/* The Perk Edit: shared styles. Palette and type come from the founder workbook. */
:root {
  --olive: #515B3A;
  --deep-olive: #303B29;
  --ivory: #F5F1E8;
  --gold: #B49B70;
  --sage: #B4BBA6;
  --charcoal: #302F2B;
  --paper: #FBF9F4;
  --rule: #DDD8CA;
  --muted: #5F5E55;

  --display: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --body: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.375rem;
  --step-2: 1.875rem;
  --step-3: clamp(2.125rem, 1.6rem + 2.2vw, 3rem);
  --step-4: clamp(2.75rem, 1.6rem + 5vw, 5rem);

  --gap: clamp(1.25rem, 3vw, 2.5rem);
  --band: clamp(3.5rem, 8vw, 6.5rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--charcoal);
  font: 400 var(--step-0)/1.6 var(--body);
}

h1, h2, h3, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }

h1, h2, .wordmark, blockquote {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--step-4); line-height: 1.02; text-wrap: balance; }
h2 { font-size: var(--step-3); line-height: 1.1; text-wrap: balance; }
h3 { font: 700 var(--step-0)/1.35 var(--body); }

a { color: var(--olive); text-underline-offset: 0.2em; }
a:hover { color: var(--deep-olive); }

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

.wrap { width: min(100% - 2.5rem, 68rem); margin-inline: auto; }
.measure { max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--ivory); color: var(--deep-olive); padding: 0.6rem 1rem;
}
.skip:focus { top: 1rem; }

/* Masthead */
.masthead { background: var(--deep-olive); color: var(--ivory); }
.masthead-row {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.5rem 2rem; padding-block: 1.1rem;
}
.wordmark { font-size: 1.75rem; line-height: 1; color: inherit; text-decoration: none; }
.masthead .wordmark:hover { color: var(--sage); }
.masthead nav { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 1.5rem; font-size: 0.95rem; }
.masthead nav a { color: var(--ivory); text-decoration: none; padding-block: 0.25rem; border-bottom: 1px solid transparent; }
.masthead nav a:hover { border-bottom-color: var(--sage); }
.masthead nav a[aria-current] { border-bottom-color: var(--gold); }
.masthead nav .nav-app { border: 1px solid var(--sage); border-radius: 999px; padding: 0.3rem 0.95rem; }
.masthead nav .nav-app:hover, .masthead nav .nav-app[aria-current] { border-color: var(--gold); }

/* Buttons and links */
.button {
  display: inline-block; font: 500 1rem/1.2 var(--body); text-decoration: none; cursor: pointer;
  background: var(--olive); color: var(--ivory); border: 1px solid var(--olive);
  border-radius: 6px; padding: 0.85rem 1.35rem;
}
.button:hover { background: var(--deep-olive); border-color: var(--deep-olive); color: var(--ivory); }
.button.on-dark { background: var(--ivory); color: var(--deep-olive); border-color: var(--ivory); }
.button.on-dark:hover { background: #fff; border-color: #fff; color: var(--deep-olive); }
.text-link { font-weight: 500; }
.text-link.on-dark { color: var(--ivory); }
.text-link.on-dark:hover { color: var(--sage); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 2rem; }
.actions.stack { flex-direction: column; align-items: flex-start; margin-top: 0; }

/* Hero */
.hero, .page-head { background: var(--deep-olive); color: var(--ivory); }
.hero { padding-block: clamp(3rem, 7vw, 6rem) clamp(3.5rem, 8vw, 7rem); }
.hero-grid { display: grid; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
@media (min-width: 60rem) { .hero-grid { grid-template-columns: 1.25fr 1fr; } }
.lede { font-size: var(--step-1); line-height: 1.5; max-width: 34em; margin-top: 1.5rem; color: #E4E2D6; }

.page-head { padding-block: clamp(3rem, 7vw, 5rem); }
.page-head .lede { max-width: 30em; }

/* The edited slip: the one decorative idea on the site. */
.slip {
  background: var(--ivory); color: var(--charcoal); border-radius: 6px;
  padding: 1.75rem clamp(1.25rem, 3vw, 2rem) 1rem;
  box-shadow: 0 1.5rem 3rem -1.5rem rgba(18, 24, 14, 0.7);
}
.slip figcaption { font-family: var(--display); font-size: var(--step-2); line-height: 1; padding-bottom: 1rem; border-bottom: 2px solid var(--olive); }
.slip ul { list-style: none; padding: 0; }
.slip li { padding-block: 1.1rem; border-bottom: 1px solid var(--rule); display: grid; gap: 0.15rem; }
.slip li:last-child { border-bottom: 0; }
.slip-item { font-weight: 500; }
.slip-mark { font: italic 500 1.3rem/1.25 var(--display); color: var(--olive); }
.slip-cut .slip-item { color: var(--muted); }
.strike {
  background: linear-gradient(var(--charcoal), var(--charcoal)) no-repeat 0 55% / 100% 1.5px;
}
@media (prefers-reduced-motion: no-preference) {
  .strike { animation: strike 0.7s 0.6s cubic-bezier(0.6, 0, 0.2, 1) backwards; }
  @keyframes strike { from { background-size: 0 1.5px; } }
}

/* Bands */
.band { padding-block: var(--band); }
.band + .band { border-top: 1px solid var(--rule); }
.band-sage { background: #E3E6DA; border-top: 0; }
.band-sage + .band, .band-quote + .band { border-top: 0; }
.band-quote { background: var(--paper); }
.band h2 + p { margin-top: 1.1rem; }
.band p + p { margin-top: 1rem; }

blockquote { font-size: var(--step-3); line-height: 1.15; max-width: 22em; color: var(--deep-olive); border-left: 3px solid var(--gold); padding-left: clamp(1rem, 3vw, 2rem); }
.band-quote blockquote + p { margin-top: 1.75rem; }

.trio { display: grid; gap: var(--gap); margin-top: 2.75rem; }
@media (min-width: 48rem) { .trio { grid-template-columns: repeat(3, 1fr); } }
.trio > div { border-top: 2px solid var(--olive); padding-top: 1.1rem; }
.trio h3 { font: 500 var(--step-2)/1.1 var(--display); margin-bottom: 0.6rem; }

.split { display: grid; gap: var(--gap) clamp(2rem, 6vw, 5rem); align-items: start; }
@media (min-width: 52rem) { .split { grid-template-columns: 1fr 1fr; } }
.split h2 { font-size: var(--step-2); }

.plain-list { list-style: none; padding: 0; }
.plain-list li { padding-block: 1rem; border-top: 1px solid #C6CBB8; }
.plain-list li:last-child { border-bottom: 1px solid #C6CBB8; }

/* The workbook's table: olive header, ivory and paper rows. */
.table-scroll { overflow-x: auto; margin-top: 2.25rem; }
.sheet { width: 100%; border-collapse: collapse; text-align: left; min-width: 32rem; }
.sheet thead th { background: var(--olive); color: var(--ivory); font-weight: 500; padding: 0.8rem 1rem; }
.sheet tbody th, .sheet td { padding: 1rem; vertical-align: top; border-bottom: 1px solid var(--rule); }
.sheet tbody th { font-weight: 700; width: 30%; }
.sheet tbody tr:nth-child(odd) { background: var(--paper); }
.sheet .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sheet td.num { font-weight: 700; }
.table-scroll + .small { margin-top: 0.9rem; }

/* The Perk Preview: four parts, sized by their minutes on wide screens. */
.minutes { list-style: none; padding: 0; margin-top: 2.25rem; display: grid; gap: 1.5rem; }
.minutes li { border-top: 3px solid var(--olive); padding-top: 0.9rem; }
.minutes-n { font: 500 var(--step-2)/1 var(--display); color: var(--olive); display: block; margin-bottom: 0.5rem; }
.minutes p { margin-top: 0.35rem; color: var(--muted); }
@media (min-width: 56rem) {
  .minutes { display: flex; gap: 1.25rem; }
  .minutes .m3 { flex: 3 1 0; }
  .minutes .m4 { flex: 4 1 0; }
  .minutes .m5 { flex: 5 1 0; }
}

/* Long-form pages */
.prose { max-width: 44rem; }
.prose h2 { font-size: var(--step-2); margin-top: 3rem; }
.prose article:first-child h2 { margin-top: 0; }
.prose article + article { margin-top: 3rem; padding-top: 3rem; border-top: 1px solid var(--rule); }
.prose article + article h2 { margin-top: 0; }
.prose h2 + p, .prose h2 + ul { margin-top: 1rem; }
.prose ul { padding-left: 1.2rem; }
.prose li + li { margin-top: 0.5rem; }
.prose li::marker { color: var(--gold); }

/* Footer */
.footer { background: var(--deep-olive); color: #D9D8CC; padding-block: 3rem; font-size: 0.95rem; }
.footer-row { display: grid; gap: 1.5rem 3rem; }
@media (min-width: 48rem) { .footer-row { grid-template-columns: 1fr auto; } .fineprint { grid-column: 1 / -1; } }
.footer .wordmark { color: var(--ivory); margin-bottom: 0.35rem; }
.footer a { color: var(--ivory); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: baseline; }
.fineprint { font-size: 0.8125rem; line-height: 1.55; max-width: 78ch; color: #B9BAAB; border-top: 1px solid #4A5540; padding-top: 1.25rem; }

/* On phones the table becomes a list: each row's heading sits above its text. */
@media (max-width: 40rem) {
  .sheet { min-width: 0; }
  .sheet thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .sheet tr, .sheet tbody th, .sheet td { display: block; width: auto; }
  .sheet tbody th { border-bottom: 0; padding-bottom: 0.25rem; }
  .sheet td { padding-top: 0; }
  .sheet td.num { text-align: left; padding-top: 0; }
  .sheet td:not(:last-child) { border-bottom: 0; padding-bottom: 0.4rem; }
}
