:root {
  color-scheme: dark;
  --ink: #f5f2e9;
  --muted: #acb8c5;
  --canvas: #09131e;
  --panel: #102131;
  --line: #284055;
  --gold: #f3c969;
  --gold-soft: #ffe8a9;
  --danger: #ffb3a7;
  --good: #b4edce;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--canvas); scroll-behavior: smooth; }
body { margin: 0; background: radial-gradient(circle at 85% 0%, #1b3851 0, transparent 31rem), var(--canvas); color: var(--ink); }
button, textarea, select { font: inherit; }
button { cursor: pointer; }
.shell { width: min(100% - 2rem, 65rem); margin: 0 auto; padding: 1.4rem 0 3rem; }
.masthead { display: flex; align-items: center; justify-content: space-between; padding-bottom: 3.8rem; }
.brand { color: var(--ink); display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; font-weight: 700; letter-spacing: .02em; }
.brand b { color: var(--gold); }
.brand-mark { display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); font-family: Georgia, serif; font-size: 1.2rem; }
.badge, .status { border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .78rem; letter-spacing: .08em; padding: .42rem .72rem; text-transform: uppercase; }
.intro { max-width: 46rem; margin-bottom: 2.5rem; }
.eyebrow, .kicker { color: var(--gold); font-size: .75rem; font-weight: 750; letter-spacing: .14em; margin: 0 0 .7rem; }
.kicker { margin-bottom: .35rem; }
h1, h2, p { margin-top: 0; }
h1 { font-family: Georgia, "Yu Mincho", serif; font-size: clamp(2.65rem, 7vw, 5.4rem); letter-spacing: -.06em; line-height: .96; margin-bottom: 1.2rem; }
h1 em { color: var(--gold); font-style: normal; }
.lead { color: var(--muted); font-size: clamp(1rem, 2vw, 1.17rem); line-height: 1.75; max-width: 42rem; }
.guide-card, .result-panel { border: 1px solid var(--line); border-radius: 1rem; background: linear-gradient(145deg, rgba(20, 42, 60, .94), rgba(12, 27, 39, .95)); box-shadow: 0 1rem 4rem rgba(0, 0, 0, .15); }
.guide-card { padding: clamp(1.1rem, 4vw, 2rem); }
.card-heading, .result-header { align-items: flex-start; display: flex; gap: 1rem; justify-content: space-between; }
h2 { font-size: clamp(1.25rem, 3vw, 1.55rem); letter-spacing: -.035em; margin-bottom: 1.25rem; }
.language-label { color: var(--muted); display: grid; font-size: .78rem; gap: .3rem; min-width: 7rem; }
select { background: #0b1926; border: 1px solid var(--line); border-radius: .45rem; color: var(--ink); padding: .45rem; }
textarea { background: #081621; border: 1px solid #38556d; border-radius: .7rem; caret-color: var(--gold); color: var(--ink); display: block; font-size: 1rem; line-height: 1.55; padding: .9rem; resize: vertical; width: 100%; }
textarea:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(243, 201, 105, .15); outline: none; }
.form-footer { align-items: center; display: flex; gap: 1rem; justify-content: space-between; margin-top: .85rem; }
.form-footer p { color: var(--muted); font-size: .82rem; line-height: 1.5; margin: 0; max-width: 33rem; }
#search-button { background: var(--gold); border: 1px solid var(--gold); border-radius: .55rem; color: #1b1a16; font-weight: 800; padding: .7rem 1rem; white-space: nowrap; }
#search-button:hover { background: var(--gold-soft); }
#search-button:disabled { cursor: wait; opacity: .65; }
.examples { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.25rem; }
.examples button { background: transparent; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .85rem; padding: .42rem .7rem; }
.examples button:hover { border-color: var(--gold); color: var(--gold); }
.result-panel { margin-top: 1rem; padding: clamp(1.1rem, 4vw, 2rem); }
.result-header h2 { margin-bottom: 0; }
.status { flex: 0 0 auto; margin-top: .15rem; }
.status.answered { border-color: #2a7957; color: var(--good); }
.status.error { border-color: #825553; color: var(--danger); }
.result-content { border-top: 1px solid var(--line); color: var(--muted); line-height: 1.7; margin-top: 1.25rem; padding-top: 1.25rem; }
.result-content p { margin-bottom: 1rem; }
.answer-text { color: var(--ink); font-size: 1.12rem; line-height: 1.75; }
.citation { background: rgba(7, 18, 28, .64); border-left: 3px solid var(--gold); border-radius: 0 .6rem .6rem 0; margin-top: 1.2rem; padding: 1rem 1rem 1rem 1.1rem; }
.citation h3 { color: var(--gold-soft); font-size: .95rem; margin: 0 0 .5rem; }
.citation blockquote { color: var(--ink); margin: 0 0 .85rem; }
.citation a { color: var(--gold); font-weight: 700; }
.notice { border: 1px solid #875a4f; border-radius: .6rem; color: var(--danger); padding: .9rem 1rem; }
.how { margin: 4.5rem 0 3.5rem; }
.how h2 { font-family: Georgia, "Yu Mincho", serif; font-size: clamp(2rem, 5vw, 3rem); }
.how ol { display: grid; gap: 1rem; list-style: none; margin: 0; padding: 0; }
.how li { align-items: flex-start; border-top: 1px solid var(--line); display: flex; gap: 1rem; padding-top: 1rem; }
.how li > span { color: var(--gold); font-family: Georgia, serif; font-size: 1.3rem; width: 2.5rem; }
.how strong { display: block; font-size: 1rem; margin-bottom: .25rem; }
.how p { color: var(--muted); line-height: 1.55; margin-bottom: 0; }
.scope { border-top: 1px solid var(--line); margin: 0 0 3.5rem; max-width: 52rem; padding-top: 2rem; }
.scope h2 { font-family: Georgia, "Yu Mincho", serif; font-size: clamp(1.65rem, 4vw, 2.45rem); line-height: 1.15; }
.scope p:not(.eyebrow) { color: var(--muted); line-height: 1.75; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; line-height: 1.55; padding-top: 1.25rem; }
.sr-only { clip: rect(0, 0, 0, 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
@media (max-width: 38rem) {
  .shell { width: min(100% - 1.25rem, 65rem); }
  .masthead { padding-bottom: 2.8rem; }
  .card-heading, .result-header { flex-direction: column; }
  .language-label { width: 100%; }
  .form-footer { align-items: flex-start; flex-direction: column; }
  #search-button { width: 100%; }
  .status { margin: 0; }
}
