/*
Theme Name: Day Another
Description: Independent publication. What still works after a subscription, support, or ownership change.
Version: 2.0.0
Text Domain: dayanother
*/

:root {
  --paper: #f6f1e8;
  --ink: #161412;
  --muted: #5c564e;
  --rule: #8f3b2c;
  --line: #d7cfc3;
  --max: 72rem;
  --read: 40.5rem;
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Segoe UI", system-ui, sans-serif;
  --space: 1.25rem;
}

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

html { background: var(--paper); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
}

a { color: inherit; }

a:hover { color: var(--rule); }

:focus-visible {
  outline: 2px solid var(--rule);
  outline-offset: 3px;
}

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

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 20;
  background: var(--paper);
  padding: 0.4rem 0.7rem;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.masthead {
  padding: 1.25rem 0 0;
}

.masthead-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.wordmark {
  display: block;
  margin: 0.55rem 0 0.35rem;
  font-family: var(--serif);
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.95;
  text-decoration: none;
}

.wordmark:hover { color: var(--ink); }

.deck {
  margin: 0 0 1.1rem;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 0.7rem 0;
  border-top: 2px solid var(--rule);
  border-bottom: 1px solid var(--ink);
}

.topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--sans);
  font-size: 0.92rem;
}

.topics a { text-decoration: none; }

.topics a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.search {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--ink);
}

.search input {
  width: 11rem;
  border: 0;
  background: transparent;
  font: inherit;
  font-family: var(--sans);
  font-size: 0.9rem;
  padding: 0.2rem 0;
}

.search button {
  border: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.ad-slot,
.tos-ad {
  width: min(100% - 2rem, var(--max));
  margin: 1rem auto 0;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.article .tos-ad {
  width: 100%;
  margin: 1.5rem auto;
}

.tos-ad-label {
  margin: 0 0 0.4rem;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.page {
  padding: 1.75rem 0 4rem;
}

.front-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 2rem 2.5rem;
}

.kicker {
  margin: 0 0 0.45rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rule);
  text-decoration: none;
}

.lead-title {
  margin: 0 0 0.7rem;
  font-size: clamp(2rem, 4.2vw, 3.35rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.lead-title a { text-decoration: none; }

.lead-excerpt {
  margin: 0 0 0.7rem;
  font-size: 1.2rem;
  line-height: 1.4;
}

.meta {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--muted);
}

.rail {
  border-left: 1px solid var(--line);
  padding-left: 1.5rem;
}

.rail h2 {
  margin: 0 0 0.8rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.rail ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: story;
}

.rail li {
  counter-increment: story;
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  gap: 0.55rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}

.rail li::before {
  content: counter(story);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.rail a { text-decoration: none; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 2.75rem 0 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--ink);
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-head a { text-decoration: none; }

.topic-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.topic-grid h3 {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
  line-height: 1.2;
}

.topic-grid h3 a { text-decoration: none; }

.topic-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.topic-grid li {
  padding: 0.45rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.98rem;
  line-height: 1.3;
}

.topic-grid li a { text-decoration: none; }

.crumbs {
  margin: 0 0 1rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted);
}

.crumbs a { color: inherit; }

.article {
  width: min(100% - 2rem, var(--read));
  margin-inline: auto;
}

.article h1 {
  margin: 0.2rem 0 0.7rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.article .content {
  margin-top: 1.4rem;
}

.article .content p { margin: 0 0 1.15em; }

.article .content h2 {
  margin: 1.8rem 0 0.7rem;
  font-size: 1.45rem;
  line-height: 1.2;
}

.article .content h3 {
  margin: 1.4rem 0 0.5rem;
  font-size: 1.15rem;
}

.article .content a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.article .content ul,
.article .content ol { padding-left: 1.2rem; }

.article .content li { margin: 0.35rem 0; }

.article .content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.article .content th,
.article .content td {
  border-bottom: 1px solid var(--line);
  padding: 0.4rem 0.5rem 0.4rem 0;
  text-align: left;
}

.related {
  width: min(100% - 2rem, var(--read));
  margin: 2.5rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--ink);
}

.related h2 {
  margin: 0 0 0.7rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.related li {
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
}

.related a { text-decoration: none; }

.stream {
  width: min(100% - 2rem, 46rem);
}

.stream article {
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
}

.stream h2 {
  margin: 0.2rem 0 0.4rem;
  font-size: 1.55rem;
  line-height: 1.15;
}

.stream h2 a { text-decoration: none; }

.site-foot {
  margin-top: 3rem;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--ink);
  font-family: var(--sans);
  font-size: 0.88rem;
}

.site-foot a { text-decoration: none; }

.foot-statement {
  margin: 0 0 1.25rem;
  max-width: 38rem;
  color: var(--muted);
}

.foot-cols {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1.5rem 2rem;
}

.foot-cols h2 {
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.foot-cols ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-cols li {
  padding: 0.2rem 0;
}

.foot-cols .topics {
  gap: 0.2rem 0;
  flex-direction: column;
}

.foot-copy {
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.tos-reward {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(22, 20, 18, 0.5);
  padding: 1.5rem;
}
.tos-reward[hidden] { display: none; }
.tos-reward-card {
  background: var(--paper);
  max-width: 26rem;
  padding: 1.4rem 1.3rem;
  width: 100%;
  border: 1px solid var(--ink);
}
.tos-reward-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tos-reward-actions button {
  border: 1px solid var(--ink);
  cursor: pointer;
  font: inherit;
  font-family: var(--sans);
  padding: 0.45rem 0.85rem;
  background: transparent;
}
#tos-reward-watch { background: var(--ink); color: var(--paper); }

@media (max-width: 900px) {
  .front-grid,
  .topic-grid,
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .rail { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 640px) {
  .front-grid,
  .topic-grid,
  .foot-cols { grid-template-columns: 1fr; }
  .masthead-top { display: none; }
  .search input { width: 8rem; }
}

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