/* Skin for the portal: layout B, the front page, picked on 2026-09-28.
   Type and colour values are the ones measured from Apple Newsroom's stylesheets on
   2026-09-27. The masthead and front page rules are copied from the approved mockup
   (b-front-page.html); the inner pages follow the same type. */

:root {
  --ink: #1d1d1f;
  --ink2: #6e6e73;
  --line: #d2d2d7;
  --fill: #f5f5f7;
  --link: #0066cc;
  --bg: #ffffff;
  --warn: #b3261e;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.47 var(--sans);
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.vh {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.muted { color: var(--ink2); }
.link { color: var(--link); }

/* ---- masthead and footer ---- */

.mast { text-align: center; padding: 22px 0 0; }
.mast .date { font-size: 14px; color: var(--ink2); letter-spacing: -0.016em; }
.brand { display: inline-block; font: 700 30px/1.15 var(--serif); letter-spacing: -0.005em; margin-top: 4px; }
.mast .tag { color: var(--ink2); margin-top: 4px; font-size: 15px; letter-spacing: -0.016em; }
.mast nav { margin-top: 14px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); padding: 11px 0; }
.mast nav a { font-size: 14px; color: var(--ink2); margin: 0 14px; letter-spacing: -0.016em; }
.mast nav a[aria-current] { color: var(--ink); font-weight: 600; }

.site-footer {
  border-top: 1px solid var(--line); margin-top: 72px; padding: 24px 0 48px;
  font-size: 14px; color: var(--ink2); letter-spacing: -0.016em;
}
.site-footer a { margin-right: 18px; }

.messages { margin-top: 20px; }
.messages li { background: var(--fill); border-radius: 10px; padding: 12px 16px; margin-bottom: 8px; }

/* ---- front page: the lead, the two under it, the rest, the rail ---- */

.page { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; padding-top: 36px; }
.kick { font-size: 14px; color: var(--ink2); letter-spacing: -0.016em; }
.kick b { color: var(--ink); font-weight: 600; }
.leadstory h2 { font: 700 40px/1.1 var(--serif); letter-spacing: -0.012em; margin-top: 8px; }
.leadstory .sum { font-size: 19px; line-height: 1.42; margin-top: 14px; letter-spacing: -0.02em; }
.leadstory .why { margin-top: 10px; }
.sum { margin-top: 10px; }
.why { margin-top: 8px; }
.why b { font-weight: 600; }
.src {
  font-size: 14px; color: var(--ink2); margin-top: 10px; letter-spacing: -0.016em;
  display: flex; justify-content: space-between; gap: 4px 16px; flex-wrap: wrap;
}
.src .topics a { margin-right: 12px; }
.src .go { white-space: nowrap; }
.perma { color: var(--ink2); margin-right: 14px; }
.out { color: var(--link); white-space: nowrap; }

.two {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px;
  margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--ink);
}
.two h2 { font: 700 21px/1.22 var(--serif); margin-top: 6px; }
.two .sum { font-size: 16px; line-height: 1.45; margin-top: 8px; letter-spacing: -0.018em; }
.two .why { font-size: 16px; line-height: 1.45; margin-top: 6px; letter-spacing: -0.018em; }

.rest { margin-top: 36px; border-top: 1px solid var(--ink); padding-top: 6px; }
.rest h2.sec { font-size: 14px; font-weight: 600; color: var(--ink2); letter-spacing: -0.016em; padding: 10px 0 2px; }
.rest ol { columns: 2; column-gap: 40px; }
.rest li { break-inside: avoid; padding: 16px 0; border-bottom: 1px solid var(--line); }
.rest h3 { font: 700 19px/1.24 var(--serif); margin-top: 4px; }
.rest .sum { font-size: 15px; line-height: 1.45; margin-top: 6px; letter-spacing: -0.016em; }
.rest .why { font-size: 15px; line-height: 1.45; margin-top: 4px; letter-spacing: -0.016em; }

.rail section { padding: 18px 0 22px; border-top: 1px solid var(--line); }
.rail section:first-child { border-top: 1px solid var(--ink); }
.rail h2 { font-size: 14px; font-weight: 600; color: var(--ink2); margin-bottom: 10px; letter-spacing: -0.016em; }
.rail li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 15px; }
.rail li span { color: var(--ink2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rail li a[aria-current] { font-weight: 600; }
.rail .search input { padding: 9px 12px; }
.rail .signup h2 { font-size: 15px; color: var(--ink); margin-bottom: 8px; }
.rail .signup .search-form { margin-top: 0; }
.rail .signup input { padding: 9px 12px; }
.rail .signup button { padding: 9px 16px; border: 0; }
.signup .fine { font-size: 14px; color: var(--ink2); margin-top: 8px; letter-spacing: -0.016em; }
.signup .fine a { color: var(--link); }

.yest { margin-top: 56px; border-top: 1px solid var(--ink); padding-top: 18px; }
.yest h2 { font: 700 28px/1.14 var(--serif); }
.yest .sub { color: var(--ink2); font-size: 14px; letter-spacing: -0.016em; margin-top: 4px; }
.yest ol { columns: 2; column-gap: 40px; margin-top: 10px; }
.yest li { break-inside: avoid; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.yest li a { font-family: var(--serif); font-weight: 700; }
.yest li span { color: var(--ink2); font-size: 14px; letter-spacing: -0.016em; white-space: nowrap; }
.more { display: inline-block; margin-top: 14px; color: var(--link); }

/* ---- page heads and story lists on topic and search pages ---- */

.page-head { padding: 40px 0 8px; }
.page-head h1 { font: 700 40px/1.1 var(--serif); letter-spacing: -0.012em; }
.page-head p { color: var(--ink2); margin-top: 8px; }
.meta { font-size: 14px; color: var(--ink2); margin-top: 6px; letter-spacing: -0.016em; }

.story { padding: 20px 0; border-bottom: 1px solid var(--line); }
.story h2 { font: 700 21px/1.22 var(--serif); margin-top: 6px; }
.story .sum { font-size: 16px; line-height: 1.45; margin-top: 8px; letter-spacing: -0.018em; }
.story .why { font-size: 16px; line-height: 1.45; margin-top: 6px; letter-spacing: -0.018em; }

.rows li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rows li span { color: var(--ink2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rows p { color: var(--ink2); font-size: 14px; }
.month { padding-top: 36px; }
.month h2 { font: 700 21px/1.22 var(--serif); margin-bottom: 8px; }

/* ---- one story ---- */

.story-page { padding-top: 40px; }
.story-page h1 { font: 700 40px/1.1 var(--serif); letter-spacing: -0.012em; margin-top: 8px; }
.story-page h1 + .meta { margin-top: 10px; }
.story-page .sum { font-size: 19px; line-height: 1.42; margin-top: 18px; letter-spacing: -0.02em; }
.story-page .why { font-size: 19px; line-height: 1.42; margin-top: 12px; letter-spacing: -0.02em; }
.story-page .read { display: inline-block; margin-top: 22px; font-weight: 600; color: var(--link); }
.story-page .topics { margin-top: 18px; font-size: 14px; }
.story-page .topics a { color: var(--ink2); margin-right: 14px; }
.draft-label {
  display: inline-block; font-size: 14px; font-weight: 600; color: var(--warn);
  border: 1px solid var(--warn); border-radius: 6px; padding: 1px 8px; margin-bottom: 12px;
}
.pager {
  display: flex; justify-content: space-between; gap: 24px; margin-top: 40px; padding-top: 16px;
  border-top: 1px solid var(--line); font-size: 15px;
}
.pager a { color: var(--link); }
.pager span:last-child { text-align: right; }
.related { padding-top: 48px; }
.related h2 { font-size: 14px; font-weight: 600; color: var(--ink2); letter-spacing: -0.016em; margin-bottom: 6px; }

/* ---- plain text pages ---- */

.prose { padding-top: 8px; }
.prose p { margin-top: 14px; }
.prose h2 { font: 700 21px/1.22 var(--serif); margin-top: 36px; }
.prose ul { margin-top: 10px; }
.prose li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.prose a { color: var(--link); }

/* ---- forms ---- */

input[type="text"], input[type="url"], input[type="search"], input[type="email"] {
  width: 100%; font: inherit; font-size: 16px; letter-spacing: -0.018em; color: var(--ink);
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
input:focus { outline: 2px solid var(--link); outline-offset: 1px; border-color: transparent; }
button {
  font: inherit; font-size: 15px; font-weight: 600; letter-spacing: -0.016em;
  padding: 10px 18px; border: 1px solid var(--ink); border-radius: 8px;
  background: var(--ink); color: #fff; cursor: pointer;
}
.search-form { display: flex; gap: 8px; margin-top: 20px; }
.search-form input { flex: 1; min-width: 0; }
.error { color: var(--warn); }

/* ---- an empty list says so ---- */

.empty { padding: 16px 0; color: var(--ink2); border-bottom: 1px solid var(--line); }

/* ---- narrow laptops and tablets: the rail moves under the stories ---- */

@media (max-width: 1068px) {
  .page { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .rail { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
  .rail section:nth-child(2) { border-top: 1px solid var(--ink); }
}

/* ---- phones ---- */

@media (max-width: 734px) {
  .wrap, .narrow { padding: 0 20px; }
  /* a phone shows the name, the date and one whole story on the first screen */
  .mast { padding-top: 10px; text-align: left; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 12px; }
  .mast .date { order: 2; font-size: 14px; }
  .brand { font-size: 24px; margin-top: 0; order: 1; }
  .mast .tag, .mast .rt { display: none; }
  .mast nav { order: 3; width: 100%; margin-top: 0; padding: 0; border-top: 0; }
  .mast nav a { margin: 0 18px 0 0; }
  .page { padding-top: 16px; }
  .leadstory h2 { font-size: 25px; line-height: 1.14; margin-top: 4px; }
  .leadstory .sum { font-size: 16px; line-height: 1.45; margin-top: 8px; }
  .leadstory .why { font-size: 16px; line-height: 1.45; margin-top: 6px; }
  .two { grid-template-columns: 1fr; gap: 0; padding-top: 0; margin-top: 20px; }
  .two article { padding: 18px 0 6px; border-bottom: 1px solid var(--line); }
  .rest ol, .yest ol { columns: 1; }
  .rest li { padding: 16px 0 6px; }
  .story { padding: 16px 0 6px; }
  .rail { grid-template-columns: 1fr; }
  .rail section:nth-child(2) { border-top: 1px solid var(--line); }
  .page-head { padding-top: 28px; }
  .page-head h1, .story-page h1 { font-size: 28px; line-height: 1.14; }
  .story-page { padding-top: 28px; }

  /* 44px is the smallest comfortable touch target */
  .brand { display: inline-block; padding: 11px 0; }
  .mast nav a, .src a, .more, .out, .perma, .site-footer a, .pager a,
  .story-page .kick a, .story-page .topics a, .story-page .read, .prose a, .empty a,
  .signup .fine a {
    display: inline-block; padding: 13px 0;
  }
  .src { margin-top: 0; align-items: center; }
  .rail li, .rows li { padding: 0; }
  .rail li a, .rows li a { display: block; padding: 11px 0; flex: 1; }
  .rail li span, .rows li span { align-self: center; }
  .yest li { padding: 0; }
  .yest li a { display: inline-block; padding: 10px 0; }
  button, input[type="text"], input[type="url"], input[type="search"] { min-height: 44px; }
}

/* ---- explainers: the front page block, the article and the lists on its page ----
   DESIGN.md, "Explainers". Same variables, sizes and radii as the rules above. An explainer page is
   a .story-page, so its kicker, headline and summary come from the story page rules. */

.xp-front { background: var(--fill); border-radius: 10px; padding: 18px 22px 20px; margin-bottom: 32px; }
.xp-front h2 { font: 700 28px/1.14 var(--serif); letter-spacing: -0.012em; margin-top: 6px; }
.xp-front .sum { font-size: 17px; line-height: 1.45; margin-top: 8px; letter-spacing: -0.02em; }
.xp-front .meta { margin-top: 8px; }

.xp-short { background: var(--fill); border-radius: 10px; padding: 18px 22px 20px; margin-top: 28px; }
.xp-short h2 { font-size: 15px; font-weight: 600; letter-spacing: -0.016em; }
.xp-short ul { list-style: disc; padding-left: 1.2em; margin-top: 6px; }
.xp-short li { margin-top: 8px; }
.xp-short li::marker, .xp-list li::marker, .fig-points li::marker { color: var(--ink2); }

.xp-section { margin-top: 44px; }
.xp-section > h2 { font: 700 28px/1.14 var(--serif); letter-spacing: -0.012em; }
.xp-section > p, .xp-section > .xp-list { margin-top: 16px; line-height: 1.55; }
.xp-section > h2 + p, .xp-section > h2 + .xp-list { margin-top: 14px; }
.xp-list { padding-left: 1.4em; }
ul.xp-list { list-style: disc; }
ol.xp-list { list-style: decimal; }
.xp-list li { margin-top: 8px; padding-left: 2px; }
.xp-list li:first-child { margin-top: 0; }
.xp-section > .xp-note {
  background: var(--fill); border-radius: 10px; padding: 14px 18px; margin-top: 20px;
  font-size: 16px; line-height: 1.5; letter-spacing: -0.018em;
}

.xp-gloss dl, .xp-work dl { margin: 12px 0 0; }
.xp-gloss dl > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.xp-gloss dt { font-weight: 600; }
.xp-gloss dd { margin: 2px 0 0; }

.xp-work .xp-source { font: 700 21px/1.25 var(--serif); margin-top: 12px; }
.xp-work a, .xp-end a { color: var(--link); }
.xp-work dl > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.xp-work dt { font-size: 14px; color: var(--ink2); letter-spacing: -0.016em; }
.xp-work dd { margin: 0; overflow-wrap: anywhere; }
.xp-work h3 { font-size: 14px; font-weight: 600; color: var(--ink2); letter-spacing: -0.016em; margin-top: 28px; }
.xp-related { margin-top: 6px; }
.xp-related li { padding: 10px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.xp-related a { display: block; }
.xp-related span { display: block; margin-top: 2px; font-size: 15px; color: var(--ink2); letter-spacing: -0.016em; }
.xp-end { margin-top: 28px; font-size: 15px; line-height: 1.5; color: var(--ink2); letter-spacing: -0.016em; }

/* ---- explainers: figures ----
   HTML and CSS drawings written by explainers/figures.py. Text is never under 14px, every box lets
   its text wrap, and the wide layouts start at 600px, so a phone gets one column. */

.fig { margin: 30px 0 0; padding: 14px 0 16px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.fig-title { font: 600 15px/1.3 var(--sans); letter-spacing: -0.016em; }
.fig-body { margin-top: 14px; }
.fig figcaption { margin-top: 14px; font-size: 14px; line-height: 1.4; color: var(--ink2); letter-spacing: -0.016em; }
.fig-label { display: block; font: 600 15px/1.3 var(--sans); letter-spacing: -0.016em; }
.fig-detail { display: block; margin-top: 3px; font-size: 14px; line-height: 1.4; color: var(--ink2); letter-spacing: -0.016em; }

/* flow: boxes, with an arrow from each row to the next; two or three boxes in a row run side by side */
.fig-nodes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.fig-node { background: var(--fill); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 11px; }
.fig-arrow { display: block; position: relative; height: 28px; }
.fig-arrow::before { content: ""; position: absolute; left: 50%; top: 2px; bottom: 9px; width: 2px; margin-left: -1px; background: var(--ink2); }
.fig-arrow::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; margin-left: -6px;
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 8px solid var(--ink2);
}

/* steps: numbered, one under the other, joined by a line */
.fig-step { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 0 14px; position: relative; padding-bottom: 18px; }
.fig-step:last-child { padding-bottom: 0; }
.fig-step:not(:last-child)::before { content: ""; position: absolute; left: 14px; top: 34px; bottom: 4px; width: 2px; background: var(--line); }
.fig-num { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--bg); font: 600 14px/30px var(--sans); text-align: center; }
.fig-text { padding-top: 5px; }

/* compare: columns of points, stacked on a phone */
.fig-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.fig-col { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 14px; }
.fig-col-head { font: 600 15px/1.3 var(--sans); letter-spacing: -0.016em; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.fig-points { list-style: disc; padding-left: 1.1em; margin-top: 10px; }
.fig-points li { margin-top: 6px; font-size: 14px; line-height: 1.4; letter-spacing: -0.016em; }
.fig-points li:first-child { margin-top: 0; }

/* bars: the length is the value against the largest value, the printed value is the display text */
.fig-bar + .fig-bar { margin-top: 14px; }
.fig-bar-head { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 16px; font-size: 15px; line-height: 1.3; letter-spacing: -0.016em; }
.fig-bar-value { flex: none; max-width: 50%; text-align: right; color: var(--ink2); font-variant-numeric: tabular-nums; }
.fig-track { height: 10px; margin-top: 6px; background: var(--fill); border-radius: 5px; overflow: hidden; }
.fig-fill { display: block; height: 100%; background: var(--ink2); border-radius: 5px; }
.fig-bar.is-top .fig-bar-label { font-weight: 600; }
.fig-bar.is-top .fig-bar-value { font-weight: 700; color: var(--ink); }
.fig-bar.is-top .fig-fill { background: var(--link); }
.fig-unit { margin-top: 14px; font-size: 14px; line-height: 1.4; color: var(--ink2); letter-spacing: -0.016em; }

/* tiles: a big number with its label under it */
.fig-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fig-tiles .fig-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
.fig-tile { background: var(--fill); border: 1px solid var(--line); border-radius: 10px; padding: 14px 14px 15px; }
.fig-value { display: block; font: 700 30px/1.1 var(--serif); letter-spacing: -0.012em; }
.fig-tile-label { display: block; margin-top: 6px; font-size: 14px; line-height: 1.35; color: var(--ink2); letter-spacing: -0.016em; }

@media (min-width: 600px) {
  .fig-nodes.fig-n2, .fig-cols.fig-n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .fig-nodes.fig-n3, .fig-cols.fig-n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .fig-tiles.fig-n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fig-tiles.fig-n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fig-tiles .fig-tile:last-child:nth-child(odd) { grid-column: auto; }
  .xp-work dl > div { grid-template-columns: 9em minmax(0, 1fr); }
}

@media (max-width: 734px) {
  .xp-front { padding: 16px 18px 18px; margin-bottom: 20px; }
  .xp-front h2 { font-size: 22px; line-height: 1.18; }
  .xp-front .sum { font-size: 16px; }
  .xp-short { padding: 16px 18px 18px; }
  .xp-section { margin-top: 36px; }
  .xp-section > h2 { font-size: 24px; line-height: 1.16; }
  .xp-work .xp-source { font-size: 19px; }
  .xp-work dd a, .xp-end a, .xp-source a { display: inline-block; padding: 12px 0; }
  .xp-related li { padding: 0; }
  .xp-related a { padding: 12px 0 8px; }
  .xp-related span { margin-top: 0; padding-bottom: 12px; }
  .fig-value { font-size: 26px; }
}

/* six menu links do not fit on one line on a narrow phone with the gaps above, so they share the line */
@media (max-width: 420px) {
  .mast nav { display: flex; flex-wrap: wrap; justify-content: space-between; }
  .mast nav a { margin: 0; }
}
