:root {
  color-scheme: light;
  --ink: #17324d;
  --ink-soft: #42556a;
  --paper: #f7f2e8;
  --paper-deep: #eadfca;
  --white: #fffdf8;
  --rust: #a9472b;
  --rust-dark: #7e2f1d;
  --gold: #d4a947;
  --line: #d7cbb7;
  --good: #28745f;
  --warn: #9a5b18;
  --error: #a12c2c;
  font-family: "Noto Serif SC", "Songti SC", STSong, Georgia, serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 80% 0%, #f2dfb8 0, transparent 26rem), var(--paper); min-height: 100vh; }
button, textarea, input { font: inherit; }
a { color: inherit; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 9; padding: .7rem 1rem; background: var(--ink); color: white; }
.skip-link:focus { top: 1rem; }
.site-header { min-height: 4.5rem; padding: .8rem clamp(1rem, 4vw, 3.5rem); display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid color-mix(in srgb, var(--ink) 20%, transparent); }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand > span { display: grid; place-items: center; width: 2.35rem; height: 2.35rem; background: var(--ink); color: #f6d77c; border-radius: .25rem .25rem .8rem .25rem; }
.header-note { font-family: system-ui, sans-serif; color: var(--ink-soft); font-size: .9rem; }
.shell { width: min(72rem, calc(100% - 2rem)); margin-inline: auto; }
.home-main { padding-block: clamp(2rem, 6vw, 5rem); }
.intro { max-width: 46rem; margin-bottom: 2.3rem; }
.intro.compact { margin-bottom: 2rem; }
.eyebrow { margin: 0 0 .7rem; color: var(--rust); font-family: system-ui, sans-serif; font-weight: 750; letter-spacing: .12em; font-size: .82rem; }
h1 { margin: 0; font-size: clamp(2.3rem, 7vw, 5.4rem); line-height: 1.05; letter-spacing: -.04em; }
h1 span { color: var(--rust); }
.intro > p:last-child { max-width: 42rem; margin: 1.25rem 0 0; color: var(--ink-soft); font-family: system-ui, sans-serif; font-size: 1.05rem; line-height: 1.75; }
.agent-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.agent-card { position: relative; min-height: 21rem; padding: clamp(1.4rem, 4vw, 2.4rem); border: 1px solid var(--line); background: color-mix(in srgb, var(--white) 92%, transparent); text-decoration: none; box-shadow: 0 1.2rem 3rem rgba(38, 45, 51, .08); transition: transform .2s ease, border-color .2s ease; overflow: hidden; }
.agent-card:hover { transform: translateY(-4px); border-color: var(--rust); }
.agent-card:focus-visible, .button:focus-visible, textarea:focus-visible, input:focus-visible, audio:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.card-index { font: 700 .8rem/1 system-ui, sans-serif; letter-spacing: .13em; color: var(--rust); }
.card-icon { position: absolute; right: 1.1rem; top: .1rem; font-size: 9rem; line-height: 1; color: color-mix(in srgb, var(--rust) 9%, transparent); }
.agent-card h2 { position: relative; max-width: 18rem; margin: 6rem 0 .7rem; font-size: clamp(1.5rem, 3vw, 2rem); }
.agent-card p { position: relative; max-width: 28rem; min-height: 4.8rem; margin: 0; color: var(--ink-soft); font: 1rem/1.7 system-ui, sans-serif; }
.card-action { position: absolute; left: clamp(1.4rem, 4vw, 2.4rem); bottom: 1.6rem; font: 700 1rem/1 system-ui, sans-serif; color: var(--rust); }
.footer { padding: 1.5rem 1rem 2.4rem; color: var(--ink-soft); text-align: center; font: .88rem/1.6 system-ui, sans-serif; }
.panel { border: 1px solid var(--line); background: rgba(255, 253, 248, .94); padding: clamp(1.1rem, 3vw, 2rem); box-shadow: 0 1rem 2.6rem rgba(38, 45, 51, .07); }
.button { min-height: 3rem; border: 0; border-radius: .25rem; padding: .75rem 1.15rem; cursor: pointer; font-family: system-ui, sans-serif; font-weight: 750; }
.button.primary { color: white; background: var(--rust); }
.button.primary:hover { background: var(--rust-dark); }
.button.secondary { color: var(--ink); background: var(--paper-deep); }
.button:disabled { cursor: not-allowed; opacity: .45; }
.status { min-height: 1.6rem; color: var(--ink-soft); font: .95rem/1.5 system-ui, sans-serif; }
.status.error { color: var(--error); }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.result-card { border-left: .3rem solid var(--gold); background: var(--white); padding: 1rem 1.1rem; }

@media (max-width: 720px) {
  .site-header { align-items: flex-start; }
  .header-note { max-width: 10rem; text-align: right; }
  .agent-grid, .field-grid { grid-template-columns: 1fr; }
  .agent-card { min-height: 19rem; }
  .agent-card h2 { margin-top: 4.8rem; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
