:root {
  --ink: #111514;
  --ink-soft: #1b211f;
  --paper: #f2f0e9;
  --panel: #faf9f4;
  --muted: #646964;
  --faint: #92978f;
  --line: #d7d8d0;
  --oxide: #a64d2e;
  --oxide-soft: #d5ab98;
  --signal: #c8ff45;
  --positive: #2f6f58;
  --negative: #9b3f35;
  --mono: "SFMono-Regular", "Roboto Mono", "IBM Plex Mono", Consolas, monospace;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: #dfe1da; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: #dfe1da;
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.shell { width: min(1080px, 100%); min-height: 100vh; margin: 0 auto; background: var(--paper); }

.topbar {
  height: 66px;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #f7f5ee;
  background: var(--ink);
  border-bottom: 1px solid #303634;
}
.brand { display: flex; align-items: center; gap: 9px; color: inherit; text-decoration: none; }
.brand img { width: 27px; height: 27px; filter: brightness(0) invert(1); }
.brand span { font-size: 15px; font-weight: 850; letter-spacing: -0.03em; }
.brand small { padding-left: 9px; border-left: 1px solid #4d5350; color: #989e99; font: 9px/1 var(--mono); letter-spacing: 0.08em; }
.engine-state { display: flex; align-items: center; gap: 8px; color: #a9afaa; font: 9px/1 var(--mono); letter-spacing: 0.08em; }
.engine-state i { width: 8px; height: 8px; background: var(--signal); transform: skewX(-18deg); }

.hero {
  min-height: 472px;
  padding: 60px 30px 36px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 300px;
  gap: 30px;
  color: #f6f4ed;
  background:
    linear-gradient(115deg, transparent 68%, rgba(200,255,69,.035) 68%),
    var(--ink);
  border-bottom: 1px solid #303634;
}
.hero-index { color: #59605c; font: 10px/1 var(--mono); writing-mode: vertical-rl; letter-spacing: .12em; }
.hero-copy { max-width: 650px; }
.eyebrow { margin: 0 0 18px; color: var(--oxide); font: 750 10px/1.2 var(--mono); letter-spacing: .12em; }
.hero .eyebrow { color: #db8a67; }
.hero h1 {
  margin: 0;
  max-width: 670px;
  font-size: clamp(44px, 6.3vw, 72px);
  line-height: .99;
  letter-spacing: -.055em;
  font-weight: 760;
}
.hero h1 span { display: block; color: #9da39e; font-weight: 500; }
.lede { max-width: 610px; margin: 28px 0 0; color: #b6bbb7; font-size: 15px; line-height: 1.6; }
.hero-actions { display: flex; gap: 10px; margin-top: 34px; }

.button {
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  transition: transform 140ms ease, background 140ms ease;
}
.button:active { transform: translateY(1px); }
.button:disabled { cursor: not-allowed; opacity: .38; }
.button-primary { color: var(--ink); background: var(--signal); }
.button-primary:hover { background: #d4ff6a; }
.button-outline { color: #dfe2dd; background: transparent; border-color: #49504d; }
.button-outline:hover { background: #202624; }
.button-dark { color: #f6f4ed; background: var(--ink); }
.button-dark:hover { background: #242a28; }
.button-crypto { color: var(--ink); background: transparent; border-color: var(--ink); }
.button-crypto:hover { color: #f6f4ed; background: var(--ink); }
.button-crypto small { margin: 0; color: inherit; font: 8px/1 var(--mono); }
.button-crypto i { font-style: normal; }
.button-wide { width: 100%; }

.hero-ledger { align-self: end; border-top: 1px solid #404744; }
.hero-ledger div { min-height: 77px; padding: 17px 0; display: grid; grid-template-columns: 30px 1fr; border-bottom: 1px solid #404744; }
.hero-ledger span { grid-row: span 2; color: #68706b; font: 10px/1.2 var(--mono); }
.hero-ledger strong { font-size: 13px; font-weight: 650; }
.hero-ledger small { margin-top: 5px; color: #848b86; font: 9px/1.2 var(--mono); }

.trust-bar { min-height: 48px; padding: 0 30px; display: flex; align-items: center; justify-content: center; gap: 18px; color: #777c77; border-bottom: 1px solid var(--line); font: 8px/1 var(--mono); letter-spacing: .08em; }
.trust-bar i { width: 3px; height: 3px; background: var(--oxide); transform: skewX(-18deg); }

.resource-strip { min-height: 92px; padding: 20px 30px; display: flex; align-items: center; justify-content: space-between; gap: 26px; color: #f3f1ea; background: var(--oxide); }
.resource-strip div { display: flex; flex-direction: column; gap: 6px; }
.resource-strip div span { color: #e9c1b0; font: 750 8px/1 var(--mono); letter-spacing: .1em; }
.resource-strip strong { font-size: 16px; line-height: 1.25; }
.resource-strip > a { min-width: 255px; min-height: 46px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; color: var(--ink); background: var(--paper); border: 1px solid rgba(17,21,20,.2); text-decoration: none; font-size: 11px; font-weight: 750; }

.panel, .result-panel, .method { padding: 58px 42px; border-bottom: 1px solid var(--line); }
.panel { background: var(--panel); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; margin-bottom: 30px; }
.section-heading h2, .method h2 { margin: 0; max-width: 760px; font-size: clamp(32px, 4.8vw, 50px); line-height: 1.03; letter-spacing: -.045em; font-weight: 720; }
.section-heading > div > p:last-child { max-width: 560px; margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.section-heading.compact { margin-bottom: 24px; }
.section-heading.compact h2 { font-size: 36px; }
.text-button { padding: 3px 0; color: var(--muted); background: none; border: 0; border-bottom: 1px solid #aeb1aa; cursor: pointer; font: 10px/1.3 var(--mono); text-transform: uppercase; }

.dropzone { min-height: 116px; padding: 22px; display: grid; grid-template-columns: 62px 1fr auto; align-items: center; gap: 20px; border: 1px solid #b9bcb4; background: var(--paper); cursor: pointer; transition: border-color 140ms ease, background 140ms ease; }
.dropzone:hover, .dropzone.is-dragging { border-color: var(--oxide); background: #f6f1e9; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-glyph { width: 62px; height: 62px; display: grid; place-items: center; color: var(--oxide); border: 1px solid var(--oxide); font: 700 11px/1 var(--mono); }
.drop-copy { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.drop-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; }
.drop-copy small { color: var(--muted); font: 10px/1.2 var(--mono); }
.drop-action { color: var(--oxide); font: 750 10px/1 var(--mono); }
.format-row { padding: 14px 0 20px; display: flex; justify-content: space-between; gap: 12px; color: #787d77; font: 8px/1.4 var(--mono); }
.privacy-note { margin: 12px 0 0; color: var(--faint); text-align: center; font-size: 10px; }
.notice { margin-top: 18px; padding: 14px; border-left: 3px solid var(--oxide); background: #eee7dd; color: var(--muted); font-size: 12px; line-height: 1.5; }
.notice a { color: var(--ink); font-weight: 750; text-underline-offset: 3px; }

.loading-panel { min-height: 480px; padding: 40px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.scan-mark { width: 84px; height: 84px; margin-bottom: 20px; display: grid; place-items: center; color: var(--oxide); animation: scan 1.3s steps(2) infinite; }
.scan-mark img { width: 100%; height: 100%; }
.loading-panel h2 { margin: 4px 0 28px; font-size: 27px; letter-spacing: -.035em; }
.loading-track { width: min(420px, 88%); height: 3px; background: #d2d4cc; overflow: hidden; }
.loading-track i { display: block; width: 30%; height: 100%; background: var(--oxide); animation: loading 1.1s ease-in-out infinite; }
.loading-steps { width: min(420px, 88%); margin-top: 11px; display: flex; justify-content: space-between; color: var(--faint); font: 8px/1 var(--mono); }

.result-panel { background: var(--paper); }
.result-meta { min-height: 34px; margin-bottom: 18px; display: grid; grid-template-columns: 1fr 1fr auto; align-items: start; color: var(--faint); font: 9px/1.3 var(--mono); letter-spacing: .07em; }
.verdict { display: grid; grid-template-columns: .35fr .65fr; min-height: 228px; color: #f6f4ed; background: var(--ink); border-top: 5px solid var(--oxide); }
.verdict[data-tone="positive"] { border-top-color: var(--positive); }
.verdict[data-tone="negative"] { border-top-color: var(--negative); }
.verdict-code { padding: 28px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid #3a413e; }
.verdict-code span { color: #8e9590; font: 9px/1.2 var(--mono); letter-spacing: .1em; }
.verdict-code strong { max-width: 250px; color: #f1b797; font: 700 clamp(25px, 4vw, 42px)/.98 var(--sans); letter-spacing: -.045em; }
.verdict[data-tone="positive"] .verdict-code strong { color: #84c6a7; }
.verdict[data-tone="negative"] .verdict-code strong { color: #df8e83; }
.verdict-copy { padding: 30px; display: flex; flex-direction: column; justify-content: flex-end; }
.verdict-copy h2 { margin: 0; max-width: 620px; font-size: clamp(30px, 5vw, 52px); line-height: 1.02; letter-spacing: -.05em; font-weight: 680; }
.verdict-copy p { margin: 18px 0 0; color: #8e9590; font-size: 11px; }

.assessment-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-top: 0; background: var(--panel); }
.assessment-grid article { min-height: 156px; padding: 20px; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.assessment-grid article:last-child { border-right: 0; }
.assessment-grid span, .card-title span, .sample-card > span, .metric-grid span, .detail-grid span, .bridge span { color: var(--muted); font: 700 8px/1.2 var(--mono); letter-spacing: .06em; }
.assessment-grid strong { margin-top: 35px; font: 750 14px/1.15 var(--mono); }
.assessment-grid small { margin-top: auto; color: #747a74; font-size: 9px; line-height: 1.35; }

.evidence-row { margin-top: 12px; display: grid; grid-template-columns: .72fr .28fr; gap: 12px; }
.curve-card, .sample-card, .bridge-card, .confidence-card, .metric-grid article, .detail-grid article, .actions-card { border: 1px solid var(--line); background: var(--panel); }
.curve-card { min-height: 300px; padding: 22px; }
.card-title { display: flex; justify-content: space-between; gap: 12px; }
.card-title small { color: var(--faint); font: 8px/1.2 var(--mono); }
#equity-chart { width: 100%; height: 238px; overflow: visible; }
.sample-card { padding: 22px; display: flex; flex-direction: column; }
.sample-card > div { padding: 22px 0; display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--line); }
.sample-card strong { font: 600 32px/1 var(--mono); }
.sample-card small { color: var(--muted); font-size: 10px; }
.sample-card p { margin: auto 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }

.full-metrics { margin-top: 58px; }
.bridge-card, .confidence-card { padding: 24px; }
.bridge { margin-top: 26px; display: grid; grid-template-columns: repeat(7, auto); align-items: end; gap: 12px; }
.bridge > b { padding-bottom: 30px; color: #9ca09a; font: 400 20px/1 var(--mono); }
.bridge > div { min-width: 0; display: flex; flex-direction: column; }
.bridge i { width: 100%; height: 5px; margin: 14px 0 12px; background: var(--oxide); transform: skewX(-18deg); }
.bridge div[data-key="fees"] i { background: var(--negative); }
.bridge div[data-key="funding"] i { background: #9a8468; }
.bridge div[data-key="net"] i { background: var(--positive); }
.bridge strong { font: 600 clamp(17px, 2.5vw, 28px)/1 var(--mono); white-space: nowrap; }

.metric-grid, .detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 12px; }
.metric-grid article, .detail-grid article { min-height: 128px; padding: 20px; display: flex; flex-direction: column; border-right: 0; }
.metric-grid article:last-child { border-right: 1px solid var(--line); }
.metric-grid strong, .detail-grid strong { margin-top: auto; font: 600 25px/1 var(--mono); }
.metric-grid small, .detail-grid small { margin-top: 9px; color: var(--faint); font-size: 9px; line-height: 1.3; }

.confidence-card { margin-top: 12px; }
.ci-scale { margin-top: 34px; display: grid; grid-template-columns: 68px 1fr 62px; align-items: center; gap: 12px; color: var(--faint); font: 8px/1 var(--mono); }
.ci-axis { position: relative; height: 2px; background: #b8bcb5; }
.ci-axis em { position: absolute; left: 50%; top: -8px; width: 1px; height: 18px; background: var(--ink); }
.ci-axis b { position: absolute; top: -5px; height: 12px; min-width: 3px; background: var(--oxide); }
.ci-values { margin: 14px 74px 0 80px; display: grid; grid-template-columns: 1fr auto 1fr; color: var(--muted); font: 10px/1 var(--mono); }
.ci-values span:last-child { text-align: right; }
.ci-values strong { color: var(--ink); font-weight: 600; }
.detail-grid { grid-template-columns: repeat(2, 1fr); }
.detail-grid article:last-child { border-right: 1px solid var(--line); }

.actions-card { margin-top: 12px; padding: 26px; }
.actions-card ol { margin: 0; padding: 0; list-style: none; counter-reset: actions; }
.actions-card li { counter-increment: actions; position: relative; min-height: 54px; padding: 18px 12px 16px 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.45; }
.actions-card li::before { content: "0" counter(actions); position: absolute; left: 2px; color: var(--oxide); font: 700 10px/1.4 var(--mono); }

.paywall { margin-top: 42px; display: grid; grid-template-columns: .48fr .52fr; border: 1px solid var(--ink); background: var(--panel); }
.locked-ledger { padding: 26px; color: #dfe2dc; background: var(--ink); }
.locked-ledger p { margin: 0 0 18px; color: #7d8580; font: 700 8px/1.2 var(--mono); letter-spacing: .08em; }
.locked-ledger div { min-height: 49px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #363d3a; font-size: 11px; }
.locked-ledger small { color: #727a75; font: 8px/1 var(--mono); }
.locked-ledger div:last-child small { color: var(--signal); }
.paywall-copy { padding: 32px; display: flex; flex-direction: column; justify-content: center; }
.paywall-copy h3 { margin: 0; max-width: 430px; font-size: 34px; line-height: 1.04; letter-spacing: -.045em; }
.paywall-copy > p:not(.eyebrow) { margin: 17px 0 24px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.terms-consent { margin: 0 0 8px; display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; color: var(--muted); font-size: 10px; line-height: 1.45; cursor: pointer; }
.terms-consent input { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); }
.terms-inline { width: max-content; margin: 0 0 18px 28px; padding: 0; color: var(--oxide); background: none; border: 0; border-bottom: 1px solid var(--oxide-soft); font: 700 9px/1.5 var(--mono); cursor: pointer; }
.paywall-copy small, .paid-actions p { margin-top: 10px; color: var(--faint); text-align: center; font-size: 9px; }
.crypto-option { margin-top: 14px; }
.crypto-option > span { display: block; margin: 0 0 8px; color: var(--faint); text-align: center; font: 8px/1 var(--mono); }
.paid-actions { margin-top: 26px; }
.paid-actions .button + .button { margin-top: 10px; }

.method { background: var(--panel); }
.method-head { max-width: 820px; }
.method-table { margin-top: 30px; border-top: 1px solid var(--ink); }
.method-table > div { min-height: 92px; display: grid; grid-template-columns: 70px 160px 1fr; align-items: center; border-bottom: 1px solid var(--line); }
.method-table span { color: var(--oxide); font: 700 10px/1 var(--mono); }
.method-table strong { font-size: 15px; }
.method-table p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.method-limit { max-width: 820px; margin: 25px 0 0; color: var(--faint); font-size: 10px; line-height: 1.5; }

footer { min-height: 78px; padding: 24px 42px calc(24px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; color: var(--muted); font: 9px/1 var(--mono); }
footer div { display: flex; gap: 18px; }
footer button, footer a { padding: 0; border: 0; color: var(--muted); background: none; font: inherit; text-decoration: none; cursor: pointer; }

dialog { width: min(560px, calc(100% - 28px)); padding: 32px; border: 1px solid var(--ink); border-radius: 0; color: var(--ink); background: var(--panel); box-shadow: 0 30px 90px rgba(12,18,16,.2); }
dialog::backdrop { background: rgba(12,18,16,.72); }
dialog h2 { margin: 0 0 20px; font-size: 31px; letter-spacing: -.04em; }
dialog p:not(.eyebrow) { color: var(--muted); font-size: 12px; line-height: 1.6; }
dialog code { font-family: var(--mono); font-size: .9em; }
.dialog-close { position: absolute; right: 16px; top: 12px; border: 0; background: none; color: var(--muted); font-size: 24px; cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 20; max-width: calc(100% - 30px); padding: 13px 16px; color: #f6f4ed; background: var(--ink); border-left: 3px solid var(--signal); font-size: 11px; transform: translate(-50%, 140%); opacity: 0; transition: 200ms ease; }
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
.is-hidden { display: none !important; }

@keyframes scan { 0%,100% { opacity: .4; transform: translateX(-3px); } 50% { opacity: 1; transform: translateX(3px); } }
@keyframes loading { from { transform: translateX(-110%); } to { transform: translateX(370%); } }

@media (max-width: 760px) {
  .topbar { height: 58px; padding: 0 17px; }
  .brand small { display: none; }
  .engine-state { font-size: 8px; }
  .hero { min-height: 560px; padding: 42px 18px 28px; display: block; }
  .hero-index { display: none; }
  .hero h1 { font-size: clamp(42px, 13vw, 58px); }
  .lede { font-size: 14px; }
  .hero-actions { display: grid; }
  .hero-ledger { margin-top: 42px; }
  .hero-ledger div { min-height: 59px; padding: 12px 0; grid-template-columns: 27px 1fr; }
  .trust-bar { padding: 0 17px; justify-content: flex-start; overflow: hidden; white-space: nowrap; }
  .resource-strip { padding: 18px 17px; display: block; }
  .resource-strip > a { min-width: 0; margin-top: 14px; }
  .panel, .result-panel, .method { padding: 42px 17px; }
  .section-heading { display: block; }
  .section-heading h2, .method h2 { font-size: 34px; }
  .section-heading .text-button { margin-top: 18px; }
  .dropzone { min-height: 104px; padding: 16px; grid-template-columns: 52px 1fr; gap: 15px; }
  .file-glyph { width: 52px; height: 52px; }
  .drop-action { display: none; }
  .format-row { flex-direction: column; }
  .result-meta { grid-template-columns: 1fr auto; }
  .result-meta #period { display: none; }
  .verdict { grid-template-columns: 1fr; min-height: 350px; }
  .verdict-code { min-height: 138px; padding: 22px; border-right: 0; border-bottom: 1px solid #3a413e; }
  .verdict-code strong { max-width: none; font-size: 31px; }
  .verdict-copy { padding: 24px 22px; }
  .verdict-copy h2 { font-size: 34px; }
  .assessment-grid { grid-template-columns: repeat(2, 1fr); }
  .assessment-grid article { min-height: 148px; }
  .assessment-grid article:nth-child(2) { border-right: 0; }
  .assessment-grid article:nth-child(n+3) { border-top: 1px solid var(--line); }
  .assessment-grid strong { margin-top: 27px; font-size: 12px; }
  .evidence-row { grid-template-columns: 1fr; }
  .curve-card { min-height: 260px; padding: 18px 14px; }
  #equity-chart { height: 205px; }
  .sample-card { min-height: 205px; }
  .sample-card > div { padding: 17px 0; }
  .bridge-card, .confidence-card { padding: 19px 15px; }
  .bridge { grid-template-columns: repeat(2, 1fr); gap: 16px 12px; }
  .bridge > b { display: none; }
  .bridge strong { font-size: 18px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-grid article:nth-child(2) { border-right: 1px solid var(--line); }
  .metric-grid article:nth-child(n+3) { border-top: 0; }
  .ci-scale { grid-template-columns: 52px 1fr 48px; gap: 8px; }
  .ci-values { margin-left: 60px; margin-right: 56px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid article:first-child { border-right: 1px solid var(--line); }
  .detail-grid article:last-child { border-top: 0; }
  .paywall { grid-template-columns: 1fr; }
  .locked-ledger { padding: 22px; }
  .paywall-copy { padding: 28px 22px; }
  .paywall-copy h3 { font-size: 31px; }
  .method-table > div { padding: 18px 0; grid-template-columns: 42px 1fr; }
  .method-table p { grid-column: 2; margin-top: 7px; }
  footer { padding-left: 17px; padding-right: 17px; }
}

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