/* Know the Times · shared styles for knowthetimes.com and tools.knowthetimes.com */

:root {
  --black: #090908;
  --night: #0b0a08;
  --ink: #1c1a17;
  --paper: #fbfaf7;
  --stone: #f1ece2;
  --rule: #e2ddd3;
  --muted: #4a443b;
  --faint: #6a6357;
  --crimson: #8b1a1a;
  --oxblood: #5c0f16;
  --gold: #b8963a;
  --gold-light: #d4b565;
  --gold-text: #8a6a22;
  --cream: #f5eedc;
  --cream-soft: #d9cfb8;
  --cream-muted: #cfc5ae;
  --serif-display: "EB Garamond", Garamond, Georgia, serif;
  --serif-body: Georgia, "Times New Roman", serif;
  --wrap: 1240px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--crimson); }
a:hover { color: var(--oxblood); }

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: 24px; padding-right: 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--gold); color: var(--black); padding: 10px 16px; z-index: 10;
}
.skip-link:focus { left: 12px; top: 12px; }

/* Header */
.site-header { background: var(--black); border-bottom: 1px solid #3a3222; }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 24px; padding-top: 8px; padding-bottom: 8px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { height: 72px; width: auto; }
.brand-tag {
  font-size: 13px; letter-spacing: 0.24em; color: var(--gold-light);
  border-left: 1px solid #6b5524; padding-left: 14px;
}
.site-nav { display: flex; flex-wrap: wrap; gap: 0 24px; font-size: 15px; letter-spacing: 0.04em; }
.site-nav a { color: #e8dfc8; text-decoration: none; padding: 13px 0; }
.site-nav a:hover { color: var(--gold-light); }

/* Ornament: line, diamond, line */
.ornament { display: flex; align-items: center; gap: 12px; width: min(420px, 80%); }
.ornament span { flex: 1; height: 1px; background: var(--gold); }
.ornament i { width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); }

/* Buttons */
.btn {
  display: inline-block; text-decoration: none; padding: 15px 28px; font-size: 16px;
  letter-spacing: 0.03em; border: 1px solid var(--gold); text-align: center;
}
.btn-ktt { background: var(--crimson); color: #fff; }
.btn-ktt:hover { background: #a32020; color: #fff; }
.btn-tfr { background: var(--oxblood); color: #f3e7cc; }
.btn-tfr:hover { background: #721420; color: #f3e7cc; }
.btn-gold { background: var(--gold); color: #2a0a0c; border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-light); color: #2a0a0c; }
.btn-line { border-color: currentColor; padding: 13px 22px; background: transparent; }

/* Hero */
.hero { background: var(--night); color: var(--cream); padding: 72px 0 88px; }
.hero .wrap { display: flex; flex-direction: column; align-items: center; gap: 28px; text-align: center; }
.crests { display: flex; justify-content: center; align-items: center; gap: clamp(16px, 4vw, 48px); }
.crests img { width: clamp(120px, 22vw, 250px); min-width: 0; flex: 0 1 auto; }
@media (max-width: 520px) { .crests img { width: 38vw; } }
.crests .divider { width: 1px; height: clamp(100px, 18vw, 180px); background: var(--gold); }
.hero h1 {
  margin: 8px 0 0; font-family: var(--serif-display); font-weight: 500;
  font-size: clamp(2.3rem, 5vw, 4rem); line-height: 1.1; color: var(--cream); max-width: 880px;
}
.hero p { margin: 0; font-size: 19px; line-height: 1.65; color: var(--cream-soft); max-width: 680px; }
.hero .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 6px; }
.motto { font-size: 13px; letter-spacing: 0.32em; color: #c9a44c; margin-top: 8px; }

/* Latest posts */
.latest {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr));
  gap: 48px; padding-top: 72px; padding-bottom: 88px;
}
.pub { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.pub h2 { margin: 0; line-height: 0; }
.pub-banner { width: 100%; aspect-ratio: 1983 / 793; object-fit: cover; border: 1px solid #3a3222; }
.pub-tfr .pub-banner { object-position: center top; border-color: #3a2418; }
.pub-intro { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.pub-intro p { margin: 0; font-size: 16px; color: var(--muted); flex: 1 1 280px; }
.pub-intro a { font-size: 15px; padding: 12px 0; }
.pub-tfr .pub-intro a { color: var(--oxblood); }

.posts { list-style: none; margin: 0; padding: 0; }
.post a {
  display: grid; grid-template-columns: 132px 1fr; gap: 18px; align-items: start;
  text-decoration: none; color: var(--ink); padding: 18px 0; border-bottom: 1px solid var(--rule);
}
.post a:hover .post-title { color: var(--crimson); }
.pub-tfr .post a:hover .post-title { color: var(--oxblood); }
.post-thumb { width: 132px; aspect-ratio: 16 / 9; object-fit: cover; background: var(--stone); }
.post-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.post-title { font-size: 21px; line-height: 1.3; }
.pub-tfr .post-title { font-family: var(--serif-display); font-size: 24px; line-height: 1.2; }
.post-sub { font-size: 15px; line-height: 1.45; color: var(--muted); }
.post-date { font-size: 14px; color: var(--faint); }
.post.no-thumb a { grid-template-columns: 1fr; }
.post-skeleton { height: 92px; border-bottom: 1px solid var(--rule); background: linear-gradient(90deg, var(--stone), var(--paper)); opacity: 0.6; }
.feed-note { font-size: 16px; color: var(--muted); padding: 18px 0; margin: 0; }

@media (max-width: 520px) {
  .post a { grid-template-columns: 96px 1fr; gap: 14px; }
  .post-thumb { width: 96px; }
  .post-sub { display: none; }
}

/* Series */
.series { background: #12100c; color: var(--cream); padding: 80px 0; }
.series .wrap { display: flex; flex-direction: column; gap: 32px; }
.series-head { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.series-head h2 { margin: 0; font-family: var(--serif-display); font-weight: 500; font-size: 42px; color: var(--cream); }
.series-head .ornament { width: min(300px, 70%); }
.series-head p { margin: 0; color: var(--cream-muted); max-width: 640px; }
.series-group { display: flex; flex-direction: column; gap: 14px; }
.series-group + .series-group { margin-top: 16px; }
.series-group h3 { margin: 0; font-size: 13px; letter-spacing: 0.22em; color: var(--gold-light); font-weight: 400; }
.series-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 20px; }
.series-card {
  display: flex; flex-direction: column; text-decoration: none; color: var(--cream);
  border: 1px solid #6b5524; background: #1a1714;
}
.series-card.tfr { background: #3a0b10; }
.series-card:hover { border-color: var(--gold); color: var(--cream); }
.series-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.series-card .meta { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; font-size: 14px; }
.series-card .meta span:last-child { color: var(--gold-light); white-space: nowrap; }

/* Tools and shop band */
.duo {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr));
  gap: 48px; padding-top: 88px; padding-bottom: 88px;
}
.duo > div { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.duo h2 { margin: 0; font-family: var(--serif-display); font-weight: 500; font-size: 38px; line-height: 1.15; }
.duo p { margin: 0; color: var(--muted); }
.kicker { font-size: 12px; letter-spacing: 0.2em; color: var(--crimson); }
.kicker.gold { color: var(--gold-text); }
.soon { font-size: 15px; color: var(--faint); font-style: italic; }

/* Support */
.support { background: var(--oxblood); color: #f3e7cc; padding: 80px 0; border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); }
.support .wrap { max-width: 980px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 40px 56px; }
.support-text { display: flex; flex-direction: column; gap: 18px; flex: 1 1 380px; max-width: 560px; align-items: flex-start; }
.support h2 { margin: 0; font-family: var(--serif-display); font-weight: 500; font-size: 40px; color: #fff; }
.support p { margin: 0; line-height: 1.7; }
.qr { background: #fff; padding: 14px; border: 1px solid var(--gold); }
.qr img { width: 180px; height: 180px; }

/* Footer */
.site-footer { background: var(--black); color: var(--cream-muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-top: 36px; padding-bottom: 36px; }
.site-footer .sign { display: flex; align-items: center; gap: 14px; }
.site-footer .sign img { width: 56px; height: 56px; }
.sign-off { font-variant: small-caps; letter-spacing: 0.06em; color: var(--gold-light); font-weight: 700; font-size: 17px; }
.site-footer a { color: var(--cream-muted); }

/* Tools page */
.tools-hero { background: var(--night); color: var(--cream); padding: 64px 0 72px; }
.tools-hero .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 32px 56px; }
.tools-hero img { width: clamp(140px, 18vw, 210px); }
.tools-hero .text { display: flex; flex-direction: column; gap: 16px; flex: 1 1 420px; }
.tools-hero .verse { font-size: 13px; letter-spacing: 0.24em; color: #c9a44c; }
.tools-hero h1 { margin: 0; font-family: var(--serif-display); font-weight: 500; font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1.1; color: var(--cream); }
.tools-hero p { margin: 0; font-size: 19px; color: var(--cream-soft); max-width: 620px; }

.feature { margin-top: 56px; background: #fff; border: 1px solid var(--rule); border-top: 4px solid var(--crimson); padding: 36px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 36px; align-items: center; }
.feature .text { display: flex; flex-direction: column; gap: 14px; }
.feature h2 { margin: 0; font-family: var(--serif-display); font-weight: 600; font-size: 40px; }
.feature p { margin: 0; color: var(--muted); }
.badge-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.badge { font-size: 12px; letter-spacing: 0.1em; background: var(--stone); color: #5e574c; padding: 4px 10px; }
.feature .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.feature .btn-line { color: var(--crimson); }
.feature-art { background: var(--stone); min-height: 280px; display: flex; align-items: center; justify-content: center; padding: 24px; }
.mini-app { background: #fff; width: 220px; border: 1px solid #d6cfc2; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.mini-app .label { font-size: 12px; letter-spacing: 0.12em; color: var(--crimson); }
.mini-app .bar { display: flex; flex-direction: column; gap: 4px; }
.mini-app .bar span { height: 8px; }
.mini-app .bar span:first-child { width: 70%; background: var(--rule); }
.mini-app .bar span:last-child { background: var(--crimson); }

.resources { padding-top: 56px; padding-bottom: 88px; display: flex; flex-direction: column; gap: 24px; }
.resources h2 { margin: 0; font-family: var(--serif-display); font-weight: 500; font-size: 32px; }
.resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.resource { background: #fff; border: 1px solid var(--rule); padding: 24px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 10px; min-height: 160px; }
a.resource:hover { border-color: var(--crimson); color: var(--ink); }
.resource .title { font-family: var(--serif-display); font-size: 26px; line-height: 1.2; }
.resource .desc { font-size: 15px; line-height: 1.5; color: #5e574c; }
