/* ---------------------------------------------------------
   owenthomas.no/theoslodispatch — shares the hub's design tokens exactly.
   If you change the palette/fonts in index.html, mirror the
   change here too (the two files aren't linked automatically).
   --------------------------------------------------------- */

:root {
  --bg: #4f2683;
  --bg-deep: #3a1c5f;
  --surface: #6737a5;
  --ink: #ffffff;
  --ink-soft: #f1e9f2;
  --rule: rgba(255, 255, 255, 0.2);
  --rule-strong: rgba(255, 255, 255, 0.42);
  --accent: #ffc62f;
  --accent-ink: #3a1c5f;
  --accent-soft: rgba(255, 198, 47, 0.16);

  --font-display: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --measure: 40rem;
  --gutter: clamp(1.5rem, 5vw, 4rem);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

a { color: var(--ink); text-decoration-color: var(--rule-strong); text-underline-offset: 0.15em; }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 1.6em 0 0.5em;
}

p, ul, ol, blockquote { max-width: var(--measure); }
p { margin: 0 0 1.3em; }

blockquote {
  margin: 1.5em 0;
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
  color: var(--ink-soft);
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

pre {
  background: var(--bg-deep);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
}
pre code { background: none; padding: 0; }

figure {
  margin: 1.8em 0;
}
figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}
figcaption {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 0.5rem;
  line-height: 1.5;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- header ---------- */

.site-header {
  background: var(--bg-deep);
  border-bottom: 1px solid var(--rule);
  padding: 1.4rem 0;
}
.site-header .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--ink);
}
.header-nav {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  display: flex;
  gap: 1.2rem;
}
.header-nav a { text-decoration: none; color: var(--ink-soft); }
.header-nav a:hover { color: var(--accent); }

/* ---------- dispatch archive list ---------- */

.dispatch-list {
  list-style: none;
  margin: 1rem 0 3rem;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.dispatch-list li { border-bottom: 1px solid var(--rule); }
.dispatch-list a {
  display: block;
  padding: 1.3rem 0.25rem;
  text-decoration: none;
  color: var(--ink);
}
.dispatch-list a:hover { background: var(--accent-soft); }
.dispatch-list a:hover .dispatch-title { color: var(--accent); }
.dispatch-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  display: block;
}
.dispatch-meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  display: block;
  margin-top: 0.3rem;
}
.dispatch-excerpt {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-top: 0.4rem;
}

/* ---------- single post ---------- */

.post-header { padding: 3rem 0 1rem; }
.post-header h1 { margin-top: 0; font-size: clamp(1.9rem, 4.5vw, 2.6rem); }

.masthead {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.masthead h1 { margin: 0; }
.masthead-mark {
  width: 3.2rem;
  height: 3.2rem;
  flex-shrink: 0;
}
.post-meta { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-soft); }

.post-body { padding-bottom: 2rem; }

.post-footer-nav {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 0;
  font-family: var(--mono);
  font-size: 0.85rem;
}
.post-footer-nav a { text-decoration: none; }

/* ---------- comments ---------- */

.comments-section {
  border-top: 1px solid var(--rule);
  padding: 2rem 0 3rem;
}
.comments-section .eyebrow { display: block; margin-bottom: 1rem; }

/* ---------- newsletter subscribe form ---------- */

.subscribe-section {
  border-top: 1px solid var(--rule);
  padding: 2.2rem 0;
}
.subscribe-section .eyebrow { margin-bottom: 0.6rem; }
.subscribe-section h2 {
  margin-top: 0;
  font-size: 1.4rem;
}

.subscribe-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 0.4rem;
}
.subscribe-form input[type="email"] {
  flex: 1;
  min-width: 12rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  padding: 0.55rem 0.85rem;
}
.subscribe-form input[type="email"]::placeholder { color: var(--ink-soft); }
.subscribe-form input[type="email"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.subscribe-form input[type="submit"] {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: 0.55rem 1rem;
  cursor: pointer;
}
.subscribe-form input[type="submit"]:hover { opacity: 0.88; }
.subscribe-form .powered-by {
  width: 100%;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink-soft);
  margin: 0.2rem 0 0;
}

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

.site-footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--rule);
  margin-top: 2rem;
  padding: 1.6rem 0 3rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
}
