/* Public newsletter archive. Same accent and type as the UGC Agent app; reading-first. */

:root {
  --ink: #1b1d24;
  --ink-soft: #4b5060;
  --ink-faint: #8a8f9c;
  --line: #e7e8ee;
  --bg: #fbfbfd;
  --surface: #ffffff;
  --accent: #3847fe;
  --accent-ink: #2b36d9;
  --accent-wash: #eef0ff;
  --accent-line: #d7dbff;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font: "Satoshi", ui-sans-serif, system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #eceef4;
    --ink-soft: #b2b7c4;
    --ink-faint: #7c8190;
    --line: #262a35;
    --bg: #0f1116;
    --surface: #161922;
    --accent: #4d69ff;
    --accent-ink: #93a5ff;
    --accent-wash: #161c40;
    --accent-line: #2a3470;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #eceef4; --ink-soft: #b2b7c4; --ink-faint: #7c8190; --line: #262a35; --bg: #0f1116; --surface: #161922;
  --accent: #4d69ff; --accent-ink: #93a5ff; --accent-wash: #161c40; --accent-line: #2a3470; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 760px; margin: 0 auto; padding: 22px 16px;
}
.mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.mark img { border-radius: 999px; }
.mark span { color: var(--ink-faint); font-weight: 500; }
.top-cta {
  font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none;
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  transition: border-color 150ms var(--ease-out), transform 150ms var(--ease-out);
}
.top-cta:hover { border-color: var(--accent-line); }
.top-cta:active { transform: scale(0.97); }

.narrow { max-width: 680px; margin: 0 auto; padding: 8px 16px 64px; }
.center { text-align: center; padding-top: 12vh; }
.center p { color: var(--ink-soft); }

.hero { padding: 40px 0 36px; border-bottom: 1px solid var(--line); }
.kicker { margin: 0 0 14px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); }
h1 { font-weight: 900; letter-spacing: -0.025em; line-height: 1.08; margin: 0 0 16px; font-size: clamp(32px, 6vw, 46px); text-wrap: balance; }
.lede { margin: 0 0 26px; font-size: 19px; color: var(--ink-soft); text-wrap: pretty; }

.subscribe { display: flex; gap: 8px; max-width: 460px; }
.subscribe input[type="email"] {
  flex: 1; min-width: 0; font: inherit; font-size: 16px; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}
.subscribe input[type="email"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 14%, transparent); }
.subscribe button, .btn {
  font: inherit; font-size: 15px; font-weight: 700; color: #fff; background: var(--accent);
  border: 0; border-radius: 10px; padding: 12px 18px; cursor: pointer;
  transition: transform 140ms cubic-bezier(0.2, 0, 0, 1), filter 140ms;
}
.subscribe button:hover, .btn:hover { filter: brightness(1.06); }
.subscribe button:active, .btn:active { transform: scale(0.97); }

.posts { list-style: none; margin: 0; padding: 0; }
.posts li { border-bottom: 1px solid var(--line); animation: rise 520ms var(--ease-out) both; animation-delay: calc(var(--i) * 40ms); }
.posts a { display: grid; gap: 4px; padding: 22px 0; text-decoration: none; color: inherit; }
.posts time { font-size: 13px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.posts strong { font-size: 21px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.3; transition: color 150ms var(--ease-out); }
.posts span { color: var(--ink-soft); font-size: 16px; }
.posts a:hover strong { color: var(--accent-ink); }
.empty { color: var(--ink-soft); padding: 32px 0; }

.back { display: inline-flex; align-items: center; gap: 6px; margin: 12px 0 8px; font-size: 14px; font-weight: 600; color: var(--ink-soft); text-decoration: none; }
.back:hover { color: var(--ink); }
.back svg { transition: transform 160ms var(--ease-out); }
.back:hover svg { transform: translateX(-2px); }

.post header { padding: 20px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 30px; animation: rise 520ms var(--ease-out) both; }
.post header time { display: block; font-size: 14px; color: var(--ink-faint); margin-bottom: 12px; }
.post header .lede { margin: 0; }
.prose { animation: rise 600ms var(--ease-out) 60ms both; }
.prose > * { margin: 0 0 1.1em; }
.prose h1 { font-size: 30px; margin-top: 1.4em; }
.prose h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; margin: 1.6em 0 0.6em; }
.prose h3 { font-size: 20px; font-weight: 700; margin: 1.4em 0 0.5em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 0 0 0.5em; }
.prose li::marker { color: var(--ink-faint); }
.prose blockquote { margin-left: 0; padding-left: 16px; border-left: 3px solid var(--accent-line); color: var(--ink-soft); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose img { display: block; max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.prose [data-callout] { padding: 18px 20px 4px; background: var(--accent-wash); border: 1px solid var(--accent-line); border-radius: 12px; }
.prose [data-callout] > * { margin: 0 0 14px; }
.prose [data-button] a {
  display: inline-block; background: var(--accent); color: #fff; text-decoration: none; font-weight: 700;
  padding: 12px 20px; border-radius: 10px; transition: transform 140ms cubic-bezier(0.2, 0, 0, 1), filter 140ms;
}
.prose [data-button] a:hover { filter: brightness(1.06); }
.prose [data-button] a:active { transform: scale(0.97); }

.after { margin-top: 48px; padding: 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.after h2 { margin: 0 0 4px; font-size: 20px; letter-spacing: -0.01em; }
.after p { margin: 0 0 16px; color: var(--ink-soft); font-size: 15px; }

.foot { display: flex; justify-content: space-between; gap: 16px; max-width: 760px; margin: 0 auto; padding: 28px 16px 40px; font-size: 13px; color: var(--ink-faint); }
.foot a { color: inherit; }
.sig { color: var(--ink); }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 520px) {
  body { font-size: 16px; }
  .subscribe { flex-direction: column; }
  .lede { font-size: 17px; }
  .posts strong { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
