:root {
  --ink: #10251d;
  --muted: #607168;
  --forest: #143c2d;
  --forest-2: #1f5a43;
  --sage: #d8e3d5;
  --cream: #f7f2e8;
  --paper: #fffdf8;
  --orange: #ef8f3c;
  --gold: #f6b65b;
  --red: #b84a3d;
  --line: rgba(16, 37, 29, 0.14);
  --shadow: 0 22px 70px rgba(24, 52, 41, 0.13);
  --radius: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 5%, rgba(246, 182, 91, .18), transparent 26rem),
    radial-gradient(circle at 93% 28%, rgba(80, 124, 96, .15), transparent 30rem),
    var(--cream);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid rgba(239, 143, 60, .55);
  outline-offset: 3px;
}
[hidden] { display: none !important; }

.grain {
  position: fixed;
  inset: 0;
  opacity: .032;
  pointer-events: none;
  z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 99; background: var(--paper); padding: .8rem 1rem; border-radius: 10px; }
.skip-link:focus { top: 1rem; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

.topbar {
  width: min(1240px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 11px 12px 11px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 12px;
  z-index: 30;
  border: 1px solid rgba(255,255,255,.54);
  background: rgba(255, 253, 248, .77);
  backdrop-filter: blur(18px);
  border-radius: 18px;
  box-shadow: 0 12px 35px rgba(21, 55, 41, .08);
}
.brand { display: flex; min-height: 44px; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--forest); }
.brand-mark svg { width: 25px; fill: none; stroke: var(--gold); stroke-width: 2.7; stroke-linecap: round; }
.brand strong { display: block; font-size: 1.08rem; letter-spacing: -.03em; }
.brand small { display: block; margin-top: -2px; color: var(--muted); font-size: .69rem; letter-spacing: .02em; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; color: #456157; font-size: .78rem; font-weight: 700; padding: 9px 12px; }
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: #49a267; box-shadow: 0 0 0 5px rgba(73, 162, 103, .12); }

.button { border: 0; border-radius: 13px; min-height: 44px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; font-weight: 800; letter-spacing: -.01em; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button-primary { background: var(--forest); color: white; box-shadow: 0 12px 25px rgba(20, 60, 45, .22); }
.button-primary:hover { background: #0f3225; box-shadow: 0 16px 32px rgba(20, 60, 45, .28); }
.button-secondary { background: var(--sage); color: var(--forest); }
.button-ghost { background: rgba(20,60,45,.06); color: var(--forest); }
.button-large { width: 100%; min-height: 58px; border-radius: 16px; padding-inline: 22px; justify-content: space-between; font-size: 1rem; }
.button-icon { font-size: .72rem; }

.hero { min-height: 670px; padding: 95px 0 70px; display: grid; grid-template-columns: 1.04fr .96fr; align-items: center; gap: 68px; }
.hero-copy { position: relative; z-index: 1; }
.eyebrow { margin: 0 0 14px; color: var(--forest-2); font-size: .72rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.hero h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(3rem, 5.5vw, 5.7rem); line-height: .98; letter-spacing: -.055em; font-weight: 500; }
.hero h1 em { display: inline-block; color: var(--forest-2); font-weight: 500; }
.hero-lead { max-width: 640px; margin: 26px 0; color: #53665d; font-size: clamp(1.05rem, 1.7vw, 1.25rem); line-height: 1.65; }
.proof-row { display: flex; flex-wrap: wrap; gap: 10px; }
.proof-row span { border: 1px solid var(--line); background: rgba(255,255,255,.48); padding: 9px 13px; border-radius: 999px; color: #4c6258; font-size: .78rem; font-weight: 800; }

.hero-visual { perspective: 1200px; }
.visual-card { overflow: hidden; border-radius: 32px; background: var(--forest); color: white; box-shadow: 0 35px 90px rgba(20,60,45,.26); transform: rotateY(-3deg) rotateX(1deg); border: 1px solid rgba(255,255,255,.13); }
.visual-header { padding: 20px 22px; display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: .83rem; }
.mini-tag { padding: 7px 10px; border-radius: 999px; background: rgba(246,182,91,.16); color: var(--gold); border: 1px solid rgba(246,182,91,.32); font-size: .7rem; }
.route-map { height: 310px; position: relative; overflow: hidden; margin: 0 14px; border-radius: 23px; background: #e9ecdd; }
.map-grid { position: absolute; inset: 0; opacity: .46; background-image: linear-gradient(rgba(20,60,45,.1) 1px, transparent 1px), linear-gradient(90deg, rgba(20,60,45,.1) 1px, transparent 1px); background-size: 42px 42px; transform: rotate(-8deg) scale(1.2); }
.route-map::before, .route-map::after { content: ""; position: absolute; border-radius: 50%; background: rgba(111,150,112,.22); filter: blur(2px); }
.route-map::before { width: 190px; height: 130px; left: -50px; top: 28px; }
.route-map::after { width: 220px; height: 160px; right: -40px; bottom: -40px; }
.route-line { position: absolute; inset: 18px 12px; width: calc(100% - 24px); height: calc(100% - 36px); fill: none; stroke: var(--orange); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 8 10; animation: route 12s linear infinite; }
@keyframes route { to { stroke-dashoffset: -180; } }
.map-node { position: absolute; z-index: 2; display: grid; justify-items: center; gap: 4px; font-size: .68rem; color: var(--forest); font-weight: 900; }
.map-node b { width: 36px; height: 36px; border-radius: 50% 50% 50% 8px; transform: rotate(-45deg); background: var(--forest); color: white; display: grid; place-items: center; box-shadow: 0 8px 18px rgba(20,60,45,.22); }
.map-node b::first-letter { transform: rotate(45deg); }
.map-node span { padding: 4px 7px; border-radius: 8px; background: rgba(255,255,255,.76); }
.origin { left: 48px; bottom: 44px; }
.destination { right: 24px; top: 34px; }
.destination b { background: var(--orange); }
.crop-orb { position: absolute; z-index: 2; left: 49%; top: 44%; transform: translate(-50%,-50%); width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); color: var(--forest); box-shadow: 0 16px 35px rgba(20,60,45,.18); border: 7px solid rgba(255,255,255,.6); }
.crop-orb span { font-size: 2rem; line-height: 1; }
.crop-orb small { font-weight: 900; margin-top: -16px; }
.visual-total { padding: 22px; display: flex; justify-content: space-between; align-items: end; }
.visual-total small { display: block; opacity: .65; font-size: .73rem; }
.visual-total strong { display: block; font-family: Georgia, serif; font-size: 2rem; font-weight: 500; }
.uplift-chip { background: #e7f0dd; color: #264b35; padding: 9px 11px; border-radius: 10px; font-size: .75rem; font-weight: 900; }

.decision-zone { padding: 65px 0 80px; display: grid; grid-template-columns: .93fr 1.07fr; gap: 24px; align-items: start; }
.input-panel, .receipt-panel { border-radius: var(--radius); border: 1px solid rgba(20,60,45,.11); background: rgba(255,253,248,.78); box-shadow: var(--shadow); }
.input-panel { padding: 34px; }
.receipt-panel { min-height: 720px; padding: 18px; background: var(--forest); color: white; position: sticky; top: 100px; }
.section-heading { max-width: 760px; margin-bottom: 30px; }
.section-heading.compact { margin-bottom: 24px; }
.section-heading h2 { margin: 0 0 12px; font-family: Georgia, serif; font-weight: 500; letter-spacing: -.04em; line-height: 1.07; font-size: clamp(2rem, 4vw, 3.7rem); }
.section-heading.compact h2 { font-size: clamp(1.8rem, 3.1vw, 2.8rem); }
.section-heading p:last-child { margin: 0; color: var(--muted); font-size: .98rem; }

.voice-box { padding: 16px; border: 1px solid var(--line); border-radius: 19px; background: #f1eee4; }
.voice-button { width: 100%; min-height: 44px; border: 0; padding: 0; background: transparent; display: flex; align-items: center; gap: 13px; text-align: left; cursor: pointer; }
.voice-button strong, .voice-button small { display: block; }
.voice-button small { color: var(--muted); font-size: .73rem; }
.mic-ring { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--forest); color: var(--gold); box-shadow: 0 0 0 7px rgba(20,60,45,.08); }
.mic-ring span { transform: scale(.6); }
.voice-button.listening .mic-ring { animation: pulse 1.2s ease infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 14px rgba(239,143,60,.14); background: var(--orange); } }
#transcript { width: 100%; resize: vertical; margin-top: 14px; border: 0; border-radius: 13px; padding: 13px 14px; background: rgba(255,255,255,.78); color: var(--ink); line-height: 1.5; }
.text-action { min-height: 44px; border: 0; padding: 10px 0 0; background: transparent; color: var(--forest-2); font-weight: 900; font-size: .78rem; cursor: pointer; }
.microcopy { margin: 7px 0 0; color: #77867f; font-size: .69rem; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.field-grid label > span { display: block; margin-bottom: 7px; color: #51635b; font-size: .75rem; font-weight: 900; }
.input-with-unit { height: 50px; display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--paper); border-radius: 13px; overflow: hidden; }
.input-with-unit input { min-width: 0; flex: 1; height: 100%; padding: 0 0 0 13px; border: 0; background: transparent; color: var(--ink); font-weight: 900; }
.input-with-unit b { color: var(--muted); font-size: .72rem; padding-right: 13px; white-space: nowrap; }
.field-grid select { width: 100%; height: 50px; padding: 0 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); color: var(--ink); font-weight: 800; }
.form-note { margin: 20px 0; border-left: 3px solid var(--orange); padding: 10px 0 10px 14px; }
.form-note span { color: var(--orange); font-size: .68rem; text-transform: uppercase; letter-spacing: .13em; font-weight: 900; }
.form-note p { margin: 4px 0 0; color: var(--muted); font-size: .75rem; }

.receipt-loading { min-height: 680px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 40px; color: rgba(255,255,255,.72); }
.receipt-loading strong { color: white; margin: 18px 0 6px; font-size: 1.1rem; }
.receipt-loading span { max-width: 360px; font-size: .76rem; }
.loader { display: flex; gap: 7px; }
.loader i { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); animation: load .9s ease-in-out infinite alternate; }
.loader i:nth-child(2) { animation-delay: .18s; }
.loader i:nth-child(3) { animation-delay: .36s; }
@keyframes load { to { transform: translateY(-10px); opacity: .4; } }
.receipt { background: var(--paper); color: var(--ink); border-radius: 20px; min-height: 684px; padding: 28px; position: relative; overflow: hidden; }
.receipt::after { content: ""; position: absolute; right: -90px; top: -120px; width: 260px; height: 260px; border-radius: 50%; background: rgba(246,182,91,.14); }
.receipt-topline { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.receipt-label { text-transform: uppercase; letter-spacing: .16em; font-size: .67rem; font-weight: 900; color: var(--forest-2); }
.classification { padding: 6px 9px; border-radius: 999px; color: #7b562a; background: #f7ead2; font-size: .65rem; font-weight: 900; }
.action-block { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin: 24px 0 22px; position: relative; z-index: 1; }
.recommended-label { font-size: .67rem; color: var(--orange); font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.sale-window { margin: 7px 0 0; color: var(--forest-2); font-weight: 900; }
.action-block h2 { margin: 2px 0 4px; font-family: Georgia, serif; font-size: clamp(2rem, 4vw, 3.1rem); letter-spacing: -.045em; line-height: 1; font-weight: 500; }
.action-block p:last-child { margin: 0; color: var(--muted); font-size: .75rem; }
.decision-seal { width: 78px; height: 78px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; align-content: center; background: var(--forest); color: white; border: 7px double rgba(246,182,91,.45); transform: rotate(8deg); }
.decision-seal span { font-size: .55rem; letter-spacing: .16em; }
.decision-seal b { font-size: 1.35rem; color: var(--gold); line-height: 1; }
.money-row { display: grid; grid-template-columns: 1fr 150px; gap: 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 20px 0; }
.money-main small { display: block; color: var(--muted); font-size: .72rem; }
.money-main strong { display: block; font-family: Georgia, serif; font-size: clamp(2.7rem, 5vw, 4.2rem); line-height: 1; font-weight: 500; letter-spacing: -.045em; margin: 6px 0 8px; }
.money-main span { display: inline-flex; padding: 6px 9px; border-radius: 8px; background: #e5eedf; color: #315d40; font-size: .72rem; font-weight: 900; }
.chance-card { display: grid; place-items: center; text-align: center; }
.chance-ring { --prob: 99; width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--orange) calc(var(--prob)*1%), #e5e5dc 0); position: relative; }
.chance-ring::before { content: ""; width: 65px; height: 65px; border-radius: 50%; background: var(--paper); position: absolute; }
.chance-ring span { position: relative; z-index: 1; font-size: 1.08rem; font-weight: 900; }
.chance-card p { margin: 6px 0 0; color: var(--muted); font-size: .63rem; line-height: 1.25; }
.safety-message { margin: 16px 0; display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: #f2ebdf; }
.safety-message span { color: var(--orange); }
.safety-message p { margin: 0; color: #59655f; font-size: .72rem; }
.breakdown-card { border: 1px solid var(--line); border-radius: 16px; padding: 15px; }
.breakdown-card summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; }
.breakdown-card summary::-webkit-details-marker { display: none; }
.breakdown-card summary b, .breakdown-card summary small { display: block; }
.breakdown-card summary small { margin-top: 2px; color: var(--muted); font-size: .68rem; }
.breakdown-card[open] summary { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.card-title { display: flex; align-items: center; justify-content: space-between; }
.card-title h3 { margin: 0; font-size: .85rem; }
.icon-button { width: 44px; min-width: 44px; height: 44px; flex: 0 0 44px; border: 0; border-radius: 10px; background: var(--sage); cursor: pointer; }
.breakdown-list { margin-top: 12px; display: grid; gap: 8px; }
.breakdown-item { display: grid; grid-template-columns: 1fr auto; gap: 15px; align-items: center; font-size: .72rem; color: var(--muted); }
.breakdown-item > div { display: grid; grid-template-columns: 1fr; gap: 5px; }
.breakdown-item b { color: var(--ink); }
.bar { height: 5px; border-radius: 999px; background: #e8e6de; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--forest-2); }
.breakdown-item.negative .bar i { background: var(--orange); }
.reconcile-row { display: flex; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: .76rem; }
.freshness-row { display: flex; justify-content: space-between; margin: 13px 0; color: var(--muted); font-size: .68rem; }
.receipt-actions { display: grid; grid-template-columns: 1.2fr 1fr; gap: 10px; }

.comparison-section, .evidence-section, .backtest-section, .architecture-section { padding: 105px 0; }
.comparison-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.plan-card { border-radius: 22px; padding: 24px; background: rgba(255,253,248,.78); border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(20,60,45,.08); position: relative; overflow: hidden; }
.plan-card.selected { background: var(--forest); color: white; transform: translateY(-12px); box-shadow: 0 26px 60px rgba(20,60,45,.25); }
.plan-card .plan-tag { display: inline-block; font-size: .65rem; letter-spacing: .11em; text-transform: uppercase; font-weight: 900; color: var(--orange); }
.plan-card.selected .plan-tag { color: var(--gold); }
.plan-card h3 { margin: 15px 0 2px; font-family: Georgia, serif; font-size: 1.7rem; font-weight: 500; }
.plan-card > p { margin: 0 0 22px; color: var(--muted); font-size: .75rem; }
.plan-card.selected > p { color: rgba(255,255,255,.62); }
.plan-money strong { display: block; font-family: Georgia, serif; font-size: 2.4rem; font-weight: 500; }
.plan-money small { color: var(--muted); }
.plan-card.selected .plan-money small { color: rgba(255,255,255,.58); }
.plan-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; }
.plan-stats div { padding: 11px; border-radius: 12px; background: rgba(20,60,45,.06); }
.plan-card.selected .plan-stats div { background: rgba(255,255,255,.08); }
.plan-stats small, .plan-stats b { display: block; }
.plan-stats small { font-size: .62rem; color: var(--muted); }
.plan-card.selected .plan-stats small { color: rgba(255,255,255,.58); }
.plan-stats b { margin-top: 3px; font-size: .84rem; }
.plan-ribbon { position: absolute; top: 16px; right: -35px; transform: rotate(42deg); width: 140px; text-align: center; padding: 6px 0; background: var(--gold); color: var(--forest); font-size: .6rem; font-weight: 900; }

.evidence-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: 30px; align-items: start; }
.evidence-intro { padding-top: 18px; }
.evidence-drawer { padding: 28px; border-radius: 26px; background: #102d22; color: white; box-shadow: var(--shadow); }
.evidence-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.evidence-grid div { min-height: 100px; padding: 15px; border: 1px solid rgba(255,255,255,.09); border-radius: 14px; background: rgba(255,255,255,.04); }
.evidence-grid small, .evidence-grid strong { display: block; }
.evidence-grid small { color: rgba(255,255,255,.48); font-size: .64rem; text-transform: uppercase; letter-spacing: .08em; }
.evidence-grid strong { margin-top: 9px; font-size: .88rem; }
.evidence-columns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; margin-top: 22px; }
.evidence-columns h3 { font-size: .75rem; color: var(--gold); text-transform: uppercase; letter-spacing: .1em; }
.evidence-columns ul { margin: 0; padding-left: 17px; color: rgba(255,255,255,.68); font-size: .7rem; line-height: 1.8; }
.evidence-columns dl { margin: 0; }
.evidence-columns dl div { border-bottom: 1px solid rgba(255,255,255,.08); padding: 7px 0; }
.evidence-columns dt { font-size: .58rem; color: rgba(255,255,255,.42); }
.evidence-columns dd { margin: 2px 0 0; font-size: .67rem; word-break: break-all; }

.backtest-card { border-radius: 30px; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 38px; }
.metric-strip { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 17px; overflow: hidden; }
.metric-strip div { padding: 18px; border-right: 1px solid var(--line); }
.metric-strip div:last-child { border-right: 0; }
.metric-strip strong, .metric-strip span { display: block; }
.metric-strip strong { font-family: Georgia, serif; font-size: 2rem; font-weight: 500; }
.metric-strip span { color: var(--muted); font-size: .66rem; }
.chart-wrap { height: 310px; margin: 25px 0; border-radius: 17px; background: #f1eee5; padding: 14px; }
.chart-wrap canvas { width: 100%; height: 100%; }
.claim-warning { border-left: 4px solid var(--orange); padding: 10px 14px; background: #f6eee0; }
.claim-warning span { color: var(--orange); font-size: .65rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 900; }
.claim-warning p { margin: 4px 0 0; color: var(--muted); font-size: .75rem; }

.architecture-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; gap: 12px; align-items: center; }
.arch-node { min-height: 145px; padding: 20px; border-radius: 20px; background: rgba(255,253,248,.72); border: 1px solid var(--line); }
.arch-node.featured { background: var(--forest); color: white; box-shadow: 0 20px 50px rgba(20,60,45,.2); }
.arch-node span { display: block; color: var(--orange); font-size: .63rem; font-weight: 900; }
.arch-node strong { display: block; margin: 24px 0 4px; font-size: 1rem; }
.arch-node small { color: var(--muted); font-size: .67rem; }
.arch-node.featured small { color: rgba(255,255,255,.58); }
.architecture-flow > i { color: var(--orange); font-style: normal; font-size: 1.4rem; }
.fallback-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 18px; }
.fallback-row span { padding: 10px; border-radius: 10px; text-align: center; background: rgba(20,60,45,.06); color: var(--muted); font-size: .65rem; font-weight: 800; }

.footer { margin-top: 40px; padding: 38px 0 50px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 30px; }
.footer strong { font-family: Georgia, serif; font-size: 1.8rem; font-weight: 500; }
.footer p { margin: 4px 0 0; color: var(--muted); font-size: .75rem; }
.footer div:last-child { display: flex; align-items: flex-end; flex-direction: column; color: var(--muted); font-size: .68rem; }

.judge-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(8,20,15,.82); backdrop-filter: blur(18px); padding: 28px; }
.judge-shell { width: min(1000px, 100%); height: min(680px, calc(100vh - 56px)); margin: auto; border-radius: 30px; background: var(--forest); color: white; overflow: hidden; display: grid; grid-template-rows: auto 5px 1fr auto; box-shadow: 0 50px 130px rgba(0,0,0,.45); }
.judge-top, .judge-bottom { padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; }
.judge-top span { font-size: .67rem; letter-spacing: .16em; color: var(--gold); font-weight: 900; }
.judge-top button, .judge-bottom button { border: 0; min-width: 44px; min-height: 44px; border-radius: 11px; background: rgba(255,255,255,.08); color: white; font-size: .78rem; font-weight: 800; cursor: pointer; }
.judge-progress { background: rgba(255,255,255,.08); }
.judge-progress i { display: block; width: 0; height: 100%; background: var(--gold); transition: width .25s linear; }
.judge-content { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: 45px; padding: 45px; }
.judge-step { color: var(--gold); font-size: .72rem; letter-spacing: .13em; font-weight: 900; }
.judge-content h2 { margin: 14px 0; font-family: Georgia, serif; font-size: clamp(2.8rem, 6vw, 5.5rem); line-height: .95; letter-spacing: -.05em; font-weight: 500; }
.judge-content p { max-width: 480px; color: rgba(255,255,255,.62); font-size: 1rem; }
.judge-visual { min-height: 360px; border-radius: 25px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.09); display: grid; place-items: center; padding: 28px; overflow: hidden; }
.judge-bottom { color: rgba(255,255,255,.6); font-variant-numeric: tabular-nums; }
.judge-stat { width: 100%; display: grid; gap: 12px; }
.judge-stat div { display: flex; justify-content: space-between; padding: 18px; border-radius: 15px; background: rgba(255,255,255,.06); }
.judge-stat strong { color: var(--gold); }
.judge-route { text-align: center; }
.judge-route b { display: block; font-family: Georgia, serif; font-size: 3.6rem; font-weight: 500; color: var(--gold); }
.judge-route span { color: rgba(255,255,255,.55); }
.judge-code { width: 100%; color: #d5e8d9; font: 700 .74rem/1.8 ui-monospace, SFMono-Regular, Menlo, monospace; }
.judge-code i { color: var(--gold); font-style: normal; }

.toast { position: fixed; right: 22px; bottom: 22px; z-index: 120; max-width: 360px; padding: 13px 16px; border-radius: 13px; background: #102d22; color: white; box-shadow: 0 16px 42px rgba(0,0,0,.25); font-size: .78rem; font-weight: 800; opacity: 0; transform: translateY(14px); pointer-events: none; transition: .25s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.reveal { opacity: 1; transform: none; }
.reveal.visible { animation: reveal-in .7s ease both; }
@keyframes reveal-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 50px; padding-top: 75px; }
  .hero-copy { max-width: 800px; }
  .hero-visual { max-width: 650px; width: 100%; margin-inline: auto; }
  .decision-zone { grid-template-columns: 1fr; }
  .receipt-panel { position: relative; top: 0; }
  .evidence-section { grid-template-columns: 1fr; }
  .comparison-grid { grid-template-columns: 1fr; }
  .plan-card.selected { transform: none; }
  .architecture-flow { grid-template-columns: 1fr; }
  .architecture-flow > i { transform: rotate(90deg); text-align: center; }
  .fallback-row { grid-template-columns: 1fr 1fr; }
  .judge-content { grid-template-columns: 1fr 1fr; padding: 28px; }
}

@media (max-width: 680px) {
  .shell { width: min(100% - 24px, 1180px); }
  .topbar { width: calc(100% - 18px); top: 7px; margin-top: 7px; }
  .brand small, .status-pill { display: none; }
  .top-actions .button { min-height: 44px; padding-inline: 12px; font-size: .72rem; }
  .hero { min-height: 0; padding: 65px 0 45px; }
  .hero h1 { font-size: clamp(3.1rem, 15vw, 4.8rem); }
  .hero-lead { font-size: 1rem; }
  .visual-card { transform: none; }
  .route-map { height: 250px; }
  .visual-total { align-items: flex-start; gap: 12px; flex-direction: column; }
  .decision-zone { padding-top: 35px; }
  .input-panel { padding: 24px 18px; }
  .receipt-panel { padding: 9px; min-height: 650px; }
  .receipt { padding: 22px 17px; }
  .field-grid { grid-template-columns: 1fr; }
  .action-block { display: grid; grid-template-columns: minmax(0, 1fr) 54px; gap: 10px; align-items: start; }
  .action-block h2 { font-size: 1.9rem; overflow-wrap: normal; word-break: normal; }
  .decision-seal { width: 54px; height: 54px; border-width: 4px; }
  .decision-seal b { font-size: 1rem; }
  .money-row { grid-template-columns: 1fr 105px; }
  .money-main strong { font-size: 3rem; }
  .chance-ring { width: 76px; height: 76px; }
  .chance-ring::before { width: 57px; height: 57px; }
  .receipt-actions { grid-template-columns: 1fr; }
  .comparison-section, .evidence-section, .backtest-section, .architecture-section { padding: 70px 0; }
  .evidence-grid, .evidence-columns, .metric-strip { grid-template-columns: 1fr; }
  .metric-strip div { border-right: 0; border-bottom: 1px solid var(--line); }
  .metric-strip div:last-child { border-bottom: 0; }
  .backtest-card { padding: 25px 17px; }
  .fallback-row { grid-template-columns: 1fr; }
  .footer { flex-direction: column; }
  .footer div:last-child { align-items: flex-start; }
  .judge-overlay { padding: 8px; }
  .judge-shell { height: calc(100vh - 16px); border-radius: 20px; }
  .judge-content { grid-template-columns: 1fr; overflow: auto; padding: 26px 20px; }
  .judge-content h2 { font-size: 3.1rem; }
  .judge-visual { min-height: 240px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.receipt-error {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px;
  text-align: center;
  border: 1px solid rgba(151, 54, 54, .22);
  border-radius: 22px;
  background: rgba(255, 244, 240, .9);
  color: #7f2f2f;
}

.receipt-error[hidden], .offline-warning[hidden] { display: none; }
.receipt-error span { max-width: 420px; color: #6f4a45; }
.offline-warning {
  margin: 0 0 18px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff2cf;
  color: #634a12;
  font-size: .75rem;
  font-weight: 800;
}

.noscript-message {
  margin: 12px auto;
  width: min(1180px, calc(100% - 24px));
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  border: 1px solid #d5a34b;
  border-radius: 14px;
  background: #fff4d5;
  color: #503b11;
}
.noscript-message strong, .noscript-message span { display: block; }

.language-control select {
  min-width: 52px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 8px;
  background: var(--paper);
  color: var(--forest);
  font-size: .75rem;
  font-weight: 900;
}

.bad-case {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}
.bad-case small, .bad-case strong { display: block; }
.bad-case small { color: var(--muted); font-size: .6rem; }
.bad-case strong { margin-top: 2px; color: var(--forest); font-size: .92rem; }

.evidence-proof {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}
.evidence-proof > div {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  background: rgba(255,255,255,.04);
}
.evidence-proof h3 { margin-top: 0; color: var(--gold); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.evidence-proof p, .evidence-proof code { color: rgba(255,255,255,.7); font-size: .68rem; line-height: 1.6; overflow-wrap: anywhere; }
.evidence-proof code { display: block; padding: 9px; border-radius: 9px; background: rgba(0,0,0,.2); color: white; }
.risk-proof-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.risk-proof-row div { padding: 9px; border-radius: 10px; background: rgba(0,0,0,.16); }
.risk-proof-row span, .risk-proof-row strong { display: block; }
.risk-proof-row span { color: rgba(255,255,255,.48); font-size: .58rem; }
.risk-proof-row strong { margin-top: 3px; font-size: .78rem; }

.judge-bottom { gap: 8px; justify-content: center; }
.judge-bottom span { min-width: 50px; text-align: center; }

@media (max-width: 920px) {
  .evidence-proof { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .language-control select { min-width: 46px; padding-inline: 5px; }
  .judge-bottom { padding: 12px; flex-wrap: wrap; }
  .judge-bottom button { flex: 1 1 54px; }
}
