/* Pages that are read rather than flicked through: legal, support, project, blog.
   Loaded after deck.css. Each page sets --c-bg / --c-ink (the app's card colour)
   and --tint (the page colour behind it) on <body>. */
body { background: var(--tint, #000000); }

/* ---------- page header ---------- */
.doc-head { padding: 72px 0 32px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.doc-head .app { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.doc-head .app img { width: 56px; height: 56px; border-radius: 14px; }
.doc-head .app span { font: 600 13px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.doc-head h1 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(56px, 9vw, 104px); line-height: .9; letter-spacing: .01em; }
.doc-head .updated { font: 600 12px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.doc-head .lede { margin: 0; max-width: 40em; font-size: 19px; line-height: 1.55; color: #e6e6e6; }

/* ---------- one card of reading ---------- */
.doc { background: var(--c-bg); color: var(--c-ink); border-radius: 24px; padding: 56px 64px 64px; box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 18px 40px rgba(0,0,0,.45); }
.doc + .doc { margin-top: 20px; }
.doc-body { max-width: 42em; }
.doc p, .doc li { font-size: 17px; line-height: 1.65; }
.doc p { margin: 0 0 16px; }
.doc ul, .doc ol { margin: 0 0 16px; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.doc h2 { margin: 48px 0 14px; display: flex; align-items: baseline; gap: 14px; font-family: var(--font-display); font-weight: 400; font-size: 36px; line-height: 1; letter-spacing: .01em; }
.doc h2:first-child { margin-top: 0; }
.doc h2 .n { font: 600 13px var(--font-mono); letter-spacing: .06em; opacity: .7; }
.doc h3 { margin: 28px 0 10px; font-size: 19px; }
.doc a { text-underline-offset: 3px; }
.doc code { font-family: var(--font-mono); font-size: .9em; }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 15px; }
.doc th, .doc td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid rgba(255,255,255,.25); vertical-align: top; }
.principle-box { margin: 8px 0 24px; padding: 22px 26px; border-radius: 16px; background: rgba(0,0,0,.24); border-left: 4px solid var(--accent); }
.principle-box p:last-child { margin: 0; }
.doc .btns { margin-top: 40px; }

/* the other pages for the same app sit under the card */
.siblings { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.siblings a { text-decoration: none; min-height: 44px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: 999px; border: 2px solid #4a4a4a; font: 700 14px var(--font-body); }
.siblings a[aria-current="page"] { border-color: var(--accent); }

/* ---------- project pages ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { padding: 5px 10px; border-radius: 999px; border: 1.5px solid #4a4a4a; font: 600 12px var(--font-mono); letter-spacing: .04em; }
.doc-head .btns { margin-top: 4px; }
.doc-head .btn { --c-ink: #ffffff; --c-bg: #111111; }
.doc-head .btn.store { background: var(--c-card, #ffffff); border-color: var(--c-card, #ffffff); color: var(--c-card-ink, #111111); }
.arch { margin: 0 0 8px; padding: 22px 26px; border-radius: 16px; background: rgba(0,0,0,.28); font: 14px/1.6 var(--font-mono); overflow-x: auto; white-space: pre; }
.shots { display: grid; gap: 14px; align-items: start; }
.shots + .shots { margin-top: 14px; }
.shots.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shots.wide > :last-child:nth-child(odd) { grid-column: 1 / -1; }   /* an odd one out spans the row */
.shots.tall { grid-template-columns: repeat(auto-fill, minmax(150px, 190px)); }
.shots button { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 10px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.shots img { display: block; width: 100%; height: auto; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.timeline li { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.2); font-size: 16px; line-height: 1.5; }
.timeline li:first-child { border-top: 0; }
.timeline .d { font: 600 12px/1.9 var(--font-mono); letter-spacing: .06em; opacity: .8; }
.timeline li.planned .d { color: var(--accent); opacity: 1; }
.doc.light .timeline li, .doc.light th, .doc.light td { border-color: rgba(17,17,17,.2); }
.doc.light .timeline li.planned .d { color: inherit; }

/* lightbox for project screenshots */
.lb { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.9); padding: 24px; }
.lb.on { display: flex; }
.lb img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.lb button { position: absolute; top: 16px; right: 16px; }

@media (max-width: 760px) {
  .doc-head { padding: 44px 0 24px; }
  .doc { padding: 28px 22px 32px; border-radius: 20px; }
  .doc p, .doc li { font-size: 16px; }
  .doc h2 { font-size: 30px; margin-top: 36px; }
  .shots.wide { grid-template-columns: minmax(0, 1fr); }
  .shots.tall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .arch { padding: 16px 18px; font-size: 12px; white-space: pre-wrap; }
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* Back link above a page title (essays, project pages) */
.back { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; font: 600 13px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: var(--dim); }
.back:hover, .back:focus-visible { color: var(--accent); }
.back:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
