/* Keystone — jetons et base. Contraste AA vérifié : node ops/contraste.mjs */
:root {
  --stone: #D8D3CA; --stone-light: #E9E5DE; --stone-deep: #C9C3B8; --slate: #3D4148; --ink: #1E2024; --mute: #4F535A;
  --moss: #6F8A4E; --moss-ink: #4B6233; --ochre: #C2793A; --ochre-ink: #7C4316; --ochre-light: #E2A469; --red: #8F2E22;
  --serif: "Instrument Serif", Georgia, serif; --sans: "Geist", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px); --max: 1280px; --radius: 3px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--stone); color: var(--ink); font: 400 16px/1.55 var(--sans); font-variant-numeric: tabular-nums; overflow-x: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--ochre-ink); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.02; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(44px, 7vw, 104px); }
h2 { font-size: clamp(34px, 4.4vw, 60px); }
h3 { font-size: clamp(24px, 2.4vw, 32px); }
p { margin: 0; max-width: 62ch; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.mute { color: var(--mute); }
.small { font-size: 14px; }
.ticker { font-weight: 600; letter-spacing: 0.02em; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* barre du haut */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--stone) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--stone-deep); }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 26px; color: var(--ink); text-decoration: none; }
.brand svg { width: 26px; height: 26px; }
.nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover, .nav a[aria-current] { text-decoration: underline; }

/* boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: var(--radius); border: 1.5px solid var(--ink);
  font: 600 15px/1 var(--sans); color: var(--ink); background: transparent; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--stone-light); color: var(--ink); }
.btn-launch { background: var(--ochre); }
.btn-launch:hover { background: #CF8746; }
.btn-small { height: 38px; padding: 0 16px; font-size: 14px; }

/* étiquette simulation */
.sim { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mute); }
.sim::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--mute); }

/* statuts des tranches */
.st { display: inline-block; padding: 3px 9px; border-radius: 2px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.03em; }
.st-ARMED { border: 1.5px solid var(--ink); color: var(--ink); }
.st-BURNED { background: var(--moss-ink); color: var(--stone-light); }
.st-CANCELLED { background: var(--red); color: var(--stone-light); }

/* emplacement visuel vide (aucune image d'IA) */
.slot { display: grid; place-items: center; border: 1.5px dashed var(--mute); color: var(--mute); font-size: 13px; text-align: center; padding: 16px; border-radius: var(--radius); }

/* FAQ */
.faq details { border-top: 1px solid var(--stone-deep); padding: 18px 0; }
.faq details:last-child { border-bottom: 1px solid var(--stone-deep); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; font-family: var(--serif); font-size: clamp(22px, 2.2vw, 28px); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--sans); font-size: 22px; transition: transform .2s; flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 10px; color: var(--mute); }

/* pied */
.foot { border-top: 1px solid var(--stone-deep); padding: 36px 0 48px; font-size: 14px; color: var(--mute); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; }

/* dessins */
.arch-svg, .graph-svg { width: 100%; height: auto; overflow: visible; }
.arch-svg text { font-family: var(--sans); }
.arch-svg .v { stroke: var(--ink); stroke-width: 1.3; }
.arch-svg .lbl { font-size: 12px; font-weight: 600; fill: var(--ink); }
.arch-svg .lbl-key { fill: var(--ink); font-size: 14px; }
.graph-svg .e { stroke: var(--ink); stroke-linecap: round; }
.graph-svg .n { stroke: var(--ink); stroke-width: 1.3; }
.graph-svg text { font: 600 11.5px var(--sans); fill: var(--ink); }
.dark .graph-svg .e { stroke: var(--stone-light); }
.dark .graph-svg .n { stroke: var(--stone-light); }
.dark .graph-svg text { fill: var(--stone-light); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (max-width: 720px) { .nav { display: none; } .top .btn { margin-left: auto; } }
[hidden] { display: none !important; }

/* ===== v2 : finition « pierre de taille » ===== */
body { background: var(--stone) radial-gradient(1200px 700px at 50% -10%, #E3DFD7 0%, transparent 70%) no-repeat; }
::selection { background: var(--ochre-light); color: var(--ink); }
.brand { font-size: 27px; letter-spacing: -0.01em; }
.brand svg { color: var(--ink); }
.top .wrap { gap: 20px; }
.mode { display: inline-flex; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border: 1px solid var(--stone-deep); border-radius: 99px; font-size: 12.5px; font-weight: 500; color: var(--mute); background: var(--stone-light); white-space: nowrap; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--mute); }
.pill-mainnet { color: var(--moss-ink); border-color: var(--moss); }
.pill-mainnet i { background: var(--moss); box-shadow: 0 0 0 3px rgba(111,138,78,.22); }
.pill-bench i { background: var(--ochre); }
.btn { transition: background-color .15s, transform .15s, box-shadow .15s; }
.btn-launch { box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 1px 0 var(--ink); }
.btn-launch:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 3px 0 var(--ink); }
.btn-launch:active { transform: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 0 0 var(--ink); }

/* arche */
.arch-svg .epure { opacity: .42; }
.arch-svg .stone { transition: transform .22s cubic-bezier(.2,.8,.3,1); outline: none; }
.arch-svg .stone.link { cursor: pointer; }
.arch-svg .stone.link:hover, .arch-svg .stone.link:focus-visible { transform: translate(var(--dx), var(--dy)); }
.arch-svg .stone:focus-visible .v { stroke-width: 2.4; }
.arch-svg .ghost .v { stroke-width: 1.1; }
.arch-svg .grain { opacity: .9; mix-blend-mode: multiply; }
.arch-svg .lbl { letter-spacing: .04em; }
.arch-svg .lbl.lbl-cut { fill: rgba(255,255,255,.5); }
.arch-svg .is-key .lbl.lbl-cut { fill: rgba(255,226,190,.45); }
.arch-svg .lbl-key { font-family: var(--serif); font-weight: 400; letter-spacing: .02em; }
.arch-tip { position: absolute; z-index: 5; transform: translate(-50%, calc(-100% - 6px)); pointer-events: none; display: grid; gap: 2px; min-width: 170px;
  padding: 10px 13px; background: var(--ink); color: var(--stone-light); font-size: 13px; line-height: 1.4; border-radius: var(--radius); box-shadow: 0 10px 24px rgba(30,32,36,.25); }
.arch-tip b { font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.1; color: var(--ochre-light); }
.arch-tip .mute { color: #B9B4AA; }
.arch-tip::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; background: var(--ink); transform: translateX(-50%) rotate(45deg); }

/* réseau */
.graph-svg .ring { stroke: currentColor; opacity: .25; }
.graph-svg .node { outline: none; }
.graph-svg .node.link { cursor: pointer; }
.graph-svg .e { transition: stroke-opacity .2s, stroke-width .2s; }
.graph-svg.hl .e:not(.hot) { stroke-opacity: .03 !important; }
.graph-svg.hl .node:not(.hot) { opacity: .55; }
.graph-svg .node.hot .n { stroke-width: 2.4; }
.graph-svg .node { transition: opacity .2s; }
.dark .graph-svg .n { stroke: var(--stone-light); }
.dark .graph-svg .node:not(.is-key) .n { fill: var(--slate); }
.dark .graph-svg .node:not(.is-key) .n[fill="var(--moss)"] { fill: var(--moss); }

/* bandes sombres */
.dark { background: var(--slate); color: var(--stone-light); }
.dark .mute, .dark p { color: #C4BFB5; }
.dark a { color: var(--ochre-light); }
.dark a:hover { color: var(--stone-light); }
.dark h2, .dark h3 { color: var(--stone-light); }

/* statuts : casse de phrase, plus calmes */
.st { letter-spacing: .01em; font-size: 13px; padding: 3px 10px; border-radius: 99px; }

/* pied de page */
.foot { padding: 0; background: var(--ink); color: #C4BFB5; border: 0; }
.foot a { color: var(--stone-light); text-decoration: none; }
.foot a:hover { color: var(--ochre-light); text-decoration: underline; }
.foot .foot-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 32px; padding-top: 64px; padding-bottom: 48px; justify-content: initial; }
.foot .foot-grid > div { display: grid; gap: 9px; align-content: start; min-width: 0; }
.foot h4 { margin: 0 0 6px; font: 600 13px var(--sans); color: var(--stone-light); letter-spacing: .02em; }
.foot .brand { color: var(--stone-light); }
.foot .brand svg { color: var(--stone-light); }
.foot .foot-brand p { color: #C4BFB5; max-width: 34ch; margin-top: 8px; }
.foot .foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 32px; padding-top: 20px; padding-bottom: 28px; border-top: 1px solid #3A3D43; font-size: 13px; }
.foot .mute { color: #A9A49B; }
@media (max-width: 900px) { .foot .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .foot .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 720px) { .mode { display: none; } }
.foot .foot-base span { overflow-wrap: anywhere; }

/* ===== v3 : « l'inscription » (accueil n° 5 choisi par Alex). Dalle gravée, une colonne de lecture, pied centré. ===== */
:root { --slab: #CFC9BE; --carve: #2B2E33; --measure: 680px; }
body { background: var(--stone); }
::selection { background: var(--ochre-light); color: var(--ink); }
.top { background: var(--stone); backdrop-filter: none; border-bottom: 1px solid var(--stone-deep); }
.btn-launch, .btn-launch:hover, .btn-launch:active { box-shadow: 0 1px 2px rgba(30,32,36,.18), 0 4px 10px rgba(124,67,22,.18); }
.btn-launch:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(30,32,36,.18), 0 8px 18px rgba(124,67,22,.22); }
.btn-launch:active { transform: none; }
.carve { font-family: var(--serif); color: var(--carve); text-shadow: 0 1.5px 0 rgba(255,255,255,.55), 0 -1px 0 rgba(30,32,36,.22); }
.slab { position: relative; max-width: 1200px; margin: 12px auto 0; background: var(--slab); border: 1.5px solid var(--ink); text-align: center;
  display: grid; place-items: center; padding: 64px 48px; box-shadow: inset 0 2px 0 rgba(255,255,255,.45), inset 0 -3px 0 rgba(30,32,36,.12), 0 18px 40px -24px rgba(30,32,36,.45); }
.slab::before { content: ""; position: absolute; inset: 14px; border: 0.75px solid rgba(30,32,36,.45); pointer-events: none; }
.slab-in { display: grid; justify-items: center; gap: 22px; max-width: 980px; position: relative; }
.slab h1 { font-size: clamp(46px, 6.4vw, 96px); line-height: .94; text-wrap: balance; }
.slab .lead { font-family: var(--serif); font-size: clamp(20px, 2vw, 26px); color: var(--carve); max-width: 40ch; text-wrap: balance; }
.slab .rule { width: 120px; height: 1.5px; background: var(--ink); opacity: .5; }
.slab .note { font-size: 14px; color: #44484F; }
.slab .acts { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.slab-page { margin-left: var(--gutter); margin-right: var(--gutter); padding: 48px 40px; }
@media (min-width: 1248px) { .slab-page { margin-left: auto; margin-right: auto; } }
.slab-page h1 { font-size: clamp(40px, 5vw, 72px); }
.col { max-width: var(--measure); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); box-sizing: content-box; }
.prose p { font-family: var(--serif); font-size: clamp(21px, 2vw, 26px); line-height: 1.42; max-width: none; color: var(--ink); text-wrap: pretty; }
.prose p + p { margin-top: 22px; }
.prose em { font-style: normal; color: var(--ochre-ink); }
/* pied centré */
.foot { text-align: center; }
.foot .foot-c { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-flow: row; justify-items: center; gap: 18px; padding: 72px 0 34px; }
.foot .foot-c .brand { font-size: 44px; gap: 14px; }
.foot .foot-c .brand svg { width: 40px; height: 40px; }
.foot .foot-c p { max-width: 52ch; color: var(--on-dark-2, #C4BFB5); font-size: 14.5px; }
.foot .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 26px; font-size: 14.5px; }
.foot .foot-base { justify-content: center; text-align: center; }
@media (max-width: 720px) {
  .slab { margin: 10px 12px 0; padding: 44px 24px; }
  .slab::before { inset: 9px; }
}

/* v3 : têtes des pages intérieures taillées dans la même dalle que l'accueil */
.slab-head { margin: 28px 0 40px; padding: 56px 40px; justify-items: center; }
.slab-head > * { position: relative; }
.slab-head h1 { font-size: clamp(40px, 5vw, 72px); line-height: .96; text-wrap: balance; }
.slab-head p, .slab-head .mute { max-width: 62ch; margin-inline: auto; color: #44484F; text-wrap: pretty; }
.ident.slab-coin { place-items: initial; align-items: end; border-bottom: 1.5px solid var(--ink); text-align: left; margin: 24px 0 8px; padding: 36px 40px; }
.slab-coin > * { position: relative; }
.slab-coin .meta, .slab-coin .meta span { color: #44484F; }
@media (max-width: 720px) {
  .slab-head { margin: 16px 0 28px; padding: 40px 22px; }
  .ident.slab-coin { grid-template-columns: minmax(0, 1fr); padding: 28px 22px; }
}
.foot a.btn-launch, .foot a.btn-launch:hover { color: var(--ink); text-decoration: none; }
::placeholder { color: #5F636A; opacity: 1; }
p, li, figcaption { text-wrap: pretty; }
.slab-coin .slot { border: 0; background: transparent; outline: 1px dashed rgba(30,32,36,.45); outline-offset: -1px; box-shadow: none; }
main section.blk > p.mute { max-width: 560px; }

/* le compte X : bouton carré de l'en-tête (même trait que les boutons), lien avec icône dans le pied de page */
.xlink { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 38px; height: 38px; border: 1.5px solid var(--ink); border-radius: var(--radius); color: var(--ink); }
.xlink:hover { background: var(--ink); color: var(--stone-light); }
.foot .links a.x { display: inline-flex; align-items: center; gap: 7px; }
@media (max-width: 720px) { .top .xlink { margin-left: auto; } .top .xlink + .btn { margin-left: 0; } .top .wrap { gap: 12px; } }
