:root {
  color-scheme: light;
  --ink: #202e26;
  --muted: #4b6053;
  --accent: #176146;
  --paper: #f5f7f2;
  --line: #cddacf;
  font: 100%/1.55 system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
main { max-width: 48rem; margin: auto; padding: 1.25rem 1rem 3rem; }
header { display:flex; align-items:center; justify-content:space-between; gap:.8rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.brand { font-size: 1.15rem; font-weight: 750; }
.language { display:flex; align-items:center; gap:.45rem; flex-wrap:wrap; }
.language label { font-size:.9rem; }
.intro { margin: 2rem 0 1.25rem; }
h1, h2, h3 { line-height: 1.22; margin: 0; }
h1 { max-width: 18ch; font-size: clamp(1.8rem, 5vw, 2.8rem); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.15rem; }
p { margin: .5rem 0; }
.intro p, .hint, .meta { color: var(--muted); }
.hint, .meta { font-size: .9rem; }
form, article { border: 1px solid var(--line); border-radius: .8rem; background: #fff; padding: 1rem; }
form { border-top: 4px solid var(--accent); }
label { display: block; font-weight: 700; }
.search-line { display: flex; gap: .55rem; margin-top: .4rem; }
input, button, select { font: inherit; min-height: 44px; border-radius: .5rem; padding: .55rem .75rem; }
input, select { border: 1px solid #819589; color: var(--ink); background: #fff; }
input { width: 100%; min-width: 0; }
button { font-weight: 700; cursor: pointer; }
button[type=submit] { color: white; background: var(--accent); border: 1px solid var(--accent); }
.text-button { border: 0; margin-top: .25rem; padding-inline: 0; background: transparent; color: var(--accent); text-decoration: underline; }
a { color: var(--accent); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
#results { margin-top: 1.5rem; }
#result-list { display: grid; gap: .75rem; margin-top: .75rem; }
.result-group { display: grid; gap: .75rem; }
.result-group article > h4 { margin: 0; font-size: 1.15rem; line-height: 1.22; }
.badge { display: inline-block; padding: .15rem .5rem; margin: .45rem 0 0; color: #155238; background: #e6f1e8; border-radius: .35rem; font-size: .88rem; font-weight: 700; }
.match-panel:empty { display: none; }
.match-panel { margin: .75rem 0; }
.match-panel fieldset { min-width: 0; margin: .75rem 0; border: 1px solid var(--line); border-radius: .55rem; }
.match-panel legend { font-weight: 700; }
.match-answers { display:flex; flex-wrap:wrap; gap:.4rem; }
.match-panel button { border: 1px solid var(--accent); background: #fff; color: var(--accent); }
.match-panel button[aria-pressed=true] { color: #fff; background: var(--accent); }
.sr-only { position:absolute; clip-path:inset(50%); width:1px; height:1px; overflow:hidden; white-space:nowrap; }
.freshness { color: var(--muted); font-size: .9rem; }
.freshness[data-state=unavailable], .freshness[data-state=changed] {
  padding: .45rem .65rem; color: #593900; background: #fff1cf; border-radius: .35rem;
}
summary { display: flex; align-items: center; gap: .45em; min-height: 44px; cursor: pointer; font-weight: 700; color: var(--accent); }
summary::before { content: "+"; min-width: 1ch; }
details[open] summary::before { content: "−"; }
details[open] { border-top: 1px solid var(--line); margin-top: .5rem; }
.application { margin-top: .85rem; padding-top: .85rem; border-top: 1px solid var(--line); }
.application h4, .application h5 { margin: .35rem 0; font-size: 1rem; }
.application ul, .application ol { padding-inline-start: 1.4rem; }
.application li { margin-block: .5rem; }
.prepared-answers:not([hidden]) { margin: .9rem 0; padding: .75rem; background: var(--paper); border: 1px solid var(--line); border-radius: .55rem; }
.prepared-answers dt { font-weight: 700; }
.prepared-answers dd { margin: 0 0 .45rem; min-height: 1.45em; }
.prepared-answers button { border: 1px solid var(--accent); background: #fff; color: var(--accent); }
.prepared-answers textarea { width: 100%; min-height: 5rem; font: inherit; }
@media (max-width: 420px) {
  .search-line { flex-direction: column; }
  .language { align-items: flex-start; flex-direction: column; gap: .2rem; }
}

/* Minimalistic Option C Helper Panel & Cards */
body.has-helper main { max-width: 68rem; }
.results-layout { display: grid; gap: 1rem; align-items: start; margin-top: .75rem; }
body.has-helper .results-layout { grid-template-columns: minmax(0, 1fr) minmax(320px, 1.05fr); gap: 1.25rem; }
body.has-helper #result-list { margin-top: 0; }
article.is-active { border-left: 3px solid var(--accent); }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin: .7rem 0 .4rem; }
.explain-btn { border: 1px solid #819589; background: #fff; color: var(--accent); }
.explain-btn:hover { background: #edf2ec; }
.explain-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.helper-status-line { display: flex; align-items: center; gap: .4rem; margin: .45rem 0 .75rem; font-size: .86rem; font-weight: 700; color: var(--muted); }
.helper-status-line[hidden] { display: none; }
.helper-status-dot { width: 8px; height: 8px; border-radius: 999px; flex-shrink: 0; background: var(--accent); }
.helper-status-line[data-source="cloud"] .helper-status-dot { background: #17416f; }
.helper-status-line[data-source="loading"] .helper-status-dot { background: #7a5400; }
.helper-status-line[data-source="error"] .helper-status-dot { background: #7a1c1c; }
.split-pane { position: sticky; top: 1rem; background: #fff; border: 1px solid var(--line); border-radius: .8rem; padding: 1.25rem; }
.split-pane[hidden] { display: none; }
.split-pane-header { display: flex; align-items: flex-start; justify-content: space-between; gap: .65rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
.split-pane-header .region-tag { font-size: .86rem; font-weight: 700; color: var(--muted); margin-bottom: .2rem; }
.close-sheet-btn { min-width: 44px; min-height: 44px; padding: 0; border: 1px solid transparent; background: transparent; color: var(--muted); flex-shrink: 0; }
.close-sheet-btn:hover { color: var(--ink); background: #edf2ec; }
.helper-box.is-minimal { padding-top: .25rem; }
.answer-card.is-minimal { padding-bottom: .85rem; border-bottom: 1px solid var(--line); }
.answer-question { font-size: .88rem; font-weight: 700; color: var(--muted); margin-bottom: .35rem; }
.answer-body p { margin: .45rem 0; }
.decision-reminder { margin-top: .75rem; padding-top: .65rem; border-top: 1px solid var(--line); font-size: .88rem; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.prompt-chips.is-minimal { display: flex; flex-wrap: wrap; gap: .4rem; margin: .85rem 0 .75rem; }
.prompt-chips.is-minimal .prompt-chip { min-height: 44px; padding: .35rem .75rem; border-radius: 999px; font-size: .85rem; font-weight: 600; border: 1px solid var(--line); color: var(--muted); background: transparent; }
.prompt-chips.is-minimal .prompt-chip:hover { color: var(--ink); background: #edf2ec; }
.prompt-chips.is-minimal .prompt-chip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: #edf2ec; }
.helper-question-form { border: 0; border-top: 0; border-radius: 0; padding: 0; background: transparent; margin-top: .25rem; }
.helper-form-row { display: flex; gap: .5rem; }
.helper-form-row button { color: #fff; background: var(--accent); border: 1px solid var(--accent); flex-shrink: 0; }
.privacy-note { margin: .55rem 0 0; font-size: .86rem; color: var(--muted); }
.privacy-note.alert { padding: .5rem .65rem; border-radius: .5rem; background: #fff3d4; color: #5a3c00; border: 1px solid #dfc078; font-weight: 600; }
.callout.error.is-minimal { padding: .75rem .85rem; border-radius: .5rem; background: #fdeaea; color: #7a1c1c; border: 1px solid #e4a3a3; margin-bottom: .85rem; }
.callout.error.is-minimal button { border: 1px solid #7a1c1c; background: #fff; color: #7a1c1c; }
.skeleton-group { display: grid; gap: .55rem; padding: .25rem 0; }
.skeleton-line { height: .95rem; border-radius: 6px; background: linear-gradient(90deg, #e1e8e2 25%, #eff4ef 50%, #e1e8e2 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }
.skeleton-line.short { width: 58%; }
.skeleton-line.med { width: 84%; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton-line { animation: none; } }
.sheet-backdrop { display: none; }
@media (min-width: 821px) { .sheet-grabber { display: none; } }
@media (max-width: 820px) {
  body.has-helper .results-layout { grid-template-columns: 1fr; }
  .sheet-backdrop.is-open { display: block; position: fixed; inset: 0; z-index: 20; background: rgba(16, 26, 20, .56); }
  .split-pane.is-open { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 25; max-height: 82vh; overflow-y: auto; border-radius: 1rem 1rem 0 0; box-shadow: 0 12px 32px rgba(15, 28, 21, .22); padding: 1rem 1rem 1.5rem; }
  .sheet-grabber { width: 42px; height: 5px; border-radius: 999px; background: var(--line); margin: 0 auto .65rem; }
}
@media (max-width: 480px) {
  .helper-form-row { flex-direction: column; }
}

/* Live Web Results (Ticket 10) */
.live-web-section { margin-top: 1.25rem; }
.live-web-section[hidden] { display: none; }
.live-search-trigger { border: 1px solid var(--accent); background: #fff; color: var(--accent); min-height: 44px; }
.live-search-trigger:hover { background: #edf2ec; }
.live-web-card { background: #fff; border: 1px solid var(--line); border-top: 3px solid #17416f; border-radius: .8rem; padding: 1.15rem; }
.live-web-badge { font-size: .88rem; color: var(--muted); margin: .35rem 0 .75rem; }
.live-web-sources-title { margin: .85rem 0 .35rem; font-size: .95rem; }
.live-web-sources { margin: 0 0 .75rem; padding-inline-start: 1.25rem; }
.live-web-sources li { margin: .25rem 0; }
.live-scheme-list { display: grid; gap: .75rem; margin: .5rem 0 .85rem; }
.live-scheme-item { background: #f8faf9; border: 1px solid var(--line); border-radius: .65rem; padding: .85rem 1rem; }
.live-scheme-name { margin: 0 0 .35rem; font-size: 1rem; color: var(--ink); }
.live-scheme-summary { margin: 0 0 .5rem; line-height: 1.5; }
.live-scheme-link { margin: 0; font-size: .92rem; }
.live-search-chip-frame { display: block; width: 100%; min-height: 54px; border: 0; margin: .5rem 0; background: transparent; }

/* Calm Voice Guide (1B · Soft Fading Dialogue) */
.talk-pill { border: 2px solid var(--accent); background: #edf5f0; color: var(--accent); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; white-space: nowrap; flex-shrink: 0; }
.talk-pill:hover { background: #dfece4; }
.talk-pill[aria-expanded="true"] { background: var(--accent); color: #fff; }
.voice-surface { margin-top: 1.15rem; background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: 1.25rem; box-shadow: 0 8px 24px rgba(23,33,27,.07); }
.voice-surface[hidden] { display: none; }
.voice-call-stage { display: flex; flex-direction: column; align-items: center; padding: .5rem .25rem .25rem; }
.voice-fading-dialogue { width: 100%; max-width: 34rem; margin: 0 auto 1.15rem; display: grid; gap: .55rem; padding: .75rem; border-radius: .85rem; background: linear-gradient(180deg, rgba(246,247,244,.38) 0%, #f6f7f4 45%); border: 1px solid var(--line); min-height: 150px; align-content: end; }
.voice-turn { padding: .55rem .8rem; border-radius: .7rem; font-size: .95rem; max-width: 88%; }
.voice-turn.is-old { opacity: .48; }
.voice-turn.user { justify-self: end; background: #e2eee6; color: var(--ink); }
.voice-turn.guide { justify-self: start; background: #fff; border: 1px solid var(--line); color: var(--ink); }
.voice-turn-who { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: .12rem; }
.voice-turn-text { margin: 0; }
.voice-stream-caret { display: inline-block; width: 7px; height: 1em; background: currentColor; vertical-align: -2px; margin-inline-start: 3px; opacity: .6; animation: voice-blink .8s steps(2) infinite; }
.voice-orb { width: 110px; height: 110px; border-radius: 999px; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 12px rgba(24,77,53,.11); transition: background .25s ease, transform .2s ease, box-shadow .25s ease; }
.voice-orb:hover { transform: scale(1.03); }
.voice-orb.is-user-streaming { background: var(--accent); box-shadow: 0 0 0 16px rgba(24,77,53,.16), 0 0 0 28px rgba(24,77,53,.06); animation: voice-breathe 1.8s ease-in-out infinite; }
.voice-orb.is-speaking { background: #17416f; box-shadow: 0 0 0 16px rgba(23,65,111,.15), 0 0 0 28px rgba(23,65,111,.06); animation: voice-breathe 1.5s ease-in-out infinite; }
.voice-orb.is-muted { background: #6c6454; box-shadow: 0 0 0 10px rgba(108,100,84,.12); animation: none; }
.voice-orb-svg { width: 42px; height: 42px; display: block; }
.voice-wave-bar { transform-origin: center; animation: voice-eq .9s ease-in-out infinite; }
.voice-wave-bar:nth-child(2) { animation-delay: .15s; }
.voice-wave-bar:nth-child(3) { animation-delay: .3s; }
.voice-wave-bar:nth-child(4) { animation-delay: .1s; }
.voice-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .8rem; margin-top: 1.15rem; }
.voice-ctrl-mute { min-height: 48px; padding: .5rem 1.1rem; border-radius: 999px; border: 1px solid var(--line); background: #f6f7f4; color: var(--ink); font-weight: 600; }
.voice-ctrl-mute[aria-pressed="true"] { background: #fff4d8; border-color: #d9b45a; color: #5a3c00; }
.voice-ctrl-end { min-height: 48px; padding: .5rem 1.25rem; border-radius: 999px; border: 1px solid #d99b9b; background: #fdecec; color: #8b1e1e; font-weight: 700; }
.voice-error-box { background: #fdeaea; border: 1px solid #e4a3a3; color: #7a1c1c; border-radius: .75rem; padding: .9rem 1rem; }
.voice-error-box p { margin: 0 0 .7rem; }
.voice-error-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.btn-primary-voice { min-height: 44px; padding: .45rem .95rem; border-radius: .5rem; border: 1px solid var(--accent); background: var(--accent); color: #fff; font-weight: 600; }
.btn-secondary-voice { min-height: 44px; padding: .45rem .95rem; border-radius: .5rem; border: 1px solid #7a1c1c; background: #fff; color: #7a1c1c; font-weight: 600; }
@keyframes voice-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }
@keyframes voice-eq { 0%, 100% { transform: scaleY(.55); } 50% { transform: scaleY(1.1); } }
@keyframes voice-blink { 0% { opacity: .7; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .voice-orb, .voice-wave-bar, .voice-stream-caret { animation: none !important; } }
.voice-lang-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .38rem; width: 100%; margin-bottom: .5rem; }
.voice-lang-label { font-size: .82rem; font-weight: 600; color: var(--muted, #4a5568); margin-inline-end: .15rem; }
.voice-lang-pill { min-height: 44px; padding: .35rem .78rem; border-radius: 999px; border: 1px solid var(--line, #cbd5e1); background: #fff; color: var(--ink, #1e293b); font-size: .86rem; font-weight: 500; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.voice-lang-pill:hover { border-color: var(--accent); color: var(--accent); }
.voice-lang-pill[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.voice-summary { display: grid; gap: .85rem; }
.voice-summary-status { margin: 0; font-weight: 500; color: var(--muted, #4a5568); }
.voice-summary-title { margin: 0; font-size: 1.15rem; color: var(--ink, #1e293b); }
.voice-summary-list { display: grid; gap: .75rem; }
.voice-summary-card { display: grid; gap: .45rem; padding: .9rem 1rem; border: 1px solid var(--line, #cbd5e1); border-radius: .75rem; background: #fff; }
.voice-summary-name { margin: 0; font-size: 1rem; color: var(--ink, #1e293b); }
.voice-summary-desc { margin: 0; font-size: .94rem; color: var(--ink, #1e293b); line-height: 1.45; }
.voice-summary-docs-heading { margin: .2rem 0 0; font-size: .88rem; font-weight: 600; color: var(--muted, #4a5568); }
.voice-summary-docs { margin: 0; padding-inline-start: 1.2rem; display: grid; gap: .25rem; font-size: .9rem; color: var(--ink, #1e293b); }
.voice-summary-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--accent); text-decoration: underline; justify-self: start; }
.btn-neutral-voice { min-height: 44px; padding: .45rem .95rem; border-radius: .5rem; border: 1px solid var(--line, #cbd5e1); background: #fff; color: var(--ink, #1e293b); font-weight: 600; }
.voice-summary-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .25rem; }
