/* Archive site styles.
   Colours mirror content/brand.json; change them there and in this file's
   :root block together. Everything else derives from these tokens. */
:root {
  --ink: #0f172a;
  --body: #334155;
  --muted: #64748b;
  --accent: #1d4ed8;
  --accent-dark: #0f2a5c;
  --page: #faf9f7;
  --surface: #ffffff;
  --rule: #e2e8f0;
  --display: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1200px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* masthead */
.masthead { background: var(--surface); border-bottom: 1px solid var(--rule); }
.masthead-inner {
  display: flex; align-items: center; gap: 24px;
  padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; text-decoration: none; color: var(--ink); }
/* Shipped at 3x for retina; the height here is what actually renders it. */
.brand-logo { height: 70px; width: auto; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--ink); text-decoration: none; font-size: 15px; }
.nav a:hover, .nav a.active { color: var(--accent); }
.strapline {
  width: 100%; order: 3; margin: 0; text-align: right;
  font-family: var(--display); font-style: italic; font-size: 13px; color: var(--muted);
}
@media (min-width: 900px) {
  .strapline { width: auto; order: 0; margin-left: 8px; text-align: left; }
}

.btn {
  display: inline-block; padding: 10px 18px; border-radius: 6px;
  font-size: 15px; font-weight: 600; text-decoration: none; border: 0; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #1e40af; }
.btn-block { display: block; width: 100%; }

/* layout */
.layout { display: grid; grid-template-columns: 1fr; gap: 40px; padding-top: 36px; padding-bottom: 56px; }
@media (min-width: 1000px) { .layout { grid-template-columns: minmax(0, 1fr) 340px; } }

.page-title { font-family: var(--display); font-size: 44px; line-height: 1.08; color: var(--ink); margin: 0 0 12px; }
.page-title span { color: var(--ink); }
.page-sub { margin: 0 0 24px; font-size: 18px; color: var(--muted); }
.eyebrow { font-size: 11px; letter-spacing: 1.5px; color: var(--accent); margin: 0 0 8px; font-weight: 700; }
.section-title { font-family: var(--display); font-size: 28px; color: var(--ink); margin: 36px 0 8px; }
.side-title { font-family: var(--display); font-size: 22px; color: var(--ink); margin: 0 0 16px; }

/* search + filters */
.search input {
  width: 100%; padding: 14px 16px 14px 42px; font-size: 16px;
  border: 1px solid var(--rule); border-radius: 8px; background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'><circle cx='11' cy='11' r='7'/><path d='M20 20l-3.5-3.5'/></svg>") no-repeat 14px center / 18px 18px;
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.filters { display: flex; align-items: center; gap: 16px; margin: 16px 0 24px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--rule);
  background: var(--surface); color: var(--body); font-size: 14px; cursor: pointer;
}
.chip.active { background: #e8efff; border-color: #c7d7fe; color: var(--accent); font-weight: 600; }
.sort { margin-left: auto; }
.sort select { padding: 8px 12px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); font-size: 14px; }

/* hero */
.hero { margin: 8px 0 8px; }
.hero-link { display: block; position: relative; text-decoration: none; color: var(--ink); background: #eef2f7; border-radius: 4px; overflow: hidden; }
.hero-link img { width: 100%; height: 190px; object-fit: cover; }
.hero-copy { position: absolute; inset: 0; padding: 22px 26px; background: linear-gradient(90deg, rgba(250,249,247,.97) 52%, rgba(250,249,247,.78) 100%); }
.hero-copy h2 { font-family: var(--display); font-size: 34px; margin: 4px 0 6px; color: var(--ink); }
.hero-copy p { margin: 0; color: var(--body); }
.hero-cta { margin-top: 10px !important; color: var(--accent); font-weight: 600; }

/* entries */
.entries { list-style: none; margin: 8px 0 0; padding: 0; }
.entry { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; padding: 22px 0; border-top: 1px solid var(--rule); align-items: start; }
@media (min-width: 900px) { .entry { grid-template-columns: 220px minmax(0, 1fr) auto; } }
@media (max-width: 620px) { .entry { grid-template-columns: 1fr; } }
.entry-thumb { position: relative; display: block; border-radius: 4px; overflow: hidden; background: #e5e9f0; }
.entry-thumb img { width: 100%; height: 146px; object-fit: cover; }
.video-badge { position: absolute; top: 8px; left: 8px; background: #dc2626; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: 1px; padding: 3px 7px; border-radius: 3px; }
.play { position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%; background: rgba(15,23,42,.55); }
.play::after { content: ""; position: absolute; top: 50%; left: 54%; transform: translate(-50%, -50%); border-left: 14px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.topic { margin: 0 0 4px; font-size: 11px; font-weight: 700; letter-spacing: 1.2px; color: var(--accent); }
.entry-body h3 { font-family: var(--display); font-size: 21px; line-height: 1.25; margin: 0 0 6px; }
.entry-body h3 a { color: var(--ink); text-decoration: none; }
.entry-body h3 a:hover { color: var(--accent); }
.summary { margin: 0 0 8px; }
.meta { margin: 0; font-size: 13px; color: var(--muted); }
.entry-cta { white-space: nowrap; }
.entry-cta a { font-size: 15px; font-weight: 600; text-decoration: none; }
.empty { padding: 28px 0; color: var(--muted); }

/* sidebar */
.prev-issues { list-style: none; margin: 0 0 28px; padding: 0; }
.prev-issue { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.prev-issues.wide .prev-issue { grid-template-columns: 160px minmax(0, 1fr); }
.prev-thumb img { width: 100%; height: 90px; object-fit: cover; border-radius: 3px; }
.issue-no { margin: 0 0 2px; font-size: 10px; letter-spacing: 1.4px; font-weight: 700; color: var(--accent); }
.prev-issue h3 { font-family: var(--display); font-size: 18px; line-height: 1.25; margin: 0 0 4px; }
.prev-issue h3 a { color: var(--ink); text-decoration: none; }
.date { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.open a { font-size: 14px; text-decoration: none; }
.browse-all { margin: 20px 0 0; }
.browse-all a { text-decoration: none; font-weight: 600; }

/* subscribe */
.subscribe { background: var(--accent-dark); color: #fff; border-radius: 6px; padding: 26px 24px; }
.subscribe h2 { font-family: var(--display); font-size: 26px; margin: 0 0 6px; color: #fff; }
.subscribe p { margin: 0 0 16px; color: #cbd5e1; }
.subscribe input {
  width: 100%; padding: 13px 14px; font-size: 15px; border: 0; border-radius: 6px;
  margin-bottom: 12px; background: #fff; color: var(--ink);
}
.subscribe-note { margin: 12px 0 0 !important; font-size: 13px; color: #94a3b8; }
.subscribe-note.is-ok { color: #86efac; }
.subscribe-note.is-error { color: #fca5a5; }

/* issue page */
.issue-hero { width: 100%; height: 260px; object-fit: cover; border-radius: 4px; margin: 8px 0 20px; }
.intro { font-size: 17px; }
.closing { background: #eff6ff; border-left: 3px solid var(--accent); padding: 20px 24px; margin: 28px 0; border-radius: 4px; }
.closing h2 { font-family: var(--display); font-size: 20px; margin: 0 0 6px; color: var(--ink); }
.closing p { margin: 0 0 4px; }
.closing .prompt { color: var(--muted); font-size: 14px; }
.pager { display: flex; justify-content: space-between; gap: 16px; padding: 20px 0; border-top: 1px solid var(--rule); }
.pager a { text-decoration: none; font-weight: 600; }

/* footer */
.site-footer { border-top: 1px solid var(--rule); background: var(--surface); padding: 26px 0; margin-top: 40px; }
.footer-note, .footer-links { margin: 0; text-align: center; font-size: 13px; color: var(--muted); }
.footer-links { margin-top: 6px; }
.footer-links a { text-decoration: none; }
