/* Сигнал — an editorial shell around the original Hyprfeed reader.
   Keep upstream class names and DOM hooks; tokens also style AI and assistant UI. */
:root {
  --volt: #1764f5;
  --volt-ink: #fff;
  --radius: 14px;
  --radius-sm: 9px;
  --topbar-h: 56px;
  --shadow-1: 0 2px 10px rgb(30 71 133 / 4%);
  --shadow-2: 0 12px 36px rgb(30 71 133 / 12%);
}
html[data-theme="light"] {
  --bg: #f5f8fe;
  --panel: #f8fbff;
  --surface: #fff;
  --field: #f2f6fc;
  --ink: #15213d;
  --muted: #6d7fa2;
  --faint: #8192b3;
  --line: #e2eaf7;
  --line-strong: #cbdaf0;
  --wash: #e9f1ff;
  --scrim: rgb(26 46 83 / 27%);
}
html[data-theme="dark"] {
  --volt: #75a8ff;
  --volt-ink: #0c1a34;
  --bg: #111a2a;
  --panel: #121e31;
  --surface: #17233a;
  --field: #101d32;
  --ink: #edf3ff;
  --muted: #a4b3cf;
  --faint: #879bbb;
  --line: #263752;
  --line-strong: #3d5378;
  --wash: #233858;
  --scrim: rgb(3 10 23 / 62%);
}
body { letter-spacing: -.015em; }
button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
:focus-visible { outline-color: var(--volt); outline-offset: 3px; }
.bolt { filter: drop-shadow(0 3px 8px rgb(23 100 245 / 15%)); }
.btn--primary:hover { box-shadow: 0 5px 18px rgb(23 100 245 / 20%); }
.btn--ghost { background: var(--surface); border-color: var(--line); }
.btn--ghost:hover { color: var(--volt); border-color: var(--line-strong); }
.btn--primary { font-weight: 650; }
.field-label, .setting-label { font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 600; }
.field input, .field select {
  width: 100%; min-width: 0; padding: 10px 12px; font: inherit; color: var(--ink);
  background: var(--field); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.field select:focus { outline: 2px solid var(--volt); outline-offset: 2px; }
.field select { cursor: pointer; }
.shell { grid-template-columns: 248px minmax(0, 1fr); }
.sidebar {
  padding: 23px 17px 18px;
  background: linear-gradient(180deg, var(--panel), color-mix(in srgb, var(--bg) 55%, var(--surface)));
}
.sidebar-head { padding: 0 10px 29px; align-items: flex-start; }
.brand { gap: 10px; align-items: flex-start; }
.brand > .bolt { width: 29px; height: 36px; margin-top: 3px; }
.brand-copy { display: flex; flex-direction: column; gap: 4px; }
.wordmark { font-size: 24px; font-weight: 780; letter-spacing: -.06em; line-height: 1.2; }
.brand-tagline { color: var(--muted); font-size: 10px; line-height: 1.4; letter-spacing: -.02em; max-width: 137px; }
.nav-primary { gap: 7px; }
.nav-primary .navitem { min-height: 45px; padding: 11px 13px; gap: 13px; font-size: 13px; color: var(--ink); }
.navitem svg { width: 20px; height: 20px; }
.nav-primary .navitem.is-active, .navitem.is-active { color: var(--volt); background: var(--wash); box-shadow: none; }
.nav-primary .navitem:hover { background: var(--wash); }
.navitem .count--volt { background: color-mix(in srgb, var(--volt) 10%, var(--surface)); color: var(--volt); font-size: 10px; }
.nav-secondary { margin: 22px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.nav-secondary .navitem, .sidebar-admin { font-size: 12px; color: var(--muted); padding: 8px 12px; }
.sidebar-admin { width: 100%; margin: 6px 0 16px; }
.sources-heading { margin-top: 26px; padding: 17px 5px 4px; border-top: 1px solid var(--line); }
.sources-toggle { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); font-weight: 600; }
.sources-toggle .chev { width: 14px; height: 14px; transition: transform .15s ease; }
.sources-toggle[aria-expanded="false"] .chev { transform: rotate(-90deg); }
html[data-sources-collapsed="0"] #sources-panel { display: block !important; }
html[data-sources-collapsed="1"] #sources-panel { display: none !important; }
html[data-sources-collapsed="0"] #sources-toggle .chev { transform: none; }
html[data-sources-collapsed="1"] #sources-toggle .chev { transform: rotate(-90deg); }
.feeditem { padding: 8px 11px; font-size: 12px; gap: 9px; }
.feeditem.is-active { color: var(--volt); box-shadow: none; }
.feeditem .favicon { width: 15px; height: 15px; }
.feed-list-empty { line-height: 1.6; font-size: 12px; }
.sidebar-foot { padding-top: 17px; margin-top: 10px; }
.avatar { background: var(--wash); color: var(--volt); width: 33px; height: 33px; }
.user-name { font-size: 12px; }
.user-email { font-size: 10px; line-height: 1.6; }
.sidebar-foot .iconbtn { width: 28px; }
.sidebar-foot .iconbtn svg { width: 18px; height: 18px; }
.topbar { min-height: var(--topbar-h); background: color-mix(in srgb, var(--surface) 88%, transparent); padding: 8px 24px; }
.context-title { font-size: 17px; letter-spacing: -.035em; }
.topbar-actions { gap: 8px; }
.topbar-user { display: flex; align-items: center; gap: 9px; margin-left: 9px; padding-left: 17px; border-left: 1px solid var(--line); text-align: left; }
.topbar-user-copy { display: flex; flex-direction: column; gap: 1px; max-width: 118px; line-height: 1.4; font-size: 10px; color: var(--muted); }
.topbar-user-copy strong { color: var(--ink); font-weight: 650; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-user:hover .avatar { background: color-mix(in srgb, var(--volt) 15%, var(--surface)); }
.searchpill { background: var(--field); border-color: transparent; border-radius: 9px; min-height: 37px; }
.searchpill-label { font-size: 11px; color: var(--muted); max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewswitch { background: var(--field); border-color: transparent; }
.viewswitch-btn.is-active { color: var(--volt); }
.unread-dot { width: 6px; height: 6px; border-radius: 50%; box-shadow: none; }
.news-periods { padding: 12px 24px 0; }
.news-period-chip { padding: 7px 13px; font-size: 11px; font-weight: 500; }
.news-period-label { margin-top: 8px; font-size: 13px; }
.news-period-navigation { margin-top: 6px; }
.news-period-foot { margin-top: 6px; line-height: 1.5; }
.news-period-foot a { color: var(--volt); text-decoration: none; }
.entries { padding: 14px 24px 70px; }
.kicker, .kicker time { text-transform: none; letter-spacing: 0; font-size: 11px; font-weight: 500; }
.story.hero { grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); }
.story.hero .thumb { order: 1; min-height: 320px; }
.story.hero .story-body { order: 2; padding: 30px; }
.story.hero .story-title { font-size: clamp(25px, 2.7vw, 37px); line-height: 1.14; font-weight: 740; letter-spacing: -.045em; }
.story.card .story-title { font-size: 16px; line-height: 1.4; letter-spacing: -.03em; }
.story.hero:hover .story-title, .story.breaker:hover .story-title { text-decoration-thickness: 2px; text-underline-offset: 4px; }
.story.hero .story-dek { font-size: 14px; line-height: 1.7; }
.thumb--empty { background: linear-gradient(140deg, var(--wash), var(--surface)); }
.thumb-letter { font-weight: 650; font-size: 74px; transform: none; color: var(--volt); opacity: .35; }
.story-ask {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 6px;
  color: var(--volt); font-size: 11px; font-weight: 600; padding: 6px 9px;
  border-radius: 7px; margin: 6px -9px -4px; transition: background .15s;
}
.story-ask:hover { background: var(--wash); }
.story.card .story-ask { margin-top: auto; padding-top: 10px; }
.row { grid-template-columns: 8px 17px minmax(75px, 130px) minmax(0, auto) minmax(0, 1fr) max-content 28px 28px 32px; gap: 10px; }
.row .story-ask { align-self: center; justify-content: center; margin: 0; padding: 5px; font-size: 17px; }
.row .story-ask span { display: none; }
.row .starbtn { width: 28px; }
.row .row-title { font-size: 13px; }
.row .row-dek { font-size: 12px; }
.row .row-time { font-size: 10px; }
.reader { border: 1px solid var(--line); }
.reader-bar { background: color-mix(in srgb, var(--surface) 94%, transparent); }
.reader-ask { color: var(--volt); white-space: nowrap; }
.reader-title { letter-spacing: -.045em; }
.empty-source { font-size: 12px; color: var(--muted); }
.empty-title { font-size: 25px; font-weight: 720; }
.empty-text { line-height: 1.7; font-size: 14px; max-width: 48ch; }
.auth-body { background: radial-gradient(ellipse at 80% 12%, var(--wash), transparent 60%), var(--bg); }
.auth-card { width: min(430px, 100%); border-radius: 20px; box-shadow: 0 16px 56px rgb(38 83 154 / 7%); padding: 38px; }
.auth-mark .wordmark { font-size: 32px; font-weight: 750; }
.auth-mark .bolt { width: 42px; height: 48px; }
.auth-tag { font-size: 12px; max-width: 28ch; line-height: 1.65; margin-top: 2px; }
.auth-alt { font-size: 12px; }
.auth-form .field input { min-height: 43px; }
.auth-form .btn--primary { min-height: 43px; margin-top: 3px; }
.settings-nav { width: 221px; }
.settings-link { font-size: 12px; gap: 9px; min-height: 39px; }
.settings-link svg { width: 18px; height: 18px; }
.theme-picker { flex-wrap: wrap; }
.theme-chip { font-size: 12px; padding: 9px 12px; }
.setting-heading { font-size: 18px; font-weight: 650; margin: 2px 0 7px; letter-spacing: -.035em; }
.schedule-form { margin-top: 19px; }
.schedule-form > .hint { margin-top: 8px; }
.schedule-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 17px 15px; margin: 24px 0 20px; }
.schedule-fields input, .schedule-fields select { font-size: 13px; min-height: 42px; }
.schedule-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 13px; }
.schedule-status { margin: 22px 0; padding: 16px; background: var(--field); border: 1px solid var(--line); border-radius: 10px; }
.schedule-status > div { display: flex; justify-content: space-between; gap: 20px; margin: 5px 0; font-size: 12px; }
.schedule-status dt { color: var(--muted); }
.schedule-status dd { margin: 0; text-align: right; }
#schedule-freshness[data-state="fresh"] { background: #e4f6ed; color: #237752; }
#schedule-freshness[data-state="error"] { background: #fff0ec; color: #a74632; }
#schedule-freshness[data-state="updating"] { background: var(--wash); color: var(--volt); }
#ui-language { max-width: 250px; }
.about-hero { background: var(--panel); }
.about-brand { position: relative; }
.about-tagline { max-width: 40ch; margin-left: auto; margin-right: auto; }
.about-license { line-height: 1.9; }
.about-stack { position: relative; }
.toast { max-width: calc(100vw - 32px); text-align: center; }
.modal .toast { position: absolute; top: auto; bottom: 18px; max-width: calc(100% - 28px); border-radius: 10px; }
.toast-action { color: #a7c8ff; text-transform: none; letter-spacing: 0; }
@media (min-width: 1600px) { .entries, .news-periods { max-width: 1440px; margin-left: auto; margin-right: auto; } }
@media (max-width: 1100px) {
  .shell { grid-template-columns: 224px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .brand-tagline { max-width: 126px; }
  .searchpill-label, .topbar-user-copy { display: none; }
  .topbar-user { padding-left: 10px; margin-left: 3px; }
  .topbar { padding-inline: 22px; }
  .entries, .news-periods { padding-left: 22px; padding-right: 22px; }
  .row { grid-template-columns: 8px 17px minmax(0, 1fr) max-content 27px 27px 30px; gap: 7px; }
  .row .row-dek, .row .row-feed { display: none; }
}
@media (max-width: 900px) {
  html[data-sidebar-open="true"] .sidebar { transform: none; box-shadow: var(--shadow-2); }
  html[data-sidebar-open="true"] .scrim { display: block !important; }
  .shell { display: block; }
  .sidebar { width: 270px; }
  .topbar { padding: 13px 16px; min-height: 64px; }
  .brand-tagline { max-width: 155px; }
  .reader-ask span { display: none; }
  .reader-ask { font-size: 17px; padding: 5px 8px; }
}
@media (max-width: 700px) {
  .settings-nav { width: 100%; }
  .settings-link { min-height: 46px; font-size: 14px; }
  .schedule-fields { gap: 15px; }
  .schedule-status > div { flex-direction: column; gap: 2px; margin: 7px 0; }
  .schedule-status dd { text-align: left; }
}
@media (max-width: 600px) {
  :root { --topbar-h: 60px; }
  .topbar { min-height: 60px; padding: 11px 12px; gap: 8px; }
  .context-title { font-size: 15px; }
  .topbar-actions { gap: 3px; }
  .topbar-user { padding-left: 7px; margin-left: 3px; }
  .topbar-user .avatar { width: 28px; height: 28px; font-size: 11px; }
  .topbar-actions .iconbtn { width: 29px; }
  .topbar-actions .iconbtn svg { width: 17px; }
  .news-periods { padding: 17px 14px 0; }
  .news-period-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .news-period-chip { flex: none; font-size: 10px; padding: 6px 10px; }
  .news-period-foot { font-size: 10px; }
  .news-period-label { margin-top: 11px; font-size: 12px; }
  .news-period-form { flex: 1; }
  .entries { padding: 19px 14px 75px; }
  .story.hero { grid-template-columns: 1fr; }
  .story.hero .thumb { min-height: 0; height: 205px; order: 1; }
  .story.hero .story-body { padding: 23px 19px; order: 2; gap: 10px; }
  .story.hero .story-title { font-size: 27px; }
  .story.hero .story-dek { font-size: 13px; }
  .grid--magazine, .grid--cards { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .row { grid-template-columns: 6px 16px minmax(0, 1fr) 27px 27px 28px; padding: 12px 4px; gap: 6px; }
  .row .row-feed, .row .row-time { display: none; }
  .row .row-title { white-space: normal; line-height: 1.45; font-size: 13px; }
  .row .starbtn { opacity: 1; }
  .auth-card { padding: 30px 25px; }
  .auth-body { padding: 18px; }
  .schedule-fields { grid-template-columns: 1fr; }
  .theme-chip { padding: 8px 10px; }
  .empty { padding: 10vh 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Feed controls remain visible on phones and describe all three layouts. */
.news-feed-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.news-view-switch { display: flex; flex: none; max-width: 100%; overflow-x: auto; }
.news-view-switch .viewswitch-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: auto; min-height: 34px; height: auto; padding: 6px 10px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.news-view-switch .viewswitch-btn.is-active { background: var(--volt); color: var(--volt-ink); }
.news-view-switch [aria-disabled="true"] { cursor: wait; opacity: .7; }

/* One bounded media frame, regardless of asset dimensions or editorial role. */
.story .media-frame, .story.hero .media-frame, .story.breaker .media-frame {
  position: relative; width: 100%; height: auto; min-height: 0; aspect-ratio: 16 / 9;
  flex: none; overflow: hidden; align-self: start; background: var(--field); order: 0;
}
.story .media-frame img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: 100%; margin: 0; object-fit: cover; object-position: center; transform: none; }
.story:hover .media-frame img { transform: none; }
.story .media-frame--contain img { object-fit: contain; padding: clamp(10px, 5%, 24px); }
.story .media-frame.thumb--empty img { display: none; }
.story .media-frame.thumb--empty { background: linear-gradient(135deg, var(--field), var(--surface)); }
.story .media-frame .thumb-letter { font-size: clamp(28px, 4vw, 60px); opacity: .2; }

/* Magazine: a leading editorial story with supporting cards to its right. */
.grid--magazine { grid-template-columns: minmax(0, 1.15fr) repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.grid--magazine .story.hero { grid-column: auto; grid-row: auto; display: flex; flex-direction: column; }
.grid--magazine .story.breaker { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; }
.grid--magazine .story.hero .story-body { flex: none; order: 1; justify-content: flex-start; padding: 16px; gap: 9px; }
.grid--magazine .story.breaker .story-body { order: 1; padding: 22px; }
.grid--magazine .story.breaker > .starbtn[data-star] { right: calc(54.545% + 9px); }
.grid--magazine .story.hero .story-title { font-size: clamp(23px, 2vw, 31px); line-height: 1.18; letter-spacing: -.04em; }
.grid--magazine .story.hero .story-dek { font-size: 13px; line-height: 1.65; -webkit-line-clamp: 6; }
.grid--magazine .story.hero .story-reading-actions { margin-top: 4px; padding-top: 4px; }
.grid--cards { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); align-items: start; }
.story--no-media { min-height: 0; }
.story--no-media > .starbtn[data-star] { top: auto; bottom: 10px; }
.story--no-media .story-reading-actions { padding-right: 38px; }
.story-title, .story-dek, .row-title { overflow-wrap: anywhere; word-break: normal; min-width: 0; }
.story.card .story-title { line-height: 1.35; }
.story .story-body .kicker { padding-right: 30px; flex-wrap: wrap; row-gap: 4px; min-width: 0; }
.story .kicker-feed { max-width: 100%; }
.story .kicker time { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.story .story-body .hidebtn, .story.hero .story-body .hidebtn, .story.breaker .story-body .hidebtn { top: 8px; right: 6px; }

/* Saved state changes only color and fill, never size, position, or shape. */
.starbtn[data-star], #reader-star, [data-bookmark-entry] {
  width: 32px; height: 32px; min-width: 32px; flex: none; display: inline-flex;
  align-items: center; justify-content: center; border-radius: 8px; opacity: 1;
  color: var(--muted); background: var(--surface); padding: 0; transition: color .15s, background .15s;
}
.starbtn[data-star] { top: 9px; right: 9px; box-shadow: 0 1px 5px rgb(21 33 61 / 8%); }
.starbtn[data-star] svg, #reader-star svg, [data-bookmark-entry] svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.starbtn[data-star].is-starred, #reader-star.is-starred, [data-bookmark-entry].is-starred { color: var(--volt); background: var(--surface); }
.starbtn[data-star].is-starred svg, #reader-star.is-starred svg, [data-bookmark-entry].is-starred svg { fill: currentColor; }
[data-bookmark-entry]:hover, #reader-star:hover { background: var(--wash); }
[data-bookmark-entry][aria-busy="true"] { cursor: progress; opacity: .65; }
[data-bookmark-entry]:focus-visible { outline: 2px solid var(--volt); outline-offset: 3px; }
.saved-filter-empty { grid-column: 1 / -1; padding: 38px 18px; color: var(--muted); text-align: center; }

/* Compact still retains the image, full headline, source, and publication time. */
.grid--list .row { grid-template-columns: 112px minmax(0, 1fr) auto; gap: 15px; padding: 13px 0; }
.grid--list .row.story--no-media { grid-template-columns: minmax(0, 1fr) auto; }
.grid--list .row-thumb { border-radius: 8px; }
.grid--list .row-copy { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.grid--list .row .row-title { font-size: 14px; line-height: 1.4; white-space: normal; overflow: visible; }
.grid--list .row .kicker { display: flex; flex-wrap: wrap; min-width: 0; gap: 4px 7px; }
.grid--list .row .kicker-feed { display: inline-flex; }
.grid--list .row .kicker time { display: inline; flex-basis: auto; }
.grid--list .row-actions { display: flex; align-items: center; gap: 3px; }
.grid--list .row .starbtn { position: static; width: 32px; height: 32px; opacity: 1; box-shadow: none; }
.grid--list .row .story-ask { width: 32px; height: 32px; }
@media (max-width: 1200px) and (min-width: 701px) {
  .grid--magazine { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--magazine .story.hero { grid-column: 1 / -1; grid-row: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .grid--magazine .story.hero .story-title { font-size: 25px; }
  .grid--magazine .story.hero > .starbtn[data-star] { right: calc(50% + 9px); }
}
@media (max-width: 700px) {
  .grid--magazine, .grid--cards { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .grid--magazine .story.hero, .grid--magazine .story.breaker { grid-column: auto; grid-row: auto; display: flex; flex-direction: column; }
  .grid--magazine .story.hero .story-body, .grid--magazine .story.breaker .story-body { padding: 18px; }
  .grid--magazine .story.hero .story-title { font-size: 26px; }
  .grid--magazine .story.breaker > .starbtn[data-star] { right: 9px; }
  .news-view-switch { display: flex; }
  .news-feed-toolbar { gap: 8px; }
  .news-feed-toolbar .news-period-chips { width: 100%; }
  .grid--list .row { grid-template-columns: 84px minmax(0, 1fr); gap: 10px; align-items: start; }
  .grid--list .row .row-title { font-size: 13px; }
  .grid--list .row-actions { grid-column: 2; justify-content: flex-end; margin-top: -4px; }
  .grid--list .row.story--no-media .row-actions { grid-column: auto; margin-top: 0; }
  .grid--list .row .kicker { font-size: 10px; }
  .grid--list .row .kicker time { flex-basis: 100%; }
}
.article-opening-preference { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 18px 0; color: var(--muted); font-size: 12px; }

/* Keep the archive controls to two quiet rows; exact boundaries are on demand. */
.news-period-context { display:flex; align-items:center; flex-wrap:wrap; gap:8px 18px; margin-top:10px; }
.news-period-details { position:relative; min-width:0; }
.news-period-details > summary { margin:0; cursor:pointer; list-style:none; color:var(--muted); font-size:12px; font-weight:500; }
.news-period-details > summary::-webkit-details-marker { display:none; }
.news-period-info { position:absolute; top:calc(100% + 8px); left:0; z-index:15; width:min(370px,calc(100vw - 48px)); padding:14px; background:var(--surface); border:1px solid var(--line); border-radius:10px; box-shadow:var(--shadow-2); font-size:12px; line-height:1.6; }
.news-period-info p + p { margin-top:8px; color:var(--muted); }
.news-period-context .news-period-navigation { margin:0; gap:4px; }
.news-period-navigation .btn { min-width:32px; min-height:32px; padding:4px 8px; }
.news-period-ai { margin-left:auto; color:var(--volt); font-size:12px; text-decoration:none; }
.news-period-form input { font-size:12px; height:32px; }
.news-period-form label.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.news-period-chips { gap:3px; padding:3px; border-radius:10px; background:var(--wash); }
.news-period-chip { border:0; border-radius:7px; background:transparent; min-height:32px; padding:6px 10px; }
.news-period-chip.is-active { background:var(--surface); color:var(--ink); box-shadow:0 1px 3px rgb(20 40 80 / 9%); }
.news-view-switch .viewswitch-btn.is-active { background:var(--surface); color:var(--ink); box-shadow:0 1px 3px rgb(20 40 80 / 9%); }

/* Both grids use aligned rows, bounded images and anchored reading actions. */
.grid--magazine { grid-template-columns:repeat(3,minmax(0,1fr)); }
.grid--cards { grid-template-columns:repeat(auto-fill,minmax(min(300px,100%),1fr)); }
.grid--magazine, .grid--cards { align-items:stretch; grid-auto-rows:auto; gap:16px; }
.grid--magazine .story, .grid--cards .story { display:flex; flex-direction:column; grid-column:auto; grid-row:auto; height:100%; min-width:0; }
.grid--magazine .story .media-frame, .grid--cards .story .media-frame { height:150px; min-height:0; aspect-ratio:auto; order:0; }
.grid--magazine .story .media-frame img, .grid--cards .story .media-frame img { object-fit:contain; }
.grid--magazine .story .story-body, .grid--cards .story .story-body { display:flex; flex-direction:column; flex:1; min-width:0; padding:16px; gap:10px; justify-content:flex-start; order:1; }
.grid--magazine .story .story-title, .grid--cards .story .story-title { font-size:16px; line-height:1.4; letter-spacing:-.02em; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; }
.grid--magazine .story .story-dek, .grid--cards .story .story-dek { font-size:13px; line-height:1.6; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; }
.grid--magazine .story .story-reading-actions, .grid--cards .story .story-reading-actions { margin-top:auto; padding-top:14px; padding-right:38px; min-height:38px; }
.grid--magazine .story > .starbtn[data-star], .grid--cards .story > .starbtn[data-star] { top:auto; bottom:12px; right:12px; box-shadow:none; }
.grid--magazine .story .story-meta { font-size:11px; margin:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.grid--magazine .story .kicker, .grid--cards .story .kicker { display:flex; flex-wrap:wrap; gap:4px 6px; margin:0; padding-right:22px; }
.story .kicker .unread-dot { width:5px; height:5px; }
.story .kicker .kicker-sep { display:none; }
.story .kicker-feed { min-width:0; max-width:calc(100% - 12px); overflow:hidden; }
.story .kicker time { flex-basis:100%; font-size:10px; white-space:nowrap; }
@media (max-width:1200px) and (min-width:701px) { .grid--magazine { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:700px) {
  .grid--magazine, .grid--cards { grid-template-columns:minmax(0,1fr); grid-auto-rows:auto; }
  .grid--magazine .story .story-title, .grid--cards .story .story-title { -webkit-line-clamp:unset; }
  .grid--magazine .story .media-frame, .grid--cards .story .media-frame { height:180px; }
  .news-period-context { gap:8px 12px; }
  .news-period-context .news-period-navigation { flex:0 0 100%; order:2; }
  .news-period-ai { margin:0; }
  .news-period-context .news-period-form { flex:0 1 auto; flex-wrap:nowrap; }
  .news-period-form input { min-width:145px; }
}
.article-opening-preference label { display: flex; flex-direction: column; gap: 7px; width: 100%; font-weight: 600; }
.article-opening-preference select { max-width: 100%; min-height: 40px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); color: var(--ink); padding: 8px 10px; font: inherit; }
.article-opening-preference [role="status"] { line-height: 1.5; }
