/* Arkana static pages (landing, card meanings, legal) */
:root {
  --serif: "Bona Nova", "Iowan Old Style", Georgia, serif; --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --ink: #1B2140; --ochre: #E0A526; --paper: #F3EDE0;
  --bg: #E3E2DC; --surface: #F2F1EC; --surface-2: #EAE9E3; --line: #CBC8BE; --line-strong: #A9A69C;
  --text: #1B2140; --text-2: #444962; --muted: #62667E; --focus: #24398A; --edge: #1B2140;
  --cloth: #23367F; --on-cloth: #F3EDE0; --on-cloth-muted: #BCC5E8;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #0E1226; --surface: #151A33; --surface-2: #1B2140; --line: #2B3258; --line-strong: #3E4677;
  --text: #EDE8DB; --text-2: #C9CAD8; --muted: #9A9FBB; --focus: #E0A526; --edge: #05070F; --cloth: #1F2F70; color-scheme: dark; } }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 17px; line-height: 1.6; font-variant-numeric: lining-nums; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--ochre); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow > * { max-width: 760px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 9; }
.skip:focus { left: 8px; }

/* header + footer */
.top { border-bottom: 1px solid var(--line); background: var(--bg); }
.top .wrap { display: flex; align-items: center; gap: 18px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 25px; }
.brand svg { width: 32px; height: 32px; }
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; margin-left: auto; align-items: center; font-size: 15.5px; font-weight: 550; }
.nav a { text-decoration: none; color: var(--text-2); padding: 6px 0; }
.nav a:hover, .nav a[aria-current] { color: var(--text); }
.nav .lang { border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 10px; font-size: 13px; font-weight: 650; }
.foot { margin-top: 72px; border-top: 1px solid var(--line); padding: 32px 0 48px; font-size: 14.5px; color: var(--text-2); }
.foot .wrap { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.foot h2 { font-family: var(--sans); font-size: 14px; font-weight: 650; margin: 0 0 6px; color: var(--text); }
.foot ul { list-style: none; margin: 0; padding: 0; } .foot li { margin: 3px 0; }
.foot .fine { grid-column: 1 / -1; color: var(--muted); font-size: 13.5px; }

/* type */
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0; }
h2 { font-size: clamp(28px, 4vw, 38px); margin-bottom: 14px; }
h3 { font-size: 22px; margin-bottom: 6px; }
.lede { font-family: var(--serif); font-size: clamp(19px, 2.3vw, 22px); line-height: 1.5; color: var(--text-2); max-width: 58ch; }
section { padding: 56px 0 8px; }
.sec-intro { max-width: 62ch; color: var(--text-2); margin: 0 0 26px; }
p { max-width: 68ch; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: 10px; font-weight: 650; font-size: 16px; text-decoration: none;
  background: var(--ochre); color: #1B2140; border: 1.5px solid var(--edge); box-shadow: 3px 3px 0 var(--edge); }
.btn:hover { background: #E8B035; text-decoration: none; }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--edge); }
.btn.quiet { background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); box-shadow: none; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* hero */
.hero { padding: 48px 0 24px; }
.hero .wrap { display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); } }
.hero h1 { font-size: clamp(40px, 6.4vw, 68px); line-height: 1.02; letter-spacing: -.01em; margin-bottom: 18px; max-width: 13ch; }
.hero-cloth { position: relative; border-radius: 22px; background: var(--cloth); aspect-ratio: 5 / 4;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgba(0,0,0,.05) 0 1px, transparent 1px 3px), radial-gradient(120% 80% at 50% 0%, rgba(255,255,255,.08), transparent 60%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25), inset 0 -30px 60px rgba(0,0,0,.18); overflow: hidden; }
.fan { position: absolute; left: 50%; top: 52%; width: 0; height: 0; }
.fan .c { position: absolute; width: clamp(110px, 16vw, 168px); left: 0; top: 0; transform-origin: 50% 120%; filter: drop-shadow(0 6px 14px rgba(5,8,30,.45)); }
.fan .c svg { display: block; width: 100%; height: auto; border-radius: 6%/3.5%; }
.fan .c1 { transform: translate(-50%, -55%) rotate(-16deg) translate(-18%, 4%); }
.fan .c2 { transform: translate(-50%, -60%); z-index: 2; }
.fan .c3 { transform: translate(-50%, -55%) rotate(16deg) translate(18%, 4%); }
.hero-note { margin-top: 14px; font-size: 14.5px; color: var(--muted); }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; counter-reset: s; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: s; padding: 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ochre); color: #1B2140; border: 1.5px solid #1B2140; font-weight: 700; margin-bottom: 12px; }
.steps p { margin: 0; color: var(--text-2); }

/* spreads */
.spreads { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.spread { display: grid; grid-template-columns: 46px 1fr; gap: 14px; align-items: start; padding: 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.spread svg { width: 46px; height: 52px; } .spread svg rect { fill: var(--ochre); stroke: var(--ink); stroke-width: .8; }
.spread h3 { font-size: 19px; margin: 0 0 4px; } .spread p { margin: 0; font-size: 15px; color: var(--text-2); }
.spread .n { font-size: 13.5px; color: var(--muted); font-weight: 600; }

/* split feature */
.split { display: grid; gap: 28px; align-items: start; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; } }
.panel { padding: 24px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--ochre); }
.panel p { font-family: var(--serif); font-size: 18px; line-height: 1.6; margin: 0 0 12px; }
.panel .who { font-family: var(--sans); font-size: 13.5px; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
ul.ticks { padding-left: 20px; margin: 0; } ul.ticks li { margin: 6px 0; }

/* price table */
.prices { width: 100%; border-collapse: collapse; font-size: 16px; max-width: 760px; }
.prices th, .prices td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); }
.prices th { font-size: 14px; color: var(--muted); font-weight: 600; }
.prices td:nth-child(n+2) { font-variant-numeric: tabular-nums; }

/* card grids */
.cardgrid { display: grid; gap: 18px 14px; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
@media (min-width: 900px) { .cardgrid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); } }
.cardgrid a { display: grid; gap: 7px; text-decoration: none; text-align: center; font-size: 14px; font-weight: 550; line-height: 1.25; }
.cardgrid svg { display: block; width: 100%; height: auto; border-radius: 6%/3.5%; box-shadow: 0 1px 2px rgba(10,14,40,.3), 0 6px 14px rgba(10,14,40,.2); transition: transform .15s ease; }
@media (hover: hover) { .cardgrid a:hover svg { transform: translateY(-3px); } }
.suits { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.suits a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); text-decoration: none; font-weight: 600; font-size: 15px; }
.group { margin: 40px 0 0; } .group h2 { font-size: 28px; } .group > p { color: var(--text-2); margin: 0 0 18px; }

/* faq */
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; max-width: 820px; }
.faq summary { cursor: pointer; font-weight: 650; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 24px; line-height: 1; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 10px 0 0; color: var(--text-2); }

/* card page */
.crumbs { font-size: 14px; color: var(--muted); padding: 20px 0 0; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.cardpage { display: grid; gap: 32px; padding-top: 22px; align-items: start; }
@media (min-width: 820px) { .cardpage { grid-template-columns: 280px minmax(0, 1fr); gap: 48px; } }
.cardpage .art { width: min(260px, 64vw); margin: 0 auto; }
@media (min-width: 820px) { .cardpage .art { width: 280px; position: sticky; top: 24px; } }
.cardpage .art svg { display: block; width: 100%; height: auto; border-radius: 6%/3.5%; box-shadow: 0 2px 4px rgba(10,14,40,.3), 0 14px 30px rgba(10,14,40,.25); }
.cardpage .art .rev { transform: rotate(180deg); margin-top: 18px; width: 44%; }
.cardpage .art figcaption { font-size: 13.5px; color: var(--muted); text-align: center; margin-top: 8px; }
.cardpage h1 { font-size: clamp(38px, 5.4vw, 56px); margin-bottom: 6px; }
.kicker { font-weight: 600; color: var(--text-2); margin: 0 0 18px; }
.keys { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; padding: 0; list-style: none; }
.keys li { font-size: 14.5px; padding: 4px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.cardpage h2 { font-size: 26px; margin: 30px 0 8px; }
.cardpage .meaning { font-family: var(--serif); font-size: 20px; line-height: 1.55; margin: 0 0 8px; }
.cardpage .body { color: var(--text-2); }
.cta-box { margin-top: 34px; padding: 22px; border-radius: 18px; background: var(--cloth); color: var(--on-cloth); }
.cta-box h2 { color: var(--on-cloth); margin: 0 0 6px; font-size: 26px; }
.cta-box p { color: var(--on-cloth-muted); margin: 0 0 16px; }
.pn { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--line); font-weight: 600; font-size: 15.5px; }
.legal h1 { font-size: clamp(34px, 5vw, 46px); margin: 28px 0 8px; }
.legal h2 { font-size: 24px; margin: 30px 0 8px; }
.legal p, .legal li { color: var(--text-2); }
.notfound { text-align: center; padding: 80px 0; } .notfound h1 { font-size: 48px; margin-bottom: 12px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.cardsvg { display: block; width: 100%; height: auto; }
.cardsvg text { font-family: var(--serif); text-anchor: middle; fill: #1B2140; font-variant-numeric: lining-nums; }
.cardsvg .ce { font-weight: 700; }

/* original artwork with Arkana fallback */
.cf { display: block; }
.cf img { display: block; width: 100%; height: auto; aspect-ratio: 350 / 600; object-fit: cover; border-radius: 6%/3.5%; background: var(--paper);
  box-shadow: 0 1px 2px rgba(10,14,40,.3), 0 6px 14px rgba(10,14,40,.2); }
.cf .svgfb { display: none; }
.cf.fb img { display: none; } .cf.fb .svgfb { display: block; }
.cardgrid .cf img { transition: transform .15s ease; }
@media (hover: hover) { .cardgrid a:hover .cf img { transform: translateY(-3px); } }
.fan .c .cf img { box-shadow: none; }
.cardpage .art .cf img { box-shadow: 0 2px 4px rgba(10,14,40,.3), 0 14px 30px rgba(10,14,40,.25); }

/* integration page */
.page-h1 { font-size: clamp(38px, 5.6vw, 58px); margin: 22px 0 10px; }
.intg { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
@media (min-width: 960px) { .intg { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 56px; } .intg aside { padding-top: 96px; } }
.intg h2 { font-size: 28px; margin: 36px 0 10px; }
.intg h3 { font-family: var(--sans); font-size: 16px; font-weight: 650; margin: 20px 0 6px; }
.endpoint { margin-top: 26px; padding: 20px; border-radius: 18px; background: var(--cloth); color: var(--on-cloth); display: grid; gap: 12px; justify-items: start; }
.ep-label { font-size: 14px; font-weight: 600; color: var(--on-cloth-muted); }
.ep-row { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }
.ep { flex: 1 1 260px; min-width: 0; font: 500 15px/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.18); border-radius: 10px; padding: 13px 14px; overflow-wrap: anywhere; }
.endpoint .btn.quiet { background: transparent; color: var(--on-cloth); border-color: rgba(255,255,255,.35); }
.ep-status { margin: 0; min-height: 1.5em; font-size: 15px; } .ep-status.ok { color: #BFE6C6; } .ep-status.bad { color: #FFC2B3; }
pre { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; overflow-x: auto; font: 14px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; margin: 0 0 12px; max-width: 100%; }
ol.plain { padding-left: 22px; margin: 0; } ol.plain li { margin: 4px 0; }
dl.tools { margin: 0; } dl.tools dt { margin-top: 14px; font-weight: 650; } dl.tools dd { margin: 2px 0 0; color: var(--text-2); }
ul.asks { padding-left: 20px; margin: 0; font-family: var(--serif); font-size: 18px; } ul.asks li { margin: 6px 0; }

/* spread guide pages */
.spread h3 a { color: inherit; text-decoration: none; } .spread h3 a:hover { text-decoration: underline; }
.spreadpage { max-width: 760px; margin: 0 auto; padding-bottom: 32px; }
.spreadpage h1 { font-size: clamp(34px, 5vw, 52px); margin: 22px 0 6px; }
.spreadpage section { margin-top: 36px; padding: 0; border: 0; }
.boardfig { margin: 32px 0 0; padding: 24px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.boardfig figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
.board { width: 100%; max-width: 420px; height: auto; max-height: 420px; }
.board rect { fill: var(--ochre); stroke: var(--ink); stroke-width: 1.2; }
.board .cross rect { fill: var(--paper, #fff); opacity: .92; }
.board text { font-weight: 700; font-size: 18px; font-family: var(--sans); text-anchor: middle; fill: var(--ink); font-variant-numeric: lining-nums; }
.positions { list-style: none; counter-reset: pos; padding: 0; margin: 0; display: grid; gap: 14px; }
.positions li { counter-increment: pos; display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 14px; }
.positions li::before { content: counter(pos); grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: var(--bg); font-weight: 700; font-variant-numeric: lining-nums; }
.positions h3 { margin: 4px 0 2px; font-size: 19px; } .positions p { margin: 0; color: var(--text-2); }
