@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Work+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #F5F1EA;
  --bg-card: #EEEBE4;
  --bg-white: #FDFAF5;
  --text: #1A1A1A;
  --text-muted: #6B6560;
  --text-light: #9B9590;
  --accent: #BB061E;
  --accent-dim: rgba(187, 6, 30, 0.08);
  --accent-hover: #960518;
  --border: rgba(0, 0, 0, 0.1);
  --border-strong: rgba(0, 0, 0, 0.2);
  --dark: #0A0A2E;
  --reader: #BB061E;
  --supporter: #0A0A2E;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Work Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: 'Instrument Serif', serif;
  line-height: 1.25;
  font-weight: 400;
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-hover); }

/* MASTHEAD */
.masthead {
  background: var(--dark);
  color: #fff;
  text-align: center;
  padding: 2rem 1.5rem 1.5rem;
  border-bottom: 4px solid var(--accent);
}

.masthead-logo {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 400;
  color: #fff;
  letter-spacing: -0.02em;
  display: block;
  line-height: 1;
}

.masthead-logo span { color: var(--accent); }

.masthead-tagline {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-top: 0.5rem;
}

.masthead-date {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  margin-top: 0.35rem;
}

/* NAV */
.nav {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  gap: 1rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.9rem;
  border-right: 1px solid var(--border);
  transition: all 0.15s;
}

.nav-links li:first-child a { padding-left: 0; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.nav-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  object-fit: cover;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: 3px;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  font-family: 'Work Sans', sans-serif;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }

.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: #14143f; color: #fff; }

.btn-outline { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn-outline:hover { background: var(--accent-dim); color: var(--accent); }

.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--border-strong); color: var(--text); }

.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.75rem; }
.btn-lg { padding: 0.75rem 1.75rem; font-size: 0.9rem; }

/* CONTAINER */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 720px; margin: 0 auto; padding: 0 1.5rem; }

/* LAYOUT */
.layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}

/* SECTION HEADERS */
.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--text);
}

.section-header h2 {
  font-family: 'Work Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text);
}

.section-header .accent-rule {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ARTICLE CARDS */
.article-list { display: grid; gap: 0; }

.article-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: start;
}

.article-item:first-child { padding-top: 0; }

.article-category {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.4rem;
}

.article-title-link {
  font-family: 'Instrument Serif', serif;
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--text);
  display: block;
  margin-bottom: 0.4rem;
}

.article-title-link:hover { color: var(--accent); }

.article-excerpt {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 0.6rem;
}

.article-byline {
  font-size: 0.75rem;
  color: var(--text-light);
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.article-byline .dot { opacity: 0.4; }

/* FEATURED / LEAD ARTICLE */
.lead-article {
  padding: 0 0 2rem;
  margin-bottom: 2rem;
  border-bottom: 3px solid var(--accent);
}

.lead-category {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.2rem 0.6rem;
  margin-bottom: 0.75rem;
}

.lead-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.lead-title a { color: var(--text); }
.lead-title a:hover { color: var(--accent); }

.lead-excerpt {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
  font-style: italic;
}

/* SIDEBAR */
.sidebar { }

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.sidebar-widget h3 {
  font-family: 'Work Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-article {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.sidebar-article:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-article:first-child { padding-top: 0; }

.sidebar-article a {
  font-family: 'Instrument Serif', serif;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.35;
  display: block;
  margin-bottom: 0.25rem;
}

.sidebar-article a:hover { color: var(--accent); }

.sidebar-article .meta {
  font-size: 0.7rem;
  color: var(--text-light);
}

/* SUBSCRIBE BOX */
.subscribe-box {
  background: var(--dark);
  color: #fff;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.subscribe-box h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 0.4rem;
  font-weight: 400;
}

.subscribe-box p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* ARTICLE PAGE */
.article-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3.5rem;
  align-items: start;
}

.article-main { }

.article-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.article-headline {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.article-standfirst {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1.25rem;
  line-height: 1.6;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.article-meta-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.article-meta-bar .separator { color: var(--border-strong); }

.article-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #2A2520;
}

.article-body p { margin-bottom: 1.4rem; }

.article-body h2 {
  font-size: 1.4rem;
  margin: 2.5rem 0 0.75rem;
  color: var(--text);
}

.article-body h3 {
  font-size: 1.15rem;
  margin: 2rem 0 0.6rem;
}

.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 1.25rem;
  margin: 1.5rem 0;
  font-family: 'Instrument Serif', serif;
  font-size: 1.15rem;
  color: var(--text-muted);
  font-style: italic;
}

.article-body ul, .article-body ol {
  margin: 0 0 1.4rem 1.5rem;
}

.article-body li { margin-bottom: 0.4rem; }

.article-body strong { color: var(--text); }

/* PAYWALL */
.paywall-gradient {
  position: relative;
  margin-top: -4rem;
}

.paywall-gradient::before {
  content: '';
  display: block;
  height: 4rem;
  background: linear-gradient(to bottom, transparent, var(--bg));
}

.paywall-box {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  padding: 2.5rem;
  text-align: center;
}

.paywall-box h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.paywall-box p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}

/* AFFILIATE BOXES */
.affiliate-strip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 2rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.88rem;
}

.affiliate-strip strong { display: block; margin-bottom: 0.2rem; }
.affiliate-strip p { color: var(--text-muted); margin: 0 0 0.4rem; font-size: 0.82rem; }

/* REACTIONS */
.reactions {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  background: var(--bg-white);
  border-radius: 100px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Work Sans', sans-serif;
  color: var(--text-muted);
}

.reaction-btn:hover { border-color: var(--accent); color: var(--accent); }
.reaction-btn.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

/* PRICING */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  padding: 2rem;
  position: relative;
}

.pricing-card.featured {
  border-color: var(--accent);
  border-top: 4px solid var(--accent);
}

.pricing-tier { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); margin-bottom: 0.5rem; }
.pricing-price { display: flex; align-items: baseline; gap: 0.2rem; margin-bottom: 1.25rem; }
.pricing-currency { font-size: 1rem; color: var(--text-muted); margin-top: 0.5rem; }
.pricing-amount { font-size: 2.8rem; font-family: 'Instrument Serif', serif; }
.pricing-period { font-size: 0.85rem; color: var(--text-muted); }

.pricing-features { list-style: none; margin-bottom: 1.75rem; }
.pricing-features li {
  padding: 0.4rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.pricing-features li::before { content: '✓'; color: var(--accent); font-weight: 700; }
.pricing-features li.no::before { content: '–'; color: var(--text-light); }
.pricing-features li.no { color: var(--text-light); }

/* CATEGORY BADGE */
.cat-badge {
  display: inline-block;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
}

/* ACCOUNT */
.account-page { max-width: 760px; margin: 0 auto; padding: 3rem 1.5rem; }
.account-header { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 2px solid var(--text); }
.account-avatar { width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--accent); }
.account-name { font-size: 1.5rem; margin-bottom: 0.2rem; }
.account-email { font-size: 0.85rem; color: var(--text-muted); }

.info-row { display: flex; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.info-box { background: var(--bg-card); border: 1px solid var(--border); padding: 1rem 1.25rem; flex: 1; min-width: 150px; }
.info-box-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 0.3rem; }
.info-box-value { font-family: 'Instrument Serif', serif; font-size: 1.1rem; }

/* STATUS BADGES */
.status-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
}
.status-trial { background: rgba(255,180,0,0.15); color: #B8860B; border: 1px solid rgba(255,180,0,0.3); }
.status-active { background: rgba(0,160,80,0.12); color: #00804A; border: 1px solid rgba(0,160,80,0.25); }
.status-expired { background: rgba(187,6,30,0.1); color: var(--accent); border: 1px solid rgba(187,6,30,0.25); }
.status-reader { background: rgba(187,6,30,0.1); color: var(--accent); border: 1px solid rgba(187,6,30,0.2); }
.status-supporter { background: rgba(10,10,46,0.08); color: var(--dark); border: 1px solid rgba(10,10,46,0.2); }

/* FLASH */
.flash { padding: 0.875rem 1.25rem; font-size: 0.88rem; margin-bottom: 1.25rem; border-radius: 2px; }
.flash-success { background: rgba(0,160,80,0.1); border: 1px solid rgba(0,160,80,0.25); color: #00804A; }
.flash-error { background: rgba(187,6,30,0.08); border: 1px solid rgba(187,6,30,0.25); color: var(--accent); }
.flash-info { background: var(--accent-dim); border: 1px solid rgba(187,6,30,0.2); color: var(--accent); }

/* FOOTER */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.6);
  padding: 3rem 1.5rem 2rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand .logo { font-family: 'Instrument Serif', serif; font-size: 1.3rem; color: #fff; margin-bottom: 0.5rem; }
.footer-brand p { font-size: 0.82rem; line-height: 1.6; }

.footer-col h4 { font-family: 'Work Sans', sans-serif; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; color: rgba(255,255,255,0.4); margin-bottom: 0.75rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.4rem; }
.footer-col ul li a { color: rgba(255,255,255,0.5); font-size: 0.85rem; }
.footer-col ul li a:hover { color: #fff; }

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* GOOGLE SIGNIN */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: #fff;
  color: #333;
  border: 1px solid #ddd;
  padding: 0.75rem 1.5rem;
  border-radius: 3px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  font-family: 'Work Sans', sans-serif;
  width: 100%;
}
.btn-google:hover { background: #f5f5f5; color: #333; box-shadow: 0 2px 6px rgba(0,0,0,0.12); }
.btn-google img { width: 18px; height: 18px; }

/* DIVIDER */
.rule { height: 1px; background: var(--border); margin: 1.5rem 0; }
.rule-bold { height: 2px; background: var(--text); margin: 1.5rem 0; }

/* FILTER TABS */
.filter-bar {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--text);
  margin-bottom: 2rem;
  overflow-x: auto;
}

.filter-tab {
  padding: 0.5rem 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
  margin-bottom: -2px;
  white-space: nowrap;
  font-family: 'Work Sans', sans-serif;
}

.filter-tab:hover { color: var(--accent); }
.filter-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* TRIAL BANNER */
.trial-strip {
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1.5rem;
  text-align: center;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.trial-strip strong { font-weight: 700; }
.trial-strip a { color: #fff; text-decoration: underline; }

/* ADMIN */
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.admin-table th { text-align: left; padding: 0.6rem 0.75rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); border-bottom: 2px solid var(--text); }
.admin-table td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .article-page { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
