/* Self-hosted webfonts (Google Fonts, OFL). Latin subset, variable weight ranges.
   Self-hosting keeps the page free of third-party requests and lets the build pin exact bytes. */

@font-face {
  font-family: "Big Shoulders Display";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("/assets/fonts/big-shoulders-display.woff2") format("woff2");
}

@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/hanken-grotesk.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono.woff2") format("woff2");
}

/* Articles - The Editorial Desk
   Comp-led build from .impeccable/mocks/articles-editorial-desk.png (approved round 3).
   Page-scoped: this stylesheet owns /articles/ only and overrides nothing globally. */

:root {
  --ed-paper: #f7f8f7;
  --ed-ink: #090c1b;
  --ed-ink-soft: #3d4557;
  --ed-muted: #5b6472;
  --ed-blue: #2a5cff;
  --ed-rule: #0a0c1b;
  --ed-rule-soft: #d5d9df;
  --ed-display: "Big Shoulders Display", "Anton", "Arial Narrow", system-ui, sans-serif;
  --ed-body: "Hanken Grotesk", "Instrument Sans", system-ui, -apple-system, sans-serif;
  --ed-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ed-shell: 1400px;
  --ed-gutter: clamp(18px, 3.8vw, 56px);
}

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

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

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

.ed a { color: inherit; text-decoration: none; }
.ed img { display: block; max-width: 100%; height: auto; }
.ed [hidden] { display: none !important; }

.ed-shell {
  width: 100%;
  max-width: var(--ed-shell);
  margin-inline: auto;
  padding-inline: var(--ed-gutter);
}

.ed .skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 50;
  background: var(--ed-ink);
  color: #fff;
  padding: 10px 16px;
}
.ed .skip-link:focus { left: 12px; top: 12px; }

.ed :focus-visible { outline: 2px solid var(--ed-blue); outline-offset: 3px; }

/* ---------- header ---------- */

.ed .site-header {
  position: relative;
  z-index: 10;
  background: var(--ed-paper);
  border-bottom: 1px solid var(--ed-rule);
}

.ed .nav-bar {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 40px);
  min-height: 72px;
}

.ed .wordmark {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-height: 44px;
  padding-block: 6px;
  line-height: 1;
}

.ed .wordmark-name {
  font-family: var(--ed-display);
  font-weight: 800;
  font-size: clamp(20px, 1.7vw, 25px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.ed .wordmark-credentials {
  color: var(--ed-muted);
  font-family: var(--ed-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.ed .wordmark-credentials i { padding-inline: 3px; font-style: normal; color: var(--ed-blue); }

.ed .primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  margin-left: auto;
}

.ed .primary-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ed-ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
}

.ed .primary-nav a::after {
  content: "";
  position: absolute;
  right: 0; bottom: 6px; left: 0;
  height: 2px;
  background: var(--ed-blue);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}
.ed .primary-nav a:hover::after,
.ed .primary-nav a.active::after { transform: scaleX(1); transform-origin: left; }
.ed .primary-nav a:hover,
.ed .primary-nav a.active { color: var(--ed-blue); }

.ed .menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: var(--ed-ink);
  cursor: pointer;
  font-family: var(--ed-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ed .menu-lines { display: grid; gap: 4px; }
.ed .menu-lines i { display: block; width: 18px; height: 1px; background: currentColor; }

.ed .nav-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding-inline: 18px;
  background: var(--ed-blue);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background-color 160ms ease;
}
.ed .nav-action:hover { background: var(--ed-ink); }

/* ---------- masthead ---------- */

.ed-masthead {
  padding-block: clamp(18px, 2.4vw, 34px) 16px;
  text-align: center;
  border-bottom: 1px solid var(--ed-rule);
}

.ed-masthead h1 {
  margin: 0;
  font-family: var(--ed-display);
  font-weight: 800;
  font-size: clamp(62px, 11vw, 158px);
  line-height: 0.88;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

.ed-masthead__line {
  margin: 10px 0 clamp(16px, 2vw, 26px);
  font-size: clamp(14px, 1.15vw, 17px);
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* ---------- feature grid ---------- */

.ed-feature { padding-bottom: 16px; border-bottom: 1px solid var(--ed-rule); }

.ed-grid {
  display: grid;
  grid-template-columns: 25% 50% 25%;
}

.ed-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(18px, 2.2vw, 30px) clamp(14px, 1.7vw, 24px) clamp(22px, 2.4vw, 34px);
}
.ed-col--center { order: 0; }
.ed-col--left { border-right: 1px solid var(--ed-rule); }
.ed-col--right { border-left: 1px solid var(--ed-rule); }

.ed-kicker {
  margin: 0 0 12px;
  color: var(--ed-ink);
  font-family: var(--ed-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.ed-kicker::after {
  content: "";
  display: block;
  width: 28px;
  height: 1px;
  margin-top: 8px;
  background: var(--ed-rule);
}

.ed-photo { display: block; width: 100%; }
.ed-photo img { width: 100%; }
.ed-photo--foot img { aspect-ratio: 331 / 263; object-fit: cover; }
.ed-photo--meal img { aspect-ratio: 330 / 263; object-fit: cover; }
.ed-photo--hero img { aspect-ratio: 643 / 262; object-fit: cover; }
.ed-photo--reta { margin-top: 4px; }
.ed-photo--reta img { aspect-ratio: 340 / 148; object-fit: contain; background: #fff; }

.ed-headline {
  margin: 16px 0 0;
  font-family: var(--ed-display);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: 0.004em;
  text-transform: uppercase;
}
.ed-headline a:hover { color: var(--ed-blue); }
.ed-headline--sm { font-size: clamp(24px, 2.6vw, 34px); }
.ed-headline--xl { font-size: clamp(40px, 5.6vw, 76px); }

.ed-col--center { align-items: center; text-align: center; }
.ed-col--center .ed-headline { max-width: 14ch; }
.ed-col--center .ed-photo { margin-top: clamp(14px, 1.6vw, 22px); }

/* ---------- learning paths ---------- */

.ed-paths { border-bottom: 1px solid var(--ed-rule); }
.ed-paths__inner {
  display: flex;
  align-items: center;
  gap: clamp(28px, 6vw, 90px);
  min-height: 64px;
  padding-block: 10px;
}
.ed-section-label {
  flex: 0 0 auto;
  color: var(--ed-ink-soft);
  font-family: var(--ed-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1.3;
  text-transform: uppercase;
}
.ed-paths__links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  flex: 1 1 auto;
}
.ed-paths__links a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ed-ink);
  font-family: var(--ed-display);
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}
.ed-paths__links a + a { border-left: 1px solid #9298a5; }
.ed-paths__links a span { color: var(--ed-blue); font-family: var(--ed-body); font-size: 0.9em; }
.ed-paths__links a:hover { color: var(--ed-blue); }

.ed-teaser {
  margin: 18px 0 0;
  max-width: 52ch;
  color: var(--ed-ink-soft);
  font-size: 16px;
}

.ed-action {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  color: var(--ed-blue);
  font-family: var(--ed-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ed-action:hover { color: var(--ed-ink); }

.ed-rule {
  width: 100%;
  height: 1px;
  margin: 18px 0 0;
  border: 0;
  background: var(--ed-rule);
}

.ed-mini {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  margin-top: 16px;
}
.ed-mini__title {
  flex: 1 1 auto;
  font-family: var(--ed-display);
  font-weight: 700;
  font-size: clamp(19px, 1.9vw, 24px);
  line-height: 1.12;
}
.ed-mini:hover .ed-mini__title { color: var(--ed-blue); }

.ed-arrow {
  flex: 0 0 auto;
  font-size: 20px;
  line-height: 1;
  transition: transform 160ms ease;
}
.ed-mini:hover .ed-arrow,
.ed-entry__link:hover .ed-arrow { transform: translateX(4px); }

/* ---------- topic rail ---------- */

.ed-rail { padding-bottom: 10px; border-bottom: 1px solid var(--ed-rule); }

.ed-rail__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px clamp(14px, 2.4vw, 34px);
  padding-block: 16px;
}

.ed-browse-label { margin-right: 2px; }

.ed-topics { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(14px, 2.4vw, 34px); }

.ed-topic {
  position: relative;
  min-height: 44px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--ed-ink);
  cursor: pointer;
  font-family: var(--ed-body);
  font-size: 15px;
  font-weight: 500;
}
.ed-topic::after {
  content: "";
  position: absolute;
  right: 0; bottom: 0; left: 0;
  height: 2px;
  background: var(--ed-blue);
  transform: scaleX(0);
  transition: transform 160ms ease;
}
.ed-topic:hover { color: var(--ed-blue); }
.ed-topic.is-active { color: var(--ed-blue); font-weight: 700; }
.ed-topic.is-active::after { transform: scaleX(1); }

.ed-search { position: relative; margin-left: auto; min-width: 260px; }
.ed-search__label {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.ed-search__input {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px 8px 34px;
  border: 1px solid var(--ed-rule-soft);
  background: #fff;
  color: var(--ed-ink);
  font-family: var(--ed-body);
  font-size: 15px;
}
.ed-search__input::placeholder { color: var(--ed-muted); }
.ed-search::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 13px; height: 13px;
  margin-top: -7px;
  border: 1.5px solid var(--ed-muted);
  border-radius: 50%;
  pointer-events: none;
}

.ed-status {
  flex: 1 0 100%;
  margin: 0;
  color: var(--ed-muted);
  font-family: var(--ed-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- archive ---------- */

.ed-archive { padding-block: clamp(26px, 3vw, 44px) clamp(30px, 3.4vw, 52px); }

.ed-archive__heading {
  margin: 0 0 clamp(18px, 2vw, 28px);
  font-family: var(--ed-display);
  font-weight: 800;
  font-size: clamp(26px, 2.6vw, 34px);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.ed-archive__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(24px, 4vw, 68px);
}

.ed-entry { border-top: 1px solid var(--ed-rule-soft); }
.ed-entry__link {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 16px;
  padding: 16px 0;
}
.ed-entry--thumb .ed-entry__link { grid-template-columns: auto 1fr auto; }
.ed-entry__thumb {
  grid-row: 1 / span 2;
  grid-column: 1;
  align-self: center;
  height: 54px;
  width: auto;
}
.ed-entry__kicker {
  grid-column: 1;
  grid-row: 1;
  color: var(--ed-muted);
  font-family: var(--ed-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.ed-entry__title {
  grid-column: 1;
  grid-row: 2;
  font-family: var(--ed-display);
  font-weight: 700;
  font-size: clamp(19px, 1.5vw, 23px);
  line-height: 1.14;
}
.ed-entry--thumb .ed-entry__kicker,
.ed-entry--thumb .ed-entry__title { grid-column: 2; }
.ed-entry__link:hover .ed-entry__title { color: var(--ed-blue); }
.ed-entry__link .ed-arrow { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.ed-entry--thumb .ed-entry__link .ed-arrow { grid-column: 3; }

.ed-empty {
  margin: 26px 0 0;
  color: var(--ed-muted);
  font-size: 16px;
}

/* ---------- closing CTA ---------- */

.blog-cta {
  position: relative;
  padding: clamp(34px, 4vw, 62px) var(--ed-gutter);
  background: var(--ed-ink);
  color: #fff;
}
.blog-cta-media { display: none; }
.blog-cta-content {
  width: 100%;
  max-width: var(--ed-shell);
  margin-inline: auto;
}
.blog-cta-content .eyebrow {
  margin: 0 0 12px;
  color: #b9c2d6;
  font-family: var(--ed-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.blog-cta-content h2 {
  margin: 0 0 10px;
  color: #fff;
  max-width: 24ch;
  font-family: var(--ed-display);
  font-weight: 800;
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 0.98;
  text-transform: uppercase;
}
.blog-cta-content p { margin: 0 0 20px; color: #c6cddc; font-size: 16px; }
.blog-cta-content .button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding-inline: 20px;
  background: var(--ed-blue);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.blog-cta-content .button:hover { background: #fff; color: var(--ed-ink); }

/* ---------- footer ---------- */

.ed .site-footer {
  background: var(--ed-paper);
  color: var(--ed-ink);
  border-top: 1px solid var(--ed-rule);
  padding: clamp(30px, 3.4vw, 52px) 0 26px;
}
.ed .site-footer__grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(140px, 1fr));
  gap: clamp(20px, 3vw, 40px);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ed-rule-soft);
}
.ed .site-footer__name {
  margin: 0;
  font-family: var(--ed-display);
  font-weight: 800;
  font-size: clamp(22px, 2vw, 28px);
  text-transform: uppercase;
}
.ed .site-footer__creds {
  display: block;
  margin-top: 6px;
  color: var(--ed-blue);
  font-family: var(--ed-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.ed .site-footer__desc { max-width: 40ch; margin: 14px 0 0; color: var(--ed-muted); font-size: 15px; }
.ed .site-footer__col-title {
  margin: 0 0 12px;
  color: var(--ed-muted);
  font-family: var(--ed-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.ed .site-footer__col ul { margin: 0; padding: 0; list-style: none; }
.ed .site-footer__col li { display: flex; align-items: center; min-height: 40px; }
.ed .site-footer__col a { color: var(--ed-ink-soft); font-size: 15px; }
.ed .site-footer__col a:hover { color: var(--ed-blue); }
.ed .site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 16px;
  color: var(--ed-muted);
  font-size: 13px;
}
.ed .site-footer__disclaimer { max-width: 70ch; margin: 0; }

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .ed-grid { grid-template-columns: 1fr 1fr; }
  .ed-col--center { grid-column: 1 / -1; order: -1; border-bottom: 1px solid var(--ed-rule); }
  .ed-col--left { border-right: 1px solid var(--ed-rule); }
  .ed-col--right { border-left: 0; }
  .ed .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .ed .menu-toggle { display: inline-flex; }
  .ed .nav-action { display: none; }
  .ed .primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0; left: 0;
    z-index: 20;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px var(--ed-gutter) 16px;
    background: var(--ed-paper);
    border-bottom: 1px solid var(--ed-rule);
  }
  .ed .primary-nav.is-open { display: flex; }
  .ed .primary-nav a { min-height: 46px; border-bottom: 1px solid var(--ed-rule-soft); }
  .ed .primary-nav a::after { display: none; }
  .ed .primary-nav a:last-child { border-bottom: 0; }
  .ed .site-header { position: relative; }
}

@media (max-width: 720px) {
  .ed-grid { grid-template-columns: 1fr; }
  .ed-col--center { grid-column: auto; }
  .ed-col--left { border-right: 0; border-bottom: 1px solid var(--ed-rule); }
  .ed-col--right { border-top: 1px solid var(--ed-rule); }
  .ed-archive__list { grid-template-columns: 1fr; }
  .ed-search { margin-left: 0; width: 100%; }
  .ed-paths__inner { display: block; padding-block: 12px 10px; }
  .ed-paths__inner > .ed-section-label { display: block; margin-bottom: 7px; }
  .ed-paths__links a { min-height: 44px; gap: 4px; font-size: clamp(18px, 5vw, 23px); }
  .ed-paths__links a span { font-size: 0.8em; }
  .ed-browse-label { flex-basis: 100%; }
  .ed-topics { gap: 8px clamp(14px, 4vw, 24px); }
  .ed .site-footer__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .ed * { transition: none !important; }
}
