:root {
  --ed-canvas: #FAF9F6;
  --ed-paper: #FFFFFF;
  --ed-ink: #172C3B;
  --ed-muted: #4C5F66;
  --ed-teal: #155E59;
  --ed-soft: #EAF1EC;
  --ed-line: #D8DFDA;
  --ed-focus: #155E59;
}

body {
  margin: 0;
  background: var(--ed-canvas);
  color: var(--ed-ink);
  font-family: Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ed-page {
  width: min(100% - 40px, 1200px);
  margin-inline: auto;
  padding: 56px 0 80px;
  color: var(--ed-ink);
  font: 400 16px/1.65 Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ed-page *,
.ed-lightbox * { box-sizing: border-box; }

.ed-page h1,
.ed-page h2,
.ed-page h3,
.ed-lightbox { color: var(--ed-ink); }

.ed-page h1,
.ed-page h2,
.ed-page h3,
.ed-page p,
.ed-page figure { margin-top: 0; }

.ed-page a { color: var(--ed-teal); text-underline-offset: 0.18em; }
.ed-page a:hover { text-decoration-thickness: 2px; }

.ed-page a:focus-visible,
.ed-page button:focus-visible,
.ed-lightbox button:focus-visible {
  outline: 3px solid var(--ed-focus);
  outline-offset: 3px;
}

.ed-page-head,
.ed-legal-head {
  max-width: 760px;
  margin: 0 auto 44px;
}

.ed-page-head h1,
.ed-legal-head h1,
.ed-not-found h1 {
  max-width: 18ch;
  margin-bottom: 16px;
  font-size: clamp(2rem, 4.1vw, 3.15rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.ed-page-head > p:last-child {
  max-width: 62ch;
  margin-bottom: 0;
  color: var(--ed-muted);
  font-size: 1.0625rem;
}

.ed-eyebrow {
  margin-bottom: 12px;
  color: var(--ed-teal);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.ed-blog-index { padding-top: 72px; }
.ed-blog-index .ed-page-head { margin-bottom: 28px; }
.ed-reading-list { max-width: 860px; margin-inline: auto; }
.ed-post-list { margin: 0; padding: 0; list-style: none; }
.ed-post-item { padding: 30px 0 32px; border-bottom: 1px solid var(--ed-line); }
.ed-post-item:first-child { border-top: 1px solid var(--ed-line); }
.ed-post-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; color: var(--ed-muted); font-size: 0.875rem; line-height: 1.5; }
.ed-post-item h2 { max-width: 32ch; margin-bottom: 8px; font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 650; letter-spacing: -0.025em; line-height: 1.25; }
.ed-post-item h2 a { color: var(--ed-ink); text-decoration: none; }
.ed-post-item h2 a:hover { color: var(--ed-teal); text-decoration: underline; }
.ed-post-excerpt { max-width: 66ch; margin-bottom: 12px; color: var(--ed-muted); }
.ed-text-link { font-weight: 700; text-decoration: none; }
.ed-text-link span { display: inline-block; margin-left: 4px; transition: transform 180ms ease; }
.ed-text-link:hover span { transform: translateX(3px); }

.ed-next-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 64px;
  padding: 30px 0;
  border-top: 1px solid var(--ed-line);
  border-bottom: 1px solid var(--ed-line);
}
.ed-next-step h2 { margin-bottom: 7px; font-size: clamp(1.35rem, 2.5vw, 1.8rem); font-weight: 650; letter-spacing: -0.025em; line-height: 1.2; }
.ed-next-step p:not(.ed-eyebrow) { max-width: 54ch; margin-bottom: 0; color: var(--ed-muted); }
.ed-next-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 20px; }
.ed-next-links a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 650; }
.ed-next-links a:first-child { font-weight: 750; }
.ed-next-step-compact { margin-top: 34px; padding: 24px; border: 1px solid var(--ed-line); background: var(--ed-paper); }
.ed-next-step-compact .ed-next-links { flex-direction: column; align-items: flex-start; gap: 2px; }
.ed-empty { max-width: 760px; margin: 0 auto; padding: 32px 0; color: var(--ed-muted); }

.ed-article-page { max-width: 100%; padding-top: 44px; }
.ed-article-page > article,
.ed-article-next { width: min(100% - 40px, 760px); margin-inline: auto; }
.ed-article-head { margin-bottom: 26px; }
.ed-back-link { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; font-size: 0.9rem; font-weight: 650; text-decoration: none; }
.ed-article-head h1 { max-width: 21ch; margin-bottom: 16px; font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 650; letter-spacing: -0.035em; line-height: 1.14; }
.ed-article-deck { max-width: 66ch; margin-bottom: 0; color: var(--ed-muted); font-size: 1.125rem; line-height: 1.6; }
.ed-article-body { max-width: 70ch; margin-inline: auto; color: var(--ed-ink); font-size: 1.0625rem; line-height: 1.78; overflow-wrap: anywhere; }
.ed-article-body > * + * { margin-top: 1.15em; }
.ed-article-body h1,
.ed-article-body h2,
.ed-article-body h3,
.ed-article-body h4 {
  color: var(--ed-ink) !important;
  font-family: Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-weight: 650 !important;
  letter-spacing: -0.025em !important;
  line-height: 1.3 !important;
}
.ed-article-body h1 { margin-top: 1.8em !important; margin-bottom: 0.55em !important; font-size: clamp(1.65rem, 3vw, 2rem) !important; letter-spacing: -0.035em !important; line-height: 1.2 !important; }
.ed-article-body h2 { margin-top: 2em !important; margin-bottom: 0.55em !important; font-size: clamp(1.45rem, 2.5vw, 1.85rem) !important; line-height: 1.25 !important; }
.ed-article-body h3 { margin-top: 1.75em !important; margin-bottom: 0.4em !important; font-size: 1.25rem !important; line-height: 1.35 !important; }
.ed-article-body h4 { margin-top: 1.5em !important; margin-bottom: 0.35em !important; font-size: 1.125rem !important; letter-spacing: -0.015em !important; line-height: 1.4 !important; }
.ed-article-body p { margin-bottom: 1.1em; }
.ed-article-body ul,
.ed-article-body ol { padding-left: 1.4em; }
.ed-article-body li + li { margin-top: 0.45em; }
.ed-article-body blockquote { margin-inline: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--ed-teal); color: var(--ed-muted); }
.ed-article-body img { max-width: 100%; height: auto; }
.ed-article-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.ed-article-body th,
.ed-article-body td { padding: 9px 12px; border: 1px solid var(--ed-line); text-align: left; }
.ed-article-next { padding-top: 18px; }
.ed-related { padding: 28px 0; border-top: 1px solid var(--ed-line); }
.ed-related h2 { max-width: 30ch; margin-bottom: 0; font-size: 1.45rem; font-weight: 650; line-height: 1.3; }
.ed-related h2 a { color: var(--ed-ink); text-decoration: none; }
.ed-related h2 a:hover { color: var(--ed-teal); text-decoration: underline; }

.ed-legal-page { max-width: 820px; padding-top: 68px; }
.ed-legal-head { margin-bottom: 36px; }
.ed-legal-head h1 { margin-bottom: 14px; }
.ed-legal-head .ed-post-meta { margin-bottom: 0; }
.ed-legal-copy { max-width: 72ch; }
.ed-legal-copy h2 { margin: 34px 0 8px; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.35; }
.ed-legal-copy h2:first-child { margin-top: 0; }
.ed-legal-copy p { margin-bottom: 0; color: var(--ed-ink); line-height: 1.75; }
.ed-legal-copy a { overflow-wrap: anywhere; }
.ed-not-found { max-width: 760px; min-height: 48vh; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.ed-not-found > p:not(.ed-eyebrow) { color: var(--ed-muted); }
.ed-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 18px; background: var(--ed-teal); color: #fff !important; font-weight: 700; text-decoration: none; }
.ed-button:hover { background: #104C48; }

.ed-gallery-page { padding-top: 56px; }
.ed-gallery-head { margin-bottom: 34px; }
.ed-gallery-grid { columns: 3; column-gap: 18px; }
.ed-gallery-item { display: inline-block; width: 100%; min-width: 0; margin: 0 0 18px; break-inside: avoid; vertical-align: top; }
.ed-gallery-open { position: relative; display: block; width: 100%; overflow: hidden; background: var(--ed-soft); color: inherit; text-decoration: none; cursor: pointer; text-align: left; }
.ed-gallery-open img { display: block; width: 100%; height: auto; }
.ed-gallery-zoom { position: absolute; right: 10px; bottom: 10px; min-height: 36px; display: flex; align-items: center; padding: 5px 10px; background: rgba(23, 44, 59, 0.92); color: #fff; font-size: 0.8rem; font-weight: 650; opacity: 0; transition: opacity 180ms ease; }
.ed-gallery-open:hover .ed-gallery-zoom,
.ed-gallery-open:focus-visible .ed-gallery-zoom { opacity: 1; }
.ed-gallery-item figcaption { padding-top: 8px; color: var(--ed-muted); font-size: 0.875rem; line-height: 1.5; }

.ed-lightbox { width: min(96vw, 1400px); max-width: none; max-height: 96dvh; padding: 0; border: 1px solid rgba(255,255,255,.18); background: #10191E; color: #fff; }
.ed-lightbox::backdrop { background: rgba(8, 15, 20, 0.88); }
.ed-lightbox-frame { position: relative; min-height: 70vh; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 64px 16px 18px; }
.ed-lightbox figure { min-width: 0; margin: 0; text-align: center; }
.ed-lightbox figure img { display: block; width: 100%; height: min(78dvh, 900px); object-fit: contain; }
.ed-lightbox figcaption { min-height: 24px; padding-top: 10px; color: #F4F6F5; font-size: 0.9rem; line-height: 1.4; }
.ed-lightbox button { min-width: 48px; min-height: 48px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.4); background: #172C3B; color: #fff; font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; }
.ed-lightbox button:hover:not(:disabled) { background: #155E59; }
.ed-lightbox button:disabled { cursor: default; opacity: .55; }
.ed-lightbox .ed-lightbox-close { position: absolute; top: 12px; right: 12px; }
.ed-lightbox [data-gallery-prev] { justify-self: start; }
.ed-lightbox [data-gallery-next] { justify-self: end; }

@media (max-width: 820px) {
  .ed-gallery-grid { columns: 2; column-gap: 14px; }
  .ed-gallery-item { margin-bottom: 14px; }
  .ed-next-step { align-items: flex-start; flex-direction: column; }
  .ed-next-links { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .ed-page { width: min(100% - 32px, 1200px); padding-top: 40px; padding-bottom: 60px; }
  .ed-blog-index { padding-top: 44px; }
  .ed-page-head,
  .ed-legal-head { margin-bottom: 30px; }
  .ed-page-head h1,
  .ed-legal-head h1,
  .ed-not-found h1 { font-size: clamp(1.9rem, 9vw, 2.3rem); }
  .ed-post-item { padding: 24px 0; }
  .ed-next-step { margin-top: 42px; padding: 24px 0; }
  .ed-next-links { flex-direction: column; align-items: flex-start; gap: 2px; }
  .ed-article-page { width: 100%; padding-top: 28px; }
  .ed-article-page > article,
  .ed-article-next { width: calc(100% - 32px); }
  .ed-article-cover { width: 100%; margin-bottom: 28px; }
  .ed-article-body { font-size: 1rem; }
  .ed-legal-page { padding-top: 44px; }
  .ed-gallery-grid { columns: 1; column-gap: 0; }
  .ed-gallery-item { margin-bottom: 20px; }
  .ed-gallery-zoom { opacity: 1; }
  .ed-lightbox { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border: 0; }
  .ed-lightbox-frame { min-height: 100dvh; grid-template-columns: 1fr 1fr; align-content: center; gap: 12px; padding: 68px 12px max(18px, env(safe-area-inset-bottom)); }
  .ed-lightbox figure { grid-column: 1 / -1; grid-row: 1; }
  .ed-lightbox figure img { height: min(72dvh, 760px); }
  .ed-lightbox [data-gallery-prev] { grid-column: 1; grid-row: 2; }
  .ed-lightbox [data-gallery-next] { grid-column: 2; grid-row: 2; justify-self: end; }
}

@media (prefers-reduced-motion: reduce) {
  .ed-page *,
  .ed-lightbox * { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
