/* Inner pages: the templates ported from the inner-pages mockup (Platform, Method, About, Journal, Glossary, Data, Changelog). */
/* PLATFORM */
.modules { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; }
.mod { display: flex; flex-direction: column; gap: 14px; min-height: 290px; }
.mod .top { display: flex; justify-content: space-between; align-items: center; }
.mod .glyph { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line2); background: rgba(255,255,255,.03); }
.mod .glyph svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.mod ul { list-style: none; padding: 0; margin-top: auto; display: grid; gap: 7px; border-top: 1px solid var(--line); padding-top: 14px; }
.mod li { font-size: 14px; color: var(--soft); display: flex; gap: 10px; }
.mod li::before { content: ""; flex: none; width: 5px; height: 5px; margin-top: 9px; border-radius: 1px; background: var(--c, var(--mute)); }
.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-top: 10px; }
.flow div { position: relative; padding: 18px 16px; border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.flow div:first-child { border-radius: 16px 0 0 16px; } .flow div:last-child { border-radius: 0 16px 16px 0; }
.flow div + div { border-left: 0; }
.flow b { display: block; font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.flow span { font-size: 13.5px; color: var(--soft); line-height: 1.45; display: block; }
.flow div:not(:last-child)::after { content: "→"; position: absolute; right: -9px; top: 50%; transform: translateY(-50%); z-index: 2; font-size: 13px; color: var(--mute); background: var(--void); padding: 2px 0; }
.not { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.not .card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.not .card h3::before { content: "✕"; color: var(--ember); margin-right: 10px; font-size: .9em; }

/* METHOD */
.doc { display: grid; grid-template-columns: 230px 1fr; gap: 60px; align-items: start; }
.doc > * { min-width: 0; }
.toc { position: sticky; top: 140px; display: grid; gap: 2px; }
.toc a { display: flex; gap: 10px; text-decoration: none; font-size: 14px; color: var(--mute); padding: 7px 12px; border-radius: 10px; border-left: 1px solid var(--line); }
.toc a span { font-family: var(--mono); font-size: 11px; padding-top: 3px; }
.toc a.on { color: var(--steel); background: rgba(255,255,255,.04); border-left-color: var(--ember); }
.prose { max-width: 70ch; }
.prose section { padding: 8px 0 54px; scroll-margin-top: 140px; }
.prose h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); }
.prose h2 .n { font: 500 13px var(--mono); color: var(--ember); display: block; letter-spacing: .08em; margin-bottom: 8px; }
.prose p { font-size: 1.06rem; line-height: 1.72; margin-bottom: 16px; }
.prose strong { color: var(--steel); font-weight: 500; }
.callout { border: 1px solid var(--line2); border-left: 2px solid var(--ember); border-radius: 0 16px 16px 0; padding: 18px 22px; background: rgba(255,122,69,.04); margin: 22px 0; }
.callout b { display: block; font: 500 11px var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ember); margin-bottom: 6px; }
.callout p { margin: 0; font-size: 1rem; }
pre.file { font: 12.8px/1.8 var(--mono); color: var(--soft); background: #070A10; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; overflow-x: auto; margin: 22px 0; }
pre.file .k { color: var(--steel); } pre.file .s { color: #b9c7e6; } pre.file .e { color: var(--ember); } pre.file .c { color: var(--mute); }
.eras { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 22px 0; }
.eras div { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: rgba(255,255,255,.02); }
.eras b { display: block; font: 500 11px var(--mono); letter-spacing: .07em; text-transform: uppercase; margin-bottom: 4px; }
.eras span { font-size: 13px; color: var(--soft); line-height: 1.4; display: block; }

/* ABOUT */
.big { font-size: clamp(1.7rem, 1.1rem + 2.2vw, 2.9rem); font-weight: 500; letter-spacing: -.04em; line-height: 1.15; max-width: 26ch; }
.big em { font-style: normal; color: var(--mute); }
.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.principles .n { font: 500 12px var(--mono); color: var(--ember); letter-spacing: .08em; }
.principles h3 { margin: 12px 0 8px; }
.story { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.spiralbox { aspect-ratio: 1; border-radius: 26px; border: 1px solid var(--line); position: relative; overflow: hidden;
  background: radial-gradient(50% 50% at 50% 50%, rgba(120,110,255,.22), transparent 70%), radial-gradient(40% 40% at 70% 30%, rgba(255,110,170,.14), transparent 70%), #06080D; }
.spiralbox i { position: absolute; inset: 22%; background: url('/logo-mark.svg') center/contain no-repeat; filter: drop-shadow(0 0 24px rgba(170,180,255,.5)); }
.spiralbox .lbl { position: absolute; font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.person { display: flex; gap: 18px; align-items: center; }
.person .ph { width: 76px; height: 76px; flex: none; border-radius: 18px; border: 1px solid var(--line2); position: relative; overflow: hidden; background: #111521; }
.person .ph::after { content: ""; position: absolute; inset: -40%; background: conic-gradient(#ff7a45, #ffd166, #3ee0a0, #3ab7ff, #7b6cff, #ff4d6d, #ff7a45); opacity: .22; mix-blend-mode: color-dodge; filter: blur(10px); animation: spin 8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* JOURNAL */
.feat { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0; padding: 0; }
.feat .art { min-height: 340px; position: relative; overflow: hidden; background: #06080D; border-right: 1px solid var(--line); }
.feat .art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.feat .body { padding: 34px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.feat h3 { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.1rem); letter-spacing: -.035em; line-height: 1.12; }
.meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font: 500 11.5px var(--mono); color: var(--mute); letter-spacing: .04em; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 46px 0 22px; }
.filters button { font: 500 13px var(--display); color: var(--soft); background: transparent; border: 1px solid var(--line2); border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.filters button.on { color: #0E1013; background: var(--steel); border-color: transparent; }
.posts { display: grid; }
.post { display: grid; grid-template-columns: 130px 1fr 150px; gap: 26px; align-items: baseline; padding: 24px 6px; border-top: 1px solid var(--line); text-decoration: none; transition: background .25s, padding .35s cubic-bezier(.2,.7,.2,1); border-radius: 4px; }
.post:hover { background: rgba(255,255,255,.025); padding-left: 16px; }
.post h3 { font-size: 1.25rem; margin-bottom: 4px; }
.post p { font-size: 14.5px; }
.post .cat { justify-self: end; }
.example { font: 500 10px var(--mono); color: var(--ember); letter-spacing: .08em; text-transform: uppercase; border: 1px dashed rgba(255,122,69,.5); border-radius: 999px; padding: 3px 8px; }

/* GLOSSARY */
.gtools { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 30px; }
.search { flex: 1; min-width: 260px; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(14,18,26,.55); }
.search input { flex: 1; background: none; border: 0; outline: 0; color: var(--steel); font: 15px var(--display); }
.search svg { width: 16px; height: 16px; stroke: var(--mute); fill: none; stroke-width: 1.8; }
.az { display: flex; gap: 3px; flex-wrap: wrap; }
.az a { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; font: 500 12px var(--mono); color: var(--mute); text-decoration: none; }
.az a.has { color: var(--steel); cursor: pointer; } .az a.has:hover { background: rgba(255,255,255,.06); }
.terms { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.term h3 { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 8px; }
.term h3 small { font: 500 10.5px var(--mono); color: var(--mute); letter-spacing: .06em; text-transform: uppercase; }
.term p { font-size: 14.5px; line-height: 1.6; }
.term .rel { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.term .rel a { font: 500 11px var(--mono); color: var(--soft); text-decoration: none; border-bottom: 1px dashed var(--line2); }
.letter { grid-column: 1 / -1; font: 500 13px var(--mono); color: var(--ember); letter-spacing: .1em; padding: 18px 2px 2px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }

/* FOUNDERS: holographic cards */
.founders { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 380px)); gap: 22px; }
.holo { padding: 14px; transform-style: preserve-3d; transition: transform .5s cubic-bezier(.2,.7,.2,1), border-color .3s; will-change: transform; }
.holo .frame { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 3 / 4; border: 1px solid var(--line2); }
.holo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.holo .foil { position: absolute; inset: 0; mix-blend-mode: color-dodge; opacity: .0; transition: opacity .4s;
  background: linear-gradient(115deg, transparent 20%, rgba(255,122,69,.55) 35%, rgba(255,209,102,.5) 42%, rgba(62,224,160,.5) 50%, rgba(58,183,255,.55) 58%, rgba(123,108,255,.55) 65%, transparent 80%);
  background-size: 250% 250%; background-position: var(--fx, 50%) var(--fy, 50%); }
.holo:hover .foil { opacity: .55; }
.holo .frame::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at var(--fx, 50%) var(--fy, 50%), rgba(255,255,255,.22), transparent 45%); opacity: 0; transition: opacity .4s; }
.holo:hover .frame::after { opacity: 1; }
.holo figcaption { padding: 16px 6px 4px; display: grid; gap: 6px; }
.holo figcaption > div { display: flex; justify-content: space-between; align-items: baseline; }
.holo figcaption p { font-size: 14px; }

/* DATA */
.cov { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14.5px; }
.cov th { text-align: left; font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); padding: 0 16px 12px; border-bottom: 1px solid var(--line2); }
.cov td { padding: 18px 16px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--soft); }
.cov td:first-child { color: var(--steel); font-weight: 500; white-space: nowrap; }
.cov td:first-child i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 10px; background: var(--c); box-shadow: 0 0 10px var(--c); }
.cov tr:hover td { background: rgba(255,255,255,.02); }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 22px; padding: 22px 8px 6px; background: var(--glass); }
.steps4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; counter-reset: s; }
.steps4 .card h3 { margin: 14px 0 8px; }
.steps4 .card .n { font: 500 12px var(--mono); color: var(--ember); letter-spacing: .08em; }
.split2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.yes h3::before { content: "✓"; color: var(--run); margin-right: 10px; }
.no h3::before { content: "✕"; color: var(--ember); margin-right: 10px; }
.list { list-style: none; padding: 0; display: grid; gap: 10px; margin-top: 14px; }
.list li { font-size: 14.5px; color: var(--soft); padding-left: 16px; position: relative; }
.list li::before { content: ""; position: absolute; left: 0; top: 10px; width: 5px; height: 5px; border-radius: 1px; background: var(--mute); }

/* CHANGELOG */
.log { position: relative; display: grid; gap: 0; }
.entry { display: grid; grid-template-columns: 190px 1fr; gap: 40px; padding: 0 0 56px; position: relative; }
.entry .when { position: sticky; top: 140px; align-self: start; }
.entry .when b { display: block; font: 500 13px var(--mono); color: var(--steel); letter-spacing: .04em; }
.entry .when span { font: 500 11px var(--mono); color: var(--mute); letter-spacing: .06em; text-transform: uppercase; }
.entry .body { border-left: 1px solid var(--line2); padding-left: 32px; position: relative; }
.entry .body::before { content: ""; position: absolute; left: -5px; top: 4px; width: 9px; height: 9px; border-radius: 2px; background: var(--c, var(--steel)); box-shadow: 0 0 12px var(--c, transparent); }
.entry h3 { font-size: 1.45rem; letter-spacing: -.03em; margin-bottom: 10px; }
.entry .items { display: grid; gap: 10px; margin-top: 16px; }
.entry .item { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: baseline; font-size: 15px; color: var(--soft); }
.kind { font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; text-align: center; border: 1px solid var(--line2); }
.kind.new { color: #0E1013; background: var(--teal); border-color: transparent; }
.kind.imp { color: var(--indigo); border-color: rgba(127,140,255,.5); }
.kind.site { color: var(--pink); border-color: rgba(255,116,180,.5); }
.kind.fix { color: var(--ember); border-color: rgba(255,122,69,.5); }

/* GLOSSARY: filters */
.gcats { display: flex; gap: 8px; flex-wrap: wrap; margin: -10px 0 26px; }
.gcats button { font: 500 12.5px var(--display); color: var(--soft); background: transparent; border: 1px solid var(--line2); border-radius: 999px; padding: 6px 13px; cursor: pointer; }
.gcats button.on { color: #0E1013; background: var(--steel); border-color: transparent; }
.gcount { font: 500 11.5px var(--mono); color: var(--mute); }

/* METHOD: the scroll stack of the eight steps above the long read */
.stack { list-style: none; padding: 0; margin: 0 0 70px; display: grid; gap: 14px; counter-reset: st; }
.stack li { position: relative; display: flex; gap: 18px; align-items: baseline; padding: 22px 26px; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(160deg, #10141c, #0a0d13); box-shadow: 0 -20px 50px -30px rgba(0, 0, 0, .9); }
.stack li a { text-decoration: none; font-size: clamp(1.15rem, 1rem + .6vw, 1.5rem); font-weight: 500; letter-spacing: -.025em; }
.stack li span { font: 500 12px var(--mono); color: var(--ember); letter-spacing: .08em; }
.js .stack.pinned li { position: sticky; top: calc(var(--nav-h) + var(--i) * 12px); transform-origin: 50% 0; transform: scale(var(--s, 1)); }
.js .stack.pinned { padding-bottom: 30vh; }

/* PLATFORM: how it fits, as an accordion gallery */
.acc { display: flex; gap: 10px; height: 260px; }
.acc .panel { position: relative; flex: 1; min-width: 0; overflow: hidden; border-radius: 20px; border: 1px solid var(--line); padding: 22px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; cursor: default; outline: none;
  background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--c, #8892a0) 22%, transparent), transparent 70%), linear-gradient(160deg, #0f131b, #090c11); transition: flex-grow .6s var(--ease), border-color .3s; }
.acc .panel.open { flex-grow: 3.2; border-color: var(--line2); }
.acc .panel:focus-visible { border-color: var(--ember); }
.acc .panel b { font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--c, var(--steel)); }
.acc .panel .n { position: absolute; top: 20px; left: 22px; font: 500 12px var(--mono); color: var(--mute); }
.acc .panel span:not(.n) { color: var(--soft); font-size: 14.5px; line-height: 1.5; max-width: 34ch; }
.acc .panel p { color: var(--soft); font-size: 14px; max-width: 40ch; opacity: 0; transform: translateY(6px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.acc .panel.open p { opacity: 1; transform: none; }

/* ABOUT: founders' photos and the contact band */
.contact-band { text-align: center; }
.contact-band .ctas { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }

@media (max-width: 900px) {
  .doc, .story, .feat { grid-template-columns: 1fr; } .toc { display: none; }
  .flow, .eras { grid-template-columns: 1fr; } .flow div { border-radius: 0 !important; border-left: 1px solid var(--line) !important; } .flow div:not(:last-child)::after { display: none; }
  .post { grid-template-columns: 1fr; gap: 6px; } .post .cat { justify-self: start; }
  .feat .art { min-height: 220px; border-right: 0; border-bottom: 1px solid var(--line); }
  .split2 { grid-template-columns: 1fr; } .entry { grid-template-columns: 1fr; gap: 12px; } .entry .when { position: static; } .entry .item { grid-template-columns: 1fr; gap: 4px; } .kind { justify-self: start; }
  .acc { flex-direction: column; height: auto; } .acc .panel { min-height: 0; padding-top: 48px; } .acc .panel p { opacity: 1; transform: none; }
  .modules { grid-template-columns: 1fr; } .terms { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .js .stack.pinned li { position: relative; top: auto; transform: none; } .js .stack.pinned { padding-bottom: 0; } .acc .panel p { opacity: 1; transform: none; } }

/* GLOSSARY: build-time list */
.terms .letter { margin: 0 0 4px; }
.az span { width: 30px; height: 30px; display: grid; place-items: center; font: 500 12px var(--mono); color: rgba(111, 120, 132, .5); }
.gcount { margin: 0 0 16px; }
.terms .empty { grid-column: 1 / -1; color: var(--mute); padding: 20px 2px; }
.term { scroll-margin-top: calc(var(--nav-h) + 12px); }
.terms .letter { scroll-margin-top: calc(var(--nav-h) + 12px); }

/* JOURNAL: topics and the empty state */
.topics { list-style: none; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 22px; }
.topics li { font: 500 13px var(--display); color: var(--soft); border: 1px solid var(--line2); border-radius: 999px; padding: 7px 14px; }
.empty-state { padding: clamp(28px, 4vw, 48px); max-width: 760px; }
.empty-state h2 { margin-top: 12px; }
.empty-state .ctas, .notfound .ctas { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }

/* DISCLAIMER, PRIVACY */
.legal section { padding: 0 0 26px; }
.legal h2 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem); }
.legal a { color: var(--steel); text-decoration-color: var(--ember); text-underline-offset: 4px; }
.legal > .lab { margin-bottom: 24px; }

/* 404 */
.notfound { min-height: 100vh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 10px; padding: 40px var(--side); position: relative; z-index: 2;
  background: radial-gradient(50% 40% at 50% 40%, rgba(120, 110, 255, .14), transparent 70%); }
.notfound h1 { font-weight: 500; font-size: clamp(2.2rem, 1.6rem + 2vw, 3.4rem); letter-spacing: -.05em; }
.notfound .ctas { justify-content: center; }

/* the particle illustrations (src/ui/art.js): on the platform panels and above each method step */
canvas.art { display: block; pointer-events: none; }
.acc { height: 330px; }
.acc .panel .art { position: absolute; left: 0; top: 0; width: 100%; height: 62%; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); opacity: .55; transition: opacity .5s var(--ease); }
.acc .panel.open .art { opacity: 1; }
.prose .art { width: 100%; height: clamp(150px, 20vw, 210px); margin: 4px 0 22px; border-radius: 16px; border: 1px solid var(--line);
  background: radial-gradient(80% 90% at 50% 0%, rgba(127, 140, 255, .06), transparent 70%), #07090e; }
@media (max-width: 900px) { .acc { height: auto; } .acc .panel { min-height: 210px; } .acc .panel .art { opacity: 1; } }
