:root {
  --ink: #0b0b0c;
  --ink-strong: #0b0b0c;
  --bone: #fafaf7;
  --paper: #f2ede5;
  --surface: #fffefa;
  --aubergine: #2b1b2e;
  --aubergine-deep: #170f1b;
  --violet: #5b4fe5;
  --orchid: #a24dc6;
  --magenta: #e94ba8;
  --muted: #55535c;
  --line: rgba(11, 11, 12, 0.14);
  --line-strong: rgba(11, 11, 12, 0.22);
  --gradient: linear-gradient(105deg, var(--violet) 0%, var(--orchid) 52%, var(--magenta) 100%);
  --title-gradient: linear-gradient(96deg, var(--violet) 0%, #8b4dcf 48%, var(--magenta) 100%);
  --shadow: 0 28px 80px rgba(43, 27, 46, 0.09);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "Inter", "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  line-height: 1.5;
  background:
    radial-gradient(circle at 88% 8%, rgba(233, 75, 168, 0.16), transparent 28%),
    radial-gradient(circle at 10% 88%, rgba(91, 79, 229, 0.12), transparent 26%),
    linear-gradient(180deg, var(--bone) 0%, #fffefa 44%, var(--paper) 100%);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.page {
  width: min(1180px, calc(100% - 48px));
  margin: 24px auto 46px;
}

.page-header {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
  min-height: min(640px, 82svh);
  padding: clamp(26px, 5vw, 58px) 0 44px;
}

.brand-copy {
  max-width: 850px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 760;
  line-height: 1.2;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.eyebrow::before,
.section-kicker::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 12px;
  border-radius: 999px;
  background: var(--gradient);
  vertical-align: 0.04em;
}

.page-header h1 {
  max-width: 17ch;
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  font-weight: 520;
  line-height: 0.98;
  letter-spacing: -0.045em;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.title-gradient {
  display: inline;
  background: var(--title-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  color: var(--violet);
  -webkit-text-fill-color: transparent;
}

.subtitle {
  max-width: 62ch;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.35vw, 1.22rem);
}

.library-link,
.print-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  font: inherit;
  font-weight: 760;
  text-decoration: none;
}

.library-link {
  gap: 10px;
  margin-top: 28px;
  padding: 12px 18px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 254, 250, 0.78);
  color: var(--ink);
}

.library-link::after {
  content: "\2192";
  flex: 0 0 auto;
  color: var(--magenta);
}

.header-actions {
  display: grid;
  justify-items: end;
  gap: 20px;
}

.brand-lockup {
  width: 236px;
  max-width: 52vw;
}

.print-button {
  border: 0;
  padding: 12px 18px;
  color: var(--bone);
  background: var(--title-gradient);
  cursor: pointer;
}

.hero-grid,
.card-grid,
.tips-grid,
.two-grid {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
}

.card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.tips-grid--two,
.two-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lead-card,
.principles-card,
.alert-card,
.info-card,
.tip-card,
.note-card,
.plate-card,
.red-flag-band {
  border: 1px solid rgba(91, 79, 229, 0.14);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 254, 250, 0.92), rgba(240, 236, 255, 0.42)),
    var(--surface);
  box-shadow: 0 18px 46px rgba(43, 27, 46, 0.06);
  padding: clamp(20px, 3vw, 30px);
}

.alert-card,
.note-card:nth-child(2n),
.tip-card:nth-child(2n),
.info-card:nth-child(2n),
.principles-card {
  border-color: rgba(233, 75, 168, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 254, 250, 0.92), rgba(253, 232, 244, 0.46)),
    var(--surface);
}

.lead-card h2,
.alert-card h3,
.info-card h3,
.tip-card h3,
.note-card h3,
.red-flag-band h3,
.plate-card h2,
.principles-card h2,
.principles-card h3 {
  margin: 0 0 12px;
  color: var(--aubergine);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.lead-card h2,
.plate-card h2 {
  max-width: 13ch;
  font-size: clamp(1.9rem, 3.6vw, 3.4rem);
  font-weight: 520;
  letter-spacing: -0.05em;
}

.alert-card h3,
.info-card h3,
.tip-card h3,
.note-card h3 {
  font-size: 1.22rem;
}

.lead-card p,
.alert-card p,
.info-card p,
.tip-card,
.note-card,
.principles-card,
.plate-card,
.page-footer {
  color: var(--muted);
}

.lead-card p:last-child,
.alert-card p:last-child,
.info-card p:last-child,
.tip-card ul:last-child,
.note-card ul:last-child,
.principles-card p:last-child,
.plate-card ul:last-child {
  margin-bottom: 0;
}

.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.pill-grid span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid rgba(91, 79, 229, 0.18);
  border-radius: 999px;
  background: rgba(240, 236, 255, 0.72);
  color: var(--aubergine);
  font-size: 0.92rem;
  font-weight: 760;
}

.pill-grid span:nth-child(2n) {
  border-color: rgba(233, 75, 168, 0.2);
  background: rgba(253, 232, 244, 0.76);
}

.alert-card ul,
.tip-card ul,
.note-card ul,
.red-flag-band ul,
.plate-notes {
  margin: 0;
  padding-left: 18px;
}

.tip-card li + li,
.note-card li + li,
.red-flag-band li + li,
.plate-notes li + li {
  margin-top: 8px;
}

.tip-card a,
.note-card a,
.page-footer a {
  color: var(--violet);
  font-weight: 760;
}

.red-flag-band {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
  color: var(--bone);
  background:
    radial-gradient(circle at 88% 18%, rgba(233, 75, 168, 0.38), transparent 28%),
    radial-gradient(circle at 8% 92%, rgba(91, 79, 229, 0.34), transparent 32%),
    linear-gradient(145deg, var(--aubergine) 0%, var(--aubergine-deep) 100%);
}

.red-flag-band .section-kicker,
.red-flag-band p,
.red-flag-band li {
  color: rgba(250, 250, 247, 0.78);
}

.red-flag-band h3 {
  color: var(--bone);
}

.page-footer {
  margin-top: 18px;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  font-weight: 700;
}

.plate-wrap {
  display: grid;
  place-items: center;
  margin: 20px 0;
}

.plate {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  width: min(100%, 320px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 14px solid rgba(255, 254, 250, 0.96);
  border-radius: 999px;
  box-shadow: 0 18px 52px rgba(43, 27, 46, 0.12);
  background: var(--surface);
}

.plate-half,
.plate-quarter {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: 16px;
  text-align: center;
}

.plate-half {
  grid-column: 1;
  grid-row: 1 / span 2;
  background: linear-gradient(160deg, rgba(91, 79, 229, 0.86), rgba(139, 77, 207, 0.62));
  border-right: 4px solid rgba(255, 254, 250, 0.96);
}

.plate-quarter--protein {
  grid-column: 2;
  grid-row: 1;
  background: linear-gradient(160deg, rgba(233, 75, 168, 0.82), rgba(162, 77, 198, 0.58));
  border-bottom: 4px solid rgba(255, 254, 250, 0.96);
}

.plate-quarter--carb {
  grid-column: 2;
  grid-row: 2;
  background: linear-gradient(160deg, rgba(250, 250, 247, 0.96), rgba(240, 236, 255, 0.92));
}

.plate span,
.plate-label {
  display: grid;
  place-items: center;
  width: min(100%, 112px);
  min-height: 62px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(255, 254, 250, 0.9);
  color: var(--ink);
  font-weight: 800;
  text-align: center;
  line-height: 1.05;
  box-shadow: 0 10px 26px rgba(43, 27, 46, 0.12);
}

.plate-quarter span {
  transform: translateX(-12px);
}

.plate-label--veg {
  position: absolute;
  left: 9%;
  top: 31%;
}

.plate-label--protein {
  position: absolute;
  right: 10%;
  top: 12%;
}

.plate-label--carb {
  position: absolute;
  right: 10%;
  bottom: 12%;
}

.note-block {
  margin-top: 18px;
  padding: 16px;
  border-left: 5px solid var(--magenta);
  border-radius: var(--radius-md);
  background: rgba(255, 254, 250, 0.7);
}

@media (max-width: 980px) {
  .page-header,
  .hero-grid,
  .tips-grid,
  .tips-grid--two,
  .two-grid,
  .red-flag-band {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-header {
    min-height: auto;
  }

  .header-actions {
    justify-items: start;
  }
}

@media (max-width: 700px) {
  .page {
    width: min(calc(100% - 24px), 1180px);
    margin-top: 12px;
  }

  .page-header h1 {
    max-width: 100%;
    font-size: clamp(2.85rem, 13vw, 4.25rem);
    line-height: 0.96;
    letter-spacing: -0.045em;
  }

  .brand-lockup {
    width: min(100%, 206px);
  }

  .card-grid {
    grid-template-columns: 1fr;
  }
}

@page {
  size: A4;
  margin: 12mm;
}

@media print {
  body {
    background: #fff;
  }

  .page {
    width: 100%;
    margin: 0;
  }

  .page-header {
    min-height: auto;
    padding: 0 0 16px;
  }

  .library-link,
  .print-button {
    display: none;
  }

  .lead-card,
  .principles-card,
  .alert-card,
  .info-card,
  .tip-card,
  .note-card,
  .plate-card,
  .red-flag-band {
    break-inside: avoid;
    box-shadow: none;
  }
}

/* ====================================================================
   PUBLIC WEBSITE CONSISTENCY PASS · 2026-05-21
   Resource pages now follow the flagship course/homepage rhythm.
   ==================================================================== */
body {
  background: linear-gradient(180deg, var(--bone) 0%, #fffefa 54%, var(--paper) 100%);
}

.page {
  width: min(1280px, calc(100% - 56px));
  margin-top: 26px;
}

.page-header {
  grid-template-columns: 1fr;
  min-height: auto;
  gap: clamp(34px, 4vw, 56px);
  padding-top: clamp(18px, 2vw, 30px);
  padding-bottom: clamp(38px, 5vw, 64px);
}

.header-actions {
  order: -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  justify-items: stretch;
  width: 100%;
  gap: 18px;
}

.brand-lockup {
  width: clamp(188px, 17vw, 236px);
  max-width: 58vw;
}

.page-header h1 {
  max-width: 16ch;
  font-size: clamp(3rem, 6.2vw, 6.1rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  word-break: normal;
  overflow-wrap: normal;
}

.title-gradient {
  white-space: nowrap;
}

.subtitle {
  max-width: 66ch;
  font-size: clamp(1.02rem, 1.2vw, 1.16rem);
  line-height: 1.66;
}

.lead-card,
.principles-card,
.alert-card,
.info-card,
.tip-card,
.note-card,
.plate-card,
.red-flag-band {
  border-radius: 22px;
  box-shadow: 0 18px 46px rgba(43, 27, 46, 0.055);
}

.lead-card h2,
.plate-card h2 {
  max-width: 18ch;
  font-size: clamp(2rem, 3.5vw, 3.35rem);
  line-height: 1.04;
}

@media (max-width: 700px) {
  .page {
    width: min(calc(100% - 24px), 1180px);
    margin-top: 14px;
  }

  .page-header {
    gap: 30px;
    padding-bottom: 30px;
  }

  .header-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .print-button {
    min-height: 44px;
    padding: 10px 16px;
  }

  .page-header h1 {
    max-width: 100%;
    font-size: clamp(2.65rem, 11.4vw, 3.8rem);
    line-height: 1.02;
  }

  .title-gradient {
    white-space: normal;
  }
}
