/* Working skin for the portal.
   Type and colour values are the ones measured from Apple Newsroom's stylesheets on
   2026-09-27, the same values the layout mockups use. The public pages follow the plain
   ranked list. The layout that gets picked replaces the public part of this file. */

: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;
  --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;
}

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: 720px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink2); }
.small { font-size: 14px; letter-spacing: -0.016em; }
.link { color: var(--link); }

/* ---- header and footer ---- */

.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px 24px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 14px;
}
.site-name { font-size: 21px; font-weight: 700; letter-spacing: 0.011em; }
.site-nav a { font-size: 14px; color: var(--ink2); margin-left: 22px; letter-spacing: -0.016em; }
.site-nav a:first-child { margin-left: 0; }
.site-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; }

/* ---- page heads ---- */

.page-head { padding: 44px 0 8px; }
.page-head h1 { font-size: 32px; line-height: 1.125; font-weight: 700; letter-spacing: 0.004em; }
.page-head p { color: var(--ink2); margin-top: 6px; }

/* ---- story rows ---- */

.story { display: grid; grid-template-columns: 44px minmax(0, 1fr); padding: 26px 0; border-bottom: 1px solid var(--line); }
.story.plain { grid-template-columns: minmax(0, 1fr); }
.story .n { font-size: 17px; color: var(--ink2); font-variant-numeric: tabular-nums; padding-top: 3px; }
.story h2 { font-size: 21px; line-height: 1.24; font-weight: 600; letter-spacing: 0.011em; }
.story.lead h2 { font-size: 28px; line-height: 1.14; font-weight: 700; letter-spacing: 0.007em; }
.story.lead .n { padding-top: 7px; }
.meta { font-size: 14px; color: var(--ink2); margin-top: 6px; letter-spacing: -0.016em; }
.sum { margin-top: 10px; }
.why { margin-top: 8px; }
.why b { font-weight: 600; }
.foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 12px; font-size: 14px; letter-spacing: -0.016em;
}
.topics a { color: var(--ink2); margin-right: 14px; }
.out { color: var(--link); white-space: nowrap; }
.permalink { color: var(--ink2); margin-right: 14px; }

/* ---- earlier days, lists with counts ---- */

.earlier { padding-top: 56px; }
.earlier h2, .section-title { font-size: 24px; line-height: 1.17; font-weight: 700; letter-spacing: 0.009em; }
.compact { margin-top: 12px; border-top: 1px solid var(--line); }
.compact li { display: grid; grid-template-columns: 44px minmax(0, 1fr); padding: 11px 0; border-bottom: 1px solid var(--line); }
.compact .n { color: var(--ink2); font-variant-numeric: tabular-nums; }
.compact .t { font-weight: 600; }
.more { display: inline-block; margin-top: 14px; color: var(--link); }

.browse { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding-top: 64px; }
.browse h2 { font-size: 17px; font-weight: 600; margin-bottom: 10px; }
.browse h2.next { margin-top: 28px; }
.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-size: 21px; font-weight: 600; margin-bottom: 8px; }

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

.story-page { padding-top: 44px; }
.story-page h1 { font-size: 32px; line-height: 1.125; font-weight: 700; letter-spacing: 0.004em; }
.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; }
.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: 17px; font-weight: 600; margin-bottom: 6px; }

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

.prose { padding-top: 8px; }
.prose p { margin-top: 14px; }
.prose h2 { font-size: 21px; font-weight: 600; 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="date"],
input[type="password"], input[type="email"], textarea {
  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;
}
textarea { line-height: 1.5; resize: vertical; }
input:focus, textarea: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;
}
button.quiet { background: #fff; color: var(--ink); border-color: var(--line); font-weight: 400; }
button.text {
  background: none; border: 0; padding: 0; color: var(--link); font-weight: 400; font-size: 14px;
}
.inline { display: inline; }
.search-form { display: flex; gap: 8px; margin-top: 20px; }
.search-form input { flex: 1; min-width: 0; }
.error { color: var(--warn); }
.errorlist { color: var(--warn); font-size: 14px; margin-top: 4px; }

/* ---- editor desk ---- */

.desk-bar { background: var(--fill); border-bottom: 1px solid var(--line); font-size: 14px; letter-spacing: -0.016em; }
.desk-bar .wrap { display: flex; align-items: center; gap: 20px; padding-top: 9px; padding-bottom: 9px; }
.desk-bar b { font-weight: 600; }
.desk-bar a { color: var(--link); }
.desk-bar form { margin-left: auto; }

.desk-head { padding: 36px 0 0; }
.desk-head h1 { font-size: 28px; line-height: 1.14; font-weight: 700; letter-spacing: 0.007em; }
.progress { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 12px; color: var(--ink2); font-size: 14px; }
.progress ol { display: flex; gap: 4px; }
.progress li { width: 22px; height: 6px; border-radius: 3px; background: var(--line); }
.progress li.done { background: var(--ink); }

.paste { display: flex; gap: 8px; margin-top: 8px; }
.paste input { flex: 1; min-width: 0; }
.paste-label { display: block; font-weight: 600; margin-top: 28px; }

.desk-section { padding-top: 44px; }
.desk-section > h2 { font-size: 17px; font-weight: 600; padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
.board-row { display: grid; grid-template-columns: 32px minmax(0, 1fr); padding: 14px 0; border-bottom: 1px solid var(--line); }
.board-row.draft { grid-template-columns: minmax(0, 1fr); }
.board-row .n { color: var(--ink2); font-variant-numeric: tabular-nums; }
.board-row .t { font-weight: 600; }
.board-row .actions { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 14px; }
.board-row .actions a { color: var(--link); }
.move { display: inline-flex; align-items: center; gap: 6px; color: var(--ink2); }
.move select {
  font: inherit; font-size: 14px; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px;
}
.empty { padding: 16px 0; color: var(--ink2); border-bottom: 1px solid var(--line); }

.bookmark { background: var(--fill); border-radius: 12px; padding: 18px 20px; margin-top: 44px; }
.bookmark a.pill {
  display: inline-block; font-weight: 600; font-size: 15px; color: var(--ink);
  border: 1px solid var(--ink); border-radius: 8px; padding: 6px 12px; background: #fff; cursor: grab;
}
.bookmark p { margin-top: 8px; color: var(--ink2); font-size: 14px; }
.bookmark .on-phone { display: none; margin-top: 0; }
.days { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 15px; }
.days a { color: var(--link); }

.readbox { background: var(--fill); border-radius: 12px; padding: 16px 20px; margin-top: 20px; }
.readbox .from { font-size: 14px; color: var(--ink2); }
.readbox .orig { font-weight: 600; margin-top: 4px; }
.readbox .desc { color: var(--ink2); margin-top: 6px; font-size: 15px; }
.readbox a { color: var(--link); font-size: 14px; display: inline-block; margin-top: 8px; }

.story-form { margin-top: 8px; }
.field { margin-top: 22px; }
.field > label, .field > .label { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; margin-bottom: 6px; }
.counter { font-weight: 400; font-size: 14px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.counter.over { color: var(--warn); font-weight: 600; }
.hint { font-size: 14px; color: var(--ink2); margin-top: 5px; }
.three { display: grid; grid-template-columns: 2fr 2fr 1.4fr; gap: 12px; }
.three label { display: block; font-weight: 600; margin-bottom: 6px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices > div { display: contents; }
.choices label {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 400; font-size: 15px;
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; cursor: pointer; background: #fff;
}
.choices label:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choices input { accent-color: var(--ink); margin: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.two label { display: block; font-weight: 600; margin-bottom: 6px; }
.buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); }

.signin { max-width: 380px; padding-top: 44px; }
.signin h1 { font-size: 28px; font-weight: 700; }
.signin label { display: block; font-weight: 600; margin: 18px 0 6px; }
.signin button { margin-top: 22px; }

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

@media (max-width: 734px) {
  .page-head { padding-top: 32px; }
  .page-head h1, .story-page h1 { font-size: 28px; }
  .story, .compact li { grid-template-columns: 32px minmax(0, 1fr); }
  .story.plain { grid-template-columns: minmax(0, 1fr); }
  .story.lead h2 { font-size: 24px; }
  .story h2 { font-size: 19px; }
  .browse, .two { grid-template-columns: 1fr; gap: 36px; }
  .two { gap: 22px; }
  .three { grid-template-columns: 1fr; gap: 22px; }
  .site-nav a { margin-left: 0; margin-right: 18px; }
  /* 44px is the smallest comfortable touch target */
  .earlier h2 a, .story-page .meta a, .story-page .topics a, .prose a, .empty a,
  .buttons a, .desk-head .meta a, .readbox a, .progress a, .hint a,
  .site-nav a, .foot a, .more, .out, .permalink, .site-footer a, .pager a, .days a, .desk-bar a, .story-page .read {
    display: inline-block; padding: 13px 0;
  }
  .site-name { display: inline-block; padding: 7px 0; }
  .foot { margin-top: 0; align-items: center; }
  .rows li { padding: 0; }
  .rows li a { display: block; padding: 11px 0; flex: 1; }
  .rows li span { align-self: center; }
  .compact li a.t { display: inline-block; padding: 4px 0; }
  .board-row .actions { gap: 0 18px; }
  .board-row .actions a, .board-row .actions button.text { display: inline-block; padding: 12px 0; }
  .move select { min-height: 44px; padding: 0 10px; font-size: 16px; }
  button, input[type="text"], input[type="url"], input[type="search"], input[type="date"],
  input[type="password"], textarea { min-height: 44px; }
  button.text { min-height: 0; }
  .choices label { padding: 11px 14px; }
  .desk-bar .wrap { padding-top: 0; padding-bottom: 0; }
  .desk-bar button.text { padding: 13px 0; }
  /* a bookmark button cannot be dragged on a phone */
  .bookmark a.pill, .bookmark .on-laptop { display: none; }
  .bookmark .on-phone { display: block; }
}
