/* 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; }
}
