@import url('https://fonts.googleapis.com/css2?family=Electrolize&display=swap');

:root {
  color-scheme: light dark;
  font-family: "Electrolize", ui-sans-serif, system-ui, sans-serif;
  font-synthesis: none;
  --canvas: #f4f4f1;
  --surface: #ebebe7;
  --surface-strong: #deded9;
  --text: #111111;
  --muted: #62625f;
  --faint: #858580;
  --rule: #c6c6c0;
  --rule-strong: #111111;
  --inverse: #f7f7f4;
  --danger: #7b3030;
  --warning: #795c20;
  --success: #355d44;
  --focus: #111111;
  --max: 1340px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --type-interface-xs: 10px;
  --type-interface-sm: 12px;
  --type-reading-mobile: 16px;
  --type-reading: 17px;
  --type-dek: 20px;
  --gutter: clamp(var(--space-4), 3vw, var(--space-6));
}

:root[data-theme="dark"] {
  --canvas: #151515;
  --surface: #1d1d1d;
  --surface-strong: #282828;
  --text: #eeeeea;
  --muted: #aaa9a3;
  --faint: #7d7d78;
  --rule: #3b3b39;
  --rule-strong: #eeeeea;
  --inverse: #151515;
  --danger: #c77d7d;
  --warning: #c2a468;
  --success: #80aa8e;
  --focus: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #151515;
    --surface: #1d1d1d;
    --surface-strong: #282828;
    --text: #eeeeea;
    --muted: #aaa9a3;
    --faint: #7d7d78;
    --rule: #3b3b39;
    --rule-strong: #eeeeea;
    --inverse: #151515;
    --danger: #c77d7d;
    --warning: #c2a468;
    --success: #80aa8e;
    --focus: #ffffff;
  }
}

* { box-sizing: border-box; }
html { background: var(--canvas); color: var(--text); }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--text); }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }

::selection { background: var(--text); color: var(--inverse); }

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

.skip-link {
  position: fixed;
  left: var(--space-3);
  top: var(--space-3);
  z-index: 100;
  transform: translateY(-160%);
  padding: var(--space-2) var(--space-3);
  background: var(--text);
  color: var(--inverse);
  text-decoration: none;
}
.skip-link:focus { transform: none; }

.shell {
  width: min(var(--max), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
}

.utility-bar {
  border-bottom: 1px solid var(--rule);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.utility-bar .shell {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.utility-cluster { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.site-header {
  border-bottom: 2px solid var(--rule-strong);
}
.site-header .shell {
  min-height: 86px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  gap: var(--space-5);
  padding-block: var(--space-4) 14px;
}
.site-header.compact .shell { min-height: 64px; padding-block: 10px; align-items: center; }
.masthead {
  margin: 0;
  font-size: clamp(28px, 4vw, 52px);
  line-height: .95;
  letter-spacing: .01em;
  text-decoration: none;
}
.site-header.compact .masthead { font-size: clamp(22px, 3vw, 30px); }
.site-nav { display: flex; gap: 18px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.site-nav a,
.text-button {
  border: 0;
  background: none;
  padding: 4px 0;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
  cursor: pointer;
}
.site-nav a:hover,
.text-button:hover { color: var(--text); }

.section-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.section-rule::after { content: ""; height: 1px; flex: 1; background: var(--rule); }

.metadata {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.home-main { padding-block: 28px 64px; }
.lead-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(250px, .65fr);
  gap: 32px;
  padding: var(--space-5) 0 34px;
  border-bottom: 1px solid var(--rule-strong);
}
.lead-story { min-width: 0; }
.lead-story h1 {
  margin: 12px 0 14px;
  max-width: 900px;
  font-size: clamp(34px, 5.6vw, 66px);
  line-height: 1.02;
  letter-spacing: -.015em;
  font-weight: 400;
}
.lead-story .dek {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.5;
  color: var(--muted);
}
.lead-story a { text-decoration: none; }
.lead-story a:hover h1 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }

.feed-section { padding-top: var(--space-6); }
.feed-list { margin-top: 12px; border-top: 1px solid var(--rule-strong); }
.feed-item {
  max-width: 900px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}
.feed-item h2 { margin: 0 0 8px; font-size: clamp(20px, 2.7vw, 30px); line-height: 1.14; font-weight: 400; }
.feed-item h2 a { text-decoration: none; }
.feed-item h2 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.feed-item p { margin: 0; color: var(--muted); line-height: 1.5; }

.empty-state {
  padding: 36px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
}
.empty-state h2 { margin: 0 0 8px; color: var(--text); font-size: 22px; font-weight: 400; }

.story-page { padding-block: 28px 72px; }
.story-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: clamp(32px, 6vw, 84px);
  align-items: start;
}
.story-main { min-width: 0; max-width: 780px; }
.story-main h1 {
  margin: 14px 0 16px;
  font-size: clamp(32px, 4.8vw, 48px);
  line-height: 1.08;
  font-weight: 400;
}
.story-main .dek { margin: 0 0 20px; font-size: clamp(18px, 2.4vw, 21px); line-height: 1.5; color: var(--muted); }
.story-copy { margin-top: 34px; }
.story-copy section { padding: 22px 0; border-top: 1px solid var(--rule); }
.story-copy h2 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; font-weight: 400; }
.story-copy p { margin: 0; max-width: 72ch; font-size: 17px; line-height: 1.58; }
.story-context { position: sticky; top: 18px; border-top: 2px solid var(--rule-strong); }
.context-block { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.context-block h2 { margin: 0 0 8px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; font-weight: 400; }
.context-block p,
.context-block li { margin: 0; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.context-block ul { margin: 0; padding-left: 18px; }
.context-block li + li { margin-top: 8px; }
.context-block a { text-decoration: underline; text-underline-offset: 3px; }

.content-page { max-width: 850px; padding-block: 34px 72px; }
.content-page h1 { margin: 12px 0 24px; font-size: clamp(34px, 5vw, 50px); line-height: 1.05; font-weight: 400; }
.content-page section { padding: 24px 0; border-top: 1px solid var(--rule); }
.content-page h2 { margin: 0 0 12px; font-size: 15px; letter-spacing: .05em; text-transform: uppercase; font-weight: 400; }
.content-page p,
.content-page li { max-width: 74ch; font-size: 17px; line-height: 1.58; }
.content-page a { text-decoration: underline; text-underline-offset: 3px; }

.site-footer { border-top: 2px solid var(--rule-strong); margin-top: 24px; }
.site-footer .resource-layer {
  display: grid;
  grid-template-columns: 1.2fr repeat(2, 1fr);
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
}
.site-footer h2 { margin: 0 0 10px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 400; }
.site-footer p,
.site-footer a { font-size: 12px; line-height: 1.6; color: var(--muted); }
.site-footer a { display: block; width: fit-content; text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.site-footer .utility-footer { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }

.lead-layout { grid-template-columns: minmax(0, 820px); gap: 0; padding-block: 38px 46px; }
.feed-item { grid-template-columns: minmax(0, 820px); gap: 0; padding-block: 28px; }
.site-footer .resource-layer { grid-template-columns: minmax(0, 1.5fr) minmax(180px, .75fr); gap: 48px; padding-block: 32px; }
.site-footer .resource-layer nav { display: grid; align-content: start; gap: 7px; }
.site-footer .utility-footer { min-height: 44px; justify-content: flex-start; }

.outline-button,
.solid-button {
  min-height: 36px;
  border-radius: 1px;
  padding: 8px 12px;
  text-transform: uppercase;
  letter-spacing: .07em;
  font-size: 10px;
  cursor: pointer;
}
.outline-button { border: 1px solid var(--rule-strong); background: transparent; color: var(--text); }
.outline-button:hover { background: var(--surface-strong); }
.solid-button { border: 1px solid var(--text); background: var(--text); color: var(--inverse); }
.solid-button:hover { opacity: .86; }
button:disabled { opacity: .45; cursor: wait; }

.loading-line { height: 1px; width: 100%; background: var(--rule); overflow: hidden; }
.loading-line::after { content: ""; display: block; width: 30%; height: 100%; background: var(--text); animation: loading 1s linear infinite; }
@keyframes loading { from { transform: translateX(-110%); } to { transform: translateX(440%); } }

@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; }
}

@media (max-width: 1024px) {
  .lead-layout { grid-template-columns: 1fr; }
  .story-layout { grid-template-columns: minmax(0, 1fr) 240px; gap: 40px; }
}

@media (max-width: 760px) {
  .site-header .shell { grid-template-columns: 1fr; align-items: start; min-height: auto; }
  .site-nav { justify-content: flex-start; }
  .lead-story h1 { font-size: clamp(34px, 11vw, 50px); }
  .story-layout { grid-template-columns: 1fr; }
  .story-context { position: static; }
  .site-footer .resource-layer { grid-template-columns: 1fr; }
  .site-footer .utility-footer { align-items: flex-start; flex-direction: column; padding-block: 14px; }
}
