* { box-sizing: border-box }
:root {
  --paper: #f8f4eb; --panel: #fffdf7; --ink: #23231e; --muted: #5c5c51;
  --accent: #9c4124; --rule: #d9d0bd; --display: Georgia, "Times New Roman", serif;
  --body: system-ui, sans-serif; color-scheme: light;
}
[data-edition="signal"] {
  --paper: #141820; --panel: #212732; --ink: #f2f5fa; --muted: #c0c8d2;
  --accent: #9cfad4; --rule: #424b59; --display: system-ui, sans-serif; color-scheme: dark;
}
[data-edition="workbench"] {
  --paper: #ebf2ef; --panel: #f8fcfa; --ink: #132e27; --muted: #405b53;
  --accent: #126047; --rule: #b7cfc4; --display: "Trebuchet MS", system-ui, sans-serif;
}
[data-edition="studio"] {
  --paper: #f4effc; --panel: #fff; --ink: #271a42; --muted: #5d4f73;
  --accent: #6135a6; --rule: #d5c8e6; --display: Georgia, serif;
}
[data-edition="daily"] {
  --paper: #f9f8f2; --panel: #fff; --ink: #102341; --muted: #46576f;
  --accent: #124ca3; --rule: #bccee4; --display: system-ui, sans-serif;
}
html { scroll-padding-top: 1rem }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.55 var(--body) }
a { color: inherit; text-underline-offset: .25em }
a:hover { color: var(--accent) }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px }
img { max-width: 100%; display: block; height: auto }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0; overflow-wrap: anywhere }
p { margin: 0 }
.shell { width: min(100% - 3rem, 78rem); margin-inline: auto }
.skip { position: absolute; top: 0; left: 1rem; z-index: 2; translate: 0 -150%; background: var(--panel); padding: .5rem 1rem }
.skip:focus { translate: 0 0 }
.masthead { border-bottom: 1px solid var(--rule) }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; padding-block: .85rem }
.brand { flex: none; display: inline-block; max-width: 100% }
.brand img { width: 14rem }
nav { display: flex; flex-wrap: wrap; gap: .55rem 1.1rem }
nav a { font-size: .9rem; font-weight: 650 }
.masthead nav a { text-decoration: none }
.masthead nav a:hover { text-decoration: underline }
.mobile-topics { display: none }
.ad-slot {
  display: flex;
  justify-content: center;
  justify-content: safe center;
  min-height: 280px;
  margin-block: 50px;
  overflow-x: auto;
}
.lead { padding: 2.5rem 0 3rem }
.intro { display: flex; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 2rem }
.intro h1, .listing h1, .legal h1 { font-size: clamp(2.4rem, 5vw, 5.4rem); letter-spacing: -.055em }
.intro p { max-width: 29ch; color: var(--muted) }
.features, .cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem }
.card { min-width: 0 }
.card a { display: block; height: 100%; color: inherit; text-decoration: none }
.card a:hover h2, .card a:hover h3 { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px }
.card img { width: 100%; aspect-ratio: 8/5; object-fit: cover; background: var(--rule) }
.card-copy { padding: 1rem 0 0 }
.label { color: var(--accent); font-weight: 750; font-size: .875rem; margin-bottom: .45rem }
.card h2, .card h3 { font-size: clamp(1.25rem, 2.1vw, 2rem) }
.excerpt { margin-top: .6rem; color: var(--muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden }
.topic { padding-block: 2.25rem 2.75rem; border-top: 1px solid var(--rule) }
.topics .cards { grid-template-columns: repeat(4, minmax(0, 1fr)) }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; margin-bottom: 1.25rem }
.section-head a { flex: none }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.8rem) }
.listing { padding-block: 2.5rem 4rem }
.listing .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2rem }
@media (min-width: 74rem) {
  .listing .cards { grid-template-columns: repeat(5, minmax(0, 1fr)) }
}
.dek { font-size: clamp(1.05rem, 2vw, 1.35rem); color: var(--muted); margin: .9rem 0 1.5rem }
.pagination { margin-top: 2.5rem }
.pagination a { padding: .5rem 1rem; border: 1px solid var(--rule) }
.pagination [aria-current] { text-decoration: none; background: var(--ink); color: var(--paper) }
.story { padding-block: 2.2rem }
.story-intro { display: flow-root }
.story-head, .story-text { max-width: 48rem; margin-inline: auto }
.story-head h1 { font-size: clamp(2.15rem, 5vw, 4.8rem); letter-spacing: -.045em; margin-top: .5rem }
.story-head .dek { margin-bottom: .6rem }
.story-meta, .updated { color: var(--muted); font-size: .9rem }
.story-cover { margin: 1.75rem auto 2rem; max-width: 63rem }
.story-cover img { width: 100%; aspect-ratio: 2/1; object-fit: cover }
.toc { border: 1px solid var(--rule); background: var(--panel); padding: .8rem 1rem; margin-bottom: 1.5rem }
.toc summary { cursor: pointer; font-weight: 700 }
.toc ul { margin-bottom: 0; padding-left: 1.35rem }
.prose { overflow-wrap: anywhere; font-size: 1.0625rem; line-height: 1.75 }
.prose > * + *, .prose section > * + * { margin-top: 1.1rem }
.prose h2 { font-size: clamp(1.55rem, 2.8vw, 2.2rem); margin-top: 2.2rem; scroll-margin-top: 1rem }
.prose h3 { font-size: 1.4rem }
.prose p, .prose li { max-width: 75ch }
.prose pre { padding: 1rem; white-space: pre-wrap; background: var(--panel) }
.prose table { display: block; width: 100%; overflow: auto; border-collapse: collapse }
.prose td, .prose th { border: 1px solid var(--rule); padding: .45rem }
.story .topic { margin-top: 3rem }
.legal { max-width: 48rem; padding-block: 3rem 4rem }
footer { border-top: 1px solid var(--rule); background: var(--panel) }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: .85rem 1.5rem; flex-wrap: wrap; padding-block: 1.2rem }
.footer-inner p { color: var(--muted); font-size: .875rem }

[data-edition="signal"] .story-head { border-left: 4px solid var(--accent); padding-left: 1.25rem }
[data-edition="workbench"] .story-head { background: var(--panel); border: 1px solid var(--rule); padding: clamp(1rem, 3vw, 2rem) }
[data-edition="studio"] .story-head { text-align: center }
[data-edition="studio"] .story-cover img { border-radius: clamp(.65rem, 2vw, 1.5rem) }
[data-edition="daily"] .story-head { border-bottom: 3px double var(--rule); padding-bottom: 1rem }

/* Editorial front page with a large photograph and a rail of smaller stories. */
[data-edition="journal"] .features { grid-template-columns: 2fr 1fr; align-items: start }
[data-edition="journal"] .features > .card h2 { font-size: clamp(1.8rem, 3.7vw, 3.5rem) }
.feature-rail { display: grid; grid-auto-rows: 1fr; align-self: stretch; gap: 1.25rem }
.feature-rail .card a { display: grid; grid-template-columns: 38% minmax(0, 1fr); gap: .75rem; align-items: center }
.feature-rail .card-copy { padding: 0 }
.feature-rail .card h2 { font-size: clamp(1.2rem, 1.9vw, 1.75rem) }
.feature-rail .excerpt { display: none }

/* Dark magazine with full-bleed feature cards and two columns of topic briefs. */
[data-edition="signal"] .lead { background: #10131a }
[data-edition="signal"] .features .card { position: relative; background: var(--panel) }
[data-edition="signal"] .features .card img { aspect-ratio: 1; opacity: .52 }
[data-edition="signal"] .features .card-copy { position: absolute; inset: auto 0 0; padding: 1rem; background: linear-gradient(transparent,#0e131a 46%) }
[data-edition="signal"] .features .excerpt { display: none }
[data-edition="signal"] .topics .cards { grid-template-columns: repeat(2, minmax(0, 1fr)) }
[data-edition="signal"] .topics .card a { display: grid; grid-template-columns: 34% minmax(0, 1fr); gap: 1rem; align-items: center }
[data-edition="signal"] .topics .card-copy { padding: 0 }

/* Workbench uses a left-hand topic menu and a catalog grid. */
[data-edition="workbench"] .masthead-inner { align-items: flex-start; flex-direction: column }
[data-edition="workbench"] .masthead nav a { padding: .35rem .65rem; border: 1px solid var(--rule); border-radius: 2px }
[data-edition="workbench"] .features { grid-template-columns: 1.25fr 1fr 1fr }
[data-edition="workbench"] .card a { background: var(--panel); border: 1px solid var(--rule) }
[data-edition="workbench"] .card-copy { padding: .9rem 1rem 1.1rem }
[data-edition="workbench"] .topic { display: grid; grid-template-columns: minmax(8rem, 13rem) 1fr; gap: 1rem }
[data-edition="workbench"] .topics .cards { grid-template-columns: repeat(3, minmax(0, 1fr)) }
[data-edition="workbench"] .section-head { display: block }
[data-edition="workbench"] .section-head h2 { margin-bottom: .5rem }

/* Studio centers the masthead and pairs wide landscape photographs. */
[data-edition="studio"] .masthead-inner, [data-edition="studio"] .intro { align-items: center; flex-direction: column; text-align: center }
[data-edition="studio"] .masthead nav { justify-content: center }
[data-edition="studio"] .intro p { max-width: 55ch }
[data-edition="studio"] .features { grid-template-columns: 1fr 1fr }
[data-edition="studio"] .features .card:first-child { grid-column: 1 / -1 }
[data-edition="studio"] .features .card:first-child a { display: grid; grid-template-columns: 58% 1fr; align-items: center }
[data-edition="studio"] .features .card:first-child h2 { font-size: clamp(1.6rem, 3.5vw, 3.2rem) }
[data-edition="studio"] .card a { border-radius: 1.25rem; background: var(--panel); overflow: hidden }
[data-edition="studio"] .card-copy { padding: 1.2rem }
[data-edition="studio"] .topics .cards { grid-template-columns: repeat(2, minmax(0, 1fr)) }
[data-edition="studio"] .topics .topic:nth-child(even) { background: var(--panel); padding-inline: 1rem; border-radius: 1.25rem }

/* Daily puts short briefs alongside each topic's lead story. */
[data-edition="daily"] .masthead { border-top: 6px solid var(--accent); background: var(--panel) }
[data-edition="daily"] .intro { align-items: start; flex-direction: column }
[data-edition="daily"] .features { grid-template-columns: 1fr 1fr; align-items: start }
[data-edition="daily"] .features .card:nth-child(n + 3) a {
  display: grid;
  grid-template-columns: 34% minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
}
[data-edition="daily"] .features .card:nth-child(n + 3) .card-copy { padding: 0 }
[data-edition="daily"] .topics .cards { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start }
.topic-rail { display: grid; grid-auto-rows: 1fr; gap: .8rem; align-self: stretch }
.topic-rail .card a { display: grid; grid-template-columns: clamp(5.5rem, 9.3vw, 8.5rem) minmax(0, 1fr); gap: .85rem; align-items: center }
.topic-rail .card-copy { padding: 0 }
.topic-rail .excerpt, .topic-rail .label { display: none }

@media (width > 57rem) {
  .shell { width: min(100% - 3rem, 68rem) }
  .brand img { width: 12.5rem }
  .masthead-inner { padding-block: .7rem }
  .lead { padding-block: 1.75rem 2rem }
  .intro { gap: .7rem 1.5rem; margin-bottom: 1.4rem }
  .intro h1, .listing h1, .legal h1 {
    font-size: clamp(2.25rem, 3.6vw, 3.125rem);
    letter-spacing: -.04em;
  }
  .intro p, .dek { font-size: 1rem }
  .features, .cards { gap: .875rem }
  .card img { aspect-ratio: 16 / 9 }
  .card-copy { padding-top: .75rem }
  .card h2, .card h3 { font-size: clamp(1.0625rem, 1.55vw, 1.3125rem); line-height: 1.2 }
  .features > .card h2 { font-size: 1.375rem }
  .label { font-size: .8125rem; margin-bottom: .3rem }
  .excerpt { font-size: .9375rem; line-height: 1.5; margin-top: .45rem }
  .topic { padding-block: 1.5rem 1.75rem }
  .section-head { margin-bottom: .9rem }
  .section-head h2 { font-size: clamp(1.5rem, 2.25vw, 1.875rem); line-height: 1.16 }
  .section-head a { font-size: .9375rem }
  .listing { padding-block: 1.75rem 3rem }
  .listing .cards { row-gap: 1.5rem }
  .story { padding-block: 1.7rem }
  .story-head, .story-text { max-width: 43rem }
  .story-head h1 { font-size: clamp(2.125rem, 3.4vw, 2.875rem); letter-spacing: -.035em }
  .story-cover { max-width: 55rem; margin-block: 1.25rem 1.5rem }
  .prose { font-size: 1rem; line-height: 1.7 }
  .prose h2 { font-size: 1.5rem; margin-top: 1.75rem }
  .prose h3 { font-size: 1.2rem }
  .story .topic { margin-top: 2.25rem }
  .legal { max-width: 46rem; padding-block: 2.25rem 3rem }

  [data-edition="journal"] .features > .card img,
  [data-edition="daily"] .topics .cards > .card img { aspect-ratio: 2 / 1 }
  [data-edition="journal"] .features > .card h2 { font-size: clamp(1.625rem, 2.55vw, 2.125rem) }
  .feature-rail { gap: .7rem }
  .feature-rail .card a { grid-template-columns: 34% minmax(0, 1fr) }
  .feature-rail .card h2 { font-size: 1.0625rem }

  [data-edition="signal"] .features .card img { aspect-ratio: 4 / 3 }
  [data-edition="signal"] .features .card-copy { padding: .8rem }
  [data-edition="workbench"] .topics .topic { grid-template-columns: minmax(9rem, 11rem) minmax(0, 1fr) }
  [data-edition="workbench"] .card-copy { padding: .75rem .8rem .9rem }

  [data-edition="studio"] .features .card:first-child a { grid-template-columns: 55% minmax(0, 1fr) }
  [data-edition="studio"] .features .card:first-child img { aspect-ratio: 2.15 / 1 }
  [data-edition="studio"] .features .card:first-child h2 { font-size: clamp(1.625rem, 2.5vw, 2rem) }
  [data-edition="studio"] .card-copy { padding: 1rem }
  [data-edition="studio"] .features .card:first-child .card-copy { padding: 1.25rem }

  [data-edition="daily"] .features .card:nth-child(n + 3) h2 { font-size: 1.125rem }
  [data-edition="daily"] .topics .cards > .card h3 { font-size: 1.375rem }
  .topic-rail { gap: .65rem }
  .topic-rail .card a { grid-template-columns: clamp(4.5rem, 7vw, 5.75rem) minmax(0, 1fr); gap: .75rem }
  .topic-rail .card h3 { font-size: 1.0625rem }
}

@media (max-width: 57rem) {
  .masthead-inner, .intro { align-items: flex-start; flex-direction: column }
  .masthead .masthead-inner { align-items: center; flex-direction: row }
  .masthead .desktop-topics { display: none }
  .mobile-topics { display: block; position: relative; flex: none }
  .mobile-topics summary {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-height: 44px;
    padding: .45rem .75rem;
    border: 1px solid var(--rule);
    background: var(--panel);
    cursor: pointer;
    font-weight: 650;
    list-style: none;
  }
  .mobile-topics summary::-webkit-details-marker { display: none }
  .mobile-topics summary::after {
    content: "";
    inline-size: .42rem;
    block-size: .42rem;
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    rotate: 45deg;
  }
  .mobile-topics[open] summary::after { rotate: 225deg }
  .masthead .mobile-topics nav {
    position: absolute;
    z-index: 5;
    inset-inline-end: 0;
    display: grid;
    gap: .15rem;
    width: min(18rem, 80vw);
    margin-top: .4rem;
    padding: .4rem;
    border: 1px solid var(--rule);
    background: var(--panel);
    text-align: start;
  }
  .masthead .mobile-topics:not([open]) nav { display: none }
  .masthead .mobile-topics nav a { display: flex; align-items: center; min-height: 44px; padding-inline: .65rem }
  .topics .cards, [data-edition="workbench"] .topics .cards { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  [data-edition="workbench"] .topic { display: block }
  [data-edition="workbench"] .section-head { display: flex }
}
@media (max-width: 49rem) {
  [data-edition="journal"] .features,
  [data-edition="daily"] .topics .cards { grid-template-columns: minmax(0, 1fr) }
  .feature-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto }
  .topic-rail { grid-auto-rows: auto }
}
@media (max-width: 38rem) {
  .shell { width: calc(100% - 2rem) }
  .story .ad-slot { margin-inline: -1rem }
  .masthead .brand img { width: min(11rem, 47vw) }
  footer .brand img { width: 11rem }
  nav { gap: .35rem .75rem }
  .lead { padding-block: 1.75rem 2rem }
  .features, .feature-rail, .cards, .listing .cards,
  [data-edition] .features, [data-edition] .topics .cards { grid-template-columns: minmax(0, 1fr) }
  [data-edition="studio"] .features .card:first-child a { display: block }
  [data-edition="signal"] .features .card img { aspect-ratio: 8/5 }
  .story-cover img { aspect-ratio: 4/3 }
}

