/* Maestro Brief — clean editorial news styling
   Design intent: sterile white canvas, hairline rules, one midnight header bar,
   generous reading sizes, and exactly one piece of fun imagery (the origami
   cover). Everything else earns its place or leaves. */

:root {
  --bg: #ffffff;
  --tint: #f6f7f9;
  --tint-2: #eef1f6;
  --ink: #14161a;
  --ink-2: #3d4451;
  --muted: #697180;
  --line: #e4e7ec;
  --line-2: #cfd5de;
  --night: #0b1220;
  --night-2: #111a29;
  --blue: #4f78ff;
  --blue-link: #2f52d9;
  --blue-soft: #eef2ff;
  --mint: #3cc98f;
  --serif: Georgia, Cambria, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --shell: min(1180px, calc(100% - 48px));
  /* Optimized hero (307 KB JPEG). The 2.6 MB PNG stays the OG/social image. */
  --hero-art: url("https://maestromojo.s3.us-west-2.amazonaws.com/fileman/dd2b61c52a194955a85e8919127dabda/site_media/hero-origami_e280f1ca.jpg");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }
h1, h2, h3 { font-weight: 700; letter-spacing: -.02em; }

.shell { width: var(--shell); margin-inline: auto; }
.skip-link { position: fixed; z-index: 100; left: 1rem; top: 1rem; transform: translateY(-200%); padding: .7rem 1rem; background: #fff; color: var(--night); }
.skip-link:focus { transform: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Small uppercase label. Used sparingly — never more than one per screen area. */
.eyebrow {
  margin: 0 0 .6rem;
  color: var(--muted);
  font: 600 .7rem/1 var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- header
   One bar. Brand, topics, search, subscribe. No second deck. */

.masthead {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--night);
  color: #fff;
}
.masthead__inner {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  min-height: 62px;
}
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  flex: 0 0 auto;
  color: inherit;
  text-decoration: none;
}
.brand-lockup > span { display: grid; }
.brand-lockup strong { font-size: 1.02rem; line-height: 1.15; letter-spacing: -.02em; }
.brand-lockup small { color: #98a2b3; font-size: .66rem; line-height: 1.2; }
.brand-mark { width: 32px; height: 32px; }

.topic-nav { display: flex; align-items: center; gap: .1rem; flex: 1 1 auto; min-width: 0; }
.topic-nav a {
  position: relative;
  flex: 0 0 auto;
  padding: .55rem .72rem;
  color: #b4bdcb;
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.topic-nav a:hover { color: #fff; }
.topic-nav a.is-current { color: #fff; }
.topic-nav a.is-current::after {
  content: "";
  position: absolute;
  left: .72rem;
  right: .72rem;
  bottom: -.15rem;
  height: 2px;
  background: var(--blue);
}
.header-search { position: relative; flex: 0 1 168px; margin-left: auto; }
.header-search input {
  width: 100%;
  padding: .42rem 1.9rem .42rem .6rem;
  color: #fff;
  background: #060b14;
  border: 1px solid #2b3546;
  border-radius: 3px;
  font-size: .75rem;
  outline: none;
}
.header-search input::placeholder { color: #7c8798; }
.header-search input:focus { border-color: #6d8cff; }
.header-search > span:last-child {
  position: absolute;
  right: .55rem;
  top: 50%;
  transform: translateY(-52%);
  color: #7c8798;
  font-size: .95rem;
  pointer-events: none;
}
.topic-cta {
  flex: 0 0 auto;
  margin-left: .5rem;
  padding: .42rem .8rem !important;
  color: #fff !important;
  background: var(--blue);
  border-radius: 3px;
  font-size: .76rem !important;
}
.topic-cta:hover { background: #3d68ff; }
.nav-toggle {
  display: none;
  margin-left: auto;
  padding: .4rem .65rem;
  color: #fff;
  background: transparent;
  border: 1px solid #2f3a4c;
  border-radius: 3px;
  font-size: .76rem;
  font-weight: 600;
}

/* Content pages use the same bar with a shorter link set. */
.site-nav { display: flex; align-items: center; gap: .2rem; flex: 1 1 auto; }
.site-nav a { padding: .55rem .7rem; color: #b4bdcb; font-size: .8rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.site-nav a:hover { color: #fff; }

/* ------------------------------------------------------------------ hero
   Full-bleed evergreen cover: dark veil, live headline in site type. */

.hero { position: relative; width: 100%; background-color: var(--night); }

.hero-veiled .hero {
  display: grid;
  align-items: end;
  min-height: clamp(480px, 70vh, 660px);
  padding-block: clamp(2.5rem, 6vw, 4rem);
  color: #fff;
  /* The artwork carries its own printed title across the left half of the
     frame, and a wide crop cannot exclude it. So the left field is fully
     opaque: it extinguishes the printed lettering and becomes the clean
     surface the live headline sits on. The figure begins at 47% and stays lit. */
  background-image:
    linear-gradient(94deg, rgb(8,13,21) 0%, rgb(8,13,21) 44%, rgba(8,13,21,.72) 57%, rgba(8,13,21,.34) 78%, rgba(8,13,21,.26) 100%),
    linear-gradient(to top, rgba(8,13,21,.75) 0%, rgba(8,13,21,.08) 46%, rgba(8,13,21,0) 72%),
    var(--hero-art);
  background-repeat: no-repeat;
  background-size: cover, cover, cover;
  background-position: center, center, 52% 20%;
}
/* .hero__inner keeps the full shell width so the headline starts on the same
   left edge as the story column below. The measure is set on the text itself. */
.hero-veiled .hero__kicker { color: #96abff; }
.hero-veiled .hero h1 {
  margin: 0;
  max-width: 20ch;
  font-size: clamp(2.05rem, 3.7vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.hero-veiled .hero__dek {
  max-width: 46ch;
  margin: 1.1rem 0 0;
  color: #ccd4e0;
  font-size: 1.02rem;
}

/* ----------------------------------------------------------------- layout */

.brief-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 3.4rem;
  align-items: start;
  padding-block: clamp(2.2rem, 4vw, 3.2rem) 4.5rem;
}
/* One measure for the whole column — headline and dek share an edge. */
.brief-feed { min-width: 0; max-width: 740px; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem 1.2rem;
  align-items: baseline;
  padding-bottom: .9rem;
  border-bottom: 2px solid var(--ink);
}
.section-head h2 { margin: 0; font-size: 1.32rem; letter-spacing: -.02em; }
.section-head p { margin: 0; color: var(--muted); font-size: .88rem; }

/* Grid / list switch. Grid is the default, the choice is remembered. */
.view-toggle {
  display: inline-flex;
  align-self: center;
  margin-left: auto;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  overflow: hidden;
}
.view-toggle button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 27px;
  padding: 0;
  color: var(--muted);
  background: #fff;
  border: 0;
  cursor: pointer;
}
.view-toggle button + button { border-left: 1px solid var(--line-2); }
.view-toggle button:hover { color: var(--ink); }
.view-toggle button[aria-pressed="true"] { color: var(--blue-link); background: var(--blue-soft); }
.view-toggle svg { width: 14px; height: 14px; fill: currentColor; }

/* ------------------------------------------------------------- story rows
   Text first. No synthetic thumbnails, no numbering, no verdict chips. */

.story-row {
  padding: 1.55rem 0;
  border-bottom: 1px solid var(--line);
}
.story-row[hidden] { display: none; }
.story-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem .6rem;
  margin: 0;
  color: var(--muted);
  font: 500 .8rem/1.4 var(--sans);
}
.story-meta > * + *::before { content: "·"; margin-right: .6rem; color: var(--line-2); }
.story-meta .source { color: var(--ink-2); font-weight: 600; }
.story-meta .topic { color: var(--blue-link); text-transform: uppercase; letter-spacing: .06em; font-size: .69rem; font-weight: 650; }
.story-row h3 {
  margin: .5rem 0 .45rem;
  font-size: clamp(1.22rem, 1.9vw, 1.5rem);
  line-height: 1.25;
  letter-spacing: -.02em;
}
.story-row h3 a { text-decoration: none; }
.story-row h3 a:hover { color: var(--blue-link); }
.story-row > p:not(.story-meta) {
  margin: 0;
  color: var(--ink-2);
  font-size: .98rem;
  line-height: 1.6;
}
/* --- grid view --- */
.story-list.is-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
  margin-top: 1.4rem;
}
.is-grid .story-row {
  display: flex;
  flex-direction: column;
  padding: 1.15rem 1.2rem 1.3rem;
  border: 1px solid var(--line);
}
.is-grid .story-row:hover { border-color: var(--line-2); }
.is-grid .story-row h3 { margin: .5rem 0 .45rem; font-size: 1.1rem; }
.is-grid .story-row > p:not(.story-meta) {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: .89rem;
}

.no-results { padding: 2.5rem 0; color: var(--muted); }
.archive-more {
  display: inline-block;
  margin-top: 1.8rem;
  color: var(--blue-link);
  font-size: .88rem;
  font-weight: 650;
  text-decoration: none;
}
.archive-more:hover { text-decoration: underline; text-underline-offset: .25em; }

/* -------------------------------------------------------------------- rail */

.brief-rail {
  position: sticky;
  top: 86px;
  display: grid;
  align-content: start;
  gap: 1.6rem;
}
.rail-card { padding: 0; }
.rail-card h2 { margin: 0 0 .9rem; font-size: 1.08rem; line-height: 1.3; }
.rail-card .eyebrow { padding-bottom: .55rem; border-bottom: 1px solid var(--line); }

.maestro-card ul { display: grid; gap: .95rem; margin: 0; padding: 0; list-style: none; }
.maestro-card li { display: grid; gap: .15rem; padding-left: .95rem; position: relative; }
.maestro-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .48rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
}
.maestro-card li strong { font-size: .86rem; font-weight: 650; }
.maestro-card li span { color: var(--muted); font-size: .82rem; line-height: 1.5; }

.subscribe-card { padding: 1.3rem; background: var(--tint); }
.subscribe-card h2 { margin-bottom: .4rem; }
.subscribe-card > p { margin: 0; color: var(--muted); font-size: .84rem; }
.subscribe-form { margin-top: .95rem; }
.input-row { display: grid; grid-template-columns: 1fr 42px; }
.input-row input {
  min-width: 0;
  padding: .62rem .65rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-2);
  border-right: 0;
  border-radius: 3px 0 0 3px;
  font-size: .88rem;
}
.input-row button {
  border: 0;
  border-radius: 0 3px 3px 0;
  color: #fff;
  background: var(--blue);
  font-size: 1.2rem;
  cursor: pointer;
}
.input-row button:hover { background: #3d68ff; }
.form-status { min-height: 1.1em; margin: .5rem 0 0; color: var(--blue-link); font-size: .76rem; }
.fineprint { margin: .5rem 0 0; color: var(--muted); font-size: .7rem; line-height: 1.45; }
.hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; }

.rail-links { display: grid; border-top: 1px solid var(--line); }
.rail-links a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 0;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
  font-size: .84rem;
  font-weight: 600;
  text-decoration: none;
}
.rail-links a:hover { color: var(--blue-link); }
.rail-links a span { color: var(--line-2); }

/* ------------------------------------------------------------------ footer */

.site-footer { color: #aeb8c6; background: var(--night); }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto 1.15fr;
  gap: 2.6rem;
  align-items: start;
  padding-block: 2.6rem;
}
.brand-lockup--footer { color: #fff; }
.footer-grid nav { display: flex; flex-wrap: wrap; gap: .7rem 1.1rem; }
.footer-grid nav a { color: #aeb8c6; font-size: .8rem; text-decoration: none; }
.footer-grid nav a:hover { color: #fff; }
.footer-notes { display: grid; gap: .6rem; }
.disclosure, .site-credit { margin: 0; font-size: .78rem; line-height: 1.55; }
.disclosure { color: #7f8a9b; }
.site-credit { color: #aeb8c6; }
.site-credit a { color: #fff; font-weight: 600; text-decoration-color: var(--blue); text-underline-offset: .2em; }

/* --------------------------------------------- article, archive, about, 404 */

.article-shell {
  width: min(720px, calc(100% - 40px));
  min-height: 60vh;
  margin-inline: auto;
  padding-block: clamp(2.6rem, 6vw, 4.5rem);
}
.article-shell > h1, .article-shell main > h1, .article-shell .page-title {
  margin: 0 0 1rem;
  font: 700 clamp(2rem, 4.2vw, 3rem)/1.1 var(--sans);
  letter-spacing: -.03em;
  text-wrap: balance;
}
.article-shell > h2, .article-shell main > h2 {
  margin: 2.6rem 0 .7rem;
  font: 700 clamp(1.3rem, 2.4vw, 1.62rem)/1.25 var(--sans);
  letter-spacing: -.02em;
}
.article-shell > h3, .article-shell main > h3 { margin: 2rem 0 .55rem; font-size: 1.14rem; }
.article-shell p, .article-shell li { font-family: var(--serif); font-size: 1.12rem; line-height: 1.75; }
.article-shell .standfirst { color: var(--ink-2); font-size: 1.2rem; line-height: 1.6; }
.article-shell blockquote {
  margin: 2rem 0;
  padding: .2rem 0 .2rem 1.15rem;
  color: var(--ink);
  border-left: 3px solid var(--blue);
}
.article-shell blockquote p { margin: 0; }
.article-shell hr { margin: 2.4rem 0; border: 0; border-top: 1px solid var(--line); }
.article-shell code { padding: .12em .32em; font: .86em var(--mono); background: var(--tint-2); border-radius: 2px; }
.article-shell pre { overflow: auto; padding: 1rem; color: #dfe7f2; background: var(--night); border-radius: 3px; }
.article-shell pre code { background: none; padding: 0; }
.article-shell a { text-decoration-color: var(--blue); text-underline-offset: .2em; }
.article-shell img, .article-shell video { width: 100%; height: auto; margin: 2rem 0; }
.article-shell iframe { width: 100%; aspect-ratio: 16/9; height: auto; margin: 2rem 0; border: 0; }
.article-shell .page-tools, .article-shell .eyebrow { font-family: var(--sans); }

.archive-nav, .mounts-nav, .crumbs, .pagenav { color: var(--muted); font-family: var(--sans); font-size: .8rem; }
.archive-nav a, .mounts-nav a, .crumbs a, .pagenav a { margin-right: 1rem; font-weight: 600; }
.docit-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.6rem; }
.docit-tags a {
  padding: .26rem .46rem;
  color: var(--blue-link);
  background: var(--blue-soft);
  border-radius: 2px;
  font: 600 .68rem/1 var(--sans);
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
}
.docit-list { list-style: none; margin: 2rem 0 0; padding: 0; border-top: 2px solid var(--ink); }
.docit-list li {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: .3rem 1.4rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}
.docit-list .docit-date { grid-column: 1; grid-row: 1/4; padding-top: .35rem; color: var(--muted); font: 500 .8rem/1.4 var(--sans); }
.docit-list li > a {
  grid-column: 2;
  font: 700 clamp(1.18rem, 2vw, 1.45rem)/1.25 var(--sans);
  letter-spacing: -.02em;
  text-decoration: none;
}
.docit-list li > a:hover { color: var(--blue-link); }
.docit-list .docit-tags, .docit-list .docit-excerpt { grid-column: 2; }
.docit-list .docit-tags { margin: .1rem 0 0; }
.docit-list .docit-excerpt { margin: .3rem 0 0; color: var(--ink-2); font: 1rem/1.6 var(--sans); }
.docit-pagetools { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 2.2rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.docit-pagetools a, .docit-pagetools button {
  padding: .38rem .55rem;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
  font: 600 .74rem/1 var(--sans);
  text-decoration: none;
}
.docit-pagetools a:hover, .docit-pagetools button:hover { border-color: var(--line-2); }

.support-grid {
  width: min(1000px, calc(100% - 40px));
  margin-inline: auto;
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(2.6rem, 6vw, 4.5rem);
}
.support-copy h1 { margin: 0 0 1rem; font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1.08; letter-spacing: -.03em; }
.support-copy p { color: var(--ink-2); font-size: 1rem; }
.support-form { padding: clamp(1.2rem, 2.5vw, 1.75rem); background: var(--tint); }
.field { margin-bottom: 1rem; }
.field label { display: block; margin-bottom: .3rem; color: var(--ink-2); font-size: .74rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.field label span { color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: 0; }
.field input, .field textarea {
  width: 100%;
  padding: .68rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 3px;
}
.field textarea { min-height: 148px; resize: vertical; }
.support-form button {
  padding: .68rem 1.1rem;
  color: #fff;
  background: var(--blue);
  border: 0;
  border-radius: 3px;
  font-weight: 650;
  cursor: pointer;
}
.support-form button:hover { background: #3d68ff; }

/* -------------------------------------------------------------- responsive */

@media (max-width: 1120px) {
  .brief-layout { grid-template-columns: minmax(0, 1fr) 270px; gap: 2.4rem; }
  .header-search { flex-basis: 132px; }
  .topic-nav a { padding: .55rem .55rem; }
}
@media (max-width: 960px) {
  :root { --shell: min(1180px, calc(100% - 32px)); }
  .has-js .nav-toggle { display: block; }
  .has-js .topic-nav, .has-js .site-nav { display: none; }
  .has-js .topic-nav.is-open, .has-js .site-nav.is-open {
    display: grid;
    flex-basis: 100%;
    order: 3;
    gap: 0;
    padding-bottom: .7rem;
    border-top: 1px solid rgba(255,255,255,.1);
  }
  .masthead__inner { flex-wrap: wrap; padding-block: .7rem; }
  .topic-nav.is-open a, .site-nav.is-open a { padding: .7rem .1rem; border-bottom: 1px solid rgba(255,255,255,.07); }
  .topic-nav.is-open a.is-current::after { display: none; }
  .header-search { flex-basis: auto; margin: .6rem 0 .3rem; }
  .topic-cta { margin: .5rem 0 0; text-align: center; }
  .brief-layout { grid-template-columns: 1fr; gap: 2.8rem; }
  .brief-rail { position: static; grid-template-columns: 1fr 1fr; gap: 1.8rem 2.4rem; }
  .rail-links { grid-column: 1 / -1; }
  .support-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.8rem; }
  .footer-notes { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  :root { --shell: min(1180px, calc(100% - 28px)); }
  .brand-lockup strong { font-size: .95rem; }
  .brand-lockup small { font-size: .62rem; }
  .brand-mark { width: 28px; height: 28px; }
  /* Narrow screens cannot fit a veiled left field, so the crop itself is
     pushed past the printed lettering: zoom to 120% and pin to the right
     edge, which starts the frame at ~54% — clear of the title, still on
     the conductor. */
  .hero-veiled .hero {
    min-height: 400px;
    background-image:
      linear-gradient(to top, rgba(8,13,21,.94) 0%, rgba(8,13,21,.76) 48%, rgba(8,13,21,.5) 100%),
      var(--hero-art);
    background-size: cover, auto 120%;
    background-position: center, 100% 24%;
  }
  .section-head p { flex-basis: 100%; order: 3; }
  .story-list.is-grid { grid-template-columns: 1fr; gap: 1rem; }
  .is-grid .story-row > p:not(.story-meta) { -webkit-line-clamp: 2; }
  .hero-veiled .hero h1 { font-size: clamp(1.8rem, 8vw, 2.3rem); }
  .hero-veiled .hero__dek { font-size: .95rem; }
  .section-head { gap: .2rem; }
  .story-row { padding: 1.25rem 0; }
  .story-row h3 { font-size: 1.14rem; }
  .story-row > p:not(.story-meta) { font-size: .93rem; }
  .brief-rail { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .article-shell p, .article-shell li { font-size: 1.06rem; }
  .docit-list li { grid-template-columns: 1fr; }
  .docit-list .docit-date, .docit-list li > a, .docit-list .docit-tags, .docit-list .docit-excerpt { grid-column: 1; grid-row: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
