:root {
  color-scheme: dark;
  --bg: #08080a;
  --ink: #f4f2ef;
  --muted: #aaa6a9;
  --line: rgba(255, 255, 255, .14);
  --accent: #e58cae;
  --reading-ink: #ccc8cb;
  --control-hover: rgba(255, 255, 255, .08);
  --font-body: "Inter", "Aptos", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: Georgia, Cambria, "Times New Roman", serif;
  --body: var(--font-body);
  --display: var(--font-display);
  --gutter: clamp(24px, 6.2vw, 96px);
  --max: 1440px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f7f5;
  --ink: #17181b;
  --muted: #565960;
  --line: rgba(0, 0, 0, .14);
  --accent: #92375a;
  --reading-ink: #36383d;
  --control-hover: rgba(0, 0, 0, .06);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
a:focus-visible, button:focus-visible, .skip-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
.wrap { width: min(calc(100% - var(--gutter) * 2), var(--max)); margin-inline: auto; }
.skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-160%);
  background: #fff;
  color: #08080a;
}
.skip-link:focus { transform: translateY(0); }

.blog-header {
  min-height: 84px;
  padding: 16px var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--line);
}
.wordmark { display: inline-flex; width: max-content; align-items: center; gap: 14px; }
.wordmark img { display: block; width: auto; height: 42px; }
.wordmark .brand-text { font-family: var(--font-body); font-size: 16px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.primary-nav { display: flex; align-items: center; gap: clamp(24px, 3vw, 44px); }
.primary-nav a {
  color: #bbb7ba;
  font-size: 12px;
  transition: color .2s ease;
}
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: #fff; }
.primary-nav a[aria-current="page"] { position: relative; }
.primary-nav a[aria-current="page"]::after {
  position: absolute;
  right: 0;
  bottom: -31px;
  left: 0;
  height: 1px;
  background: var(--accent);
  content: "";
}
.primary-nav a span { color: var(--accent); }
.language-switch { justify-self: end; display: flex; align-items: center; gap: 4px; }
.language-switch button {
  width: 42px;
  height: 38px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}
.language-switch button:hover { background: rgba(255, 255, 255, .08); }
.language-switch button[aria-pressed="true"] { border-color: rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); }
.language-switch img { display: block; width: 26px; height: 18px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .16); }

main { flex: 1; }
.opening {
  min-height: clamp(390px, 51vh, 560px);
  padding-block: clamp(92px, 13vw, 180px) 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  align-items: end;
  gap: clamp(44px, 10vw, 150px);
}
.opening h1 {
  max-width: 10ch;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(52px, 6vw, 76px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.045em;
}
.opening-note { max-width: 340px; margin: 0 0 6px; color: var(--muted); font-size: 14px; line-height: 1.85; }
.empty-state {
  min-height: 100px;
  padding-block: 24px;
  display: flex;
  align-items: center;
  gap: 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.empty-state p { margin: 0; }
.empty-rule { width: 68px; height: 1px; background: var(--accent); opacity: .75; }
.article-state { display: flex; flex-direction: column; justify-content: center; padding-bottom: 100px; }
.article-state .opening { min-height: 0; padding-block: clamp(100px, 16vw, 220px) 34px; grid-template-columns: minmax(0, 760px); }
.article-state .opening h1 { max-width: 16ch; font-size: clamp(44px, 5vw, 64px); line-height: 1.08; }
.article-state .opening-note { margin-top: 22px; }
.return-link { width: max-content; display: inline-flex; align-items: center; gap: 10px; color: #e7e3e5; font-size: 12px; }
.return-link span:first-child { color: var(--accent); transition: transform .2s ease; }
.return-link:hover span:first-child { transform: translateX(-3px); }

.site-footer {
  --footer-bg: #050509;
  --footer-ink: #fff;
  --footer-copy: rgba(255, 255, 255, .44);
  --footer-link: rgba(255, 255, 255, .68);
  --footer-bottom-link: rgba(255, 255, 255, .52);
  --footer-rule: rgba(255, 255, 255, .10);
  --footer-divider: rgba(255, 255, 255, .08);
  flex-shrink: 0;
  padding: 0 0 30px;
  color: var(--footer-ink);
  background: var(--footer-bg);
}
:root[data-theme="light"] .site-footer {
  --footer-bg: #f0f0ed;
  --footer-ink: #17181b;
  --footer-copy: rgba(23, 24, 27, .58);
  --footer-link: rgba(23, 24, 27, .76);
  --footer-bottom-link: rgba(23, 24, 27, .62);
  --footer-rule: rgba(23, 24, 27, .14);
  --footer-divider: rgba(23, 24, 27, .12);
}
.footer-topline { width: 100%; height: 1px; margin: 0 0 42px; background: var(--footer-rule); }
.footer-inner { max-width: 1320px; margin: 0 auto; padding: 0 28px; }
.footer-grid { display: grid; grid-template-columns: 2.15fr .7fr .7fr; gap: 56px; align-items: start; }
.footer-brand-block {
  --footer-brand-width: 560px;
  --footer-logo-trim: 60px;
  --footer-social-nudge: 18px;
  max-width: var(--footer-brand-width);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.footer-brand { position: relative; display: block; width: min(100%, var(--footer-brand-width)); aspect-ratio: 3 / 1; overflow: hidden; margin-left: calc(-1 * var(--footer-logo-trim)); text-decoration: none; }
.footer-brand-logo { position: absolute; top: 50%; left: 0; display: block; width: 100%; height: auto; max-width: none; transform: translateY(-50%); }
.footer-heading { display: inline-block; margin-bottom: 22px; color: var(--footer-ink); font-size: 16px; font-weight: 700; }
.footer-links-list, .footer-contact-list--clean { margin: 0; padding: 0; list-style: none; }
.footer-links-list li, .footer-contact-list--clean li { margin-bottom: 16px; }
.footer-links-list a, .footer-contact-list--clean a, .footer-contact-list--clean span {
  color: var(--footer-link);
  font-size: 16px;
  line-height: 1.6;
  text-decoration: none;
  transition: color .18s ease;
}
.footer-links-list a:hover, .footer-contact-list--clean a:hover { color: var(--footer-ink); }
.footer-socials { display: flex; align-items: center; justify-content: flex-start; gap: 16px; margin-top: 14px; margin-left: var(--footer-social-nudge); }
.footer-social { display: flex; align-items: center; justify-content: center; text-decoration: none; transition: transform .18s ease, opacity .18s ease; }
.footer-social:hover { transform: translateY(-2px); opacity: .82; }
.footer-social img { display: block; width: 32px; height: 32px; opacity: .95; filter: brightness(0) invert(1); }
.footer-social--linkedin img { filter: brightness(0) invert(1); }
:root[data-theme="light"] .footer-social img { filter: brightness(0); }
.footer-divider { width: 100%; height: 1px; margin: 42px 0 20px; background: var(--footer-divider); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.footer-copy { color: var(--footer-copy); font-size: 13px; line-height: 1.6; }
.footer-bottom-links { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; }
.footer-privacy, .footer-blog { color: var(--footer-bottom-link); font-size: 13px; line-height: 1.6; text-decoration: none; }
.site-footer .footer-bottom-links a:link,
.site-footer .footer-bottom-links a:visited { color: var(--footer-bottom-link); text-decoration: none; }
.footer-privacy:hover, .footer-blog:hover,
.site-footer .footer-bottom-links a:active { color: var(--footer-ink); text-decoration: none; }
.footer-copy a:link, .footer-copy a:visited, .footer-copy a:hover, .footer-copy a:active,
.post-author a:link, .post-author a:visited, .post-author a:hover, .post-author a:active { color: inherit; text-decoration: none; }
.footer-cookie-preferences { cursor: pointer; }

@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr; gap: 34px; }
  .footer-brand-block { --footer-brand-width: 460px; --footer-logo-trim: 49px; --footer-social-nudge: 16px; }
}

@media (max-width: 760px) {
  :root { --gutter: 24px; }
  .blog-header { min-height: 68px; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding-block: 12px; }
  .wordmark { gap: 10px; }
  .wordmark img { width: auto; height: 36px; }
  .wordmark .brand-text { font-size: 13px; letter-spacing: .1em; }
  .primary-nav { grid-column: 2; grid-row: 1; justify-self: end; gap: 0; }
  .primary-nav a { font-size: 10px; white-space: nowrap; }
  .primary-nav a[aria-current="page"] { display: none; }
  .primary-nav a[aria-current="page"]::after { bottom: -10px; }
  .language-switch { grid-column: 3; grid-row: 1; gap: 5px; }
  .language-switch button { width: 36px; height: 36px; }
  .language-switch img { width: 24px; height: 17px; }
  .opening { min-height: 0; padding-block: clamp(88px, 18vh, 150px) 56px; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 22px; }
  .opening h1 { max-width: none; font-size: clamp(48px, 12vw, 64px); }
  .opening-note { max-width: 420px; font-size: 13px; }
  .empty-state { min-height: 88px; }
  .article-state .opening { padding-block: 110px 30px; }
  .article-state .opening h1 { max-width: 16ch; font-size: clamp(42px, 10vw, 56px); }
  .footer-topline { margin-bottom: 34px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-inner { padding-right: max(20px, env(safe-area-inset-right)); padding-left: max(20px, env(safe-area-inset-left)); }
  .footer-heading { margin-bottom: 14px; font-size: 14px; }
  .footer-links-list li, .footer-contact-list--clean li { margin-bottom: 10px; }
  .footer-links-list a, .footer-contact-list--clean a, .footer-contact-list--clean span { font-size: 14px; line-height: 1.55; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-bottom-links { gap: 14px 18px; }
  .footer-brand-block { --footer-brand-width: min(300px, 88vw); --footer-logo-trim: 32px; --footer-social-nudge: 10px; width: 100%; max-width: min(320px, 100%); margin-inline: 0; justify-self: start; }
  .footer-brand { margin-inline: 0; margin-left: calc(-1 * var(--footer-logo-trim)); }
  .footer-socials { gap: 14px; margin-left: var(--footer-social-nudge); margin-top: 14px; max-width: 100%; }
  .footer-social img { width: 28px; height: 28px; }
}
@media (max-width: 380px) {
  :root { --gutter: 18px; }
  .blog-header { gap: 8px; }
  .wordmark img { width: auto; height: 34px; }
  .wordmark .brand-text { font-size: 12px; letter-spacing: .08em; }
  .primary-nav a { font-size: 9px; }
  .language-switch { gap: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Typography follows the original site's section-title and body roles. */
.opening { min-height: 0; padding-block: 64px 40px; gap: 40px; }
.opening h1 { max-width: none; font-size: 40px; font-weight: 500; line-height: 1.06; letter-spacing: 0; text-wrap: balance; }
.opening-note { font-size: 16px; line-height: 1.72; margin-bottom: 0; }
.stories { padding-bottom: 88px; }
.featured-post { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 48px; align-items: center; margin-bottom: 64px; }
.post-image { display: block; overflow: hidden; background: #111115; aspect-ratio: 16 / 10; }
.featured-post .post-image { aspect-ratio: 16 / 9; }
.post-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.post-image:hover img { transform: scale(1.025); }
.post-image--identidade-alem-do-logotipo img { object-position: 50% 15%; }
.post-image--mensagem-antes-do-layout img { object-position: 50% 56%; }
.post-copy h2 { margin: 0 0 16px; color: var(--ink); font-family: var(--font-display); font-size: 36px; font-weight: 500; line-height: 1.12; letter-spacing: 0; text-wrap: balance; }
.post-copy h2 a:hover { color: #ddd8da; }
.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 9px; margin: 0 0 18px; color: var(--muted); font-family: var(--font-body); font-size: 12px; line-height: 1.6; }
.post-summary { margin: 0 0 24px; color: var(--muted); font-size: 16px; line-height: 1.72; }
.read-link { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; }
.read-link span { color: var(--accent); }
.story-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.story-card { min-width: 0; }
.story-card .post-copy { padding-top: 24px; }
.story-card .post-copy h2 { font-size: 28px; }
.reading-heading { width: min(100%, 780px); margin: 64px auto 40px; }
.reading-heading .return-link { margin-bottom: 30px; }
.reading-heading h1 { margin: 0 0 24px; color: var(--ink); font-family: var(--font-display); font-size: 48px; font-weight: 500; line-height: 1.06; letter-spacing: 0; text-wrap: balance; }
.reading-deck { margin: 0 0 24px; color: var(--muted); font-size: 18px; line-height: 1.72; }
.post-author { margin: 0 0 6px; font-size: 14px; }
.reading-cover { max-width: 1100px; margin: 0 auto 48px; }
.reading-cover img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.reading-cover figcaption { margin-top: 10px; color: var(--muted); font-size: 12px; }
.reading-body { max-width: 680px; margin: 0 auto 72px; color: var(--reading-ink); font-size: 16px; line-height: 1.85; }
.reading-body p { margin: 0 0 24px; }
.reading-body h2 { margin: 44px 0 18px; color: var(--ink); font-family: var(--font-display); font-size: 28px; font-weight: 500; line-height: 1.12; letter-spacing: 0; }
.reading-references { max-width: 680px; margin: -24px auto 72px; padding-top: 22px; border-top: 1px solid var(--line); }
.reading-references h2 { margin: 0 0 12px; color: var(--ink); font-family: var(--font-display); font-size: 21px; font-weight: 500; }
.reading-references ul { display: grid; gap: 9px; margin: 0; padding-left: 20px; color: var(--muted); }
.reading-references a { color: var(--muted); text-decoration-color: var(--line); text-underline-offset: 3px; }
.reading-references a:hover { color: var(--ink); text-decoration-color: var(--accent); }
.reading-body .return-link { margin-top: 20px; }
.related-stories { padding-bottom: 88px; border-top: 1px solid var(--line); }
.related-stories > h2 { margin: 36px 0 28px; font-family: var(--font-display); font-size: 28px; font-weight: 500; line-height: 1.12; letter-spacing: 0; }
@media (max-width: 1000px) {
  .featured-post { gap: 30px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .post-copy h2 { font-size: 30px; }
  .story-grid { gap: 28px; }
}
@media (max-width: 760px) {
  .opening { padding-block: 40px 30px; gap: 16px; }
  .opening h1 { font-size: 28px; line-height: 1.06; letter-spacing: 0; }
  .opening-note { max-width: 520px; font-size: 15px; }
  .featured-post { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-bottom: 44px; }
  .post-copy h2 { font-size: 28px; }
  .story-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .story-card .post-copy h2 { font-size: 26px; }
  .post-summary { font-size: 15px; }
  .stories { padding-bottom: 56px; }
  .reading-heading { margin-top: 36px; }
  .reading-heading h1 { font-size: 36px; }
  .reading-deck { font-size: 16px; }
  .reading-cover { margin-bottom: 32px; }
  .reading-body { margin-bottom: 48px; }
  .reading-body h2 { font-size: 26px; }
  .related-stories { padding-bottom: 56px; }
}
@media (max-width: 480px) {
  .blog-header { grid-template-columns: minmax(0, 1fr) auto; }
  .primary-nav { display: none; }
  .language-switch { grid-column: 2; }
}

.blog-controls { justify-self: end; display: flex; align-items: center; gap: 12px; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 38px; padding: 0; color: var(--ink); background: transparent; border: 1px solid transparent; border-radius: 8px; cursor: pointer; }
.theme-toggle:hover, .language-switch button:hover { background: var(--control-hover); }
.theme-toggle svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.theme-moon { display: none; }
[data-theme="light"] .theme-sun { display: none; }
[data-theme="light"] .theme-moon { display: block; }
.language-switch button[aria-pressed="true"] { border-color: var(--line); background: var(--control-hover); }
.primary-nav { gap: 28px; }
.primary-nav a { color: var(--muted); font-size: 14px; white-space: nowrap; }
.primary-nav a:hover, .primary-nav a[aria-current] { color: var(--ink); }
.primary-nav a[aria-current] { position: relative; }
.primary-nav a[aria-current]::after { position: absolute; right: 0; bottom: -31px; left: 0; height: 1px; background: var(--accent); content: ""; }
.site-footer { color: var(--footer-ink); }
.section-empty { padding: 64px 0 88px; border-top: 1px solid var(--line); color: var(--muted); }
.section-empty p { margin: 0; }
[data-theme="light"] .post-copy h2 a:hover { color: var(--accent); }
[data-theme="light"] .return-link { color: var(--ink); }
@media (max-width: 1100px) {
  .blog-header { grid-template-columns: minmax(0, 1fr) auto; row-gap: 18px; }
  .primary-nav { display: flex; grid-column: 1 / -1; grid-row: 2; justify-self: start; gap: 28px; padding-bottom: 4px; }
  .primary-nav a[aria-current] { display: block; }
  .primary-nav a[aria-current]::after { bottom: -20px; }
  .blog-controls { grid-column: 2; grid-row: 1; }
}
@media (max-width: 760px) {
  .blog-header { grid-template-columns: minmax(0, 1fr) auto; }
  .primary-nav { display: flex; gap: 24px; width: 100%; padding-bottom: 6px; }
  .primary-nav a { font-size: 12px; }
  .primary-nav a[aria-current]::after { bottom: -19px; }
  .blog-controls { gap: 6px; }
  .theme-toggle { width: 36px; height: 36px; }
}
@media (max-width: 480px) {
  .primary-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
  .primary-nav a { width: max-content; padding-block: 5px; }
  .primary-nav a[aria-current]::after { bottom: 0; }
  .blog-controls { gap: 2px; }
}

/* Header typography matches the main website's .nav-link rules. */
:root { --font-label: "Inter", "Aptos", "Segoe UI", system-ui, sans-serif; }
.blog-header { position: relative; z-index: 10; }
.wordmark .brand-text { font-family: var(--font-label); }
.primary-nav { gap: 34px; }
.primary-nav a { position: relative; padding: 14px 0 13px; font-family: var(--font-label); font-size: 12px; font-weight: 700; letter-spacing: .08em; line-height: 1; text-transform: uppercase; text-decoration: none; transition: color .2s ease, transform .2s ease; }
.primary-nav a::after, .primary-nav a[aria-current]::after { content: ""; position: absolute; left: 0; right: auto; bottom: 6px; width: 0; height: 1px; border-radius: 999px; background-image: linear-gradient(90deg, #ff7a00, #ff3b6e, #9b51ff, #00d2ff, #00ffa3); opacity: .85; transition: width .2s ease, opacity .2s ease; }
.primary-nav a:hover { transform: translateY(-1px); }
.primary-nav a:hover::after, .primary-nav a:focus-visible::after, .primary-nav a[aria-current]::after { width: 100%; }
.header-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; color: var(--ink); background: transparent; border: 0; border-radius: 10px; cursor: pointer; }
.header-icon:hover { background: var(--control-hover); }
.header-icon svg, .theme-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.language-switch { position: relative; display: flex; gap: 0; }
.language-switch .lang-trigger { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 44px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; }
.language-switch .lang-trigger img, .language-switch .lang-option img { display: block; width: 26px; height: 18px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px var(--line); }
.lang-menu { position: absolute; top: calc(100% + 10px); right: 0; display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); box-shadow: 0 18px 44px rgba(0,0,0,.2); z-index: 20; }
.language-switch .lang-option { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 34px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.lang-menu[hidden], .lang-option[hidden] { display: none !important; }
.header-icon:focus-visible, .language-switch button:focus-visible, .primary-nav a:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.search-dialog { box-sizing: border-box; width: min(700px, calc(100% - 32px)); max-height: 85vh; padding: 28px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 14px; font-family: var(--font-body); }
.search-dialog::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(4px); }
.search-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.search-heading h2 { margin: 0; font-family: var(--font-body); font-size: 24px; font-weight: 600; line-height: 1.2; }
.search-label { display: block; margin-bottom: 10px; font-size: 14px; }
.search-dialog input { box-sizing: border-box; width: 100%; min-height: 48px; padding: 12px 14px; color: var(--ink); background: var(--control-hover); border: 1px solid var(--line); border-radius: 8px; font: 16px var(--font-body); }
.search-dialog input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.search-status { color: var(--muted); font-size: 13px; margin: 20px 0 8px; }
.search-results { list-style: none; padding: 0; margin: 0; }
.search-results li { border-top: 1px solid var(--line); }
.search-results a { display: block; padding: 20px 4px; text-decoration: none; color: var(--ink); }
.search-results a:hover, .search-results a:focus-visible { background: var(--control-hover); }
.search-results h3 { margin: 0 0 8px; font-family: var(--font-body); font-size: 18px; font-weight: 600; line-height: 1.4; }
.search-results span { color: var(--muted); font-size: 12px; }
.search-results p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
@media (max-width: 1100px) { .primary-nav { gap: 28px; } }
@media (max-width: 760px) { .primary-nav { gap: 24px; } .header-icon { width: 36px; height: 40px; } .search-dialog { padding: 20px; } }
@media (max-width: 480px) { .primary-nav { gap: 8px 20px; } .primary-nav a { padding: 10px 0; } .primary-nav a::after, .primary-nav a[aria-current]::after { bottom: 2px; } }

/* Search expands into the navigation's position inside the header. */
.header-search[hidden], .header-search-results[hidden] { display: none !important; }
.header-search { position: relative; min-width: 0; width: 100%; grid-column: 2; grid-row: 1; }
.search-open .primary-nav, .search-open [data-search-toggle] { display: none; }
.search-open { grid-template-columns: minmax(180px, 1fr) minmax(0, 640px) auto; }
.header-search-field { display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); min-height: 44px; }
.header-search-field > svg { width: 22px; height: 22px; flex: 0 0 22px; color: var(--ink); }
.header-search-field .search-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.header-search-field input { width: 100%; min-width: 0; border: 0; outline: none; background: transparent; color: var(--ink); font: 15px var(--font-body); padding: 10px 0; }
.header-search-field:focus-within { border-bottom-color: var(--ink); }
.header-search-field .header-icon { flex-shrink: 0; }
.header-search-results { position: absolute; top: calc(100% + 18px); left: 0; right: 0; padding: 16px 20px; background: var(--bg); border: 1px solid var(--line); border-radius: 0 0 10px 10px; box-shadow: 0 14px 30px rgba(0,0,0,.15); max-height: min(65vh, 540px); overflow-y: auto; }
.header-search-results .search-status { margin-top: 0; }
.header-search-results .search-results a { padding: 14px 4px; }
.header-search-results .search-results h3 { font-size: 16px; }
.header-search-results .search-results p { font-size: 13px; }
@media (max-width: 1100px) { .search-open { grid-template-columns: minmax(0, 1fr) auto; } .header-search { grid-column: 1 / -1; grid-row: 2; } .header-search-results { top: calc(100% + 16px); } }

/* Smaller editorial scale, with space between stories and within each story. */
main.wrap { max-width: 1080px; }
.opening { padding-block: 88px 64px; gap: 64px; }
.opening h1 { font-size: 32px; }
.opening-note { max-width: 340px; font-size: 15px; line-height: 1.8; }
.featured-post { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 72px; margin-bottom: 104px; }
.post-image, .featured-post .post-image { aspect-ratio: 16 / 9; }
.post-copy h2 { font-size: 28px; line-height: 1.25; margin-bottom: 24px; }
.post-meta { margin-bottom: 24px; line-height: 1.8; }
.post-summary { font-size: 15px; line-height: 1.85; margin-bottom: 32px; max-width: 48ch; }
.read-link { font-size: 13px; }
.story-grid { column-gap: 72px; row-gap: 96px; }
.story-card .post-copy { padding-top: 32px; }
.story-card .post-copy h2 { font-size: 24px; line-height: 1.3; }
.stories { padding-bottom: 120px; }
.reading-heading { max-width: 680px; margin-block: 80px 56px; }
.reading-heading h1 { font-size: 38px; line-height: 1.2; margin-bottom: 32px; }
.reading-deck { font-size: 17px; line-height: 1.85; margin-bottom: 32px; }
.reading-cover { max-width: 960px; margin-bottom: 64px; }
.reading-body { max-width: 650px; margin-bottom: 96px; }
.reading-body h2 { font-size: 25px; margin-block: 56px 24px; }
.related-stories { padding-bottom: 112px; }
.related-stories > h2 { font-size: 25px; margin-block: 48px 40px; }
@media (max-width: 1000px) {
 .featured-post { gap: 48px; }
 .story-grid { column-gap: 48px; row-gap: 80px; }
 .post-copy h2 { font-size: 26px; }
}
@media (max-width: 760px) {
 main.wrap { max-width: 560px; }
 .opening { padding-block: 56px 48px; gap: 24px; }
 .opening h1 { font-size: 27px; }
 .opening-note { font-size: 14px; }
 .featured-post { grid-template-columns: minmax(0, 1fr); gap: 32px; margin-bottom: 72px; }
 .post-copy h2, .story-card .post-copy h2 { font-size: 24px; margin-bottom: 22px; }
 .post-summary { font-size: 15px; margin-bottom: 28px; }
 .story-grid { row-gap: 72px; }
 .story-card .post-copy { padding-top: 32px; }
 .stories { padding-bottom: 88px; }
 .reading-heading { margin-block: 56px 40px; }
 .reading-heading h1 { font-size: 30px; }
 .reading-deck { font-size: 16px; }
 .reading-cover { margin-bottom: 48px; }
 .reading-body { margin-bottom: 72px; }
 .reading-body h2 { font-size: 24px; }
}
.share-article { display: inline-flex; align-items: center; gap: 10px; min-height: 42px; margin-top: 8px; padding: 8px 0; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--line); font: 700 12px var(--font-label); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.share-article:hover { border-color: var(--ink); }
.share-article:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.share-icon { width: 18px; height: 18px; background: currentColor; -webkit-mask: url("icons/share.svg") center / contain no-repeat; mask: url("icons/share.svg") center / contain no-repeat; }

.comments-section { width: min(100%, 650px); margin: 0 auto 104px; padding-top: 40px; border-top: 1px solid var(--line); }
.comments-heading h2 { margin: 0 0 8px; font: 500 25px/1.2 var(--font-display); color: var(--ink); }
.comments-heading p, .comments-status { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.comments-auth { margin-top: 24px; }
.comments-login { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; }
.comments-login p, .comments-identity p { margin: 0; color: var(--reading-ink); font-size: 14px; }
.comments-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: transparent; font: 600 13px var(--font-body); cursor: pointer; transition: background .2s ease, border-color .2s ease; }
.comments-button:hover { border-color: var(--ink); background: var(--control-hover); }
.comments-button:disabled { opacity: .6; cursor: wait; }
.comments-identity { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.comments-logout { min-height: 34px; padding: 6px 10px; font-size: 12px; }
.comments-form { display: grid; gap: 12px; }
.comments-label { color: var(--ink); font-size: 14px; font-weight: 600; }
.comments-form textarea { display: block; width: 100%; min-height: 120px; resize: vertical; padding: 14px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--control-hover); font: 15px/1.65 var(--font-body); }
.comments-form textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.comments-form-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.comments-note, .comments-count { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.comments-status { margin-top: 20px; }
.comments-status:empty { display: none; }
.comments-list { display: grid; gap: 0; margin: 18px 0 0; padding: 0; list-style: none; }
.comment-item { padding: 18px 0; border-top: 1px solid var(--line); }
.comment-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 8px; }
.comment-author { color: var(--ink); font-size: 14px; font-weight: 650; }
.comment-date { color: var(--muted); font-size: 12px; }
.comment-text { margin: 0; color: var(--reading-ink); font-size: 15px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 760px) {
 .comments-section { margin-bottom: 72px; padding-top: 32px; }
 .comments-heading h2 { font-size: 23px; }
 .comments-form textarea { min-height: 108px; }
}
