:root {
  --ink: #211b2e;
  --muted: #625c6d;
  --accent: #6240a6;
  --surface: #f8f6fc;
  --line: #e3dfeb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #fff;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
button { border: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #9570cc; outline-offset: 4px; }
#screen-title:focus { outline: none; }
.skip-link { position: fixed; top: -80px; left: 20px; padding: 12px; background: var(--accent); color: #fff; z-index: 3; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.masthead { height: 76px; border-bottom: 1px solid #efecf3; padding: 0 38px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 650; letter-spacing: 1.5px; }
.brand strong, .brand-mark > span { color: var(--accent); }
.brand-mark { font-size: 27px; letter-spacing: -2px; width: 39px; height: 39px; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; justify-content: center; padding-right: 2px; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.prepared-badge { font-size: 13px; color: var(--muted); }
.page { max-width: 860px; margin: 0 auto; padding: 32px 32px 20px; }
.step-meta { display: flex; justify-content: space-between; gap: 18px; font-size: 14px; line-height: 1.5; color: var(--muted); }
#step-name { color: var(--accent); font-weight: 550; }
.progress-track { height: 3px; background: #ede8f3; border-radius: 3px; margin: 10px 0 28px; overflow: hidden; }
#step-progress { display: block; height: 100%; background: var(--accent); }
.progress-1 { width: 11.111%; } .progress-2 { width: 22.222%; } .progress-3 { width: 33.333%; } .progress-4 { width: 44.444%; }
.progress-5 { width: 55.556%; } .progress-6 { width: 66.667%; } .progress-7 { width: 77.778%; } .progress-8 { width: 88.889%; } .progress-9 { width: 100%; }
h1 { font-size: clamp(30px, 4vw, 40px); font-weight: 620; line-height: 1.17; letter-spacing: -1.2px; margin: 0; }
.subtitle { font-size: 18px; color: var(--muted); line-height: 1.5; margin: 12px 0 28px; }
.screen { min-height: 300px; }
.field-label { display: block; font-size: 16px; font-weight: 600; margin-bottom: 10px; }
input[type="text"], input:not([type]), select, textarea { border: 1px solid #d3cadf; border-radius: 9px; padding: 13px 15px; width: 100%; color: var(--ink); background: #fff; font-size: 18px; line-height: 1.5; }
#search-area { height: 54px; }
fieldset { border: 0; padding: 0; margin: 22px 0 0; }
.side-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.side-options label { position: relative; cursor: pointer; }
.side-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.side-options span { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 54px; padding: 13px; border: 1px solid var(--line); border-radius: 9px; font-size: 18px; }
.side-options span::before { content: ''; width: 14px; height: 14px; border: 1px solid #b9accb; border-radius: 50%; }
.side-options input:checked + span { background: #f4effb; border-color: var(--accent); color: var(--accent); }
.side-options input:checked + span::before { border: 4px solid var(--accent); background: #fff; }
.side-options input:focus-visible + span { outline: 3px solid #9570cc; outline-offset: 3px; }
.search-options { margin-top: 16px; }
.search-options summary { display: flex; justify-content: space-between; padding: 10px 0; min-height: 44px; font-size: 16px; color: var(--muted); }
summary::-webkit-details-marker { display: none; }
.search-options summary::after { content: '+'; margin-left: 12px; color: var(--accent); }
.search-options[open] summary::after { content: '−'; }
#date-summary { margin-left: auto; }
.search-options > label { display: block; margin: 14px 0 8px; font-size: 16px; }
.navigation { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.primary-button, .secondary-button, .back-button, .text-button { min-height: 48px; border-radius: 8px; padding: 12px 18px; font-size: 16px; font-weight: 550; }
.primary-button { display: flex; align-items: center; justify-content: space-between; gap: 28px; color: #fff; background: var(--accent); }
.primary-button:hover { background: #4e2d8d; }
.primary-button:disabled { opacity: .45; cursor: not-allowed; }
.secondary-button { background: #fff; border: 1px solid #cbbfda; color: var(--accent); white-space: nowrap; }
.secondary-button:hover, .text-button:hover, .back-button:hover { background: #f4effb; }
.back-button, .text-button { background: transparent; color: var(--accent); }
.back-button { color: var(--muted); }
.resume-button, .restart-button { display: block; margin: 14px auto 0; }
.opportunity-list { display: grid; gap: 18px; }
.opportunity-card { display: flex; align-items: center; gap: 20px; border: 1px solid var(--line); padding: 24px; border-radius: 14px; }
.card-number { color: #9f8ab7; font-size: 16px; align-self: flex-start; padding-top: 3px; }
.opportunity-card > div { flex: 1; min-width: 0; }
.opportunity-card h2 { font-size: 22px; line-height: 1.3; letter-spacing: -.35px; font-weight: 600; margin: 0; }
.card-status { font-size: 16px; line-height: 1.5; color: var(--muted); margin: 9px 0 0; }
.source-card { padding: 26px 30px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.eyebrow { margin: 0 0 15px; font-size: 12px; font-weight: 650; letter-spacing: 1.3px; color: var(--accent); }
.source-summary { margin: 0; font-size: 25px; line-height: 1.5; font-weight: 450; letter-spacing: -.2px; }
.source-details { margin-top: 16px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.source-details summary { padding: 8px 0; min-height: 40px; color: var(--accent); }
.source-details summary::after { content: ' +'; }
.source-details[open] summary::after { content: ' −'; }
.source-details blockquote { margin: 12px 0; padding-left: 18px; border-left: 2px solid var(--line); white-space: pre-line; }
.source-details a { color: var(--accent); text-underline-offset: 3px; }
#transition-panel { min-height: 300px; }
.loading-content { min-height: 224px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
#loading-message { font-size: 23px; color: var(--muted); margin: 0; line-height: 1.5; }
#loading-message:focus { outline: none; }
.loading-art { width: min(360px, 100%); }
.load-scene { display: none; width: 100%; height: auto; overflow: visible; }
#transition-panel[data-animation="opportunities"] { --load-duration: 2400ms; }
#transition-panel[data-animation="analysis"] { --load-duration: 1500ms; }
#transition-panel[data-animation="note"] { --load-duration: 1000ms; }
#transition-panel[data-animation="opportunities"] .load-opportunities,
#transition-panel[data-animation="analysis"] .load-analysis,
#transition-panel[data-animation="note"] .load-note { display: block; }
#transition-panel:not([data-animation="quiet"]) .loading-content { animation: load-envelope var(--load-duration) ease both; }
#transition-panel[data-animation="quiet"] .loading-art { display: none; }
#transition-panel[data-animation="quiet"] .loading-content { animation: load-reveal 180ms ease-out both; }
.screen-arriving { animation: load-reveal 180ms ease-out both; }
.load-paper { fill: #fff; stroke: #cbbcdf; stroke-width: 1.5; }
.load-ink, .load-highlight, .load-connection, .load-pulse, .load-scan { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.load-ink { stroke: #d9d0e6; stroke-width: 3; }
.load-highlight { stroke: var(--accent); stroke-width: 3; }
.load-halo { fill: #f1ebfa; transform-origin: 180px 91px; animation: load-breathe 1200ms ease-in-out 2; }
.load-connection { stroke: #ddd2eb; stroke-width: 1.5; }
.load-node { fill: var(--accent); stroke: #e8def5; stroke-width: 6; }
.load-network { animation: load-network 2400ms ease both; }
.load-pulse { stroke: #9670cf; stroke-width: 3; stroke-dasharray: 14 86; stroke-dashoffset: 100; animation: load-travel 850ms ease-in-out 2 both; }
.load-pulse-left { animation-delay: 240ms; }
.load-pulse-right { animation-delay: 390ms; }
.load-pulse-top { animation-delay: 540ms; }
.load-source { transform-box: fill-box; transform-origin: center; animation: load-gather 2400ms cubic-bezier(.22,.7,.2,1) both; }
.load-source-left { --gather-x: 122px; --gather-y: -4px; }
.load-source-right { --gather-x: -122px; --gather-y: -4px; animation-name: load-gather-late; }
.load-source-top { --gather-x: 0px; --gather-y: 58px; animation-name: load-gather-late; }
.load-result { transform-box: fill-box; transform-origin: center; animation: load-result 2400ms cubic-bezier(.22,.7,.2,1) both; }
.load-result-second { animation-name: load-result-late; }
.load-result-dot { fill: #a087c4; }
.load-scan { stroke: #a47bd7; stroke-width: 5; stroke-dasharray: 100; animation: load-scan 1500ms ease both; }
.load-analysis-rows { animation: load-rows 1500ms cubic-bezier(.22,.7,.2,1) both; }
.load-note-paper { animation: load-reveal 220ms ease-out both; }
.load-note-heading, .load-note-lines { stroke-dasharray: 100; animation: load-write 750ms ease-out both; }
.load-note-lines { animation-delay: 140ms; }
.load-note-seal { fill: var(--accent); animation: load-seal 1000ms ease both; }
.load-note-check { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; animation: load-seal 1000ms ease both; }
@keyframes load-reveal { from { opacity: 0; } to { opacity: 1; } }
@keyframes load-envelope { 0% { opacity: 0; } 12%, 92% { opacity: 1; } 100% { opacity: 0; } }
@keyframes load-breathe { 0%, 100% { transform: scale(.8); opacity: .6; } 50% { transform: scale(1.15); opacity: 1; } }
@keyframes load-network { 0% { opacity: 0; } 20%, 62% { opacity: 1; } 76%, 100% { opacity: 0; } }
@keyframes load-travel { 0% { stroke-dashoffset: 100; opacity: 0; } 25% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes load-gather {
  0% { opacity: 0; transform: translateY(8px) scale(.94); }
  15%, 48% { opacity: 1; transform: translate(0, 0) scale(1); }
  73%, 100% { opacity: 0; transform: translate(var(--gather-x), var(--gather-y)) scale(.35); }
}
@keyframes load-gather-late {
  0%, 7% { opacity: 0; transform: translateY(8px) scale(.94); }
  22%, 53% { opacity: 1; transform: translate(0, 0) scale(1); }
  76%, 100% { opacity: 0; transform: translate(var(--gather-x), var(--gather-y)) scale(.35); }
}
@keyframes load-result {
  0%, 68% { opacity: 0; transform: translateY(10px) scale(.94); }
  86%, 100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes load-result-late {
  0%, 73% { opacity: 0; transform: translateY(10px) scale(.94); }
  91%, 100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes load-scan { 0%, 15% { stroke-dashoffset: 100; opacity: 0; } 35%, 55% { opacity: .8; } 65% { stroke-dashoffset: 0; opacity: .8; } 85%, 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes load-rows { 0%, 45% { opacity: 0; transform: translateX(12px); } 80%, 100% { opacity: 1; transform: translateX(0); } }
@keyframes load-write { from { stroke-dashoffset: 100; opacity: 0; } 20% { opacity: 1; } to { stroke-dashoffset: 0; opacity: 1; } }
@keyframes load-seal { 0%, 68% { opacity: 0; } 88%, 100% { opacity: 1; } }
.small-copy { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 14px 0 0; }
.source-card .small-copy { margin-top: 20px; }
.large-copy { font-size: 25px; line-height: 1.5; margin: 0 0 28px; letter-spacing: -.25px; }
.fact-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; border-top: 1px solid var(--line); padding-top: 24px; margin: 0; }
dt { color: var(--muted); font-size: 15px; margin-bottom: 8px; }
dd { margin: 0; font-size: 18px; line-height: 1.5; }
.unknown-list { list-style: none; margin: 0; padding: 0; }
.unknown-list li { padding: 20px 0 20px 37px; font-size: 23px; line-height: 1.5; border-bottom: 1px solid var(--line); position: relative; }
.unknown-list li::before { content: '?'; position: absolute; left: 0; top: 25px; font-size: 17px; color: var(--accent); width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; background: #f2ecfa; border-radius: 50%; }
.review-checkbox { display: flex; align-items: center; gap: 12px; min-height: 54px; font-size: 18px; line-height: 1.5; padding: 16px; background: var(--surface); border-radius: 9px; cursor: pointer; }
.review-checkbox input { width: 20px; height: 20px; flex: none; accent-color: var(--accent); }
.decision-alternatives { display: flex; gap: 12px; margin-top: 24px; }
textarea { resize: vertical; }
#verification-question { font-size: 23px; line-height: 1.5; padding: 20px; }
#action-note { font-size: 17px; height: 270px; }
#manual-copy { margin-top: 22px; }
#edited-label { color: #755018; }
.status { border-radius: 8px; padding: 12px 15px; background: #f4effb; color: #4e2d8d; font-size: 16px; line-height: 1.5; margin: 16px 0 0; }
.page-footer { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; border-top: 1px solid #efecf3; margin-top: 30px; padding-top: 16px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.page-footer details { max-width: 300px; text-align: right; }
.page-footer summary { min-height: 32px; }
.page-footer p { font-size: 14px; }
.note-navigation { flex-wrap: wrap; }
.note-navigation .primary-button { margin-left: auto; }
.page:has(#explainer-view:not([hidden])) .subtitle { margin-bottom: 12px; }
.explain-meta { display: flex; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 13px; line-height: 1.5; }
#explainer-progress { color: var(--accent); font-weight: 600; white-space: nowrap; }
.explain-context { font-size: 14px; color: var(--muted); margin: 4px 0 0; }
#explainer-heading { font-size: 25px; line-height: 1.3; letter-spacing: -.4px; margin: 12px 0; }
#explainer-heading:focus { outline: none; }
.explain-regions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.explain-region { position: relative; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--surface); }
.explain-region:not(:last-child)::after { content: '→'; position: absolute; right: -21px; top: 50%; color: var(--accent); font-size: 19px; }
.explain-regions[data-flow="parallel"] .explain-region::after { content: none; }
.explain-region .explain-region-label { text-transform: uppercase; font-size: 10px; letter-spacing: .9px; font-weight: 600; margin: 0 0 8px; color: var(--muted); }
.explain-region .explain-responsibility { font-size: 12px; font-weight: 600; color: var(--accent); margin: 0 0 6px; }
.explain-region h3 { font-size: 18px; line-height: 1.35; margin: 0 0 8px; font-weight: 600; }
.explain-region p, .explain-region blockquote, .explain-region dd { font-size: 17px; line-height: 1.45; margin: 0 0 12px; overflow-wrap: anywhere; }
.explain-region blockquote { margin: 0 0 12px; }
.explain-region a { color: var(--accent); font-size: 14px; line-height: 1.5; text-underline-offset: 3px; }
.explain-region .explain-caption { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.explain-region p:last-child { margin-bottom: 0; }
.explain-fields { margin: 0; }
.explain-fields div { padding: 5px 0; border-top: 1px solid var(--line); }
.explain-fields dt { font-size: 12px; margin-bottom: 4px; }
.explain-fields dd { margin: 0; }
.explain-supported-field { border-left: 3px solid var(--accent); padding-left: 10px !important; }
.explain-quote mark { background: #ece2fa; color: var(--ink); box-decoration-break: clone; padding: 2px; }
.explain-card { display: block; padding: 12px; background: #fff; border-radius: 9px; }
.explain-card h3 { font-size: 18px; margin: 0; }
.explain-card .card-status { font-size: 14px; margin: 10px 0; }
.explain-note { white-space: pre-line; }
.explain-region .explain-edit-badge { display: inline-block; font-size: 12px; color: #755018; margin-top: 10px; }
.explain-takeaway { font-size: 17px; line-height: 1.5; margin: 12px 0 0; }
.explain-closing { font-size: 13px; line-height: 1.5; color: var(--muted); margin: 8px 0 0; }
.explain-navigation { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
.explain-navigation .primary-button { gap: 10px; }
@media (max-width: 700px) {
  .explain-meta { flex-direction: column; gap: 4px; }
  .explain-regions { grid-template-columns: 1fr; gap: 24px; }
  .explain-region:not(:last-child)::after { content: '↓'; right: 50%; top: auto; bottom: -24px; }
  .explain-navigation { flex-wrap: wrap; }
  .explain-navigation .primary-button { margin-left: auto; }
  .explain-region p, .explain-region blockquote, .explain-region dd { font-size: 18px; }
}
@media (max-height: 800px) and (min-width: 700px) {
  .masthead { height: 64px; }
  .page { padding-top: 22px; }
  .progress-track { margin-bottom: 20px; }
  h1 { font-size: 36px; }
  .subtitle { margin: 9px 0 22px; }
  .navigation { margin-top: 22px; padding-top: 18px; }
  .page-footer { margin-top: 22px; }
  .source-card { padding: 22px 26px; }
  .source-summary, .large-copy { font-size: 23px; }
  #action-note { height: 230px; }
  .restart-button { margin-top: 6px; }
}
@media (max-width: 600px) {
  .masthead { height: 64px; padding: 0 18px; }
  .brand > span:last-child { display: none; }
  .header-actions { gap: 7px; }
  .page { padding: 24px 20px 16px; }
  .progress-track { margin-bottom: 22px; }
  h1 { font-size: 31px; }
  .subtitle { font-size: 16px; margin-bottom: 24px; }
  .screen { min-height: 0; }
  .side-options { grid-template-columns: 1fr; gap: 10px; }
  .side-options span { justify-content: flex-start; font-size: 17px; }
  .navigation { gap: 8px; }
  .primary-button { gap: 14px; font-size: 15px; padding-left: 14px; padding-right: 14px; }
  .text-button, .back-button { padding-left: 9px; padding-right: 9px; font-size: 14px; }
  .opportunity-card { gap: 12px; padding: 20px; flex-wrap: wrap; }
  .opportunity-card > div { flex-basis: calc(100% - 44px); }
  .opportunity-card h2 { font-size: 21px; }
  .opportunity-card button { margin-left: 30px; }
  .source-card { padding: 22px; }
  .source-summary, .large-copy { font-size: 21px; }
  .fact-pair { grid-template-columns: 1fr; gap: 20px; }
  .unknown-list li { font-size: 21px; }
  .review-checkbox { font-size: 16px; }
  #verification-question { font-size: 20px; padding: 16px; }
  #action-note { height: 300px; font-size: 16px; }
  .page-footer { flex-direction: column; gap: 8px; font-size: 12px; }
  .page-footer details { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; } }
