/* fullauto.online — "continuous operation"
   Light is the primary surface. Dark follows the system, or a manual override
   on <html data-theme>. Every colour is defined on bare :root first so nothing
   depends on a media query to have a value. */

:root {
  --paper:        #E8EAEE;
  --paper-raised: #F4F5F7;
  --paper-sunk:   #DDE0E6;
  --ink:          #15171C;
  --ink-2:        #4A5162;
  /* --ink-3 is used for 11-13px labels, so it has to clear 4.5:1 on --paper
     like any other text. #7A8296 read nicer and failed at 3.19:1. */
  --ink-3:        #5F6779;
  --rule:         #C9CDD6;
  --rule-strong:  #AAB0BC;

  /* Two accents, two jobs. Blue is only ever interactive.
     Amber is only ever status. They do not trade places. */
  --live:         #2B4CFF;
  --live-sunk:    #1E37C4;
  --signal:       #F2A20C;
  --signal-text:  #8A5A00;
  --spent:        #B4271F;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body:    "Newsreader", Georgia, "Times New Roman", serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --measure: 34rem;
  --shell: 78rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:        #101216;
    --paper-raised: #191C22;
    --paper-sunk:   #0A0C0F;
    --ink:          #E7E9ED;
    --ink-2:        #99A1B1;
    --ink-3:        #7C8497;
    --rule:         #2A2F38;
    --rule-strong:  #3D4451;
    --live:         #8298FF;
    --live-sunk:    #A9B7FF;
    --signal:       #F5B123;
    --signal-text:  #F5B123;
    --spent:        #FF6B60;
  }
}

:root[data-theme="dark"] {
  --paper:        #101216;
  --paper-raised: #191C22;
  --paper-sunk:   #0A0C0F;
  --ink:          #E7E9ED;
  --ink-2:        #99A1B1;
  --ink-3:        #7C8497;
  --rule:         #2A2F38;
  --rule-strong:  #3D4451;
  --live:         #8298FF;
  --live-sunk:    #A9B7FF;
  --signal:       #F5B123;
  --signal-text:  #F5B123;
  --spent:        #FF6B60;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.65;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- shared primitives ---------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.measure { max-width: var(--measure); }

a {
  color: var(--live);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--live-sunk); }

:focus-visible {
  outline: 2px solid var(--live);
  outline-offset: 3px;
  border-radius: 1px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  z-index: 20;
}
.skip:focus { left: 0; }

/* Eyebrow: a machine label. Always mono, always uppercase, always small. */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-variation-settings: "wdth" 112;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

/* ---- masthead -------------------------------------------------------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
}

.masthead__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4rem;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--display);
  font-variation-settings: "wdth" 125;
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
  display: inline-flex;
  align-items: baseline;
  gap: 0.1em;
}
.wordmark:hover { color: var(--ink); }
.wordmark span { color: var(--ink-3); font-weight: 500; }

.nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.8125rem;
}
.nav a {
  color: var(--ink-2);
  text-decoration: none;
  padding-block: 0.35rem;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--live); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

.theme-toggle {
  font-family: var(--mono);
  font-size: 0.75rem;
  background: transparent;
  border: 1px solid var(--rule-strong);
  color: var(--ink-2);
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  line-height: 1;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-2); }

/* ---- hero: the status board ----------------------------------------- */

.hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) 0; }

.hero__lede {
  font-size: clamp(1.75rem, 1.1rem + 2.6vw, 3.25rem);
  font-family: var(--display);
  font-variation-settings: "wdth" 100;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
  max-width: 22ch;
  margin: 0.75rem 0 0;
}

.hero__sub {
  color: var(--ink-2);
  max-width: 46ch;
  margin: 1.25rem 0 0;
}

.board {
  margin-top: clamp(2rem, 5vw, 3.25rem);
  border-top: 2px solid var(--ink);
}

.board__group + .board__group { margin-top: 2.25rem; }

.board__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}
.board__head h2 {
  font-size: 0.8125rem;
  font-variation-settings: "wdth" 125;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--mono);
  font-weight: 600;
}

.board__count {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--ink-3);
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.6fr) auto;
  gap: 0.5rem 1.25rem;
  align-items: baseline;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
}

.row__name {
  font-family: var(--display);
  font-variation-settings: "wdth" 100;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.row__by,
.row__note {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-2);
}
.row__note { color: var(--ink-3); }

.tag {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--signal-text);
  border: 1px solid currentColor;
  padding: 0.15rem 0.45rem;
  white-space: nowrap;
  justify-self: end;
}
.tag--quiet { color: var(--ink-3); }

.board__stamp {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--ink-3);
  margin-top: 1.25rem;
  padding-bottom: 3rem;
  border-top: 1px dashed var(--rule);
  padding-top: 0.75rem;
}

/* ---- post list ------------------------------------------------------- */

.section {
  padding-block: clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid var(--rule);
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.section__head h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);
  font-variation-settings: "wdth" 108;
}

.posts { list-style: none; margin: 0; padding: 0; }

.post-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 13rem;
  gap: 1rem 2.5rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.post-row:last-child { border-bottom: 1px solid var(--rule); }

.post-row__title {
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.75rem);
  font-variation-settings: "wdth" 100;
  letter-spacing: -0.02em;
  margin: 0.4rem 0 0;
}
.post-row__title a {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--live), var(--live));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 180ms ease;
}
.post-row__title a:hover { background-size: 100% 2px; }

.post-row__dek {
  color: var(--ink-2);
  margin: 0.5rem 0 0;
  max-width: 52ch;
}

.post-row__meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-3);
  margin: 0.75rem 0 0;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---- the signature: decay meter ------------------------------------- */

.decay {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--ink-3);
}

.decay__label {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.decay__state { color: var(--ink-2); }
.decay[data-state="aging"]    .decay__state { color: var(--signal-text); }
.decay[data-state="verify"]   .decay__state { color: var(--signal-text); }
.decay[data-state="archival"] .decay__state { color: var(--spent); }

.decay__ticks {
  display: flex;
  gap: 2px;
  height: 0.75rem;
}
.decay__tick {
  flex: 1;
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  border-radius: 0;
}
.decay__tick[data-spent="true"] {
  background: var(--signal);
  border-color: var(--signal);
}
.decay[data-state="archival"] .decay__tick[data-spent="true"] {
  background: var(--spent);
  border-color: var(--spent);
}

.decay__note {
  margin: 0.45rem 0 0;
  line-height: 1.45;
  color: var(--ink-3);
}

/* ---- article --------------------------------------------------------- */

.article { padding-block: clamp(2.5rem, 6vw, 4rem) 0; }

.article__head {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 2rem;
}

.article__title {
  font-size: clamp(2rem, 1.3rem + 3vw, 3.5rem);
  font-variation-settings: "wdth" 100;
  letter-spacing: -0.03em;
  margin: 0.75rem 0 0;
  max-width: 20ch;
}

.article__dek {
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.3125rem);
  color: var(--ink-2);
  max-width: 48ch;
  margin: 1.25rem 0 0;
  line-height: 1.5;
}

.article__strip {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-top: 2rem;
}
.article__strip .decay { min-width: 15rem; flex: 0 1 18rem; }

.article__facts {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-3);
  display: grid;
  gap: 0.3rem;
  margin: 0;
}
.article__facts dt {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: inline;
}
.article__facts dd {
  display: inline;
  margin: 0 0 0 0.5rem;
  color: var(--ink-2);
}
.article__facts div { display: block; }

.prose {
  max-width: var(--measure);
  padding-block: clamp(2rem, 5vw, 3rem) 0;
}

.prose > * + * { margin-top: 1.35em; }

.prose h2 {
  font-size: clamp(1.375rem, 1.15rem + 0.9vw, 1.875rem);
  font-variation-settings: "wdth" 105;
  letter-spacing: -0.02em;
  margin-top: 2.75em;
  padding-top: 0.9em;
  border-top: 1px solid var(--rule);
}
.prose h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }

.prose h3 {
  font-size: 1.125rem;
  font-variation-settings: "wdth" 100;
  margin-top: 2em;
}

.prose p { margin-block: 0; }

.prose ul, .prose ol { padding-left: 1.25rem; margin-block: 0; }
.prose li + li { margin-top: 0.5em; }
.prose li::marker { color: var(--ink-3); }

.prose strong { font-weight: 700; }

.prose code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  padding: 0.1em 0.35em;
  white-space: nowrap;
}

.prose pre {
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--ink-3);
  padding: 1rem 1.1rem;
  overflow-x: auto;
  margin-block: 0;
}
.prose pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
  white-space: pre;
}

.prose blockquote {
  margin-inline: 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--signal);
  color: var(--ink-2);
  font-style: italic;
}

/* A callout for the thing the reader should actually remember. */
.takeaway {
  border: 1px solid var(--rule-strong);
  border-top: 3px solid var(--ink);
  background: var(--paper-raised);
  padding: 1.25rem 1.35rem;
  font-family: var(--body);
}
.takeaway p:first-of-type { margin-top: 0.5rem; }
.takeaway p:last-child { margin-bottom: 0; }

/* Affiliate disclosure. Deliberately not amber — amber is the freshness lane.
   This is a statement of interest, so it reads as a plain bordered notice. */
.disclosure {
  border: 1px solid var(--rule-strong);
  padding: 1rem 1.2rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--ink-2);
}
.disclosure p:last-child { margin-bottom: 0; }
.disclosure > .eyebrow { margin-bottom: 0.5rem; }

/* Flag on listing rows so the interest is visible before the click, not after. */
.post-row__flag {
  color: var(--ink-2);
  border: 1px solid var(--rule-strong);
  padding: 0 0.4rem;
}

/* A dated update on a published post. Amber, because this is a freshness
   signal — the same job the decay meter does. */
.update {
  border-left: 3px solid var(--signal);
  background: var(--paper-raised);
  padding: 1rem 1.2rem;
}
.update > .eyebrow { color: var(--signal-text); }
.update p:last-child { margin-bottom: 0; }
.update p + p { margin-top: 0.75em; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.8125rem;
}
.prose th, .prose td {
  text-align: left;
  padding: 0.55rem 0.75rem 0.55rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.prose th {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.6875rem;
  color: var(--ink-3);
  font-weight: 600;
}
.table-scroll { overflow-x: auto; }

.article__foot {
  max-width: var(--measure);
  margin-top: 3.5rem;
  padding-block: 2rem 4rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--ink-3);
}
.article__foot p { margin: 0 0 0.75rem; }

/* ---- about / plain pages -------------------------------------------- */

.page { padding-block: clamp(2.5rem, 6vw, 4rem) 5rem; }
.page__title {
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  font-variation-settings: "wdth" 105;
  letter-spacing: -0.03em;
  margin-top: 0.75rem;
}

/* ---- footer ---------------------------------------------------------- */

.footer {
  border-top: 2px solid var(--ink);
  padding-block: 2.5rem 3.5rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--ink-3);
}
.footer__inner {
  display: flex;
  gap: 1.5rem 3rem;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
}
.footer a { color: var(--ink-2); text-decoration: none; }
.footer a:hover { color: var(--live); text-decoration: underline; }
.footer__links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer__note { max-width: 34ch; line-height: 1.6; margin: 0; }

/* ---- entrance: one orchestrated moment, on the board only ----------- */

.board .row {
  opacity: 0;
  animation: settle 420ms cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
  animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes settle {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .board .row { opacity: 1; transform: none; animation: none; }
}

/* ---- narrow ---------------------------------------------------------- */

@media (max-width: 46rem) {
  .row {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 0.25rem;
  }
  .row__name { grid-column: 1; }
  .tag { grid-column: 2; grid-row: 1; }
  .row__by, .row__note { grid-column: 1 / -1; }

  .post-row { grid-template-columns: minmax(0, 1fr); }
  .article__strip { gap: 1.75rem; }
}

@media (max-width: 34rem) {
  .masthead { position: static; }
  .masthead__inner { min-height: 0; padding-block: 0.9rem; gap: 0.75rem 1rem; }
  .wordmark { margin-right: 0; flex-basis: 100%; }
  .nav { gap: 1rem; margin-right: auto; }
}

@media print {
  .masthead, .footer, .theme-toggle { display: none; }
  body { background: #fff; color: #000; }
}
