/* Morning News Brief website. Colours and type follow products/MorningNewsBrief/docs/brand.md.
   No scripts, no external resources. Heritage Red is used for rules and marks only, never for text. */

/* Static at weight 600 (SemiBold), the only weight this site's headings use,
   and subset to the characters the built pages use - checked once, by hand,
   against every character the built dist/ actually contains (README has the
   exact commands and the coverage check; re-run both if the text changes
   enough to need a character this subset does not have). 1.2 MB -> 80 KB. */
@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/SourceSerif4-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --background: #0a0f1a;
  --surface: #141b2b;
  --rule: #2a3446;
  --text-primary: #f5f7fa;
  --text-secondary: #9aa7bd;
  --accent: #c0432f;
  --decision: #e0b341;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 42rem;
  --wide: 68rem;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
  width: 100%;
}

.shell {
  width: min(100% - 2.5rem, var(--wide));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--surface);
  color: var(--text-primary);
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--rule);
  z-index: 10;
}

.skip-link:focus {
  top: 1rem;
}

a {
  color: var(--text-primary);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 3px;
}

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

/* Masthead */

.masthead {
  border-bottom: 1px solid var(--rule);
  padding-block: 1.25rem;
}

.masthead-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.brand img {
  display: block;
  width: min(15rem, 62vw);
  height: auto;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.nav-list a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  padding-block: 0.25rem;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  color: var(--text-primary);
}

.nav-list a[aria-current="page"] {
  border-bottom: 2px solid var(--accent);
}

/* Type */

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0;
  margin: 0;
}

h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
}

h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

.lede {
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  color: var(--text-secondary);
  max-width: var(--measure);
}

.eyebrow,
.meta {
  color: var(--text-secondary);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}

.meta {
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 1.5rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  color: var(--text-primary);
  background: var(--surface);
  padding: 0.05em 0.3em;
}

/* Layout blocks */

.hero {
  padding-block: clamp(3rem, 9vw, 6rem) clamp(2rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--rule);
  position: relative;
}

.hero::before {
  content: "";
  display: block;
  width: 3.5rem;
  height: 3px;
  background: var(--accent);
  margin-bottom: 1.75rem;
}

.hero h1 {
  max-width: 16ch;
}

.hero .lede {
  margin-top: 1.25rem;
}

.actions {
  margin-top: 2rem;
}

.button {
  display: inline-block;
  border: 1px solid var(--text-primary);
  padding: 0.7rem 1.25rem;
  text-decoration: none;
  color: var(--text-primary);
  background: transparent;
}

.button:hover {
  background: var(--surface);
}

.block {
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--rule);
  max-width: var(--measure);
}

.sections {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0.5rem 1.5rem;
}

.sections li {
  padding: 0.5rem 0 0.5rem 0.9rem;
  border-left: 2px solid var(--rule);
  color: var(--text-primary);
}

.notice {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  max-width: var(--measure);
  color: var(--text-secondary);
}

.notice p {
  margin: 0;
}

.prose {
  max-width: var(--measure);
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.prose > h1 {
  margin-bottom: 0.5rem;
}

.prose > .lede {
  margin-top: 1rem;
}

.prose section {
  padding-top: 0.25rem;
}

.steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1.5rem 3rem;
  border-left: 1px solid var(--rule);
  margin-left: 0.6rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: -0.85rem;
  top: 0;
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  background: var(--background);
  border: 1px solid var(--accent);
  color: var(--text-primary);
  font-family: var(--serif);
  font-size: 0.95rem;
}

.steps li:last-child {
  border-left-color: transparent;
}

/* Decision markers: visible on purpose, so an unfinished page cannot pass for a finished one. */
.decision {
  background: transparent;
  color: var(--decision);
  border: 1px dashed var(--decision);
  padding: 0.05em 0.35em;
  font-style: normal;
}

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 2rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0 0 0.4rem;
}

.footer-links span[aria-hidden="true"] {
  margin-inline: 0.4rem;
}

@media (max-width: 40rem) {
  body {
    font-size: 1rem;
  }

  .masthead-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
