/* =========================
   CueLens visual system
   ========================= */

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

* {
  margin: 0;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.96) 0, rgba(255, 255, 255, 0.98) 360px),
    linear-gradient(180deg, var(--bg), #f7f9fc 100%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

:root {
  color-scheme: light;
  --bg: #fbfaff;
  --surface: #ffffff;
  --surface-raised: #fffdff;
  --surface-muted: #f6f1fb;
  --ink: #181225;
  --ink-soft: #332a46;
  --muted: #5f5870;
  --line: #e7dfef;
  --line-strong: #d5c6e4;
  --brand: #4c1d95;
  --brand-dark: #32105f;
  --brand-bright: #6d28d9;
  --brand-tint: #f1e8ff;
  --accent: #2563eb;
  --accent-tint: #edf4ff;
  --danger: #9f1239;
  --radius: 8px;
  --shadow-sm: 0 8px 24px rgba(35, 18, 64, 0.08);
  --shadow-md: 0 18px 48px rgba(35, 18, 64, 0.12);
  --max-page: 1120px;
  --max-copy: 900px;
}

::selection {
  color: #ffffff;
  background: var(--brand);
}

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

a {
  color: var(--brand);
  text-decoration-color: rgba(76, 29, 149, 0.35);
  text-underline-offset: 0.18em;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

a:hover {
  color: var(--brand-dark);
  text-decoration-color: currentColor;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.45);
  outline-offset: 3px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: 12px;
  left: 16px;
  z-index: 1000;
  padding: 0.65rem 0.9rem;
  color: #ffffff;
  background: var(--brand-dark);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-140%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Navigation */
nav,
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: 100%;
  padding: 0.85rem max(1.25rem, calc((100vw - var(--max-page)) / 2));
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(213, 198, 228, 0.75);
  box-shadow: 0 10px 30px rgba(28, 13, 48, 0.06);
  backdrop-filter: blur(18px);
}

.logo,
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: max-content;
  color: var(--brand) !important;
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.logo img,
.brand img {
  width: auto;
  height: 42px !important;
  filter: drop-shadow(0 6px 12px rgba(76, 29, 149, 0.12));
}

.logo span,
.brand span {
  color: var(--brand) !important;
  font-weight: 800 !important;
}

.brand-name,
.logo-text {
  color: var(--brand) !important;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin: 0;
  padding: 0.55rem 0.78rem;
  color: var(--ink-soft);
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--brand);
  background: var(--brand-tint);
  border-color: rgba(76, 29, 149, 0.14);
  transform: translateY(-1px);
}

.nav-links a[aria-current="page"],
.nav-links a.active {
  color: #ffffff;
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 10px 22px rgba(76, 29, 149, 0.18);
}

/* Page shell */
main {
  width: min(var(--max-page), calc(100% - 40px));
  margin: 0 auto;
}

.container,
.hero,
.section {
  width: min(100%, var(--max-copy));
  margin: 0 auto;
}

.container {
  padding: clamp(3.4rem, 7vw, 5.75rem) 0;
  text-align: left;
}

main > h1:first-child {
  margin-top: clamp(3.4rem, 7vw, 5.75rem);
}

main > section:last-child,
.container > section:last-child {
  margin-bottom: 0;
}

.hero {
  padding: clamp(4rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
  text-align: center;
}

.site-header {
  position: relative;
  z-index: 100;
}

.home-main {
  width: 100%;
  max-width: none;
}

.home-hero {
  background:
    linear-gradient(180deg, rgba(241, 232, 255, 0.72), rgba(255, 255, 255, 0.94) 78%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}

.home-hero .container,
.hero-layout {
  width: min(var(--max-page), calc(100% - 40px));
  max-width: var(--max-page);
}

.hero-layout {
  display: grid;
  gap: clamp(1.6rem, 4vw, 2.75rem);
}

.hero-copy {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

/* Typography */
h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  margin: 0 auto 1.15rem;
  font-size: clamp(2.35rem, 6vw, 4.5rem);
  text-align: center;
}

h2 {
  margin: 0 0 0.85rem;
  color: var(--brand);
  font-size: clamp(1.35rem, 2.8vw, 2rem);
}

h3 {
  margin: 0 0 0.55rem;
  font-size: 1.12rem;
}

p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.container > p:first-of-type,
.hero p,
.hero-lede,
.download-intro,
main > p:first-of-type {
  max-width: 760px;
  margin-right: auto;
  margin-left: auto;
  color: var(--muted);
  font-size: clamp(1.03rem, 1.8vw, 1.2rem);
  line-height: 1.75;
  text-align: center;
}

strong {
  color: var(--ink);
  font-weight: 800;
}

code {
  padding: 0.15rem 0.35rem;
  color: var(--brand-dark);
  background: var(--brand-tint);
  border: 1px solid rgba(76, 29, 149, 0.12);
  border-radius: 6px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9em;
}

ul,
ol {
  margin: 0.75rem 0 1.2rem 1.25rem;
  color: var(--ink-soft);
}

li + li {
  margin-top: 0.5rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  margin: 0 auto 0.9rem;
  padding: 0;
  color: var(--brand-bright);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.section-kicker,
.download-eyebrow,
.download-platform,
body.story-page .story-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  margin: 0 0 0.9rem;
  padding: 0;
  color: var(--brand-bright);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow::before,
.section-kicker::before,
.download-eyebrow::before,
.download-platform::before,
body.story-page .story-kicker::before {
  width: 1.75rem;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-bright), var(--accent));
  border-radius: 999px;
  content: "";
}

.hero-copy .section-kicker,
.download-eyebrow,
body.story-page .story-kicker {
  margin-right: auto;
  margin-left: auto;
}

/* Cards and content sections */
.founder,
.mentors,
.section,
.feature-grid > *,
.download-card,
.cue-card,
.profile-card,
.mentor-card,
.download-support,
body.story-page .story-note,
body.story-page .story-panel,
body.story-page .story-principle {
  padding: clamp(1.15rem, 2vw, 1.6rem);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.founder,
.mentors {
  margin-top: 1.25rem;
}

.founder {
  border-top: 4px solid var(--brand);
}

.mentors {
  border-top: 4px solid var(--accent);
}

.mentors ul {
  margin: 0.5rem 0 0;
  padding: 0;
  color: var(--muted);
  list-style: none;
}

.mentors strong {
  display: inline-block;
  margin-top: 0.7rem;
  color: var(--brand-dark);
}

.cue-points,
.mentor-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cue-points {
  margin-top: 0.6rem;
}

.cue-card {
  min-height: 100%;
}

.cue-card h2,
.mentor-card strong,
.profile-name strong {
  color: var(--brand-dark);
}

.cue-card h2 {
  font-size: 1.05rem;
}

.cue-card p,
.mentor-card span {
  color: var(--muted);
}

.profile-band,
.support-band {
  border-bottom: 1px solid var(--line);
}

.profile-band {
  background: rgba(255, 255, 255, 0.72);
}

.support-band {
  background: linear-gradient(180deg, rgba(237, 244, 255, 0.58), rgba(255, 255, 255, 0.9));
}

.section-layout {
  display: grid;
  grid-template-columns: minmax(160px, 0.28fr) minmax(0, 1fr);
  gap: clamp(1.2rem, 4vw, 3rem);
  align-items: start;
}

.section-heading h2 {
  color: var(--brand-dark);
}

.mentor-content > p {
  max-width: 760px;
  color: var(--muted);
}

.mentor-list {
  margin-top: 1rem;
}

.mentor-card {
  display: grid;
  gap: 0.35rem;
}

.mentor-card strong {
  margin: 0;
}

.feature-grid,
.download-grid,
.download-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.feature-grid > *,
.download-card {
  min-height: 100%;
}

.feature-grid > *:hover,
.download-card:hover,
.cue-card:hover,
.profile-card:hover,
.mentor-card:hover,
.download-support:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Timeline */
.timeline {
  position: relative;
  display: grid;
  gap: 0;
  margin-top: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.35rem;
  bottom: 0.35rem;
  left: 0.45rem;
  width: 2px;
  background: linear-gradient(180deg, var(--brand), var(--accent));
  border-radius: 999px;
}

.timeline-item,
.container > section:not(.founder):not(.mentors):not(.section):not(.timeline):not(.download-section):not(.download-card) {
  position: relative;
  margin: 0;
  padding: 0.15rem 0 2.15rem 2rem;
  border-left: 2px solid var(--line);
}

.timeline-item::before,
.container > section:not(.founder):not(.mentors):not(.section):not(.timeline):not(.download-section):not(.download-card)::before {
  content: "";
  position: absolute;
  top: 0.42rem;
  left: -0.46rem;
  width: 0.82rem;
  height: 0.82rem;
  background: var(--surface);
  border: 3px solid var(--brand);
  border-radius: 50%;
  box-shadow: 0 0 0 5px var(--brand-tint);
}

.timeline .timeline-item {
  border-left: 0;
}

.timeline .timeline-item::before {
  left: 0.04rem;
}

.timeline-item:last-child,
.container > section:not(.founder):not(.mentors):not(.section):not(.timeline):not(.download-section):not(.download-card):last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.timeline-item h2,
.container > section:not(.founder):not(.mentors):not(.section):not(.timeline):not(.download-section):not(.download-card) h2 {
  margin-bottom: 0.7rem;
  font-size: clamp(1.18rem, 2.2vw, 1.55rem);
}

/* Downloads */
.download-section {
  margin: 1.4rem auto 0;
  padding: clamp(1.35rem, 3vw, 2rem);
  text-align: center;
  background:
    linear-gradient(180deg, rgba(241, 232, 255, 0.62), rgba(255, 255, 255, 0.88)),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.download-section:first-of-type {
  margin-top: 2.1rem;
}

.downloads-container {
  max-width: var(--max-page);
}

.download-hero {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.download-options {
  margin-top: clamp(1.6rem, 4vw, 2.6rem);
  align-items: stretch;
}

.download-section.download-card {
  display: flex;
  flex-direction: column;
  margin-top: 0;
  text-align: left;
}

.download-section.download-card h2::after,
.download-card h3::after {
  margin-left: 0;
}

.download-card-copy,
.download-support-copy {
  color: var(--muted);
}

.download-platform {
  margin-right: 0;
  margin-left: 0;
}

.download-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 0.75rem;
  margin-top: auto;
}

.download-button {
  width: 100%;
  margin: 0;
}

.download-support {
  max-width: 780px;
  margin: 1.2rem auto 0;
  text-align: center;
}

.download-support h2 {
  color: var(--brand-dark);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.download-section h2,
.download-card h2,
.download-card h3 {
  color: var(--brand-dark);
}

.download-section h2::after,
.download-card h2::after,
.download-card h3::after {
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
  margin: 0.65rem auto 0;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  border-radius: 999px;
}

.btn,
.button,
a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  max-width: 100%;
  margin: 0.5rem 0.35rem 0;
  padding: 0.78rem 1.05rem;
  color: #ffffff;
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  box-shadow: 0 12px 26px rgba(76, 29, 149, 0.18);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.btn:hover,
.button:hover,
a.button:hover {
  color: #ffffff;
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  box-shadow: 0 16px 34px rgba(76, 29, 149, 0.24);
  transform: translateY(-2px);
}

.btn:active,
.button:active,
a.button:active {
  transform: translateY(0);
}

.btn.secondary,
.button.secondary {
  color: var(--brand);
  background: var(--brand-tint);
  border-color: rgba(76, 29, 149, 0.2);
  box-shadow: none;
}

.note {
  max-width: 34rem;
  margin: 1rem auto 0;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

/* Story page compatibility */
body.story-page {
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.96) 0, rgba(255, 255, 255, 0.98) 360px),
    linear-gradient(180deg, var(--bg), #f7f9fc 100%) !important;
}

body.story-page main {
  width: min(var(--max-page), calc(100% - 40px));
}

body.story-page .story-shell {
  max-width: var(--max-page);
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 5rem) 0 1.5rem;
}

body.story-page .story-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  align-items: end;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  padding: 0 0 clamp(2.5rem, 5vw, 3.8rem);
  border-bottom: 1px solid var(--line);
}

body.story-page .story-hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.7rem, 8vw, 4.9rem);
  line-height: 0.98;
  text-align: left;
}

body.story-page .story-lead {
  max-width: 720px;
  margin: 1.4rem 0 0;
  font-size: clamp(1.05rem, 1.6vw, 1.18rem);
  line-height: 1.75;
  text-align: left;
}

body.story-page .story-note p,
body.story-page .story-panel p,
body.story-page .story-principle p {
  margin: 0;
  text-align: left;
}

body.story-page .story-panel p + p {
  margin-top: 1rem;
}

body.story-page .story-lead,
body.story-page .story-note p,
body.story-page .story-panel p,
body.story-page .story-principle p {
  color: var(--muted);
}

body.story-page .story-note strong,
body.story-page .story-panel h2,
body.story-page .story-principle h2,
body.story-page .story-panel strong {
  color: var(--brand-dark);
}

body.story-page .story-timeline {
  position: relative;
  display: grid;
  margin: clamp(2.8rem, 6vw, 3.7rem) 0 clamp(2.4rem, 5vw, 3.2rem);
}

body.story-page .story-timeline::before {
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 174px;
  width: 2px;
  background: linear-gradient(180deg, var(--brand), var(--accent), var(--brand-bright));
  content: "";
}

body.story-page .story-event {
  position: relative;
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: clamp(2.1rem, 6vw, 4.25rem);
  padding: 0 0 clamp(2rem, 4vw, 2.65rem);
}

body.story-page .story-event:last-child {
  padding-bottom: 0;
}

body.story-page .story-event::before {
  position: absolute;
  top: 0.5rem;
  left: 166px;
  z-index: 1;
  width: 18px;
  height: 18px;
  border: 4px solid #ffffff;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 1px var(--line-strong), 0 0 0 6px var(--brand-tint);
  content: "";
}

body.story-page .story-timeline .story-event:nth-child(3n + 2)::before {
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.22), 0 0 0 6px var(--accent-tint);
}

body.story-page .story-timeline .story-event:nth-child(3n)::before {
  background: var(--brand-bright);
  box-shadow: 0 0 0 1px rgba(109, 40, 217, 0.22), 0 0 0 6px var(--brand-tint);
}

body.story-page .story-date {
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.4;
  padding-top: 0.34rem;
  text-align: right;
  text-transform: uppercase;
}

body.story-page .story-panel,
body.story-page .story-note,
body.story-page .story-principle {
  box-shadow: var(--shadow-sm);
}

body.story-page .story-panel h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.25rem, 2.3vw, 1.55rem);
  text-align: left;
}

body.story-page .story-quote {
  margin-top: 1.2rem;
  padding: 1rem 1.15rem;
  color: #1e3a8a;
  background: linear-gradient(180deg, rgba(237, 244, 255, 0.88), rgba(255, 255, 255, 0.9));
  border-left: 4px solid var(--accent);
  border-left-color: var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-weight: 800;
  line-height: 1.6;
}

body.story-page .story-principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
  padding-top: clamp(2rem, 5vw, 2.6rem);
  border-top: 1px solid var(--line);
}

body.story-page .story-principle h2 {
  margin-bottom: 0.65rem;
  color: var(--accent);
  font-size: 1rem;
  line-height: 1.3;
  text-align: left;
}

/* Footer */
footer,
.site-footer {
  width: 100%;
  margin-top: clamp(3rem, 7vw, 5rem);
  padding: 2rem max(1.25rem, calc((100vw - var(--max-page)) / 2));
  color: rgba(255, 255, 255, 0.82);
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.26), transparent 42%),
    var(--brand-dark);
}

footer p,
.site-footer p {
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.85rem 1.4rem !important;
  max-width: var(--max-page);
  margin: 0 auto;
  color: inherit;
  font-size: 0.95rem;
  text-align: center;
}

footer a,
.site-footer a {
  color: #dbeafe;
  text-decoration-color: rgba(219, 234, 254, 0.48);
}

footer a:hover,
.site-footer a:hover {
  color: #ffffff;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: var(--max-page);
  margin: 0 auto;
}

.footer-content p {
  display: block !important;
  margin: 0;
  max-width: none;
}

/* Motion */
@keyframes cue-rise {
  from {
    transform: translateY(8px);
  }

  to {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .container,
  .hero,
  main > h1:first-child,
  .download-section,
  .feature-grid > *,
  .download-card {
    animation: cue-rise 360ms ease both;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Responsive */
@media (max-width: 760px) {
  nav,
  .site-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.8rem;
    padding: 0.85rem 1rem;
  }

  .logo,
  .brand {
    width: 100%;
  }

  .nav-links {
    justify-content: flex-start;
    width: 100%;
  }

  .nav-links a {
    flex: 1 1 auto;
    min-width: max-content;
    padding-inline: 0.72rem;
  }

  main {
    width: min(var(--max-page), calc(100% - 32px));
  }

  .container {
    padding-block: 2.75rem;
  }

  .founder,
  .mentors,
  .section,
  .feature-grid > *,
  .download-card,
  .download-section,
  .cue-card,
  .profile-card,
  .mentor-card,
  .download-support {
    padding: 1.1rem;
  }

  .home-hero .container,
  .hero-layout {
    width: min(var(--max-page), calc(100% - 32px));
  }

  .section-layout,
  body.story-page .story-hero {
    grid-template-columns: 1fr;
  }

  .section-kicker,
  .download-eyebrow,
  .download-platform,
  body.story-page .story-kicker {
    white-space: normal;
  }

  .timeline-item,
  .container > section:not(.founder):not(.mentors):not(.section):not(.timeline):not(.download-section):not(.download-card) {
    padding-left: 1.55rem;
  }

  .btn,
  .button,
  a.button {
    width: 100%;
    margin-right: 0;
    margin-left: 0;
  }

  body.story-page main {
    width: min(var(--max-page), calc(100% - 32px));
  }

  body.story-page .story-shell {
    padding-inline: 0;
  }

  body.story-page .story-timeline::before {
    left: 9px;
  }

  body.story-page .story-event {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding-left: 36px;
  }

  body.story-page .story-event::before {
    left: 0;
  }

  body.story-page .story-date {
    text-align: left;
  }

  body.story-page .story-principles {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  body {
    font-size: 15px;
  }

  .logo img,
  .brand img {
    height: 36px !important;
  }

  .nav-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
  }

  .nav-links a {
    min-width: 0;
    padding: 0.55rem 0.4rem;
    font-size: 0.86rem;
    overflow-wrap: anywhere;
  }

  main {
    width: calc(100% - 28px);
  }

  h1 {
    font-size: clamp(2rem, 12vw, 2.8rem);
  }
}
