/* NYTimes Book Publishers design tokens
 * Mint (#60c489) is the brand accent and fill colour. It is too light to carry white
 * text, so green surfaces that hold text use forest, and green text on light
 * backgrounds uses green-ink. All pairs below meet WCAG AA.
 */
:root {
  /* Brand greens */
  --mint: #60c489;            /* accent fill, highlights — pair with --mint-ink text (6.6:1) */
  --mint-hover: #52b87c;
  --mint-ink: #12301f;
  --mint-soft: #b9ebcb;       /* accent text on forest (5.9:1) */
  --forest: #1f5c3f;          /* surfaces with white text (7.9:1) */
  --forest-deep: #174a32;
  --green-ink: #1f6f48;       /* green text on light backgrounds (5.4:1) */

  /* Neutrals */
  --ink: #2b2a28;
  --ink-hover: #454340;
  --muted: #5f5e5c;
  --paper: #fafafa;
  --white: #ffffff;
  --tint: #e8f3ed;
  --tint-soft: #f1f8f4;
  --line: #e3e6e4;
  --line-green: #d3eadc;
  --star: #e2571a;
  --danger: #b42318;
  --danger-bg: #fdecea;

  --font: "Urbanist", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container-width: 1180px;
  --container-pad: 1.25rem;
  --header-height: 84px;

  /* Radii step down with hierarchy: panels > cards > controls */
  --radius-panel: 28px;
  --radius-card: 18px;
  --radius-control: 12px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(31, 43, 36, 0.05), 0 4px 14px rgba(31, 43, 36, 0.05);
  --shadow-md: 0 2px 6px rgba(31, 43, 36, 0.06), 0 18px 40px rgba(31, 43, 36, 0.09);
  --shadow-book: 0 1px 2px rgba(0, 0, 0, 0.12), 0 10px 22px rgba(31, 43, 36, 0.16);

  --space-section: 6rem;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 220ms;

  --hero-wash: radial-gradient(110% 80% at 50% 0%, #d6eee0 0%, #eef6f1 48%, var(--paper) 80%);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur: 1ms;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.6rem);
}

h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
}

h3 {
  font-size: 1.2rem;
  letter-spacing: -0.015em;
}

p {
  margin-bottom: 1rem;
  text-wrap: pretty;
}

p:last-child {
  margin-bottom: 0;
}

::selection {
  background: var(--mint);
  color: var(--mint-ink);
}

/* One focus treatment everywhere */
:focus-visible {
  outline: 3px solid var(--green-ink);
  outline-offset: 3px;
  border-radius: 6px;
}

.panel-green :focus-visible,
.cta-block :focus-visible,
.plan-card.is-featured :focus-visible {
  outline-color: var(--mint-soft);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 3000;
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-control);
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.section {
  padding: var(--space-section) 0;
}

.section--tight {
  padding: 2.5rem 0;
}

.section--flush-top {
  padding-top: 0;
}

.section--tint {
  background: var(--tint);
}

.section__title {
  margin-bottom: 0;
}

.section__lead {
  font-size: 1.125rem;
  max-width: 40rem;
  color: var(--muted);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.section-head .section__lead {
  margin-top: 0.85rem;
}

.section-head--center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.section-head--center .section__lead {
  margin-left: auto;
  margin-right: auto;
}

.text-center {
  text-align: center;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
}

.icon--sm {
  width: 0.95em;
  height: 0.95em;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--green-ink);
  white-space: nowrap;
}

.text-link .icon {
  transition: transform var(--dur) var(--ease);
}

.text-link:hover .icon {
  transform: translateX(3px);
}

.inline-link {
  color: var(--green-ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.inline-link:hover {
  color: var(--forest);
}
