@import url('https://fonts.googleapis.com/css2?family=Newsreader:wght@400;500;600;700&family=Roboto:wght@400;500;700&display=swap');

/* Hallmark · pre-emit critique: P5 H5 E4 S5 R5 V5
 * Hallmark · genre: editorial · macrostructure: Ecosystem Index · theme: studied-DNA (source: https://kod.ru/)
 * nav: N6 (issue=above, wordmark=2xl, rule=double) · footer: Ft4 (family=mono, layout=single-block)
 * contrast: pass (40–41) · slop: pass (42–45) · honest: pass (46) · chrome: pass (47)
 * tokens: pass (48) · responsive: pass (49) · mobile: source-verified (34, 49–57)
 */
:root {
  --home-paper: oklch(96.8% 0.008 72);
  --home-paper-raised: oklch(99% 0.006 72);
  --home-ink: oklch(24% 0.025 230);
  --home-muted: oklch(48% 0.02 220);
  --home-line: oklch(78% 0.018 220);
  --home-accent: oklch(58% 0.17 38);
  --home-accent-ink: oklch(98% 0.008 72);
  --home-blue: oklch(48% 0.09 220);
  --home-focus: oklch(48% 0.14 225);
  --home-font-display: Georgia, "Times New Roman", serif;
  --home-font-body: Inter, ui-sans-serif, system-ui, sans-serif;
  --home-font-label: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --home-max: 76rem;
}

html,
body { overflow-x: clip; }

.home-page {
  background: var(--home-paper);
  color: var(--home-ink);
  font-family: var(--home-font-body);
}

.home-page a:focus-visible,
.home-page summary:focus-visible {
  outline: 0.125rem solid var(--home-focus);
  outline-offset: 0.1875rem;
}

.home-page a:active { color: var(--home-accent); }
.metrika-pixel { position: absolute; inset-inline-start: -9999px; }

.masthead,
.homepage,
.editorial-footer {
  width: min(100% - 2rem, var(--home-max));
  margin-inline: auto;
}

.masthead { padding-block-start: var(--space-sm); }
.issue-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-sm);
  align-items: center;
  padding-block: var(--space-2xs);
  border-block: 0.0625rem solid var(--home-line);
  color: var(--home-muted);
  font-family: var(--home-font-label);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.issue-line span { display: none; }
.issue-line a { color: var(--home-ink); font-weight: 700; white-space: nowrap; }
.masthead__name {
  padding-block: var(--space-sm) var(--space-xs);
  text-align: center;
  border-block-end: 0.1875rem double var(--home-ink);
  font-family: var(--home-font-display);
  font-size: clamp(1.9rem, 9.5vw, 5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
  min-width: 0;
  white-space: nowrap;
}
.masthead__nav { display: none; }
.mobile-menu { border-block-end: 0.0625rem solid var(--home-line); }
.mobile-menu summary {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--home-font-label);
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.mobile-menu summary::after { content: "+"; font-size: 1.25rem; }
.mobile-menu[open] summary::after { content: "−"; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu nav { display: grid; border-block-start: 0.0625rem solid var(--home-line); }
.mobile-menu nav a { min-height: 2.75rem; display: flex; align-items: center; border-block-end: 0.0625rem solid var(--home-line); white-space: nowrap; }

.positioning {
  display: grid;
  gap: var(--space-md);
  padding-block: var(--space-xl) var(--space-2xl);
}
.positioning p {
  max-width: 28ch;
  margin: 0;
  font-family: var(--home-font-display);
  font-size: clamp(1.75rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
  min-width: 0;
}
.editorial-link { color: var(--home-blue); font-weight: 800; text-decoration: underline; text-decoration-thickness: 0.0625rem; text-underline-offset: 0.25rem; white-space: nowrap; }

[hidden] { display: none !important; }

.search-panel { display: grid; gap: var(--space-sm); padding-block-end: var(--space-xl); }
.search-field input {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--home-line);
  border-radius: 999px;
  background: var(--home-paper-raised);
  color: var(--home-ink);
  font-family: var(--home-font-body);
  font-size: 1rem;
}
.search-field input:focus-visible { outline: 0.125rem solid var(--home-focus); outline-offset: 0.125rem; }
.search-filters { display: flex; flex-wrap: wrap; gap: var(--space-2xs); }
.filter-chip {
  padding: var(--space-2xs) var(--space-sm);
  border: 1px solid var(--home-line);
  border-radius: 999px;
  background: transparent;
  color: var(--home-muted);
  font-family: var(--home-font-label);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}
.filter-chip.is-active,
.filter-chip:hover {
  background: var(--home-accent);
  color: var(--home-accent-ink);
  border-color: var(--home-accent);
}
.search-status { margin: 0; color: var(--home-muted); font-size: 0.875rem; min-height: 1.25em; }

.front-page { display: grid; gap: var(--space-xl); padding-block-end: var(--space-3xl); }
.story-cover { margin: 0; background: var(--home-ink); overflow: clip; }
.story-cover img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.lead-story__cover,
.story-card__cover,
.deep-story__cover { display: block; }
.story-meta {
  margin: var(--space-sm) 0 var(--space-2xs);
  color: var(--home-muted);
  font-family: var(--home-font-label);
  font-size: 0.75rem;
  line-height: 1.4;
  text-transform: uppercase;
}
.lead-story h1 {
  margin: 0 0 var(--space-sm);
  font-family: var(--home-font-display);
  font-size: clamp(2.25rem, 6vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
  min-width: 0;
}
.lead-story__summary { max-width: 65ch; color: var(--home-muted); font-size: clamp(1rem, 2vw, 1.1875rem); }
.latest-rail { border-block-start: 0.1875rem solid var(--home-ink); }
.rail-heading { display: flex; align-items: baseline; justify-content: space-between; padding-block: var(--space-xs); border-block-end: 0.0625rem solid var(--home-ink); }
.rail-heading h2 { margin: 0; font-family: var(--home-font-display); font-size: 1.75rem; }
.rail-heading a { color: var(--home-blue); font-weight: 800; white-space: nowrap; }
.latest-rail ol { margin: 0; padding: 0; list-style: none; }
.latest-rail li { border-block-end: 0.0625rem solid var(--home-line); }
.latest-rail li a { display: grid; gap: var(--space-2xs); padding-block: var(--space-sm); }
.latest-rail time { color: var(--home-muted); font-family: var(--home-font-label); font-size: 0.6875rem; text-transform: uppercase; }
.latest-rail li span { font-family: var(--home-font-display); font-size: 1.125rem; font-weight: 700; line-height: 1.15; }

.editorial-section,
.section-index { padding-block: var(--space-2xl) var(--space-3xl); border-block-start: 0.1875rem solid var(--home-ink); }
.section-title { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2xs); margin-block-end: var(--space-xl); }
.section-title p { margin: 0; color: var(--home-accent); font-family: var(--home-font-label); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.section-title h2 { margin: 0; font-family: var(--home-font-display); font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.05; overflow-wrap: anywhere; min-width: 0; }
.choice-grid { display: grid; gap: var(--space-xl); }
.story-card { min-width: 0; }
.story-card h3,
.deep-story h3 { margin: 0; font-family: var(--home-font-display); font-size: clamp(1.5rem, 3vw, 2.25rem); line-height: 1.08; overflow-wrap: anywhere; min-width: 0; }
.story-card > p:last-child,
.deep-story p { color: var(--home-muted); }
.deep-list { display: grid; gap: var(--space-2xl); }
.deep-story { display: grid; gap: var(--space-lg); padding-block-end: var(--space-2xl); border-block-end: 0.0625rem solid var(--home-line); min-width: 0; }
.section-index__links { display: grid; }
.section-index__links a { display: grid; gap: var(--space-3xs); padding-block: var(--space-md); border-block-end: 0.0625rem solid var(--home-line); }
.section-index__links span { font-family: var(--home-font-display); font-size: 1.75rem; font-weight: 700; }
.section-index__links small { color: var(--home-muted); font-size: 0.875rem; }
.journal-cta { display: grid; gap: var(--space-md); margin-block-end: var(--space-3xl); padding: var(--space-lg); background: var(--home-ink); color: var(--home-paper); }
.journal-cta strong,
.journal-cta span { display: block; }
.journal-cta strong { font-family: var(--home-font-display); font-size: 1.75rem; line-height: 1.1; }
.journal-cta span { max-width: 65ch; margin-block-start: var(--space-2xs); color: var(--home-line); }
.journal-cta a { color: var(--home-accent-ink); font-weight: 800; text-decoration: underline; text-underline-offset: 0.25rem; white-space: nowrap; }
.editorial-footer { display: grid; gap: var(--space-md); padding-block: var(--space-xl); border-block-start: 0.1875rem double var(--home-ink); font-family: var(--home-font-label); font-size: 0.75rem; }
.editorial-footer__name { font-family: var(--home-font-display); font-size: 2rem; font-weight: 700; }
.editorial-footer p { margin: 0; color: var(--home-muted); }
.editorial-footer nav { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.editorial-footer a { white-space: nowrap; }

@media (min-width: 40rem) {
  .masthead,
  .homepage,
  .editorial-footer { width: min(100% - 3rem, var(--home-max)); }
  .issue-line { grid-template-columns: minmax(0, 1fr) auto auto; }
  .issue-line span { display: inline; }
  .positioning { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story-card:first-child { grid-column: 1 / -1; }
  .deep-story { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: start; }
  .section-index__links { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-xl); }
  .journal-cta { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
}

@media (min-width: 60rem) {
  .mobile-menu { display: none; }
  .masthead__nav { display: flex; justify-content: center; gap: var(--space-lg); padding-block: var(--space-xs); border-block-end: 0.0625rem solid var(--home-ink); }
  .masthead__nav a { font-family: var(--home-font-label); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; white-space: nowrap; }
  .front-page { grid-template-columns: minmax(0, 1.8fr) minmax(18rem, 0.8fr); align-items: start; }
  .choice-grid { grid-template-columns: 1.35fr minmax(0, 0.825fr) minmax(0, 0.825fr); }
  .story-card:first-child { grid-column: auto; }
  .story-card:first-child h3 { font-size: clamp(2rem, 3vw, 3rem); }
  .section-index__links { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (hover: hover) and (pointer: fine) {
  .home-page a:hover { color: var(--home-accent); }
  .story-cover img { transition: filter 160ms ease-out; }
  a:hover .story-cover img { filter: contrast(1.04); }
}

@media (pointer: coarse) {
  .home-page summary,
  .home-page nav a,
  .editorial-link,
  .journal-cta a { min-height: 2.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .story-cover img { transition: none; }
}

/* UI/UX Pro Max AgentLab refinement: AI-native dark editorial surface. */
.home-page {
  --home-paper: #0b1020;
  --home-paper-raised: #121a2e;
  --home-ink: #f8fafc;
  --home-muted: #b5c0d4;
  --home-line: #303b56;
  --home-accent: #a78bfa;
  --home-accent-ink: #ffffff;
  --home-blue: #67e8f9;
  --home-focus: #22d3ee;
  --home-font-display: Newsreader, Georgia, "Times New Roman", serif;
  --home-font-body: Roboto, Inter, ui-sans-serif, system-ui, sans-serif;
  --home-font-label: Roboto, ui-sans-serif, system-ui, sans-serif;
  background:
    radial-gradient(circle at 86% 4%, rgba(124, 58, 237, 0.18), transparent 28rem),
    radial-gradient(circle at 4% 32%, rgba(8, 145, 178, 0.12), transparent 24rem),
    var(--home-paper);
}
.home-page .masthead__name a,
.home-page h1 a,
.home-page h2,
.home-page h3,
.home-page .latest-rail li span,
.home-page .section-index__links span,
.home-page .editorial-footer__name { color: var(--home-ink); }
.home-page .masthead__name { border-block-end-color: var(--home-accent); }
.home-page .story-cover { border: 1px solid var(--home-line); border-radius: 14px; box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28); }
.home-page .story-cover img { border-radius: 13px; }
.home-page .latest-rail,
.home-page .editorial-section,
.home-page .section-index { border-block-start-color: var(--home-accent); }
.home-page .rail-heading { border-block-end-color: var(--home-line); }
.home-page .latest-rail li,
.home-page .section-index__links a,
.home-page .deep-story { border-block-end-color: var(--home-line); }
.home-page .journal-cta {
  border: 1px solid rgba(103, 232, 249, 0.45);
  border-radius: 16px;
  background: linear-gradient(135deg, #171d38 0%, #0f172a 100%);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.25);
}
.home-page .journal-cta span { color: var(--home-muted); }
.home-page .editorial-link,
.home-page .rail-heading a { color: var(--home-blue); }
.home-page .section-title p { color: var(--home-accent); }
.home-page a:hover { color: var(--home-blue); }
.home-page .story-cover img { transition: filter 180ms ease-out, transform 180ms ease-out; }
.home-page a:hover .story-cover img { filter: saturate(1.12) contrast(1.05); transform: scale(1.01); }
.home-page .mobile-menu { border-block-end-color: var(--home-line); }
.home-page .mobile-menu nav,
.home-page .mobile-menu nav a { border-color: var(--home-line); }
.home-page .max-promo-block { border-color: var(--home-line); background: #11182a; }
@media (prefers-reduced-motion: reduce) {
  .home-page .story-cover img { transition: none; }
  .home-page a:hover .story-cover img { transform: none; }
}
