:root {
  --yellow: #F5C800;
  --yellow-dark: #D4A900;
  --yellow-light: #FFF8CC;
  --black: #0A0A0A;
  --charcoal: #1C1C1C;
  --ink: #2D2D2D;
  --grey-dark: #555;
  --grey-mid: #888;
  --grey-light: #E8E8E8;
  --grey-bg: #F7F5F0;
  --white: #FEFEFE;
  --serif: 'Playfair Display', Georgia, serif;
  --body-serif: 'Source Serif 4', Georgia, serif;
  --sans: 'DM Sans', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--body-serif); background: var(--white); color: var(--ink); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { display: block; width: 100%; object-fit: cover; }

/* UTILITY */
.tag { font-family: var(--sans); font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--charcoal); background: var(--yellow); padding: 3px 8px; display: inline-block; }
.tag.outline { background: transparent; border: 1px solid var(--grey-light); color: var(--grey-dark); }
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* TOP BAR */
.topbar { background: var(--black); color: var(--grey-mid); font-family: var(--sans); font-size: 11px; letter-spacing: .06em; display: flex; justify-content: space-between; align-items: center; padding: 7px 40px; }
.topbar a { color: var(--grey-mid); transition: color .2s; }
.topbar a:hover { color: var(--yellow); }
.topbar-right { display: flex; gap: 20px; }

/* HEADER */
header { border-bottom: 3px solid var(--black); background: var(--white); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 12px rgba(0,0,0,.07); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 0 40px; gap: 24px; }
.masthead { text-align: center; padding: 14px 0; flex: 0 0 auto; }
.masthead-title { font-family: var(--serif); font-size: 38px; font-weight: 900; letter-spacing: -.02em; color: var(--black); line-height: 1.3; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: nowrap; }
.masthead-title span { background: var(--yellow); padding: 0 10px; display: inline-block; line-height: 1.25; border-radius: 2px; }
.masthead-title a { color: inherit; display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.masthead-sub { font-family: var(--sans); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--grey-mid); margin-top: 3px; }
.header-actions { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.btn { font-family: var(--sans); font-size: 12px; font-weight: 600; padding: 8px 18px; cursor: pointer; transition: all .2s; border: none; }
.btn-primary { background: var(--black); color: var(--yellow); }
.btn-primary:hover { background: var(--charcoal); }
.btn-outline { background: transparent; border: 1.5px solid var(--black); color: var(--black); }
.btn-outline:hover { background: var(--black); color: var(--white); }

/* NAV */
nav { background: var(--black); }
.nav-inner { display: flex; align-items: center; padding: 0 40px; overflow-x: auto; scrollbar-width: none; max-width: 1320px; margin: 0 auto; }
.nav-inner::-webkit-scrollbar { display: none; }
nav a { font-family: var(--sans); font-size: 11.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: #aaa; padding: 11px 16px; white-space: nowrap; border-bottom: 2px solid transparent; transition: all .2s; }
nav a:hover { color: var(--white); border-color: var(--yellow); }
nav a.active { color: var(--yellow); border-color: var(--yellow); }

/* TICKER */
.ticker { background: var(--yellow); overflow: hidden; padding: 7px 0; display: flex; align-items: center; }
.ticker-label { font-family: var(--sans); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; background: var(--black); color: var(--yellow); padding: 4px 14px; white-space: nowrap; flex-shrink: 0; }
.ticker-scroll { overflow: hidden; flex: 1; }
.ticker-track { display: flex; gap: 60px; animation: ticker 28s linear infinite; padding-left: 40px; }
.ticker-track span { font-family: var(--sans); font-size: 11.5px; font-weight: 500; color: var(--black); white-space: nowrap; }
.ticker-track span::before { content: "● "; font-size: 7px; }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* SECTION HEADER */
.section-header { display: flex; align-items: center; gap: 14px; padding: 28px 0 18px; }
.section-header h2 { font-family: var(--serif); font-size: 22px; font-weight: 900; letter-spacing: -.01em; color: var(--black); white-space: nowrap; }
.section-header::after { content: ''; flex: 1; height: 1px; background: var(--grey-light); }
.section-header .see-all { font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--grey-mid); white-space: nowrap; cursor: pointer; transition: color .2s; }
.section-header .see-all:hover { color: var(--black); }

/* CARD GRIDS */
.card-grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 28px; padding-bottom: 32px; border-bottom: 1px solid var(--grey-light); }
.card-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; padding-bottom: 32px; border-bottom: 1px solid var(--grey-light); }
.card-grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 28px; padding-bottom: 32px; border-bottom: 1px solid var(--grey-light); }
.card { display: flex; flex-direction: column; cursor: pointer; }
.card:hover .card-img img { transform: scale(1.04); }
.card:hover h3 { color: var(--grey-dark); }
.card-img { aspect-ratio: 3/2; overflow: hidden; margin-bottom: 12px; background: var(--grey-light); }
.card-img img { height: 100%; transition: transform .4s; }
.card .tag { margin-bottom: 8px; }
.card h3 { font-family: var(--serif); font-size: 18px; font-weight: 700; line-height: 1.25; color: var(--black); margin-bottom: 8px; transition: color .2s; }
.card h3.large { font-size: 22px; }
.card p { font-size: 13.5px; color: var(--grey-dark); line-height: 1.55; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { font-family: var(--sans); font-size: 10.5px; color: var(--grey-mid); margin-top: 10px; display: flex; gap: 12px; }
.card a { color: inherit; }

/* HERO */
.hero { padding: 36px 0 0; border-bottom: 2px solid var(--black); }
.hero-grid { display: grid; grid-template-columns: 1fr 320px; gap: 0; }
.hero-main { border-right: 1px solid var(--grey-light); padding-right: 32px; padding-bottom: 32px; }
.hero-main .tag { margin-bottom: 14px; }
.hero-main h1 { font-family: var(--serif); font-size: 48px; font-weight: 900; line-height: 1.08; letter-spacing: -.02em; color: var(--black); margin-bottom: 14px; }
.hero-main h1 em { font-style: italic; color: var(--grey-dark); }
.hero-deck { font-size: 17px; color: var(--grey-dark); line-height: 1.6; margin-bottom: 18px; font-weight: 300; }
.hero-meta { font-family: var(--sans); font-size: 11.5px; color: var(--grey-mid); display: flex; gap: 16px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.hero-meta strong { color: var(--ink); font-weight: 600; }
.hero-img { position: relative; aspect-ratio: 16/9; overflow: hidden; margin-bottom: 10px; }
.hero-img img { height: 100%; transition: transform .4s; }
.hero-img:hover img { transform: scale(1.02); }
.hero-caption { font-family: var(--sans); font-size: 10px; color: var(--grey-mid); letter-spacing: .04em; }
.hero-sidebar { padding-left: 28px; padding-bottom: 32px; display: flex; flex-direction: column; }
.sidebar-article { padding: 16px 0; border-bottom: 1px solid var(--grey-light); }
.sidebar-article:last-child { border-bottom: none; }
.sidebar-article .tag { margin-bottom: 8px; }
.sidebar-article h3 { font-family: var(--serif); font-size: 17px; font-weight: 700; line-height: 1.25; color: var(--black); margin-bottom: 6px; cursor: pointer; transition: color .2s; }
.sidebar-article h3:hover { color: var(--grey-dark); }
.sidebar-article p { font-size: 13px; color: var(--grey-dark); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sidebar-article .meta { font-family: var(--sans); font-size: 10.5px; color: var(--grey-mid); margin-top: 7px; }

/* OPINION */
.opinion-strip { background: var(--black); padding: 32px 0; }
.opinion-header { display: flex; align-items: baseline; gap: 16px; margin-bottom: 24px; }
.opinion-header h2 { font-family: var(--serif); font-size: 24px; font-weight: 900; color: var(--yellow); }
.opinion-header span { font-family: var(--sans); font-size: 11px; color: #666; letter-spacing: .08em; text-transform: uppercase; }
.opinion-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: #333; }
.opinion-card { background: var(--charcoal); padding: 22px; cursor: pointer; transition: background .2s; }
.opinion-card:hover { background: #2a2a2a; }
.opinion-card .avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--yellow); margin-bottom: 14px; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 18px; font-weight: 700; color: var(--black); flex-shrink: 0; }
.opinion-card .author { font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--yellow); margin-bottom: 8px; }
.opinion-card h3 { font-family: var(--serif); font-size: 17px; font-weight: 700; color: var(--white); line-height: 1.3; font-style: italic; }
.opinion-card a { color: inherit; }

/* FEATURE BANNER */
.feature-banner { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-bottom: 2px solid var(--black); }
.feature-text { padding: 40px 40px 40px 0; display: flex; flex-direction: column; justify-content: center; }
.feature-text .tag { margin-bottom: 16px; }
.feature-text h2 { font-family: var(--serif); font-size: 38px; font-weight: 900; line-height: 1.1; letter-spacing: -.02em; color: var(--black); margin-bottom: 14px; }
.feature-text p { font-size: 15px; color: var(--grey-dark); line-height: 1.65; font-weight: 300; margin-bottom: 20px; }
.read-more { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--black); border-bottom: 2px solid var(--yellow); padding-bottom: 2px; display: inline-block; transition: border-color .2s; }
.read-more:hover { border-color: var(--grey-mid); }
.feature-img { aspect-ratio: 1/1; overflow: hidden; }
.feature-img img { height: 100%; object-fit: cover; }

/* TWO COL */
.two-col { display: grid; grid-template-columns: 1fr 340px; gap: 40px; padding: 28px 0 32px; border-bottom: 1px solid var(--grey-light); }
.most-read { border-left: 1px solid var(--grey-light); padding-left: 32px; }
.most-read-title { font-family: var(--serif); font-size: 18px; font-weight: 900; color: var(--black); margin-bottom: 18px; padding-bottom: 10px; border-bottom: 2px solid var(--black); }
.most-read-item { display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--grey-light); cursor: pointer; align-items: flex-start; }
.most-read-item:last-child { border-bottom: none; }
.most-read-num { font-family: var(--serif); font-size: 28px; font-weight: 900; color: var(--yellow); line-height: 1; flex-shrink: 0; width: 30px; }
.most-read-item h4 { font-family: var(--serif); font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--black); transition: color .2s; }
.most-read-item:hover h4 { color: var(--grey-dark); }
.most-read-item a { color: inherit; }

/* NEWSLETTER */
.newsletter { background: var(--yellow); padding: 42px 0; }
.newsletter-inner { max-width: 560px; margin: 0 auto; text-align: center; padding: 0 24px; }
.newsletter-inner h2 { font-family: var(--serif); font-size: 30px; font-weight: 900; color: var(--black); margin-bottom: 8px; }
.newsletter-inner p { font-family: var(--sans); font-size: 13px; color: var(--charcoal); margin-bottom: 22px; }
.newsletter-form { display: flex; gap: 8px; max-width: 440px; margin: 0 auto; }
.newsletter-form input { flex: 1; font-family: var(--sans); font-size: 13px; padding: 12px 16px; border: 2px solid var(--black); background: var(--white); outline: none; min-width: 0; }
.newsletter-form button { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--black); color: var(--yellow); border: none; padding: 12px 22px; cursor: pointer; transition: background .2s; white-space: nowrap; }
.newsletter-form button:hover { background: var(--charcoal); }

/* FOOTER */
footer { background: var(--black); padding: 48px 0 24px; }
.footer-masthead { font-family: var(--serif); font-size: 28px; font-weight: 900; text-align: center; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid #333; }
.footer-masthead .ybrand { background: var(--yellow); padding: 2px 7px; color: var(--black); }
.footer-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 28px; padding-bottom: 32px; border-bottom: 1px solid #333; margin-bottom: 20px; }
.footer-col h4 { font-family: var(--sans); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); margin-bottom: 12px; }
.footer-col a { display: block; font-family: var(--sans); font-size: 12px; color: #888; margin-bottom: 7px; transition: color .2s; }
.footer-col a:hover { color: var(--white); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer-bottom p { font-family: var(--sans); font-size: 11px; color: #555; }
.footer-bottom p strong { color: var(--yellow); }

/* SECTION HERO */
.section-hero { background: var(--black); padding: 36px 0; }
.section-hero-inner { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.section-hero h1 { font-family: var(--serif); font-size: 52px; font-weight: 900; color: var(--white); line-height: 1; }
.section-hero h1 span { color: var(--yellow); }
.section-hero p { font-family: var(--sans); font-size: 13px; color: #888; margin-top: 8px; letter-spacing: .06em; }

/* ── AUTH MODALS ── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 9999; align-items: center; justify-content: center; backdrop-filter: blur(3px); padding: 16px; }
.modal-overlay.open { display: flex; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
.modal-box { background: var(--white); width: 100%; max-width: 440px; padding: 36px 32px; position: relative; animation: slideUp .25s ease; border-top: 4px solid var(--yellow); max-height: 90vh; overflow-y: auto; }
@keyframes slideUp { from { transform: translateY(24px); opacity:0; } to { transform: translateY(0); opacity:1; } }
.modal-close { position: absolute; top: 14px; right: 18px; font-size: 22px; line-height:1; background: none; border: none; cursor: pointer; color: var(--grey-mid); transition: color .2s; }
.modal-close:hover { color: var(--black); }
.modal-logo { font-family: var(--serif); font-size: 22px; font-weight: 900; text-align: center; margin-bottom: 4px; color: var(--black); }
.modal-logo span { background: var(--yellow); padding: 0 6px; }
.modal-subtitle { font-family: var(--sans); font-size: 11px; color: var(--grey-mid); text-align: center; margin-bottom: 20px; letter-spacing: .06em; }
.modal-box h2 { font-family: var(--serif); font-size: 24px; font-weight: 900; color: var(--black); margin-bottom: 6px; text-align: center; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); margin-bottom: 5px; }
.form-group input { width: 100%; font-family: var(--sans); font-size: 14px; padding: 11px 13px; border: 1.5px solid var(--grey-light); outline: none; transition: border-color .2s; background: var(--white); color: var(--black); }
.form-group input:focus { border-color: var(--black); }
.modal-btn { width: 100%; font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--black); color: var(--yellow); border: none; padding: 14px; cursor: pointer; transition: background .2s; margin-top: 6px; }
.modal-btn:hover { background: var(--charcoal); }
.modal-btn:disabled { opacity: .6; cursor: not-allowed; }
.modal-btn.yellow { background: var(--yellow); color: var(--black); }
.modal-btn.yellow:hover { background: var(--yellow-dark); }
.modal-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.modal-divider::before,.modal-divider::after { content:''; flex:1; height:1px; background: var(--grey-light); }
.modal-divider span { font-family: var(--sans); font-size: 11px; color: var(--grey-mid); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.modal-social-btn { width: 100%; font-family: var(--sans); font-size: 13px; font-weight: 600; padding: 12px; border: 1.5px solid var(--grey-light); background: var(--white); cursor: pointer; transition: all .2s; margin-bottom: 10px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.modal-social-btn:hover { border-color: var(--black); background: var(--grey-bg); }
.modal-switch { font-family: var(--sans); font-size: 12px; color: var(--grey-mid); text-align: center; margin-top: 18px; }
.modal-switch a { color: var(--black); font-weight: 700; cursor: pointer; border-bottom: 1px solid var(--yellow); }
.modal-forgot { font-family: var(--sans); font-size: 11px; color: var(--grey-mid); text-align: right; margin-top: -8px; margin-bottom: 14px; cursor: pointer; }
.modal-forgot:hover { color: var(--black); }

/* PLAN CARDS — Fixed vertical stack */
.plan-cards { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.plan-card { border: 2px solid var(--grey-light); padding: 14px 16px; cursor: pointer; transition: all .2s; position: relative; display: flex; align-items: center; justify-content: space-between; }
.plan-card.selected { border-color: var(--black); background: var(--grey-bg); }
.plan-card.popular::after { content: 'POPULAR'; position: absolute; top: -1px; right: 10px; font-family: var(--sans); font-size: 9px; font-weight: 700; letter-spacing: .1em; background: var(--yellow); color: var(--black); padding: 2px 7px; }
.plan-card h4 { font-family: var(--sans); font-size: 13px; font-weight: 700; color: var(--black); }
.plan-card .price { font-family: var(--serif); font-size: 20px; font-weight: 900; color: var(--black); }
.plan-card .price span { font-family: var(--sans); font-size: 11px; color: var(--grey-mid); font-weight: 400; }
.plan-card p { font-family: var(--sans); font-size: 11px; color: var(--grey-mid); }

.modal-success { text-align: center; padding: 10px 0; }
.modal-success .check { font-size: 48px; margin-bottom: 14px; }
.modal-success h3 { font-family: var(--serif); font-size: 22px; font-weight: 900; color: var(--black); margin-bottom: 8px; }
.modal-success p { font-family: var(--sans); font-size: 13px; color: var(--grey-mid); }

/* ERROR BOX */
.error-box { display: none; background: #fff0f0; border-left: 3px solid #E53935; padding: 10px 14px; font-family: var(--sans); font-size: 12px; color: #E53935; margin-bottom: 14px; }
.error-box.success-msg { background: #f0fff0; border-color: #2E7D32; color: #2E7D32; }

/* READING PROGRESS */
.reading-progress { position: fixed; top: 0; left: 0; width: 0%; height: 3px; background: var(--yellow); z-index: 9999; transition: width .1s; }

/* ════════════════════════════════════════
   RESPONSIVE — TABLET (iPad)
════════════════════════════════════════ */
@media (max-width: 1024px) {
  .card-grid-4 { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: repeat(3,1fr); }
  .opinion-grid { grid-template-columns: repeat(2,1fr); }
  .two-col { grid-template-columns: 1fr; }
  .most-read { border-left: none; padding-left: 0; border-top: 1px solid var(--grey-light); padding-top: 24px; }
}

/* ════════════════════════════════════════
   RESPONSIVE — MOBILE
════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Hide topbar on mobile */
  .topbar { display: none; }

  /* Header */
  .header-inner { padding: 0 16px; gap: 12px; }
  .masthead-title { font-size: 22px; gap: 5px; }
  .masthead-title span { padding: 0 6px; }
  .masthead { padding: 10px 0; }
  .masthead-sub { font-size: 9px; }
  .btn { font-size: 11px; padding: 7px 12px; }

  /* Nav */
  .nav-inner { padding: 0 8px; }
  nav a { padding: 10px 10px; font-size: 10px; }

  /* Container */
  .container { padding: 0 16px; }

  /* Hero */
  .hero-grid { grid-template-columns: 1fr; }
  .hero-main { border-right: none; padding-right: 0; border-bottom: 1px solid var(--grey-light); padding-bottom: 24px; }
  .hero-main h1 { font-size: 28px; }
  .hero-deck { font-size: 15px; }
  .hero-sidebar { padding-left: 0; padding-top: 20px; }

  /* Card grids */
  .card-grid-4, .card-grid-3 { grid-template-columns: 1fr; gap: 20px; }
  .card-grid-2 { grid-template-columns: 1fr; }
  .card h3 { font-size: 16px; }
  .card h3.large { font-size: 18px; }

  /* Opinion */
  .opinion-grid { grid-template-columns: 1fr; }

  /* Feature banner */
  .feature-banner { grid-template-columns: 1fr; }
  .feature-img { aspect-ratio: 16/9; }
  .feature-text { padding: 24px 0; }
  .feature-text h2 { font-size: 24px; }

  /* Two col */
  .two-col { grid-template-columns: 1fr; gap: 24px; }
  .most-read { border-left: none; padding-left: 0; border-top: 1px solid var(--grey-light); padding-top: 20px; }

  /* Newsletter */
  .newsletter-form { flex-direction: column; }
  .newsletter-form input, .newsletter-form button { width: 100%; }

  /* Footer */
  .footer-grid { grid-template-columns: repeat(2,1fr); gap: 20px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  /* Section hero */
  .section-hero h1 { font-size: 32px; }

  /* Modals */
  .modal-box { padding: 28px 20px; }
  .modal-box h2 { font-size: 20px; }

  /* Article */
  .article-header h1 { font-size: 26px !important; }
  .article-header .deck { font-size: 15px !important; }
  .article-body p { font-size: 16px !important; }
}

@media (max-width: 400px) {
  .masthead-title { font-size: 18px; }
  .hero-main h1 { font-size: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
}
