:root {
  color-scheme: light;
  --paper: #fcfaf5;
  --card: #fffdf8;
  --ink: #211e1a;
  --muted: #62594f;
  --line: #ded5c7;
  --accent: #a33421;
  --lead: #f0e5d4;
  --serif: Georgia, "Times New Roman", serif;
  font: 100%/1.5 system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; border-top: 6px solid var(--accent); }
a { color: var(--accent); text-underline-offset: .22em; }
button, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.page { width: min(1120px, calc(100% - 64px)); margin: 0 auto; }
.masthead { padding: 18px 0 25px; border-bottom: 1px solid var(--ink); text-align: center; }
.edition { display: flex; justify-content: space-between; gap: 12px; font-size: .82rem; color: var(--muted); }
.edition span { color: var(--accent); font-weight: 700; }
.brand { font: 700 clamp(3.2rem, 8.5vw, 6.7rem)/.98 var(--serif); letter-spacing: -.075em; margin: 13px 0 9px; }
.brand i { color: var(--accent); font-weight: 400; }
.brand span { color: var(--accent); }
.tagline { color: var(--muted); margin: 0; }
.reader-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; margin-top: 15px; }
.toolbar, .actions, .sort-label { display: flex; align-items: center; gap: 12px; }
.toolbar { padding-top: 25px; justify-content: space-between; flex-wrap: wrap; }
h1, h2 { font-family: var(--serif); letter-spacing: -.04em; line-height: 1.05; }
h1 { font-size: clamp(2rem, 4.2vw, 3rem); margin: 0; }
.actions { flex-wrap: wrap; }
.views { display: flex; flex-wrap: wrap; gap: 8px; margin: 15px 0; }
.provider-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 12px 0; font-size: .88rem; }
.button, select {
  border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink);
  min-height: 43px; padding: 7px 12px; font-size: .9rem;
}
.button { font-weight: 670; }
.button:hover, select:hover { border-color: var(--accent); }
.sort-label { color: var(--muted); font-size: .88rem; }
select {
  appearance: none; padding-right: 28px;
  background: var(--card) linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 15px) 50% / 5px 5px no-repeat;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.status { color: var(--muted); margin: 9px 0 15px; font-size: .9rem; }
.status:empty { display: none; }
#preview-platforms { margin-bottom: 12px; }
.story { border: 1px solid var(--line); background: var(--card); border-radius: 9px; overflow: hidden; min-width: 0; }
.story-copy { padding: clamp(18px, 3.2vw, 34px); }
.story-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 12px; font-size: .84rem; }
.topic { color: var(--accent); font-weight: 760; }
.platform { color: var(--muted); }
.rank { color: var(--accent); font-weight: 780; }
.story h2 { margin: 13px 0 9px; font-size: clamp(1.7rem, 3vw, 2.45rem); }
.story .summary { margin: 0 0 17px; max-width: 63ch; overflow-wrap: anywhere; }
.metrics { display: flex; gap: 8px 17px; flex-wrap: wrap; font-size: .88rem; font-weight: 680; }
.story-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 11px; color: var(--muted); font-size: .84rem; }
.bookmark { min-height: 34px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--card); color: var(--accent); font-weight: 650; }
.bookmark[aria-pressed="true"], .button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.lead { background: var(--lead); }
.lead h2 { font-size: clamp(2.4rem, 5.2vw, 4.45rem); }
.lead.with-image { display: grid; grid-template-columns: 1.1fr 1fr; }
.lead img { width: 100%; height: 100%; min-height: 270px; object-fit: cover; grid-column: 2; grid-row: 1; }
.lead.with-image .story-copy { grid-column: 1; grid-row: 1; align-self: center; }
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.end { text-align: center; padding: 22px 10px; border-block: 1px solid var(--line); margin: 24px 0; color: var(--muted); }
.story[aria-label] h2 { overflow-wrap: anywhere; }
#show-more, #retry { margin: 14px 0; }
footer { display: flex; justify-content: space-between; gap: 12px; padding: 0 0 24px; font-size: .85rem; }
footer span { font-weight: 700; }
.legal-links { display: flex; gap: 16px; }
.legal { max-width: 760px; padding-top: 24px; }
.legal h1 { font: 700 2.2rem/1.1 var(--serif); }
.legal h2 { font-size: 1.1rem; margin-top: 28px; }
.legal footer { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); }
dialog { width: min(560px, calc(100% - 28px)); max-height: calc(100% - 28px); padding: 0; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; }
#settings { width: min(710px, calc(100% - 28px)); }
dialog::backdrop { background: #211e1a80; }
dialog form { padding: clamp(16px, 5vw, 28px); }
.dialog-head, .dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dialog-head h2 { margin: 0; font-size: clamp(1.7rem, 5.3vw, 2.4rem); }
.profile-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.profile-name { display: grid; gap: 5px; margin: 15px 0 10px; }
.profile-name input { font: inherit; border: 1px solid var(--line); padding: 8px 10px; border-radius: 6px; }
.close { background: transparent; border: 0; color: var(--ink); min-width: 36px; font-size: 1.75rem; }
fieldset { margin: 20px 0; border: 1px solid var(--line); border-radius: 8px; padding: 11px; }
legend { font-weight: 700; padding-inline: 5px; }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 6px; }
.options label { display: flex; align-items: center; gap: 6px; min-height: 38px; cursor: pointer; font-size: .9rem; }
.options input { accent-color: var(--accent); inline-size: 17px; block-size: 17px; }
.filter-hint { color: var(--muted); font-size: .9rem; margin: 0 0 12px; }
.platform-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(245px, 100%), 1fr)); gap: 8px; }
.platform-option { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1px 5px; align-content: start; padding: 7px 10px 10px; border: 1px solid var(--line); border-radius: 6px; }
.platform-option label { display: flex; align-items: center; gap: 6px; min-height: 36px; font-size: .95rem; font-weight: 680; cursor: pointer; }
.platform-option input { accent-color: var(--accent); inline-size: 17px; block-size: 17px; flex-shrink: 0; }
.platform-state { font-size: .875rem; padding: 1px 7px; color: var(--muted); background: var(--lead); border-radius: 4px; }
.platform-state.is-live { color: #234c33; background: #e6efe6; }
.platform-detail { grid-column: 1 / -1; color: var(--muted); font-size: .875rem; }
.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.primary:hover { background: #842719; }
[hidden] { display: none !important; }
@media (max-width: 640px) {
  .page { width: calc(100% - 30px); }
  .masthead { padding-bottom: 17px; }
  .edition { font-size: .75rem; }
  .toolbar { padding-top: 18px; }
  .lead.with-image, .story-grid { grid-template-columns: 1fr; }
  .lead img, .lead.with-image .story-copy { grid-column: auto; grid-row: auto; }
  .lead img { aspect-ratio: 1.7; min-height: 0; }
}
