/* The inner "about" pages: download, why, changelog, faq, press, privacy,
   security and 404 all load this. Shared pieces first, then a block per page.
   Bigger page layouts live in download.css, why.css and changelog.css. */

/* ------------------------------------------------------------ hero with art */
.ph-split { display: grid; gap: 2.5rem; align-items: center; grid-template-columns: minmax(0, 1fr); }
/* base .split uses 1fr columns, which grow to fit a long code line; keep them in the viewport */
.split > *, .ph-copy > * { min-width: 0; }
.ph-copy { display: grid; gap: 1.3rem; align-content: start; }
@media (min-width: 960px) { .ph-split { grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); } }
.ph-art { position: relative; justify-self: center; width: min(100%, 360px); aspect-ratio: 1; display: grid; place-items: end center; }
.ph-art .pool {
  position: absolute; inset: 8% 0 0; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(63, 184, 163, .28), rgba(36, 80, 75, .2) 55%, transparent 72%);
}
.ph-art .pool::after {
  content: ''; position: absolute; left: 14%; right: 14%; bottom: 13%; height: 14%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(234, 217, 182, .32), transparent);
}
.ph-art .crab { position: relative; width: 62%; margin-bottom: 14%; }
.ph-art .crab svg { width: 100%; height: auto; }
@media (max-width: 959px) { .ph-art { width: 220px; margin-top: -.5rem; } }

/* a pixel speech bubble, like the one on the home beach */
.say {
  position: absolute; z-index: 2; padding: .55rem .85rem; border-radius: 12px; background: var(--paper); color: var(--ink);
  font: 700 1rem/1.1 var(--f-pixel); white-space: nowrap; box-shadow: 4px 4px 0 rgba(0, 0, 0, .3);
}
.say::after { content: ''; position: absolute; left: 16px; bottom: -10px; border: 10px solid transparent; border-top-color: var(--paper); border-bottom: 0; border-left: 0; }
.ph-art .say { top: 16%; left: 56%; }
@media (prefers-reduced-motion: no-preference) {
  .js .ph-art .say { animation: say-in .6s var(--ease-spring) .6s both; }
}
@keyframes say-in { from { opacity: 0; transform: translateY(8px) scale(.8); } }

/* ------------------------------------------------------------ shared blocks */
.callout {
  display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; align-items: start; padding: 1.1rem 1.3rem; border-radius: var(--radius);
  border: 1px solid rgba(127, 214, 194, .3); background: rgba(63, 184, 163, .08);
}
.callout > .ic { font-size: 1.3rem; line-height: 1.3; }
.callout p { color: var(--text-2); }
.callout p + p { margin-top: .5rem; }
.callout b, .callout strong { color: var(--paper); }
.callout.warn { border-color: rgba(255, 209, 102, .45); background: rgba(255, 209, 102, .07); }
.callout.alert { border-color: rgba(255, 122, 92, .45); background: rgba(255, 122, 92, .08); }

.check-list, .x-list { list-style: none; display: grid; gap: .7rem; }
.check-list li, .x-list li { display: grid; grid-template-columns: 1.4rem 1fr; gap: .5rem; color: var(--text-2); }
.check-list li::before { content: '✓'; color: var(--glass); font-weight: 800; }
.x-list li::before { content: '✕'; color: var(--coral); font-weight: 800; }
.check-list b, .x-list b, .check-list strong { color: var(--paper); }

.num-list { list-style: none; counter-reset: n; display: grid; gap: 1rem; }
.num-list > li { counter-increment: n; display: grid; grid-template-columns: 36px 1fr; gap: .9rem; align-items: start; color: var(--text-2); }
.num-list > li::before {
  content: counter(n); width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px;
  background: var(--coral); color: var(--ink); font: 700 1.1rem/1 var(--f-pixel); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2);
}
.num-list > li > div { padding-top: .3rem; }
.num-list b { color: var(--paper); }

.jump { display: flex; flex-wrap: wrap; gap: .5rem; }
.jump a {
  display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .8rem; border-radius: 999px; border: 1px solid var(--line-2);
  background: rgba(19, 40, 39, .5); color: var(--text-2); font: 600 .78rem/1.2 var(--f-mono); text-decoration: none; transition: border-color .2s, color .2s, background-color .2s;
}
.jump a:hover { color: var(--paper); border-color: var(--glass); background: rgba(63, 184, 163, .1); }

.data-table { width: 100%; border-collapse: collapse; font-size: .96rem; }
.data-table th, .data-table td { padding: .85rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.data-table th { font: 600 .72rem/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--glass); background: rgba(19, 40, 39, .55); }
.data-table td { color: var(--text-2); }
.data-table td:first-child { color: var(--paper); font-weight: 700; }
.data-table code { color: var(--foam); }
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(13, 28, 29, .6); }
.table-wrap .data-table tr:last-child td { border-bottom: 0; }

/* a long document: sticky contents beside the text */
.doc-grid { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .doc-grid { grid-template-columns: 230px minmax(0, 1fr); gap: 4rem; } }
.toc { align-self: start; }
@media (min-width: 1000px) { .toc { position: sticky; top: 100px; } }
.toc h2 { font: 600 .72rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--glass); margin-bottom: 1rem; }
.toc ol { list-style: none; display: grid; gap: .15rem; border-left: 1px solid var(--line-2); }
.toc a { display: block; padding: .4rem 0 .4rem 1rem; margin-left: -1px; border-left: 2px solid transparent; color: var(--text-2); text-decoration: none; font-size: .95rem; line-height: 1.35; }
.toc a:hover { color: var(--paper); border-left-color: var(--coral); }
@media (max-width: 999px) {
  .toc ol { display: flex; flex-wrap: wrap; gap: .4rem; border: 0; }
  .toc a { padding: .4rem .75rem; border: 1px solid var(--line-2); border-radius: 999px; font-size: .86rem; margin: 0; }
}
.doc-body > section + section { margin-top: clamp(3.5rem, 2.5rem + 3vw, 5.5rem); }
.doc-body > section { scroll-margin-top: 96px; }
.doc-body h2.display { font-size: var(--step-3); margin-bottom: 1.2rem; }
.doc-body h3 { font-size: var(--step-1); margin: 2rem 0 .8rem; }
.doc-body p, .doc-body li { color: var(--text-2); }
.doc-body p + p, .doc-body p + ul, .doc-body ul + p { margin-top: 1rem; }
.doc-body strong, .doc-body b { color: var(--paper); }
.doc-body code { background: var(--reef); padding: .1em .4em; border-radius: 5px; color: var(--foam); overflow-wrap: anywhere; }
.doc-body .prose-list { list-style: none; display: grid; gap: .75rem; }
.doc-body .prose-list > li { position: relative; padding-left: 1.3rem; }
.doc-body .prose-list > li::before { content: ''; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; background: var(--coral); }
.doc-body .callout { margin-block: 1.5rem; }
.updated { font: 500 .78rem/1.4 var(--f-mono); color: var(--text-3); }

/* the feature ledger: who each feature talks to, what goes, when */
.ledger { display: grid; gap: .6rem; margin-top: 1.5rem; }
.ledger > div {
  display: grid; gap: .5rem 1.5rem; padding: 1.1rem 1.2rem; border-radius: 12px; border: 1px solid var(--line); background: rgba(19, 40, 39, .4);
}
@media (min-width: 760px) { .ledger > div { grid-template-columns: 210px 1fr; } }
.ledger h3 { margin: 0; font-size: 1.02rem; line-height: 1.3; color: var(--paper); }
.ledger .who { display: block; margin-top: .45rem; font: 600 .72rem/1.45 var(--f-mono); color: var(--glass); }
.ledger dl { display: grid; gap: .55rem; margin: 0; }
.ledger dt { font: 600 .68rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.ledger dd { margin: .2rem 0 0; color: var(--text-2); font-size: .96rem; }
.ledger .off { display: inline-block; margin-left: .3rem; padding: .1rem .45rem; border-radius: 5px; background: rgba(127, 214, 194, .12); color: var(--foam); font: 600 .68rem/1.4 var(--f-mono); }

.promises { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.promise { padding: 1.4rem; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(36, 80, 75, .28), rgba(13, 28, 29, .6)); }
.promise .ic { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 11px; font-size: 1.3rem; background: rgba(255, 122, 92, .12); border: 1px solid rgba(255, 122, 92, .28); }
.promise h3 { margin-top: 1rem; font-size: 1.1rem; line-height: 1.3; }
.promise p { margin-top: .45rem; color: var(--text-2); font-size: .97rem; }

/* ------------------------------------------------------------ pages: faq */
.faq-layout { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .faq-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 4rem; } .faq-layout .toc { position: sticky; top: 100px; } }
.faq-group + .faq-group { margin-top: 3.5rem; }
.faq-group { scroll-margin-top: 96px; }
.faq-group > h2 { display: flex; align-items: center; gap: .8rem; font-size: var(--step-2); margin-bottom: 1.2rem; }
.faq-group > h2 .n { font: 600 .74rem/1 var(--f-mono); letter-spacing: .12em; color: var(--coral); }
.faq-list { display: grid; gap: .6rem; }
.faq-list details {
  border-radius: var(--radius); border: 1px solid var(--line); background: rgba(19, 40, 39, .42);
  transition: border-color .25s, background-color .25s;
}
.faq-list details:hover { border-color: var(--line-2); }
.faq-list details[open] { border-color: rgba(255, 122, 92, .4); background: linear-gradient(180deg, rgba(36, 80, 75, .32), rgba(19, 40, 39, .5)); }
.faq-list summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr 30px; gap: 1rem; align-items: center;
  padding: 1.05rem 1.2rem; font-weight: 700; font-size: 1.06rem; line-height: 1.35; border-radius: var(--radius);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: '+'; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line-2);
  color: var(--glass); font: 700 1.1rem/1 var(--f-mono); transition: transform .3s var(--ease-out), background-color .2s, color .2s;
}
.faq-list details[open] summary::after { content: '−'; background: var(--coral); color: var(--ink); border-color: transparent; }
.faq-list .a { padding: 0 1.2rem 1.25rem; color: var(--text-2); max-width: 72ch; }
.faq-list .a > * + * { margin-top: .75rem; }
.faq-list .a ul { padding-left: 1.2rem; }
.faq-list .a li + li { margin-top: .35rem; }
.faq-list .a li::marker { color: var(--coral); }
.faq-list .a code { background: var(--reef); padding: .1em .4em; border-radius: 5px; color: var(--foam); }
.faq-list .a strong { color: var(--paper); }
@media (prefers-reduced-motion: no-preference) {
  .faq-list details[open] .a { animation: faq-open .35s var(--ease-out); }
}
@keyframes faq-open { from { opacity: 0; transform: translateY(-6px); } }
.faq-side-card { margin-top: 2rem; padding: 1.2rem; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(19, 40, 39, .4); text-align: center; }
.faq-side-card .crab { display: block; width: 110px; margin: .4rem auto .8rem; }
.faq-side-card p { color: var(--text-2); font-size: .94rem; }
.faq-side-card a { display: inline-block; margin-top: .6rem; }
@media (max-width: 999px) { .faq-side-card { display: none; } }

/* ------------------------------------------------------------ pages: press */
.blurbs { display: grid; gap: 1rem; align-items: start; }
@media (min-width: 900px) { .blurbs { grid-template-columns: .8fr 1.2fr; } }
.blurb { display: grid; gap: 1rem; align-content: start; padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--line-2); background: rgba(13, 28, 29, .7); }
.blurb header { display: flex; align-items: center; gap: .8rem; }
.blurb header span { font: 600 .72rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--glass); }
.blurb .copy-btn { margin-left: auto; }
.blurb p { font-size: 1.08rem; color: var(--paper); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 0; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; background: rgba(13, 28, 29, .6); }
.facts > div { padding: 1.1rem 1.25rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.facts dt { font: 600 .68rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.facts dd { margin: .5rem 0 0; color: var(--paper); font-weight: 700; }
.facts dd a { color: var(--foam); }
.assets { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); }
.asset { display: flex; flex-direction: column; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(19, 40, 39, .45); overflow: hidden; transition: border-color .25s, transform .35s var(--ease-out); }
.asset:hover { border-color: var(--line-2); transform: translateY(-3px); }
.asset .thumb { aspect-ratio: 16 / 10; display: grid; place-items: center; background: repeating-conic-gradient(rgba(255, 255, 255, .025) 0 25%, transparent 0 50%) 0 0 / 20px 20px, var(--deep); border-bottom: 1px solid var(--line); overflow: hidden; }
.asset .thumb img { max-width: 92%; max-height: 88%; width: auto; object-fit: contain; }
.asset .thumb.tall img { max-height: 92%; }
.asset .thumb.fill img { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: cover; }
.asset .meta { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; margin-top: auto; }
.asset .meta b { display: block; font-size: .98rem; }
.asset .meta span { display: block; font: 500 .7rem/1.4 var(--f-mono); color: var(--text-3); }
.asset .meta .btn { margin-left: auto; }
.swatches { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.swatch { border-radius: 12px; border: 1px solid var(--line); overflow: hidden; background: rgba(19, 40, 39, .45); }
.swatch i { display: block; height: 76px; background: var(--c); }
.swatch b { display: block; padding: .7rem .8rem 0; font-size: .95rem; }
.swatch code { display: block; padding: .15rem .8rem .75rem; color: var(--text-3); font-size: .74rem; }
.type-specimens { display: grid; gap: .8rem; }
.type-specimens > div { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: baseline; padding: 1rem 1.2rem; border-radius: 12px; border: 1px solid var(--line); background: rgba(19, 40, 39, .4); }
.type-specimens .sample { font-size: 1.6rem; line-height: 1.1; color: var(--paper); }
.type-specimens .sample.pixel { font-family: var(--f-pixel); font-weight: 700; }
.type-specimens .sample.mono { font-family: var(--f-mono); font-size: 1.1rem; }
.type-specimens > div > span:last-child { font: 500 .72rem/1.3 var(--f-mono); color: var(--text-3); text-align: right; }
.dodont { display: grid; gap: 1rem; }
@media (min-width: 800px) { .dodont { grid-template-columns: 1fr 1fr; } }
.dodont > div { padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(19, 40, 39, .4); }
.dodont .yes { border-color: rgba(127, 214, 194, .35); }
.dodont .no { border-color: rgba(255, 122, 92, .35); }
.dodont h3 { font: 700 var(--step-1)/1.1 var(--f-pixel); margin-bottom: 1rem; }
.dodont .yes h3 { color: var(--glass); }
.dodont .no h3 { color: var(--coral-hi); }

/* ------------------------------------------------------------ pages: privacy & security */
.glance { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.glance > div { padding: 1.2rem; border-radius: 12px; border: 1px solid var(--line); background: rgba(19, 40, 39, .45); }
.glance b { display: block; font: 700 1.25rem/1.1 var(--f-pixel); color: var(--paper); }
.glance span { display: block; margin-top: .45rem; color: var(--text-2); font-size: .94rem; }
.glance > div.good b { color: var(--glass); }
.report-card {
  display: grid; gap: 1.5rem; align-items: center; padding: clamp(1.5rem, 1rem + 2vw, 2.4rem); border-radius: 20px;
  border: 1px solid rgba(255, 209, 102, .45);
  background: radial-gradient(60% 120% at 100% 0%, rgba(255, 209, 102, .14), transparent 60%), rgba(19, 40, 39, .6);
}
@media (min-width: 820px) { .report-card { grid-template-columns: auto 1fr auto; } }
.report-card img { width: 120px; }
.report-card h2 { font-size: var(--step-2); }
.report-card p { margin-top: .5rem; color: var(--text-2); max-width: 56ch; }
.boundary { display: grid; gap: .6rem; font: 600 .82rem/1.35 var(--f-mono); }
.boundary .tier { display: grid; gap: .6rem; }
@media (min-width: 760px) { .boundary .tier.two { grid-template-columns: 2fr 1fr; } .boundary .tier.three { grid-template-columns: repeat(3, 1fr); } }
.boundary .box { padding: .9rem 1rem; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(13, 28, 29, .8); color: var(--paper); text-align: center; }
.boundary .box small { display: block; margin-top: .3rem; font-weight: 500; color: var(--text-3); }
.boundary .box.untrusted { border-color: rgba(255, 122, 92, .5); background: repeating-linear-gradient(135deg, rgba(255, 122, 92, .08) 0 10px, transparent 10px 20px), rgba(13, 28, 29, .8); color: var(--coral-hi); }
.boundary .box.main { border-color: rgba(127, 214, 194, .5); background: rgba(63, 184, 163, .1); }
.boundary .box.confirm { border-color: rgba(255, 209, 102, .5); }
.boundary .link { text-align: center; color: var(--text-3); font-weight: 500; font-size: .74rem; }
.boundary .link::before { content: '↓ '; color: var(--glass); }

/* ------------------------------------------------------------ pages: 404 */
.lost { position: relative; min-height: calc(100svh - 72px); display: grid; place-items: center; overflow: hidden; padding-block: 4rem 0; text-align: center; }
.lost .wrap { position: relative; z-index: 1; display: grid; justify-items: center; gap: 1.2rem; }
.lost .code { font: 700 clamp(5rem, 3rem + 12vw, 12rem)/.85 var(--f-pixel); color: transparent; -webkit-text-stroke: 2px var(--tide); letter-spacing: .02em; }
.lost h1 { font-size: var(--step-4); max-width: 18ch; }
.lost .lede { margin-inline: auto; }
.lost .scene { position: relative; width: min(100%, 520px); height: 210px; margin-top: 1rem; }
.lost .scene .sand { position: absolute; left: 0; right: 0; bottom: 0; height: 46px; border-radius: 50% 50% 0 0 / 40% 40% 0 0; background: radial-gradient(circle, rgba(140, 110, 70, .35) 1.5px, transparent 2px) 0 0 / 22px 18px, linear-gradient(#e8d4a8, #d6bd88); }
.lost .scene .crab { position: absolute; left: 50%; bottom: 30px; width: 170px; transform: translateX(-50%); }
.lost .scene .crab svg { width: 100%; height: auto; }
.lost .scene .say { left: calc(50% + 50px); bottom: 150px; }
.lost .scene .q { position: absolute; font: 700 1.6rem/1 var(--f-pixel); color: var(--glass); opacity: .7; }
.lost .scene .q.a { left: calc(50% - 130px); bottom: 140px; }
.lost .scene .q.b { left: calc(50% - 100px); bottom: 175px; font-size: 1.1rem; }
@media (prefers-reduced-motion: no-preference) {
  .lost .scene .crab { animation: look-around 5s ease-in-out infinite; }
  .lost .scene .q { animation: bob 2.4s ease-in-out infinite; }
  .lost .scene .q.b { animation-delay: -1.2s; }
}
@keyframes look-around { 0%, 40% { transform: translateX(-50%); } 50%, 90% { transform: translateX(-50%) scaleX(-1); } }
@keyframes bob { 50% { transform: translateY(-8px); } }
.lost .btn-row { justify-content: center; margin-top: .6rem; }
.lost .elsewhere { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.4rem; margin-top: 1rem; font-weight: 700; }
.ledger h3 .off { display: table; margin: .4rem 0 0; }
@media (max-width: 959px) { .ph-art .say { left: auto; right: 0; } }
/* the closing band on a phone: let long buttons wrap, and give the crab's hat room */
@media (max-width: 720px) {
  .cta-band .btn { white-space: normal; text-align: center; }
  .cta-band .cta-crab { display: block; margin-top: 2.5rem; }
}
@media (max-width: 560px) { .lost .scene .say { left: auto; right: 0; bottom: 165px; } .lost .scene .q.a { left: 8%; } .lost .scene .q.b { left: 16%; } }

/* faq: search (js/faq.js) */
.faq-search { position: relative; display: flex; align-items: center; margin-bottom: 1.6rem; }
.faq-search svg { position: absolute; left: 1rem; width: 18px; height: 18px; color: var(--text-3); pointer-events: none; }
.faq-search input { width: 100%; min-height: 52px; padding: 0 7.5rem 0 2.9rem; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(8, 18, 20, .7); color: var(--paper); font: inherit; font-size: 1rem; }
.faq-search input::placeholder { color: var(--text-3); }
.faq-search input:focus { outline: none; border-color: var(--glass); box-shadow: 0 0 0 3px rgba(127, 214, 194, .18); }
.faq-count { position: absolute; right: 1rem; font: 600 .74rem/1 var(--f-mono); color: var(--text-3); }
.faq-none { padding: 1.5rem; border-radius: 14px; border: 1px dashed var(--line-2); color: var(--text-2); text-align: center; }

@media (max-width: 600px) { .faq-search input { padding-right: 1rem; } .faq-count { display: none; } }
