/* ==========================================================================
   touchdaw.com — "console at night" editorial system
   Pure static CSS. No framework, no JS required anywhere on the site.
   Type: Fraunces (display serif) + Archivo (text/UI), self-hosted.
   ========================================================================== */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/fraunces-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/archivo-var.woff2') format('woff2');
}

:root {
  --bg: #0d0c0a;
  --bg-raise: #14120e;
  --bg-card: #161410;
  --line: #262219;
  --line-strong: #3d372c;
  --text: #cfc9ba;
  --text-dim: #8a8272;
  --text-faint: #5b5548;
  --head: #f0ead9;
  --amber: #e8a13d;
  --amber-bright: #ffbe55;
  --amber-dim: rgba(232, 161, 61, 0.14);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Archivo', 'Segoe UI', system-ui, sans-serif;
  --w-wide: 1180px;
  --w-prose: 730px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  background: var(--bg);
  color: var(--text);
  /* faint warm grain + top glow, pure CSS atmosphere */
  background-image:
    radial-gradient(1200px 500px at 50% -180px, rgba(232, 161, 61, 0.06), transparent 70%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.006) 0 1px, transparent 1px 3px);
}

::selection { background: var(--amber); color: #14120e; }

h1, h2, h3, h4 { color: var(--head); line-height: 1.18; letter-spacing: -0.01em; }
a { color: inherit; }

img { max-width: 100%; height: auto; display: block; }

.wrap       { max-width: var(--w-wide);  margin: 0 auto; padding: 0 24px; }
.wrap-prose { max-width: var(--w-prose); margin: 0 auto; padding: 0 24px; }

/* --- console tick rule: the site's signature divider ---------------------- */
.ticks {
  height: 10px;
  border-bottom: 1px solid var(--line);
  background-image: repeating-linear-gradient(
    90deg, var(--line) 0 1px, transparent 1px 16px);
  background-size: auto 6px;
  background-repeat: repeat-x;
  background-position: bottom;
}

/* --- skip link ------------------------------------------------------------ */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--amber); color: #14120e;
  padding: 10px 18px; font-weight: 600; z-index: 100;
}
.skip:focus { left: 0; }

/* --- masthead -------------------------------------------------------------- */
.masthead { border-bottom: 1px solid var(--line); }
.masthead-top {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; padding: 26px 0 18px;
}
.wordmark {
  font-family: var(--serif); font-weight: 600;
  font-size: 1.9rem; color: var(--head); text-decoration: none;
  letter-spacing: -0.015em;
}
.wordmark em { font-style: normal; color: var(--amber); }
.masthead-tag {
  font-size: 0.8rem; color: var(--text-dim);
  letter-spacing: 0.04em; display: none;
}
.masthead nav {
  display: flex; flex-wrap: wrap; gap: 4px 26px;
  padding: 0 0 14px;
  font-size: 0.86rem; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.masthead nav a {
  color: var(--text-dim); text-decoration: none;
  padding: 2px 0; border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.masthead nav a:hover { color: var(--head); border-color: var(--amber); }
.masthead nav a[aria-current="true"] { color: var(--amber); border-color: var(--amber); }

@media (min-width: 720px) {
  .masthead-tag { display: block; }
}

/* --- kicker / labels -------------------------------------------------------- */
.kicker {
  display: inline-block;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--amber); text-decoration: none;
}
a.kicker:hover { color: var(--amber-bright); }

.datestamp {
  font-size: 0.78rem; color: var(--text-faint); letter-spacing: 0.03em;
}

/* --- home: lead feature ------------------------------------------------------ */
.lead {
  display: grid; gap: 28px; padding: 44px 0 48px;
  align-items: center;
}
.lead-media { position: relative; }
.lead-media img { border: 1px solid var(--line-strong); border-radius: 4px; }
.lead-body .kicker { margin-bottom: 14px; }
.lead-title {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  margin: 10px 0 16px;
}
.lead-title a { color: var(--head); text-decoration: none; }
.lead-title a:hover { color: var(--amber-bright); }
.lead-desc { color: var(--text-dim); font-size: 1.02rem; max-width: 34em; }
.lead-meta { margin-top: 18px; }

@media (min-width: 880px) {
  .lead { grid-template-columns: 7fr 5fr; gap: 48px; }
  .lead.noimg { grid-template-columns: 1fr; max-width: 820px; }
}

/* --- section heads ------------------------------------------------------------ */
.sec-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin: 46px 0 8px;
}
.sec-head h2 {
  font-family: var(--serif); font-weight: 600; font-size: 1.5rem;
}
.sec-head .more {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-dim); text-decoration: none;
  white-space: nowrap;
}
.sec-head .more:hover { color: var(--amber); }

/* --- card duo (secondary features) -------------------------------------------- */
.duo { display: grid; gap: 28px; padding: 20px 0 8px; }
@media (min-width: 720px) { .duo { grid-template-columns: 1fr 1fr; gap: 40px; } }

.feature { text-decoration: none; display: block; }
.feature img {
  border: 1px solid var(--line); border-radius: 4px; margin-bottom: 14px;
  aspect-ratio: 16 / 9; object-fit: cover; width: 100%;
}
.feature h3 {
  font-family: var(--serif); font-weight: 600; font-size: 1.32rem;
  margin: 8px 0 8px;
}
.feature:hover h3 { color: var(--amber-bright); }
.feature p { color: var(--text-dim); font-size: 0.94rem; }
.feature .meta-row { margin-top: 10px; }

.meta-row {
  display: flex; align-items: baseline; gap: 12px;
  font-size: 0.78rem; color: var(--text-faint);
}

/* --- the index: numbered editorial list ----------------------------------------- */
.index-list { list-style: none; padding: 8px 0 30px; }
.index-list li { border-bottom: 1px solid var(--line); }
.index-list a {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 18px; align-items: baseline;
  padding: 17px 4px;
  text-decoration: none;
  transition: background 0.15s;
}
.index-list a:hover { background: var(--bg-raise); }
.index-num {
  font-family: var(--serif); font-size: 1.05rem; color: var(--text-faint);
}
.index-list a:hover .index-num { color: var(--amber); }
.index-main h3 {
  font-size: 1.02rem; font-weight: 600; color: var(--text);
  line-height: 1.4; letter-spacing: 0;
}
.index-list a:hover h3 { color: var(--head); }
.index-main .cat { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); margin-top: 2px; }
.index-date { font-size: 0.78rem; color: var(--text-faint); white-space: nowrap; }

@media (max-width: 560px) {
  .index-list a { grid-template-columns: 36px 1fr; }
  .index-date { display: none; }
}

/* --- category strip ---------------------------------------------------------- */
.cat-strip {
  display: flex; flex-wrap: wrap; gap: 10px; padding: 8px 0 34px;
}
.cat-strip a {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.05em;
  color: var(--text-dim); text-decoration: none;
  border: 1px solid var(--line-strong); border-radius: 100px;
  padding: 7px 16px;
  transition: all 0.15s;
}
.cat-strip a:hover, .cat-strip a[aria-current="true"] {
  color: #14120e; background: var(--amber); border-color: var(--amber);
}

/* --- listing pages (blog index / category) ------------------------------------ */
.page-head { padding: 44px 0 10px; }
.page-head h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2rem, 4.5vw, 2.9rem); margin: 8px 0 12px;
}
.page-head .intro { color: var(--text-dim); max-width: 42em; font-size: 1rem; }

.post-rows { list-style: none; padding: 14px 0 40px; }
.post-rows li { border-bottom: 1px solid var(--line); }
.post-rows a {
  display: grid; gap: 20px; padding: 22px 4px;
  text-decoration: none; align-items: center;
  transition: background 0.15s;
}
.post-rows a:hover { background: var(--bg-raise); }
.post-rows img {
  border: 1px solid var(--line); border-radius: 3px;
  aspect-ratio: 16 / 10; object-fit: cover; width: 100%;
}
.post-rows h2 {
  font-family: var(--serif); font-weight: 600; font-size: 1.3rem; margin-bottom: 6px;
}
.post-rows a:hover h2 { color: var(--amber-bright); }
.post-rows .desc { color: var(--text-dim); font-size: 0.92rem; max-width: 46em; }
.post-rows .meta-row { margin-top: 8px; }

@media (min-width: 680px) {
  .post-rows a { grid-template-columns: 220px 1fr; }
  .post-rows a.noimg { grid-template-columns: 1fr; }
}

/* --- article ------------------------------------------------------------------- */
.crumbs {
  padding: 26px 0 0; font-size: 0.78rem; color: var(--text-faint);
}
.crumbs a { color: var(--text-dim); text-decoration: none; }
.crumbs a:hover { color: var(--amber); }
.crumbs span[aria-current] { color: var(--text-faint); }

.article-head { padding: 26px 0 6px; }
.article-head h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.9rem, 4.4vw, 2.75rem);
  margin: 12px 0 18px; max-width: 22em;
}
.byline {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  font-size: 0.82rem; color: var(--text-dim); padding-bottom: 26px;
}
.byline .author { color: var(--text); font-weight: 600; }

.hero-fig { margin: 0 0 12px; }
.hero-fig img {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 4px;
}

.toc {
  margin: 34px 0; padding: 20px 24px;
  background: var(--bg-raise); border: 1px solid var(--line); border-radius: 4px;
}
.toc-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--amber); margin-bottom: 10px;
}
.toc ol { list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; padding: 3px 0; }
.toc li::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--serif); color: var(--text-faint);
  margin-right: 12px; font-size: 0.85rem;
}
.toc a { color: var(--text); text-decoration: none; font-size: 0.94rem; }
.toc a:hover { color: var(--amber-bright); }

/* prose */
.prose { padding-bottom: 30px; }
.prose > p:first-of-type {
  font-size: 1.13rem; color: var(--head); line-height: 1.7;
}
.prose h2 {
  font-family: var(--serif); font-weight: 600; font-size: 1.62rem;
  margin: 2.6em 0 0.7em; padding-top: 0.9em;
  border-top: 1px solid var(--line);
  position: relative;
}
.prose h2::before {
  content: ''; position: absolute; top: -1px; left: 0;
  width: 64px; height: 3px; background: var(--amber);
}
.prose h3 { font-size: 1.16rem; font-weight: 600; margin: 1.9em 0 0.6em; font-family: var(--sans); }
.prose p { margin-bottom: 1.25em; }
.prose ul, .prose ol { margin: 0 0 1.4em 1.4em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--amber); }
.prose strong { color: var(--head); font-weight: 600; }
.prose a { color: var(--amber-bright); text-decoration: underline; text-decoration-color: rgba(232,161,61,.4); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--amber-bright); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose img { border: 1px solid var(--line); border-radius: 4px; margin: 1.6em 0; }

.prose blockquote {
  border-left: 3px solid var(--amber);
  background: var(--bg-raise);
  padding: 16px 22px; margin: 1.6em 0;
  border-radius: 0 4px 4px 0;
  color: var(--text);
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose code {
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 0.88em; background: var(--bg-raise);
  border: 1px solid var(--line); border-radius: 4px; padding: 0.12em 0.4em;
}

.prose table {
  width: 100%; border-collapse: collapse;
  margin: 1.8em 0; font-size: 0.9rem; line-height: 1.55;
  display: block; overflow-x: auto;
}
.prose th, .prose td {
  border: 1px solid var(--line); padding: 10px 14px;
  text-align: left; min-width: 110px;
}
.prose th {
  background: var(--bg-raise); color: var(--head);
  font-weight: 600; font-size: 0.82rem;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.prose tr:hover td { background: var(--bg-raise); }

/* --- related / footer of article ---------------------------------------------- */
.related { padding: 14px 0 50px; }
.related-grid { display: grid; gap: 26px; padding-top: 18px; }
@media (min-width: 720px) { .related-grid { grid-template-columns: repeat(3, 1fr); } }

.rel-card { text-decoration: none; display: block; }
.rel-card img {
  border: 1px solid var(--line); border-radius: 3px;
  aspect-ratio: 16 / 10; object-fit: cover; width: 100%; margin-bottom: 10px;
}
.rel-card h3 { font-size: 0.98rem; font-weight: 600; line-height: 1.45; color: var(--text); }
.rel-card:hover h3 { color: var(--amber-bright); }
.rel-card .meta-row { margin-top: 6px; }

/* --- static pages ----------------------------------------------------------------- */
.static-page { padding: 20px 0 60px; }
.static-page h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2rem, 4.5vw, 2.7rem); margin: 30px 0 20px;
}
.static-page h2 {
  font-family: var(--serif); font-weight: 600; font-size: 1.4rem; margin: 2em 0 0.6em;
}
.static-page p { margin-bottom: 1.2em; max-width: 46em; }
.static-page a { color: var(--amber-bright); }
.static-page ul { margin: 0 0 1.4em 1.4em; }
.static-page li { margin-bottom: 0.4em; }

/* --- sitemap page ------------------------------------------------------------------ */
.sitemap-cols { display: grid; gap: 40px; padding: 20px 0 60px; }
@media (min-width: 720px) { .sitemap-cols { grid-template-columns: 1fr 1fr; } }
.sitemap-cols h2 { font-family: var(--serif); font-size: 1.2rem; margin-bottom: 12px; }
.sitemap-cols ul { list-style: none; }
.sitemap-cols li { padding: 4px 0; border-bottom: 1px solid var(--line); }
.sitemap-cols a { color: var(--text); text-decoration: none; font-size: 0.92rem; }
.sitemap-cols a:hover { color: var(--amber-bright); }

/* --- footer -------------------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); margin-top: 30px; }
.footer-grid { display: grid; gap: 36px; padding: 46px 0 30px; }
@media (min-width: 780px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }

.footer .wordmark { font-size: 1.4rem; }
.footer-blurb { color: var(--text-dim); font-size: 0.88rem; max-width: 30em; margin-top: 12px; }
.footer h3 {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-faint); margin-bottom: 14px;
}
.footer ul { list-style: none; }
.footer li { padding: 4px 0; }
.footer li a { color: var(--text-dim); text-decoration: none; font-size: 0.9rem; }
.footer li a:hover { color: var(--amber-bright); }

.footer-base {
  border-top: 1px solid var(--line);
  padding: 18px 0 26px;
  display: flex; flex-wrap: wrap; gap: 8px 24px;
  justify-content: space-between;
  font-size: 0.76rem; color: var(--text-faint);
}
.footer-base a { color: var(--text-faint); }
.footer-base a:hover { color: var(--amber); }

/* --- 404 -------------------------------------------------------------------------------- */
.nf { text-align: center; padding: 90px 24px 110px; }
.nf .big {
  font-family: var(--serif); font-size: clamp(4rem, 12vw, 7rem);
  color: var(--amber); line-height: 1;
}
.nf h1 { font-family: var(--serif); font-weight: 600; margin: 18px 0 10px; }
.nf p { color: var(--text-dim); }
.nf a { color: var(--amber-bright); }
