/* Statement — site styles */
:root {
  --desk: #e6e8ec;
  --paper: #ffffff;
  --ink: #0d1321;
  --muted: #5b6273;
  --rule: #dcdfe5;
  --hair: #eceef2;
  --cobalt: #1f3fd1;
  --cobalt-dark: #1631aa;
  --gain: #0d7a52;
  --loss: #c2381f;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --font: "Schibsted Grotesk", system-ui, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, monospace;
  --wrap: 1160px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--desk); color: var(--ink); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img, svg, canvas { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 750; }
h3 { font-size: 1.08rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.gain { color: var(--gain); }
.loss { color: var(--loss); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 56ch; }
.page-head { padding: 56px 0 28px; }
.sim-tag { display: inline-block; font-size: 0.72rem; font-weight: 700; color: var(--muted); border: 1px dashed #b9bec9; border-radius: 999px; padding: 1px 8px; vertical-align: middle; letter-spacing: 0.03em; }
.sim-note { font-size: 0.82rem; color: var(--muted); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(230, 232, 236, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.2rem; letter-spacing: -0.03em; }
.logo svg { width: 26px; height: 30px; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: var(--radius-sm); font-size: 0.95rem; }
.nav a:hover { color: var(--ink); background: rgba(255,255,255,.6); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.menu-btn { display: none; margin-left: auto; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: 6px 12px; cursor: pointer; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 999px; border: 1px solid var(--rule); background: var(--paper); text-decoration: none; font-weight: 700; font-size: 0.95rem; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.btn-primary:hover { background: var(--cobalt-dark); border-color: var(--cobalt-dark); }
.btn-sm { padding: 7px 14px; font-size: 0.86rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn .lock { font-size: 0.72rem; font-weight: 700; color: var(--cobalt); border: 1px solid #c3cbf3; border-radius: 999px; padding: 0 7px; }

/* ---------- address form ---------- */
.addr-form { display: flex; gap: 10px; flex-wrap: wrap; }
.addr-form input { flex: 1 1 320px; min-width: 0; background: var(--paper); border: 1px solid var(--rule); border-radius: 999px; padding: 13px 20px; font-family: var(--mono); font-size: 0.92rem; outline: none; }
.addr-form input:focus { border-color: var(--cobalt); }
.form-error { color: var(--loss); font-size: 0.9rem; margin: 8px 0 0; min-height: 1.4em; }
.example-wallets { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; font-size: 0.88rem; color: var(--muted); }
.example-wallets button { border: 1px dashed #b9bec9; background: none; border-radius: 999px; padding: 4px 12px; cursor: pointer; font-size: 0.86rem; color: var(--ink); }
.example-wallets button:hover { border-style: solid; border-color: var(--ink); }

/* ---------- the paper sheet (signature element) ---------- */
.sheet {
  position: relative; background: var(--paper); padding: 40px 44px 36px; border-radius: 4px 4px var(--radius-md) var(--radius-md);
  box-shadow: 0 1px 0 rgba(13,19,33,.04), 0 24px 48px -28px rgba(13,19,33,.35);
}
/* perforated tear-off edge along the top */
.sheet::before {
  content: ""; position: absolute; left: 0; right: 0; top: -7px; height: 8px;
  background: radial-gradient(circle at 7px 0, transparent 4px, var(--paper) 4.5px) 0 0 / 14px 8px repeat-x;
}
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 20px; border-bottom: 2px solid var(--ink); }
.sheet-head .doc { font-weight: 800; font-size: 1.05rem; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.sheet-head .meta { font-size: 0.85rem; color: var(--muted); text-align: right; line-height: 1.5; }
.sheet-head .meta .num { color: var(--ink); }
.period { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 800; letter-spacing: -0.03em; margin: 4px 0 0; line-height: 1.1; }
.stamp { display: inline-block; border: 2px solid var(--muted); color: var(--muted); font-weight: 800; font-size: 0.7rem; letter-spacing: 0.12em; padding: 2px 8px; border-radius: 4px; transform: rotate(-4deg); }

.closing { padding: 26px 0 20px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 24px; border-bottom: 1px solid var(--rule); }
.closing .label { color: var(--muted); font-size: 0.9rem; }
.closing .big { font-family: var(--mono); font-weight: 600; font-size: clamp(2.2rem, 5.6vw, 3.6rem); letter-spacing: -0.04em; line-height: 1; }
.closing .chg { font-family: var(--mono); font-weight: 600; font-size: 1.1rem; text-align: right; }
.closing .chg small { display: block; font-family: var(--font); font-weight: 500; color: var(--muted); font-size: 0.82rem; }

.ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; padding: 8px 0 16px; }
.ledger div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dotted var(--rule); font-size: 0.95rem; }
.ledger dt { color: var(--muted); }
.ledger dd { margin: 0; font-family: var(--mono); font-variant-numeric: tabular-nums; }

.sheet-section { padding-top: 28px; }
.sheet-section > h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 1rem; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
.sheet-section > h3 span { font-weight: 500; font-size: 0.84rem; color: var(--muted); letter-spacing: 0; }

.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .axis { font-family: var(--mono); font-size: 11px; fill: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .chart .line.draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.6s ease-out forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.highlights { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.hl { padding: 4px 16px 4px 0; }
.hl + .hl { padding-left: 16px; border-left: 1px solid var(--hair); }
.hl .k { color: var(--muted); font-size: 0.82rem; }
.hl .v { font-family: var(--mono); font-weight: 600; font-size: 1.15rem; }
.hl .s { font-size: 0.82rem; color: var(--muted); }

table.rows { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.rows th { text-align: left; font-weight: 500; color: var(--muted); font-size: 0.78rem; padding: 6px 8px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.rows td { padding: 9px 8px; border-bottom: 1px solid var(--hair); vertical-align: top; }
.rows th:first-child, .rows td:first-child { padding-left: 0; }
.rows th:last-child, .rows td:last-child { padding-right: 0; }
.rows .r { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rows .sub { display: block; font-size: 0.78rem; color: var(--muted); }
.rows tfoot td { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: 0; }
.share-bar { display: inline-block; height: 4px; background: var(--cobalt); border-radius: 2px; vertical-align: middle; margin-right: 6px; opacity: .8; }
.more-rows { text-align: center; padding: 18px 0 4px; color: var(--muted); font-size: 0.9rem; }
.sheet-foot { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 0.78rem; color: var(--muted); line-height: 1.5; }

/* ---------- statement layout ---------- */
.stmt-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; align-items: start; padding: 40px 0 96px; }
.side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 16px; }
.card { background: var(--paper); border-radius: var(--radius-lg); padding: 20px; }
.card h3 { font-size: 0.95rem; margin-bottom: 10px; }
.months { display: flex; flex-direction: column; gap: 4px; }
.months button { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; font-size: 0.93rem; }
.months button:hover { background: var(--desk); }
.months button[aria-current="true"] { background: var(--ink); color: #fff; }
.months .tag { font-size: 0.7rem; font-weight: 700; color: var(--cobalt); border: 1px solid #c3cbf3; border-radius: 999px; padding: 0 7px; }
.months button[aria-current="true"] .tag { color: #fff; border-color: rgba(255,255,255,.5); }
.actions { display: flex; flex-direction: column; gap: 8px; }
.actions .btn { justify-content: space-between; width: 100%; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 0.9rem; }
.toggle { position: relative; width: 44px; height: 24px; flex: none; }
.toggle input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; z-index: 1; }
.toggle span { position: absolute; inset: 0; border-radius: 999px; background: #c9cdd6; transition: background 0.2s; }
.toggle span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.toggle input:checked + span { background: var(--cobalt); }
.toggle input:checked + span::after { transform: translateX(20px); }
.toggle input:focus-visible + span { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.addr-short { font-family: var(--mono); font-size: 0.85rem; word-break: break-all; }
.empty-state { background: var(--paper); border-radius: var(--radius-lg); padding: 48px; }

/* ---------- home ---------- */
.hero { padding: 64px 0 88px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.hero-grid > * { min-width: 0; }
.hero h1 { max-width: 12ch; }
.hero .lead { margin-bottom: 24px; }
.hero .sheet { padding: 32px 32px 24px; transform: rotate(1.2deg); }
.hero .closing { padding: 20px 0 14px; }
.hero .closing .big { font-size: clamp(2rem, 4.4vw, 2.8rem); }
.contents { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; margin-top: 28px; }
.contents div { padding: 20px 0; border-top: 1px solid var(--rule); }
.contents p { color: var(--muted); margin: 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 28px; }
.step-num { font-family: var(--mono); font-weight: 600; font-size: 0.9rem; color: var(--cobalt); margin-bottom: 8px; }
.step p { color: var(--muted); margin: 0; }
.share-example { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.share-example > * { min-width: 0; }
.share-example canvas { width: 100%; height: auto; border-radius: var(--radius-md); box-shadow: 0 20px 40px -24px rgba(13,19,33,.45); }

/* ---------- token ---------- */
.burn { text-align: center; padding: 88px 0 64px; }
.burn-num { font-family: var(--mono); font-weight: 600; font-size: clamp(2.8rem, 9vw, 6.4rem); letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.plan { background: var(--paper); border-radius: var(--radius-lg); padding: 28px; border: 2px solid transparent; }
.plan.active { border-color: var(--cobalt); }
.plan .hold { font-family: var(--mono); font-weight: 600; font-size: 1.4rem; margin: 6px 0 4px; letter-spacing: -0.03em; }
.plan ul { list-style: none; padding: 0; margin: 16px 0 0; }
.plan li { padding: 8px 0; border-top: 1px solid var(--hair); color: var(--muted); }
.uses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 28px; }
.uses p { color: var(--muted); margin: 0; }
.note { border-left: 3px solid var(--cobalt); padding: 12px 16px; background: var(--paper); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--muted); }
.hold-field { max-width: 340px; margin-top: 20px; }
.hold-field input { width: 100%; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: 10px 12px; font-family: var(--mono); }

/* ---------- docs ---------- */
.docs-layout { display: grid; grid-template-columns: 210px 1fr; gap: 56px; align-items: start; padding-bottom: 96px; }
.docs-layout > * { min-width: 0; }
.docs-nav { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 2px; }
.docs-nav a { text-decoration: none; color: var(--muted); padding: 6px 12px; border-radius: var(--radius-sm); font-size: 0.93rem; }
.docs-nav a:hover { color: var(--ink); background: rgba(255,255,255,.6); }
.docs-body section { padding-bottom: 44px; scroll-margin-top: 96px; }
.docs-body p, .docs-body li { max-width: 68ch; }
.formula { background: var(--paper); border-radius: var(--radius-md); padding: 16px 20px; font-family: var(--mono); font-size: 0.92rem; overflow-x: auto; }
:not(pre) > code { background: rgba(255,255,255,.7); padding: 1px 6px; border-radius: 4px; font: 0.88em var(--mono); }
details.faq { border-top: 1px solid var(--rule); }
details.faq:last-of-type { border-bottom: 1px solid var(--rule); }
details.faq summary { cursor: pointer; padding: 16px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 1.3rem; line-height: 1; }
details.faq[open] summary::after { content: "–"; }
details.faq p { padding-bottom: 16px; margin: 0; color: var(--muted); }

/* ---------- modal, toast, footer ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(13, 19, 33, 0.55); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 100; }
.modal-backdrop.open { display: flex; }
.modal { background: var(--paper); border-radius: var(--radius-lg); width: min(640px, 100%); max-height: 90vh; overflow-y: auto; padding: 28px; position: relative; }
.modal-close { position: absolute; top: 12px; right: 12px; background: none; border: 0; font-size: 1.6rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 8px; }
.modal canvas { width: 100%; height: auto; border-radius: var(--radius-sm); margin: 8px 0 16px; border: 1px solid var(--hair); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 0.92rem; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 120; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.site-footer { border-top: 1px solid var(--rule); padding: 44px 0; color: var(--muted); font-size: 0.9rem; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--ink); }
.disclaimer { margin-top: 20px; font-size: 0.82rem; max-width: 72ch; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .stmt-layout, .docs-layout, .share-example { grid-template-columns: 1fr; }
  .side, .docs-nav { position: static; }
  .docs-nav { flex-direction: row; flex-wrap: wrap; }
  .plans, .uses, .contents { grid-template-columns: 1fr; }
  .side { order: -1; }
  .months { flex-direction: row; flex-wrap: wrap; }
  .months button { width: auto; }
}
@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .wrap { padding: 0 16px; }
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--desk); border-bottom: 1px solid var(--rule); padding: 12px 16px; }
  .nav.open { display: flex; }
  .sheet { padding: 28px 18px 24px; }
  .hero .sheet { transform: none; padding: 24px 18px 18px; }
  .sheet-head { flex-direction: column; }
  .sheet-head .meta { text-align: left; }
  .closing .chg { text-align: left; }
  .ledger { grid-template-columns: 1fr; }
  .highlights { grid-template-columns: 1fr 1fr; gap: 14px 0; }
  .hl:nth-child(3) { padding-left: 0; border-left: 0; }
  .steps { grid-template-columns: 1fr; }
  /* tables → stacked rows */
  table.rows thead { display: none; }
  table.rows, .rows tbody, .rows tfoot, .rows tr, .rows td { display: block; width: 100%; }
  .rows tr { padding: 10px 0; border-bottom: 1px solid var(--hair); }
  .rows td { border: 0; padding: 2px 0 !important; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .rows td::before { content: attr(data-label); color: var(--muted); font-size: 0.8rem; text-align: left; font-family: var(--font); }
  .rows td.first { display: block; text-align: left; font-weight: 600; }
  .rows td.first::before { content: none; }
  .rows td.first .sub { display: inline; margin-left: 6px; }
  .rows td.lead-cell { display: block; text-align: left; font-weight: 600; }
  .rows td.lead-cell::before { content: none; }
  .rows td.lead-cell .sub { display: inline; margin-left: 6px; font-weight: 400; }
  .rows td.empty { display: none; }
  .rows tfoot tr { border-top: 2px solid var(--ink); }
  .rows tfoot td { border-top: 0; }
}

/* ---------- print: only the sheet ---------- */
@media print {
  body { background: #fff; }
  .site-header, .site-footer, .side, .no-print, .toast, .modal-backdrop { display: none !important; }
  .stmt-layout { display: block; padding: 0; }
  .wrap { max-width: none; padding: 0; }
  .sheet { box-shadow: none; padding: 0; }
  .sheet::before { display: none; }
  .rows tr { break-inside: avoid; }
  .chart .line { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; animation: none !important; }
}
