/* Matt in America, The Liberty Table.  Mobile first from 390px. */

:root {
  --navy: #0B1F3A;
  --deep: #071426;
  --red: #B22234;
  --gold: #C9A227;
  --white: #FFFFFF;
  --paper: #F4F0E6;
  --ink: #16233A;
  --slate: #4A5568;
  --font-head: "Oswald", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Source Sans 3", "Source Sans Pro", "Segoe UI", Helvetica, Arial, sans-serif;
  --pad: 20px;
  --radius: 4px;
  --radius-lg: 6px;
}

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

html { scroll-behavior: smooth; }

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  margin: 0;
  line-height: 1.1;
}

p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a, .btn { transition: background-color 0.15s, color 0.15s, border-color 0.15s; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.on-dark :focus-visible { outline-color: var(--gold); }

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

.grid-12 { display: grid; grid-template-columns: 1fr; gap: 40px; }

section { padding: 56px 0; }

/* Type helpers */

.eyebrow {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  line-height: 1.3;
  margin: 0 0 12px;
  display: block;
}
.eyebrow-gold { color: var(--gold); }
.eyebrow-red { color: var(--red); }

.h2 {
  font-weight: 700;
  font-size: 32px;
  color: var(--navy);
  margin: 0 0 16px;
}
.h2-white { color: var(--white); }

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
}
.btn:hover { text-decoration: underline; }
.btn-red { background: var(--red); color: var(--white); border-color: var(--red); }
.btn-outline { background: transparent; color: var(--white); border-color: #3A5078; }
.btn-navy { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* Top bar */

.topbar { background: var(--deep); color: var(--white); }
.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  color: var(--white);
  min-height: 44px;
  justify-content: center;
}
.wordmark {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.08em;
  line-height: 1;
  color: var(--white);
}
.tagline {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.26em;
  line-height: 1;
  color: var(--gold);
}

.menu-toggle {
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  background: transparent;
  color: var(--white);
  border: 1px solid #3A5078;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
html:not(.js) .menu-toggle { display: none; }

.site-nav {
  flex-basis: 100%;
  padding: 8px 0 16px;
}
.js .site-nav { display: none; }
.js .site-nav.is-open { display: block; }

.nav-list { display: flex; flex-direction: column; }
.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: 0.06em;
  color: var(--white);
  text-decoration: none;
}
.nav-list a:hover { color: var(--gold); }
.site-nav .btn { margin-top: 12px; }

/* Hero */

.hero { background: var(--navy); color: var(--white); padding: 56px 0 64px; }
.hero-h1 { font-weight: 700; font-size: 44px; line-height: 1.02; color: var(--white); margin: 0 0 16px; }
.hero-sub { font-family: var(--font-head); font-weight: 500; font-size: 24px; line-height: 1.2; color: var(--white); margin: 0 0 18px; }
.hero-lead { font-size: 18px; line-height: 1.5; color: #DCE3EE; margin: 0 0 28px; max-width: 34em; }

.hero-form { max-width: 560px; }
.form-label {
  display: block;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-bottom: 10px;
}
.form-row { display: flex; flex-wrap: wrap; gap: 10px; }
.form-input {
  flex: 1 1 200px;
  min-height: 48px;
  padding: 0 14px;
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #3A5078;
  border-radius: var(--radius);
}
.form-row .btn { flex: 0 0 auto; min-height: 48px; }
.form-note { font-size: 15px; color: #9FB0C8; margin: 10px 0 0; }

.latest-panel {
  background: var(--deep);
  border: 1px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--red);
  margin: 4px 0 20px;
}
.play-btn svg { margin-left: 4px; }
.latest-title { font-weight: 700; font-size: 28px; line-height: 1.2; min-height: 2.4em; color: var(--white); margin: 0 0 10px; }
.latest-line { margin: 0; font-size: 17px; color: #DCE3EE; }
.latest-line a { display: inline-flex; align-items: center; min-height: 44px; color: var(--white); }

.hero-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

.stripe {
  height: 11px;
  background: var(--red);
  border-bottom: 3px solid var(--gold);
}

/* Latest at the Table */

.on-paper { background: var(--paper); }
.on-white { background: var(--white); }

.latest-head { margin-bottom: 28px; }
.latest-head .h2 { font-size: 40px; margin-bottom: 6px; }
.today { font-size: 17px; color: var(--slate); margin: 0; min-height: 1.5em; }

.card-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.card {
  background: var(--white);
  border: 1px solid #D9D2C3;
  border-radius: var(--radius-lg);
  padding: 28px;
}
.card-title { font-weight: 700; font-size: 26px; color: var(--navy); margin: 0 0 12px; }
.card-blurb { color: var(--slate); margin: 0 0 16px; }
.card-link { margin: 0; font-weight: 600; }
.card-link a { display: inline-flex; align-items: center; min-height: 44px; color: var(--red); text-decoration: none; }
.card-link a:hover { text-decoration: underline; }
.card-link-navy a { color: var(--navy); }

/* The Stack */

.stack-h2 { font-size: 32px; max-width: 18em; }
.stack-sub { font-size: 20px; color: var(--slate); margin: 0 0 36px; max-width: 34em; }

.steps { display: grid; grid-template-columns: 1fr; gap: 24px; margin-bottom: 48px; }
.step { border-top: 3px solid var(--navy); padding-top: 18px; }
.step-title { font-weight: 700; font-size: 24px; color: var(--red); margin: 0 0 8px; }
.step p { margin: 0; color: var(--ink); }

.stack-cards { display: grid; grid-template-columns: 1fr; gap: 24px; }
.stack-empty { color: var(--slate); margin: 0; }

.stack-card {
  background: var(--paper);
  border: 1px solid #D9D2C3;
  border-radius: var(--radius-lg);
  padding: 28px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 10px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 1px solid var(--navy);
  color: var(--navy);
}
.chip-solid { background: var(--navy); color: var(--white); }
.stack-date { display: block; font-size: 15px; color: var(--slate); margin-bottom: 10px; }
.stack-headline { font-weight: 700; font-size: 26px; color: var(--navy); margin: 0 0 12px; line-height: 1.12; }
.stack-source { color: var(--slate); margin: 0 0 18px; }
.stack-source a { display: inline-flex; align-items: center; min-height: 44px; color: var(--red); font-weight: 600; text-decoration: none; }
.stack-source a:hover { text-decoration: underline; }
.stack-quote {
  margin: 0 0 20px;
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--gold);
  font-style: italic;
  font-size: 19px;
  color: var(--ink);
}
.stack-quote p { margin: 0; }
.take-panel {
  background: var(--white);
  border: 1px solid #D9D2C3;
  border-radius: var(--radius);
  padding: 22px;
}
.take-text { color: var(--ink); margin: 0 0 18px; }
.take-panel .btn { margin: 0; }

/* Watch */

.watch { background: var(--deep); color: var(--white); }
.watch-link { margin: 0 0 32px; font-weight: 600; }
.watch-link a { display: inline-flex; align-items: center; min-height: 44px; color: var(--gold); text-decoration: none; }
.watch-link a:hover { text-decoration: underline; }

.video-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.video-card { background: #0E2447; border-radius: var(--radius-lg); overflow: hidden; }
.video-link { display: block; color: var(--white); text-decoration: none; height: 100%; }
.thumb {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--navy);
  overflow: hidden;
}
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  background: var(--red);
}
.play::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 17px;
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent var(--white);
}
.video-panel { display: block; padding: 20px 22px 24px; }
.video-panel .eyebrow { margin-bottom: 8px; }
.video-title { display: block; font-family: var(--font-head); font-weight: 700; font-size: 24px; line-height: 1.15; color: var(--white); margin-bottom: 8px; }
.video-link:hover .video-title { text-decoration: underline; }
.video-date { display: block; font-size: 16px; color: #C9D1E0; }

/* Read */

.read-blurb { font-size: 21px; line-height: 1.45; color: var(--ink); margin: 0 0 14px; }
.read-cadence { font-size: 17px; color: var(--slate); margin: 0 0 24px; }

.post-list li { border-top: 1px solid #D9D2C3; padding: 8px 0; }
.post-list li:last-child { border-bottom: 1px solid #D9D2C3; }
.post-list a {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 19px;
  color: var(--navy);
  text-decoration: none;
  min-height: 44px;
}
.post-list a:hover { text-decoration: underline; }
.post-date { display: block; font-size: 15px; color: var(--slate); margin-top: 2px; }

.inbox-card .card-title { margin-bottom: 16px; }
.substack-embed { display: block; width: 100%; height: 320px; border: 0; margin: 0 0 16px; background: var(--white); }

/* About */

.about-p { font-size: 20px; line-height: 1.5; color: var(--ink); margin: 0 0 18px; }

.lineage-panel {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 28px;
  color: var(--white);
}
.lineage-line { font-size: 19px; color: #DCE3EE; margin: 0 0 20px; }
.lineage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lineage-cell {
  border: 1px solid #3A5078;
  border-radius: var(--radius);
  padding: 14px 16px;
}
.lineage-name { display: block; font-family: var(--font-head); font-weight: 700; font-size: 22px; line-height: 1.15; color: var(--white); margin-bottom: 4px; }
.lineage-detail { display: block; font-size: 15px; color: #C9D1E0; }

/* Trust strip */

.trust { background: var(--gold); color: #071426; padding: 18px 0; }
.trust-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 36px;
  text-align: center;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.12em;
}

/* Footer */

.footer { background: var(--deep); color: var(--white); padding: 56px 0 28px; }
.footer-top { gap: 32px; }
.brand-footer { margin: 0 0 18px; }
.footer-line { font-size: 22px; line-height: 1.35; color: var(--white); margin: 0; max-width: 24em; }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #DCE3EE;
  text-decoration: none;
  font-weight: 600;
}
.footer-links a:hover { color: var(--gold); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid #1B3358;
  font-size: 15px;
  color: #9FB0C8;
}
.footer-bottom p { margin: 0; }
.footer-bottom a { display: inline-flex; align-items: center; min-height: 44px; color: #9FB0C8; text-decoration: none; }
.footer-bottom a:hover { text-decoration: underline; }

/* Desktop from 900px */

@media (min-width: 900px) {
  :root { --pad: 64px; }

  body { font-size: 18px; }
  section { padding: 88px 0; }

  .grid-12 { grid-template-columns: repeat(12, 1fr); gap: 48px; align-items: start; }
  .span-5 { grid-column: span 5; }
  .span-6 { grid-column: span 6; }
  .span-7 { grid-column: span 7; }

  .h2 { font-size: 40px; }

  .topbar-inner { min-height: 72px; flex-wrap: nowrap; }
  .brand { flex-direction: row; align-items: baseline; gap: 16px; }
  .wordmark { font-size: 24px; }
  .menu-toggle { display: none; }
  .site-nav, .js .site-nav, .js .site-nav.is-open {
    display: flex;
    flex-basis: auto;
    align-items: center;
    gap: 28px;
    padding: 0;
  }
  .nav-list { flex-direction: row; gap: 24px; }
  .site-nav .btn { margin-top: 0; }

  .hero { padding: 96px 0; }
  .hero-h1 { font-size: 56px; }
  .hero-sub { font-size: 30px; }
  .hero-lead { font-size: 22px; }
  .hero-side { align-self: center; }

  .latest-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; }
  .latest-head .h2 { margin-bottom: 0; }
  .card-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }

  .stack-h2 { font-size: 40px; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; margin-bottom: 64px; }
  .stack-card { padding: 36px; }
  .stack-headline { font-size: 30px; }
  .take-panel { padding: 28px; }

  .video-grid { grid-template-columns: repeat(3, 1fr); }

  .lineage-panel { padding: 36px; }

  .trust-list { font-size: 15px; gap: 12px 48px; }

  .footer { padding: 72px 0 32px; }
}

/* Largest type from 1024px */

@media (min-width: 1024px) {
  .hero-h1 { font-size: 68px; }
  .hero-sub { font-size: 34px; }
  .stack-h2 { font-size: 44px; }
  .stack-headline { font-size: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
