/* News Analysis v2 theme. Tokens and shared components for the redesign (design kit:
   .planning/research/redesign/README.md). Used only by Views/Shared/_AppLayout.cshtml.
   Layout: the shell fills the window; only panes scroll. Below 1000px the page scrolls and panes stack.
   Direction-neutral: logical properties throughout, so dir="rtl" needs no extra rules. */

:root {
  /* core */
  --slate: #35536b;
  --slate-deep: #2b4558;
  --slate-ink: #1f3445;
  --slate-line: #56718a;
  --page: #f3f5f7;
  --panel: #ffffff;
  --border: #e2e7ec;
  --divider: #eef1f4;
  --ink: #16212b;
  --ink-strong: #101a23;
  --body: #2c3843;
  --muted: #5f6b77;
  --on-slate: #dbe4ec;
  --selection: #e9f0f6;
  --live: #2e8540;
  --accent: #c2410c;
  --chart-axis: #b8c3cd;
  --scroll-thumb: #c5ced8;

  /* section (category) colors: fill / bright / dark / ink */
  --sec-world-fill: #b3191a; --sec-world-bright: #ef5350; --sec-world-dark: #55090a; --sec-world-ink: #a3171a;
  --sec-nation-fill: #a8650c; --sec-nation-bright: #f0a030; --sec-nation-dark: #5a3608; --sec-nation-ink: #8f5509;
  --sec-business-fill: #35536b; --sec-business-bright: #7fa8cc; --sec-business-dark: #1c2c39; --sec-business-ink: #35536b;
  --sec-technology-fill: #4d7a26; --sec-technology-bright: #8cc554; --sec-technology-dark: #263d13; --sec-technology-ink: #3f6720;
  --sec-entertainment-fill: #006666; --sec-entertainment-bright: #2bbcbc; --sec-entertainment-dark: #013636; --sec-entertainment-ink: #006060;
  --sec-sports-fill: #8a7205; --sec-sports-bright: #e2c02a; --sec-sports-dark: #4a3d03; --sec-sports-ink: #7a6504;
  --sec-science-fill: #c2410c; --sec-science-bright: #ff7b59; --sec-science-dark: #6b2407; --sec-science-ink: #b23c0b;
  --sec-health-fill: #942b63; --sec-health-bright: #dc6aa6; --sec-health-dark: #4f1735; --sec-health-ink: #8c285d;

  /* analysis gauges */
  --sent-neg: #c2410c; --sent-neu: #5f6b77; --sent-pos: #0f766e;
  --sent-track: linear-gradient(90deg, #f5cdbb, #e6eaee 50%, #c3e3df);
  --bias-left: #2563a8; --bias-center: #5f6b77; --bias-right: #b42318;
  --bias-track: linear-gradient(90deg, #c9dcf2, #e6eaee 50%, #f2cdc9);

  /* entity types */
  --ent-people: #35536b; --ent-orgs: #12788e; --ent-places: #4f8a2e; --ent-topics: #8a6d3b;

  /* type and spacing */
  --font: 'Noto Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fs-base: 14px;
  --fs-label: 12px;
  --fs-feed: 13.5px;
  --fs-meta: 12px;
  --fs-body: 14.5px;
  --lh-body: 1.66;
  --radius: 10px;
  --radius-sm: 6px;
  --gap: 14px;
  --main-pad-block: 14px;
  --main-pad-inline: 20px;
  --header-h: 50px;
  --subbar-h: 44px;
  --footer-h: 28px;
  --shadow-on: 0 1px 2px rgba(16, 26, 35, 0.18);
  --focus: 0 0 0 3px rgba(53, 83, 107, 0.45);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
:lang(ar) body, :lang(he) body { font-family: 'Noto Sans Arabic', 'Noto Sans Hebrew', var(--font); }
:lang(ja) body { font-family: 'Noto Sans JP', var(--font); }
:lang(ko) body { font-family: 'Noto Sans KR', var(--font); }
:lang(zh) body { font-family: 'Noto Sans SC', var(--font); }
:lang(th) body { font-family: 'Noto Sans Thai', var(--font); }
:lang(hi) body { font-family: 'Noto Sans Devanagari', var(--font); }
a { color: var(--slate); }
a:hover { color: var(--slate-ink); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.45; }
img { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
.na-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.na-scroll { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
.na-muted { color: var(--muted); }
.na-num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ---------- shell ---------- */
.na-shell {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.na-header { flex: none; background: var(--slate); color: #fff; }
.na-header-in {
  min-height: var(--header-h);
  padding: 3px var(--main-pad-inline);
  display: flex;
  align-items: center;
  gap: 6px 26px;
}
.na-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; flex: none; }
.na-brand:hover { color: #fff; }
.na-brand img { height: 44px; width: auto; display: block; }
/* wordmark in Outfit (its round letters echo the logo's arcs); _AppLayout loads it subset to these letters */
.na-brand span { font-family: 'Outfit', var(--font); font-weight: 300; font-size: 20px; white-space: nowrap; }
.na-nav { display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.na-nav::-webkit-scrollbar { display: none; }
.na-nav a {
  color: var(--on-slate);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-weight: 300;   /* a light top bar (the user's request); the current page stays a little heavier */
  white-space: nowrap;
}
.na-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.na-nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, 0.16); font-weight: 500; }
.na-header-end { margin-inline-start: auto; display: flex; align-items: center; gap: 16px; flex: none; }
.na-lang { display: flex; align-items: center; gap: 7px; color: var(--on-slate); }
.na-lang select {
  background: var(--slate-deep);
  color: #fff;
  border: 1px solid var(--slate-line);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font-size: 13px;
  max-width: 220px;
}
.na-account { display: flex; align-items: center; gap: 12px; color: var(--on-slate); font-size: 13px; }
.na-account a, .na-account button.na-linkbtn { color: #fff; font-weight: 300; text-decoration: none; padding: 8px 4px; background: none; border: 0; }
.na-account details { position: relative; }
.na-account summary { list-style: none; cursor: pointer; color: #fff; font-weight: 300; padding: 8px 4px; }
.na-account summary::-webkit-details-marker { display: none; }
.na-menu {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 6px);
  z-index: 50;
  min-width: 190px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(16, 26, 35, 0.18);
  padding: 6px;
  display: flex;
  flex-direction: column;
}
.na-menu a { color: var(--ink) !important; font-weight: 500 !important; padding: 7px 10px !important; border-radius: 6px; }
.na-menu a:hover { background: var(--selection); }

.na-subbar { flex: none; background: var(--panel); border-bottom: 1px solid var(--border); }
.na-subbar-in {
  min-height: var(--subbar-h);
  padding: 0 var(--main-pad-inline);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 18px;
}
.na-subbar-end { margin-inline-start: auto; display: flex; align-items: center; gap: 18px; font-size: 12.5px; color: var(--muted); padding: 6px 0; flex-wrap: wrap; }
.na-live { display: inline-flex; align-items: center; gap: 8px; }
.na-live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 3px rgba(46, 133, 64, 0.18);
  flex: none;
}
.na-live[data-state="stale"]::before { background: var(--muted); box-shadow: none; }

.na-main {
  flex: 1;
  min-height: 0;
  display: grid;
  gap: var(--gap);
  padding: var(--main-pad-block) var(--main-pad-inline);
}
.na-footer {
  flex: none;
  height: var(--footer-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 var(--main-pad-inline);
  background: var(--panel);
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
}
.na-footer-end { margin-inline-start: auto; display: flex; gap: 16px; }

/* ---------- panes ---------- */
.na-pane {
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.na-pane-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  min-height: 44px;
}
.na-pane-head.na-soft { border-bottom-color: var(--divider); }
.na-pane-body { flex: 1; min-height: 0; overflow-y: auto; }
.na-pad { padding: 12px 14px 14px; }
.na-col { min-height: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }
.na-label {
  margin: 0;
  font-size: var(--fs-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  font-weight: 700;
}
.na-count { font-size: 12px; color: var(--muted); }
.na-empty { padding: 24px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.na-loading { opacity: 0.55; transition: opacity 0.2s; }
.na-error { padding: 16px; color: var(--accent); font-size: 13px; }

/* ---------- controls ---------- */
.na-seg { display: inline-flex; background: var(--divider); border-radius: 8px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.na-seg button {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 5px 13px;
  font-size: 12.5px;
  font-weight: 600;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
}
.na-seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: var(--shadow-on); }
.na-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.na-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  background: var(--divider);
  color: var(--muted);
  white-space: nowrap;
}
.na-chip[aria-pressed="true"] { background: var(--slate); color: #fff; }
.na-chip .n { opacity: 0.7; font-weight: 500; }
.na-switch { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 4px 0; font-size: 12.5px; color: var(--muted); }
.na-switch .track { width: 32px; height: 20px; border-radius: 999px; background: #c9d2db; position: relative; flex: none; transition: background 0.2s; }
.na-switch .track::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: inset-inline-start 0.2s; }
.na-switch[aria-checked="true"] .track { background: var(--slate); }
.na-switch[aria-checked="true"] .track::after { inset-inline-start: 15px; }
.na-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  padding: 5px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--slate);
  text-decoration: none;
}
.na-iconbtn:hover { background: var(--selection); }
.na-iconbtn svg { display: block; }
.na-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 600;
  background: var(--slate);
  color: #fff;
  text-decoration: none;
}
.na-btn:hover { background: var(--slate-ink); color: #fff; }
.na-btn.na-ghost { background: var(--divider); color: var(--ink); }
.na-btn.na-ghost:hover { background: var(--selection); }
.na-select {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 6px 8px;
  font-size: 13px;
  max-width: 100%;
}
.na-input { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 10px; font-size: 13px; min-width: 0; }

/* category tab bar (sub-bar) */
.na-cats { display: flex; flex-wrap: wrap; gap: 2px; }
.na-cats button {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 10px 9px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
}
.na-cats button[aria-pressed="true"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--dot, var(--slate)); }
.na-cats .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dot, var(--slate)); flex: none; }

/* ---------- feed rows ---------- */
.na-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  text-align: start;
  padding: 10px 14px 11px;
  border: 0;
  border-bottom: 1px solid var(--divider);
  background: transparent;
  color: inherit;
  text-decoration: none;
}
.na-row:hover { background: #f7f9fb; }
.na-row[aria-pressed="true"], .na-row[aria-current="true"] { background: var(--selection); }
.na-row .kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-c, var(--slate));
}
.na-row .kicker .clock { color: var(--muted); font-weight: 600; letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; }
.na-row .kicker .sq { width: 7px; height: 7px; border-radius: 2px; background: var(--dot, var(--slate)); flex: none; }
.na-row .title {
  font-size: var(--fs-feed);
  line-height: 1.36;
  font-weight: 500;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.na-row[aria-pressed="true"] .title { font-weight: 600; }
.na-row .meta { font-size: 11.5px; color: var(--muted); }
.na-row.na-new { animation: na-flash 2.4s ease-out; }
@keyframes na-flash { from { background: #fff4d6; } to { background: transparent; } }
.na-thumbrow { display: flex; gap: 10px; align-items: flex-start; }
.na-thumbrow img { width: 72px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; flex: none; background: #e9edf1; }

/* ---------- reader ---------- */
.na-reader { padding: 16px 18px 22px; }
.na-reader .hero { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; display: block; background: #e9edf1; }
.na-reader .metaline { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.na-badge {
  background: var(--dot, var(--slate));
  color: #fff;
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 4px;
}
.na-reader h1 { margin: 0 0 12px; font-size: 21px; line-height: 1.24; letter-spacing: -0.015em; font-weight: 700; color: var(--ink-strong); text-wrap: balance; }
.na-reader .ai { margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--slate); }
.na-reader .body { margin: 0; font-size: var(--fs-body); line-height: var(--lh-body); color: var(--body); white-space: pre-line; text-wrap: pretty; overflow-wrap: anywhere; }
.na-readlink { font-size: 12.5px; font-weight: 600; text-decoration: none; padding: 6px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- gauges ---------- */
.na-gauge { margin-top: 12px; }
.na-gauge .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; }
.na-gauge .top .name { font-weight: 600; }
.na-gauge .top .val { font-weight: 700; color: var(--g, var(--muted)); }
.na-gauge .track { position: relative; height: 8px; border-radius: 4px; margin: 9px 0 6px; background: var(--sent-track); }
.na-gauge.bias .track { background: var(--bias-track); }
.na-gauge .track .mid { position: absolute; inset-inline-start: 50%; top: -4px; width: 2px; height: 16px; background: #9aa5b1; transform: translateX(-50%); }
.na-gauge .track .knob {
  position: absolute;
  left: var(--pct, 50%);
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--g, var(--muted));
  border: 3px solid #fff;
  box-shadow: 0 1px 3px rgba(16, 26, 35, 0.4);
  transform: translate(-50%, -50%);
  transition: left 0.5s ease;
}
.na-gauge .ends { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.na-gauge.na-na .track .knob { display: none; }
/* gauges read left-to-right in every language (the scales are spatial, not textual) */
.na-gauge .track, .na-gauge .ends { direction: ltr; }

/* ---------- entities ---------- */
.na-entgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 14px 20px; }
/* "All": two groups per row (one when narrower than ~320px); a single group spans the pane so names aren't cut */
.na-entgrid-all { grid-template-columns: repeat(auto-fill, minmax(max(150px, calc(50% - 10px)), 1fr)); }
.na-entgrid-one { grid-template-columns: minmax(0, 1fr); }
.na-entgrid h3 { margin: 0 0 2px; font-size: 12.5px; font-weight: 700; color: var(--ink); }
.na-entmore { margin-top: 2px; padding: 5px 0; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--slate); cursor: pointer; }
.na-entmore:hover { color: var(--slate-ink); text-decoration: underline; }
.na-entlist { list-style: none; margin: 0; padding: 0; }
.na-entlist li { display: flex; align-items: center; padding: 1px 0; border-bottom: 1px solid var(--divider); font-size: 13px; }
.na-entlist .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* names carry dir="auto" so a Latin name on an RTL page is cut at its own end; keep the column aligned to the page */
[dir="rtl"] .na-entlist .name { text-align: right; }
.na-entlist .na-iconbtn { min-width: 26px; min-height: 26px; padding: 6px; }
.na-entlist .na-iconbtn.tl { color: #5a8bb0; }

/* ---------- map ---------- */
.na-map { position: relative; width: 100%; overflow: hidden; border-radius: 8px; background: #f5f7f9; border: 1px solid var(--border); direction: ltr; }
.na-map .layer { position: absolute; left: 0; top: 0; width: 100%; transform-origin: 0 0; transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.na-map .layer img { width: 100%; height: 100%; display: block; }
.na-map .pin {
  position: absolute;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 0 0 4px rgba(53, 83, 107, 0.18);
  transition: left 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), top 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.na-map .none { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-size: 12px; color: var(--muted); }
.na-mapnames { margin: 6px 0 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- bar chart ---------- */
.na-bars { flex: 1; min-height: 0; display: grid; grid-template-columns: 30px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; column-gap: 8px; padding-top: 10px; direction: ltr; }
.na-bars .yaxis { display: flex; flex-direction: column; justify-content: space-between; margin: -6px 0; font-size: 10.5px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.na-bars .plot { position: relative; min-height: 0; }
.na-bars .grid { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--border); }
.na-bars .cols { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--chart-axis); }
.na-bars .cols > * { flex: 1; min-width: 0; background: var(--bar, var(--slate)); border-radius: 2px 2px 0 0; border: 0; padding: 0; }
.na-bars .cols > button[aria-pressed="true"] { background: var(--accent); }
/* x-axis (NA.dayTicksHtml): a short tick under every day, a longer one with the date every few days (counted back
   from the newest), each date centered under its tick; the outermost dates stay inside the chart */
.na-bars .ticks { display: flex; gap: 2px; }
.na-bars .ticks > span { flex: 1; position: relative; height: 19px; }
.na-bars .ticks > span::before { content: ""; position: absolute; top: 0; left: 50%; width: 1px; height: 3px; background: var(--chart-axis); }
.na-bars .ticks > span.major::before { height: 6px; }
.na-bars .ticks > span > span { position: absolute; top: 7px; left: 50%; transform: translateX(-50%); font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.na-bars .ticks > span.start > span { left: 0; transform: none; }
.na-bars .ticks > span.end > span { left: auto; right: 0; transform: none; }

/* ---------- media ---------- */
.na-video { position: relative; border-radius: 6px; overflow: hidden; background: #0d1620; aspect-ratio: 16 / 9; }
.na-video img, .na-video iframe { width: 100%; height: 100%; object-fit: cover; display: block; border: 0; }
.na-video .play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(10, 16, 22, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: 0;
}
.na-thumbs { display: flex; gap: 6px; overflow-x: auto; margin-top: 8px; padding: 4px; }
.na-thumbs button { flex: none; width: 76px; padding: 0; border: 0; background: #0d1620; border-radius: 4px; overflow: hidden; }
.na-thumbs button[aria-pressed="true"] { outline: 2px solid var(--slate); outline-offset: 2px; }
.na-thumbs img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.na-clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- motion ---------- */
@keyframes na-dwell { from { width: 0; } to { width: 100%; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- phone / tablet: normal page scrolling, stacked panes ---------- */
@media (max-width: 1000px) {
  .na-shell { height: auto; min-height: 100vh; overflow: visible; }
  .na-main { display: flex !important; flex-direction: column; }
  .na-main > * { grid-column: auto !important; grid-row: auto !important; }
  .na-pane { height: min(80vh, 720px); flex: none; }
  .na-pane.na-auto { height: auto; }
  .na-col { flex: none; }
  .na-split { display: flex !important; flex-direction: column !important; }
  /* stacked parts take their own height: flex: 1 made every part as tall as the tallest, which left a big gap under the timeline's photo */
  .na-split > * { flex: none; min-height: 0; }
  .na-header-in { flex-wrap: wrap; }
  .na-nav { order: 3; flex-basis: 100%; }
  .na-brand span { display: none; }
  .na-footer { height: auto; min-height: var(--footer-h); flex-wrap: wrap; padding-block: 6px; white-space: normal; }
}
@media (max-width: 560px) {
  :root { --main-pad-inline: 12px; --gap: 12px; }
  .na-lang select { max-width: 150px; }
}

/* ======================================================================
   Pages
   ====================================================================== */

/* ---------- Home (G · Dashboard) ---------- */
.na-home {
  grid-template-columns: 276px minmax(0, 1.3fr) minmax(0, 1fr) 344px;
  /* the rows only shape column 4 (the others span both): Analysis takes its content height, TV/Social the rest */
  grid-template-rows: minmax(0, auto) minmax(200px, 1fr);
}
.na-home .home-feed { grid-column: 1; grid-row: 1 / span 2; }
.na-home .home-reader { grid-column: 2; grid-row: 1 / span 2; }
.na-home .home-mid { grid-column: 3; grid-row: 1 / span 2; }
.na-home .home-volume { flex: none; }
.na-home .home-volume .na-bars { flex: none; height: clamp(176px, 19.5vh, 212px); }
.na-home .home-volume .cols > .today { opacity: 0.4; min-height: 3px; }   /* today is still filling up; never invisible above its "Today" tick */
.na-home .home-volume .nodata {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  background: repeating-linear-gradient(135deg, transparent 0 5px, rgba(16, 26, 35, 0.06) 5px 7px);
}
.na-home .home-volume .nodata span { max-width: 100%; padding: 0 4px; font-size: 10.5px; line-height: 1.25; color: var(--muted); text-align: center; overflow-wrap: anywhere; }
.na-home .home-entities { flex: 1; }
.na-home .home-reader .na-reader .ai { display: none; }   /* the pane label already says "AI summary" */
.na-home .na-mapnames { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* recent news about the story's main person or organization, under the summary */
.home-related { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--divider); }
.home-related .head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.home-related .who { min-width: 0; font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-related .head .na-readlink { margin-inline-start: auto; flex: none; }
.home-related ul { list-style: none; margin: 0; padding: 0; }
.home-related button {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--divider);
  background: none;
  font: inherit;
  color: var(--ink);
  text-align: start;
  cursor: pointer;
}
.home-related li:last-child button { border-bottom: 0; }
.home-related button:hover .t { color: var(--slate-ink); text-decoration: underline; }
.home-related .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.home-related .t { font-size: 14px; font-weight: 600; line-height: 1.35; }
.home-related .m { font-size: 12px; color: var(--muted); }
.home-related img { flex: none; width: 84px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; background: var(--divider); }
.na-home .home-analysis { grid-column: 4; grid-row: 1; }
.na-home .home-media { grid-column: 4; grid-row: 2; }
/* TV/Social toggle stays on one line in long languages; if it still doesn't fit, "more" drops below it */
.na-home .home-media .na-pane-head { flex-wrap: wrap; row-gap: 4px; }
.na-home .home-media .na-seg { flex-wrap: nowrap; }
.na-home .home-media .na-seg button { white-space: nowrap; padding-inline: 10px; }
/* TV: player and title stay put; up to six clip thumbnails sit two across below them */
.na-home .home-media .na-pane-body { display: flex; flex-direction: column; }
.na-home .home-media .na-pane-body > * { flex: none; }
@media (min-width: 1001px) {
  /* on short windows the player gives up width (16:9 at ~18.5vh tall) so its title still shows */
  .na-home .home-media .na-video { width: min(100%, 33vh); margin-inline: auto; }
}
/* home.js sets the rows, a 16:9-per-cell aspect ratio and a floor of ~72px a row: a slightly short pane crops
   the pictures (object-fit) instead of scrolling; a much shorter one scrolls to them */
.na-home .home-media .na-thumbs {
  flex: 0 1 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
}
.na-home .home-media .na-thumbs button { position: relative; width: auto; min-height: 0; }
.na-home .home-media .na-thumbs img { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; }
.home-social { display: block; text-decoration: none; color: var(--ink); background: #f5f7f9; border: 1px solid #e8ecf0; border-radius: 10px; padding: 12px; }
.home-social:hover { color: var(--ink); border-color: var(--border); }
.home-social .who { display: flex; align-items: center; gap: 10px; }
.home-social .who img { width: 34px; height: 34px; border-radius: 50%; display: block; }
.home-social .names { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 12px; color: var(--muted); }
.home-social .names strong { font-size: 13px; color: var(--ink); }
.home-social .plat { font-size: 11px; font-weight: 700; color: #fff; background: #0a62c9; padding: 2px 7px; border-radius: 4px; text-transform: capitalize; }
.home-social .text { display: block; margin: 10px 0; font-size: 13px; line-height: 1.45; }
.home-social .pic { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; display: block; }
.home-social .when { display: block; margin-top: 8px; font-size: 12px; color: var(--muted); }
@media (max-width: 1280px) and (min-width: 1001px) {
  .na-home { grid-template-columns: 240px minmax(0, 1.3fr) minmax(0, 1fr) 300px; }
}
@media (max-height: 800px) and (min-width: 1001px) {
  .na-home .home-analysis .na-gauge .ends { display: none; }   /* the value word beside each label stays */
}
@media (max-width: 1000px) {
  .na-home .home-analysis { height: auto; }
  /* phones: the story reads at full length with the page scroll, not inside its own box */
  .na-home .home-reader { height: auto; }
  .na-home .home-reader .na-pane-body { overflow: visible; }
}

/* ---------- Newsmap ---------- */
.na-newsmap { grid-template-columns: minmax(0, 1fr) 340px; }
.nm-toggles { padding: 8px 0; gap: 5px; }
.nm-toggle { padding: 5px 12px; border-radius: 999px; border: 1.5px solid var(--fill); background: #fff; color: var(--ink); font-size: 12.5px; font-weight: 600; }
.nm-toggle[aria-pressed="true"] { background: var(--fill); color: #fff; }
.nm-map .na-pane-head { min-height: 0; }
/* tiles sit flush, like the original newsmap: hairline edges, no gutters; the dark stage hides sub-pixel seams */
.nm-stage { flex: 1; min-height: 0; position: relative; margin: 0 8px 8px; direction: ltr; background: #1d2a35; }
.nm-head { position: absolute; }
.nm-head > div {
  height: 100%;
  background: #1d2a35;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 9px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow: hidden;
  white-space: nowrap;
}
.nm-head span:first-child { overflow: hidden; text-overflow: ellipsis; }
.nm-head .n { color: #aebccb; font-weight: 600; letter-spacing: 0.02em; text-transform: none; }
.nm-tile { position: absolute; padding: 0; margin: 0; border: 0; background: none; text-align: start; }
.nm-tile .in {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  height: 100%;
  color: #fff;
  overflow: hidden;
  box-shadow: inset -1px -1px 0 rgba(0, 0, 0, 0.28);
  transition: filter 0.15s ease;
}
.nm-tile:hover .in { filter: brightness(1.12); }
/* the story in the preview lights up; no ring, so nothing around it moves */
.nm-tile[aria-pressed="true"] .in { filter: brightness(1.32); }
.nm-tile .t { font-weight: 600; line-height: 1.14; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: break-word; }
.nm-tile .m { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: rgba(255, 255, 255, 0.86); white-space: nowrap; }
.nm-tile .m span:first-child { overflow: hidden; text-overflow: ellipsis; }
.nm-tile:focus-visible { box-shadow: none; }
.nm-tile:focus-visible .in { box-shadow: inset 0 0 0 2px #fff; }   /* keyboard focus only */
.nm-hero { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; display: block; background: #e9edf1; }
.nm-ptitle { margin: 0; font-size: 18px; line-height: 1.28; font-weight: 700; color: var(--ink-strong); text-wrap: balance; }
.nm-outlets { margin-top: 8px; display: inline-flex; font-size: 12px; font-weight: 600; color: var(--slate); background: #eef3f8; border-radius: 999px; padding: 3px 10px; }
.nm-outlets.is-link { cursor: pointer; }
.nm-outlets.is-link:hover { background: #e2eaf2; }
/* the other outlets covering the story, under the preview */
.nm-coverage { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border); }
.nm-coverage ul { list-style: none; margin: 6px 0 0; padding: 0; }
.nm-coverage li > a, .nm-coverage li > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--divider);
  color: var(--ink);
  text-decoration: none;
}
.nm-coverage li:last-child > a, .nm-coverage li:last-child > div { border-bottom: 0; }
.nm-coverage .src { font-size: 12.5px; font-weight: 700; color: var(--ink-strong); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nm-coverage .m { grid-row: 1; grid-column: 2; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.nm-coverage .t { grid-row: 2; grid-column: 1 / -1; font-size: 13px; line-height: 1.38; color: var(--body); }
.nm-coverage a:hover .t { color: var(--slate-ink); text-decoration: underline; }
.nm-ai { margin: 16px 0 0; font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--slate); }
.nm-ai + .nm-body { margin-top: 4px; }
.nm-body { margin-top: 10px; font-size: 14px; line-height: 1.62; color: var(--body); white-space: pre-line; text-wrap: pretty; }
.nm-actions { display: flex; gap: 10px; margin-top: 16px; }
.nm-actions .na-btn { flex: 1; justify-content: center; font-size: 13px; }
a.na-chip { text-decoration: none; }
a.na-chip:hover { background: var(--selection); color: var(--ink); }
@media (max-width: 1000px) {
  .nm-map { height: min(75vh, 640px); }
}
.nm-note { margin-top: 16px; font-size: 12.5px; line-height: 1.5; color: var(--muted); background: #f5f7f9; border-radius: 8px; padding: 10px 12px; }

/* ---------- search with suggestions ---------- */
.na-search { position: relative; display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; background: #fff; color: var(--muted); min-width: min(320px, 100%); margin: 6px 0; }
.na-search input { border: 0; outline: 0; flex: 1; min-width: 0; font-size: 13px; background: transparent; color: var(--ink); }
.na-search:focus-within { box-shadow: var(--focus); }
.na-suggest { position: absolute; top: calc(100% + 4px); inset-inline: 0; z-index: 60; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(16, 26, 35, 0.18); padding: 4px; max-height: 320px; overflow-y: auto; }
.na-suggest [role="option"] { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 6px; font-size: 13px; color: var(--ink); cursor: pointer; }
.na-suggest [role="option"][aria-selected="true"], .na-suggest [role="option"]:hover { background: var(--selection); }
.na-suggest .n { color: var(--muted); font-size: 12px; white-space: nowrap; }
.na-suggest .none { padding: 8px 10px; color: var(--muted); font-size: 13px; }

/* ---------- Link Analysis ---------- */
.na-graph { grid-template-columns: 300px minmax(0, 1fr) 380px; }
.na-graph-empty { grid-template-columns: minmax(0, 1fr); }
.ga-analyzing { font-size: 13px; color: var(--muted); }
.ga-analyzing strong { color: var(--ink); }
.ga-start-title { font-size: 26px; font-weight: 700; letter-spacing: -0.015em; }
.ga-card { display: flex; gap: 12px; align-items: flex-start; }
.ga-card img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; background: #e9edf1; }
.ga-name { font-size: 20px; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.ga-type { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; background: var(--c, var(--slate)); padding: 2px 7px; border-radius: 4px; }
.ga-articles { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.ga-articles strong { color: var(--ink); }
.ga-wiki { margin-top: 12px; font-size: 13.5px; line-height: 1.55; color: var(--body); }
.ga-wiki-src { margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.ga-block { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--divider); }
.ga-block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.ga-conn { margin-top: 10px; }
.ga-conn-head { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.ga-conn-head .dot, .ga-sel .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ga-conn-item { display: inline-block; border: 0; background: var(--divider); color: var(--ink); border-radius: 999px; padding: 3px 9px; margin: 0 4px 4px 0; font-size: 12px; }
.ga-conn-item[aria-pressed="true"] { background: var(--slate); color: #fff; }
.ga-type-chip { border-color: var(--c); }
.ga-type-chip[aria-pressed="true"] { background: var(--c); color: #fff; }
.ga-type-chip[aria-pressed="false"] { background: #fff; color: var(--c); }
.ga-zoom button { min-width: 34px; padding: 4px 8px; }
.ga-stage-wrap { flex: 1; min-height: 0; position: relative; overflow: hidden; background: #fbfcfd; cursor: grab; touch-action: none; direction: ltr; }
.ga-stage-wrap.dragging { cursor: grabbing; }
.ga-stage { position: absolute; inset: 22px 30px 34px; transform-origin: 50% 50%; transition: transform 0.15s ease; }
.ga-stage-wrap.dragging .ga-stage { transition: none; }
.ga-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ga-node {
  position: absolute;
  transform: translate(-50%, -6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0;
  border: 0;
  background: none;
  transition: opacity 0.2s ease;
}
.ga-node .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px #fff; }
.ga-node.l1 { transform: translate(-50%, -9px); }
.ga-node.l1 .dot { width: 18px; height: 18px; }
.ga-node .lbl { font-size: 10px; font-weight: 500; line-height: 1.2; color: var(--ink); max-width: 96px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: rgba(251, 252, 253, 0.88); padding: 0 3px; border-radius: 3px; }
.ga-node.l1 .lbl { font-size: 11.5px; font-weight: 600; }
.ga-node[aria-pressed="true"] .dot { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--c); }
.ga-node.dim { opacity: 0.28; }
/* crowded graphs (small windows): some dots keep their label for hover, focus or selection (graph.js spreadOut) */
.ga-node.quiet { position: absolute; }
.ga-node.quiet .lbl { display: none; position: absolute; top: calc(100% + 2px); left: 50%; transform: translateX(-50%); z-index: 3; box-shadow: 0 1px 3px rgba(16, 26, 35, 0.18); }
.ga-node.quiet:hover .lbl, .ga-node.quiet:focus-visible .lbl, .ga-node.quiet[aria-pressed="true"] .lbl { display: block; }
.ga-center { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 4px; transition: opacity 0.2s; }
/* nodes and the centre can be dragged to rearrange the graph (graph.js) */
.ga-node, .ga-center { cursor: grab; touch-action: none; user-select: none; }
.ga-stage-wrap.moving, .ga-stage-wrap.moving * { cursor: grabbing; }
.ga-reader .na-reader .ai { display: none; }   /* the pane label already says "AI summary" */
.ga-center.dim { opacity: 0.4; }
.ga-center-dot { width: 58px; height: 58px; border-radius: 50%; background: var(--slate) center / cover no-repeat; box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--slate); }
.ga-center-name { font-size: 13px; font-weight: 700; background: rgba(255, 255, 255, 0.92); padding: 1px 6px; border-radius: 4px; max-width: 160px; text-align: center; }
.ga-sel { position: absolute; inset-inline-start: 12px; bottom: 12px; width: min(300px, calc(100% - 24px)); background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(16, 26, 35, 0.16); padding: 12px; cursor: default; }
.ga-sel .top { display: flex; justify-content: space-between; gap: 8px; }
.ga-sel .nm { font-weight: 700; font-size: 14px; overflow-wrap: anywhere; }
.ga-sel .meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 2px; }
.ga-sel .via { margin-top: 8px; font-size: 12.5px; color: var(--body); }
.ga-sel .acts { display: flex; gap: 8px; margin-top: 10px; }
.ga-sel .acts .na-btn { flex: 1; justify-content: center; font-size: 12.5px; padding: 7px 10px; }
.ga-hint { position: absolute; inset-inline-end: 12px; bottom: 10px; font-size: 11.5px; color: var(--muted); pointer-events: none; }
.ga-list { flex: 0 1 44%; min-height: 120px; overflow-y: auto; }
.ga-reader { flex: 1 1 56%; }
.ga-nothumb { width: 72px; aspect-ratio: 4 / 3; border-radius: 6px; background: #eef1f4; flex: none; }
@media (max-width: 1280px) and (min-width: 1001px) {
  .na-graph { grid-template-columns: 260px minmax(0, 1fr) 330px; }
}
@media (max-width: 1000px) {
  .ga-graph { height: min(80vh, 640px); }
}

/* ---------- Timeline · Filmstrip Player ---------- */
.na-timeline { grid-template-rows: minmax(0, 1.35fr) minmax(0, 1fr); }
.na-timeline-empty { grid-template-rows: minmax(0, 1fr); }
.tl-head { flex: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.tl-head img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.tl-head h2 { font-size: 16px; font-weight: 700; }
.tl-pos { margin-inline-start: auto; font-size: 13px; }
.tl-stage { flex: 1; min-height: 0; position: relative; overflow: hidden; background: #fafbfc; direction: ltr; }
.tl-reel { position: absolute; top: 10px; bottom: 10px; left: 50%; display: flex; gap: 12px; transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.tl-reel > .na-empty { position: static; width: 60vw; transform: translateX(-50%); }
.tl-col { flex: none; height: 100%; border-radius: 10px; }
.tl-gap { display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(135deg, #f0f3f6 0 6px, #f8fafb 6px 12px); }
.tl-gap span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
/* an outage (no stories anywhere on the site), hatched like the home chart's "No data available" band */
.tl-gap.tl-nodata { background: repeating-linear-gradient(135deg, #eef1f4 0 5px, #e3e8ed 5px 7px); }
.tl-gap.tl-nodata span { color: #4b5864; font-weight: 600; }
.tl-earlier { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 12px; background: #eef1f4; font-size: 12px; color: var(--muted); }
.tl-earlier .h { font-weight: 700; color: var(--ink); }
.tl-day { display: flex; flex-direction: column; background: #f1f4f7; overflow: hidden; }
.tl-dayhead { flex: none; display: block; width: 100%; text-align: start; border: 0; padding: 9px 12px 8px; background: transparent; transition: background 0.3s ease; }
.tl-dayhead .row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.tl-dayhead .d { font-size: 14px; font-weight: 700; color: var(--ink); }
.tl-dayhead .c { font-size: 12px; color: var(--muted); }
.tl-dayhead .bar { display: block; height: 4px; border-radius: 2px; background: rgba(127, 155, 181, 0.35); margin-top: 7px; overflow: hidden; }
.tl-dayhead .bar span { display: block; height: 100%; background: var(--muted); }
.tl-day.active .tl-dayhead { background: var(--slate); }
.tl-day.active .tl-dayhead .d { color: #fff; }
.tl-day.active .tl-dayhead .c { color: #d3dde7; }
.tl-day.active .tl-dayhead .bar span { background: #d3dde7; }
.tl-list { flex: 1; min-height: 0; position: relative; overflow: hidden; padding: 8px 10px 0; }
.tl-cards { display: flex; flex-direction: column; gap: 8px; transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.tl-card {
  position: relative;
  flex: none;
  height: 72px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  width: 100%;
  text-align: start;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--border);
  overflow: hidden;
  transition: opacity 0.4s ease, box-shadow 0.3s ease;
}
.tl-card[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--slate), 0 6px 16px rgba(16, 26, 35, 0.16); }
.tl-card.later { opacity: 0.5; }
.tl-card .th { width: 50px; height: 50px; border-radius: 6px; overflow: hidden; display: block; background: #dfe5eb; }
.tl-card .th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-card .tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tl-card .mt { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-card .tt { font-size: 12.5px; line-height: 1.3; font-weight: 600; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tl-card .dwell { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--accent); }
.tl-card[aria-pressed="true"] .dwell { width: 100%; }
.tl-card.dwelling .dwell { width: 0; animation: na-dwell var(--dwell, 6s) linear forwards; }
.tl-more { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 8px; background: linear-gradient(rgba(241, 244, 247, 0), #f1f4f7 60%); font-size: 12px; font-weight: 600; color: var(--slate); text-align: center; }
.tl-edge { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(16, 26, 35, 0.12); }
.tl-edge.prev { left: 12px; }
.tl-edge.next { right: 12px; }
.tl-controls { flex: none; border-top: 1px solid var(--border); padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.tl-scrub { display: flex; align-items: center; gap: 10px; font-size: 12px; direction: ltr; }
.tl-segs { flex: 1; display: flex; gap: 2px; min-width: 0; }
.tl-segs button { position: relative; height: 10px; min-width: 4px; padding: 0; border: 0; border-radius: 3px; background: #e2e7ec; overflow: hidden; }
.tl-segs button.on { background: #c9d6e3; }
.tl-segs button span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--slate); }
.tl-seg-gap { height: 10px; min-width: 8px; border-radius: 3px; background: repeating-linear-gradient(135deg, #d5dce3 0 3px, transparent 3px 6px); }
.tl-transport { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tl-buttons { display: flex; align-items: center; gap: 4px; }
.tl-play { min-width: 128px; justify-content: center; }
.tl-play .ico { display: inline-flex; }
.tl-note { font-size: 12px; margin-inline-start: auto; }
.tl-detail { flex-direction: row; }
.tl-split { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.35fr) 300px; }
.tl-media { min-height: 0; overflow-y: auto; border-inline-end: 1px solid var(--divider); }
.tl-text { min-height: 0; display: flex; flex-direction: column; border-inline-end: 1px solid var(--divider); }
.tl-analysis { min-height: 0; overflow-y: auto; }
.tl-playing { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--accent); }
.tl-playing::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.tl-eg { margin-top: 10px; }
.tl-eg .h { font-size: 12px; font-weight: 700; margin-bottom: 4px; }
@media (max-width: 1000px) {
  .tl-player { height: min(80vh, 640px); }
  .tl-detail { height: auto; }
  .tl-split { display: flex; flex-direction: column; }
  /* stacked: a line under each part instead of the side borders */
  .tl-media, .tl-text { border-inline-end: 0; border-bottom: 1px solid var(--divider); }
}
/* timeline: one control row on wide screens so the reel keeps its height */
.na-timeline { grid-template-rows: minmax(0, 1.5fr) minmax(0, 1fr); }
@media (min-width: 1101px) {
  .tl-controls { flex-direction: row; align-items: center; gap: 16px; padding: 8px 14px; }
  .tl-transport { order: 1; flex: none; }
  .tl-scrub { order: 2; flex: 1 1 320px; }
  .tl-note { display: none; }
}
@media (max-height: 760px) and (min-width: 1001px) {
  .tl-dayhead { padding: 7px 12px 6px; }
  .tl-dayhead .bar { margin-top: 5px; }
  .tl-head { padding: 7px 14px; }
}

/* ---------- Podcast ---------- */
.na-podcast { grid-template-columns: 290px minmax(0, 1fr) 370px; }
.na-podcast-empty, .na-pc-archive { grid-template-columns: minmax(0, 1fr); }
.na-pc-archive { max-width: 900px; width: 100%; margin: 0 auto; }
.pc-brand { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 10px 0; }
.pc-brand strong { font-size: 15px; }
.pc-day { padding: 4px 0 8px; }
.pc-dayhead { padding: 10px 14px 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.pc-ep { display: flex; align-items: center; gap: 10px; padding: 8px 14px; color: var(--ink); text-decoration: none; }
a.pc-ep:hover { background: #f7f9fb; color: var(--ink); }
.pc-ep.current { background: var(--selection); }
.pc-ep .ico { width: 28px; height: 28px; border-radius: 50%; background: var(--divider); color: var(--slate); display: flex; align-items: center; justify-content: center; flex: none; }
.pc-ep .ico svg { width: 13px; height: 13px; }
.pc-ep.current .ico { background: var(--slate); color: #fff; }
.pc-ep .tx { display: flex; flex-direction: column; min-width: 0; }
.pc-ep .t { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-ep .m { font-size: 11.5px; color: var(--muted); }
.pc-ga { display: none; }
.genalpha-unlocked .pc-ga { display: flex; background: linear-gradient(90deg, #ff4fd8, #8b5cf6, #22d3ee); background-size: 200% 100%; animation: pc-ga 6s linear infinite; }
.genalpha-unlocked .pc-ga .t, .genalpha-unlocked .pc-ga .m { color: #fff; }
@keyframes pc-ga { from { background-position: 0 0; } to { background-position: 200% 0; } }
.pc-toast { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 100; background: rgba(16, 26, 35, 0.92); color: #fff; padding: 14px 22px; border-radius: 12px; font-size: 16px; font-weight: 700; }
.pc-player .pc-top { flex: none; padding: 16px 18px 14px; display: flex; flex-direction: column; gap: 14px; }
.pc-hero { display: flex; gap: 16px; align-items: center; }
.pc-cover { width: 96px; height: 96px; border-radius: 12px; background: var(--slate); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; flex: none; color: #fff; }
.pc-cover img { width: 46px; height: auto; }
.pc-cover span { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; }
.pc-epno { font-size: 12px; font-weight: 600; }
.pc-title { font-size: 21px; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; margin: 2px 0 4px; }
.pc-transport { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pc-transport .na-btn { padding: 7px 10px; font-size: 12.5px; }
.pc-play { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--slate); color: #fff; display: flex; align-items: center; justify-content: center; }
.pc-play:hover { background: var(--slate-ink); }
.pc-play svg { width: 24px; height: 24px; }
.pc-time { font-size: 13px; color: var(--muted); min-width: 92px; }
.pc-chapters { display: flex; gap: 3px; direction: ltr; }
.pc-ch { display: flex; flex-direction: column; gap: 4px; padding: 0; border: 0; background: none; min-width: 18px; }
.pc-ch .fill { display: block; height: 10px; border-radius: 3px; background: #dfe7ef; overflow: hidden; position: relative; }
.pc-ch .fill span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--slate); }
.pc-ch.aux .fill span { background: #7f93a6; }
.pc-ch[aria-pressed="true"] .fill { box-shadow: 0 0 0 2px #c9d6e3; }
.pc-ch .lb { font-size: 11px; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; }
.pc-ch[aria-pressed="true"] .lb { color: var(--ink); font-weight: 700; }
.pc-now-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.pc-now-text { margin-top: 10px; font-size: 15.5px; line-height: 1.7; color: var(--body); white-space: pre-line; }
.pc-tblock { display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: start; border: 0; border-bottom: 1px solid var(--divider); background: transparent; padding: 12px 16px; }
.pc-tblock[aria-pressed="true"] { background: #eef3f8; box-shadow: inset 3px 0 0 var(--slate); }
.pc-tblock[aria-pressed="true"] .tx { color: var(--ink); }
.pc-tblock .h .na-badge { margin-inline-end: auto; }
/* new episodes have stopped: say so under the episode title (podcast.js) */
.pc-paused { margin: 8px 0 0; display: inline-block; padding: 4px 10px; border-radius: 6px; background: #fff4e0; color: #7a4a06; font-size: 12.5px; font-weight: 600; }
.pc-tblock .h { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.pc-tblock .tx { font-size: 14px; line-height: 1.6; color: var(--body); white-space: pre-line; }
.pc-story { padding: 10px 12px 12px; border-bottom: 1px solid var(--divider); }
.pc-story-btn { display: flex; gap: 10px; width: 100%; text-align: start; border: 0; border-radius: 8px; background: #fff; padding: 8px; box-shadow: 0 0 0 1px var(--border); }
.pc-story-btn[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--slate); background: #f7fafc; }
.pc-story-btn .n { width: 26px; height: 26px; border-radius: 50%; background: var(--slate); color: #fff; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; flex: none; }
.pc-story-btn .tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pc-story-btn .sec { font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--slate); }
.pc-story-btn .sec .na-muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.pc-story-btn .lede { font-size: 13.5px; line-height: 1.4; font-weight: 600; color: var(--ink); }
/* the story's article photo above its section and headline (podcast.js; removed if it fails to load) */
.pc-story-img { display: block; margin-bottom: 6px; border-radius: 6px; overflow: hidden; background: #e9edf1; aspect-ratio: 16 / 9; }
.pc-story-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pc-readmore { display: inline-block; margin: 6px 0 0 44px; font-size: 12.5px; font-weight: 600; text-decoration: none; }
@media (max-width: 1280px) and (min-width: 1001px) {
  .na-podcast { grid-template-columns: 250px minmax(0, 1fr) 320px; }
}

/* ---------- TV News ---------- */
.na-tv { grid-template-columns: minmax(0, 1fr) 440px; }
.tv-now { overflow-x: hidden; overflow-y: auto; }
.tv-player { flex: none; padding: 14px 16px 0; }
.tv-player .na-video { border-radius: 8px; max-height: 60vh; margin: 0 auto; aspect-ratio: 16 / 9; }
.tv-player .na-video .play { width: 64px; height: 64px; }
.tv-dur { position: absolute; inset-inline-end: 8px; bottom: 8px; background: rgba(10, 16, 22, 0.8); color: #fff; font-size: 12px; padding: 2px 6px; border-radius: 4px; }
.tv-info { flex: none; padding: 12px 16px 0; }
.tv-title { font-size: 19px; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; }
.tv-titlerow { display: flex; align-items: flex-start; gap: 12px; }
.tv-titlerow .tv-title { flex: 1; min-width: 0; }
.tv-nav { display: flex; gap: 6px; flex: none; }
.tv-nav .na-iconbtn { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--ink); }
.tv-nav .na-iconbtn:hover:not(:disabled) { background: #eef3f8; }
.tv-nav .na-iconbtn:disabled { opacity: 0.4; cursor: default; }
.tv-live { display: inline-block; margin-inline-end: 8px; padding: 1px 6px; border-radius: 4px; background: #c62828; color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.tv-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; font-size: 12.5px; }
.tv-meta .na-switch { margin-inline-start: auto; }
.tv-chanbtn { border: 0; background: none; padding: 0; font-weight: 700; color: var(--slate); }
.tv-chanbtn:hover { text-decoration: underline; }
.tv-next { display: grid; grid-template-columns: auto 72px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; width: 100%; text-align: start; margin-top: 10px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: #f7f9fb; }
.tv-next .lbl { grid-row: 1 / span 2; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.tv-next img { grid-row: 1 / span 2; width: 72px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; }
.tv-next .t { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-next .c { font-size: 12px; color: var(--muted); }
.tv-text { flex: none; padding: 12px 16px 6px; }
.tv-related { flex: none; padding: 0 16px 16px; }
.tv-related .home-related { margin-top: 10px; }
.tv-relitem { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--divider); color: var(--ink); text-decoration: none; }
.tv-related li:last-child .tv-relitem { border-bottom: 0; }
.tv-relitem:hover .t { color: var(--slate-ink); text-decoration: underline; }
.tv-desc.clamped { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tv-desc a { color: var(--slate); }
.tv-more { margin-top: 4px; padding: 4px 0; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--slate); cursor: pointer; }
.tv-more:hover { text-decoration: underline; }
.tv-desc { font-size: 13.5px; line-height: 1.6; color: var(--body); white-space: pre-line; overflow-wrap: anywhere; }
.tv-pending { display: flex; gap: 12px; align-items: flex-start; background: #f5f7f9; border-radius: 8px; padding: 12px 14px; font-size: 13px; }
.tv-row { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 10px; width: 100%; text-align: start; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--divider); background: transparent; }
.tv-row:hover { background: #f7f9fb; }
.tv-row[aria-pressed="true"] { background: var(--selection); }
.tv-thumb { position: relative; display: block; border-radius: 6px; overflow: hidden; background: #0d1620; aspect-ratio: 16 / 9; }
.tv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tv-thumb .d { position: absolute; inset-inline-end: 4px; bottom: 4px; background: rgba(10, 16, 22, 0.8); color: #fff; font-size: 11px; padding: 1px 5px; border-radius: 3px; }
.tv-thumb .d.live { background: #c62828; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.tv-row .tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tv-row .t { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tv-row .c { font-size: 12px; color: var(--slate); font-weight: 600; }
.tv-row .m { font-size: 11.5px; color: var(--muted); }
.tv-row .now { font-size: 11px; font-weight: 700; color: var(--accent); }
.tv-loadmore { display: flex; justify-content: center; width: calc(100% - 24px); margin: 12px; }

/* TV at a glance (tv.js, /api/v2/tvstats): a third column of headline numbers, clips per day, the busiest
   channels and the most-watched clips. One hue, the site's slate blue (as on the home page's news-volume chart). */
.na-tv { --tv: var(--slate); --tv-dark: var(--slate-ink); --tv-soft: var(--selection); grid-template-columns: minmax(0, 1fr) 400px 320px; }
.tv-stats .na-pane-body { padding: 14px 16px 18px; }
.tvs-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tvs-kpi { padding: 10px 12px; border-radius: 8px; background: var(--tv-soft); }
.tvs-kpi .n { display: block; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink-strong); font-variant-numeric: tabular-nums; }
.tvs-kpi .l { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.35; color: var(--body); }
.tvs-h { margin: 18px 0 10px; }
.tvs-chart { position: relative; }
.tvs-plot { position: relative; height: 92px; margin-inline-start: 34px; border-bottom: 1px solid var(--chart-axis); direction: ltr; }
.tvs-grid { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--border); }
.tvs-grid span { position: absolute; right: 100%; top: -7px; margin-right: 6px; font-size: 10.5px; line-height: 1; color: var(--muted); font-variant-numeric: tabular-nums; }
.tvs-bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; }
.tvs-bars .b { flex: 1; min-width: 0; border-radius: 4px 4px 0 0; background: var(--tv); }
.tvs-bars .b.today { opacity: 0.4; }   /* today is still filling up, as on the home chart */
.tvs-bars .b:hover { background: var(--tv-dark); }
.tvs-ticks { display: flex; justify-content: space-between; margin: 5px 0 0 34px; font-size: 10.5px; color: var(--muted); direction: ltr; }
.tvs-tip { position: absolute; z-index: 3; pointer-events: none; transform: translate(-50%, calc(-100% - 6px)); padding: 4px 8px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 11.5px; white-space: nowrap; box-shadow: 0 4px 12px rgba(16, 26, 35, 0.2); }
.tvs-top { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.tvs-chan { display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; column-gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 6px; background: none; text-align: start; cursor: pointer; }
.tvs-chan:hover { background: #f5f7f9; }
.tvs-chan[aria-pressed="true"] { background: var(--selection); }
.tvs-chan .nm { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tvs-chan .v { font-size: 12.5px; color: var(--body); font-variant-numeric: tabular-nums; }
.tvs-chan .bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--divider); overflow: hidden; }
.tvs-chan .bar i { display: block; height: 100%; border-radius: 3px; background: var(--tv); }
.tvs-watched { display: flex; flex-direction: column; gap: 2px; }
.tvs-clip { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; width: 100%; padding: 6px; border: 0; border-radius: 8px; background: none; text-align: start; cursor: pointer; }
.tvs-clip:hover { background: #f5f7f9; }
.tvs-clip .tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tvs-clip .t { font-size: 12.5px; font-weight: 600; line-height: 1.3; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tvs-clip .m { font-size: 11.5px; color: var(--muted); }
@media (max-width: 1400px) and (min-width: 1201px) {
  .na-tv { grid-template-columns: minmax(0, 1fr) 360px 290px; }
}
@media (max-width: 1200px) and (min-width: 1001px) {
  /* two columns: the stats sit under the clip list */
  .na-tv { grid-template-columns: minmax(0, 1fr) 380px; grid-template-rows: minmax(0, 1.6fr) minmax(0, 1fr); }
  .na-tv .tv-now { grid-column: 1; grid-row: 1 / span 2; }
  .na-tv .tv-browse { grid-column: 2; grid-row: 1; }
  .na-tv .tv-stats { grid-column: 2; grid-row: 2; }
}
@media (max-width: 1000px) {
  .tv-now { height: auto; }
  .na-pane.tv-stats { height: auto; }
  .tv-stats .na-pane-body { overflow: visible; }
}


/* ---------- About ---------- */
.na-about { grid-template-columns: minmax(0, 1fr) 540px; }
.ab-body { padding: 22px 24px 28px; }
.ab-intro { display: flex; gap: 18px; align-items: flex-start; }
.ab-intro img { width: 96px; height: auto; flex: none; }
.ab-intro h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.015em; }
.ab-intro p { margin-top: 8px; font-size: 15px; line-height: 1.65; color: var(--body); max-width: 70ch; }
.ab-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.ab-stats > div { background: #f5f7f9; border-radius: 10px; padding: 14px; }
.ab-stats .n { font-size: 24px; font-weight: 700; color: var(--slate); font-variant-numeric: tabular-nums; }
.ab-stats .l { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.ab-h2 { margin-top: 26px; margin-bottom: 10px; }
.ab-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ab-steps > div { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.ab-steps .h { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.ab-steps .n { width: 24px; height: 24px; border-radius: 50%; background: var(--slate); color: #fff; font-size: 12.5px; display: flex; align-items: center; justify-content: center; }
.ab-steps p { margin-top: 6px; font-size: 13.5px; line-height: 1.55; color: var(--body); }
.ab-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 10px; }
.ab-tools a { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; color: var(--ink); }
.ab-tools a:hover { border-color: var(--slate); background: #f7f9fb; color: var(--ink); }
.ab-tools .mk { width: 36px; height: 36px; border-radius: 8px; color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; font-size: 13px; }
.ab-tools .nm { display: block; font-weight: 700; }
.ab-tools .d { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.ab-entry { padding: 14px 16px; border-bottom: 1px solid var(--divider); }
.ab-entry .meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.ab-entry .ver { font-weight: 600; color: var(--ink); }
.ab-entry .ty { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px; }
.ty-feature { color: #35536b; background: #e6eef5; }
.ty-fix { color: #b42318; background: #fbe9e7; }
.ty-cleanup { color: #4f5d6b; background: #eef1f4; }
.ty-release { color: #0f766e; background: #e3f4f2; }
.ab-entry h3 { margin-top: 6px; font-size: 15px; font-weight: 700; }
.ab-entry details { margin-top: 6px; }
.ab-entry summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--slate); }
.ab-details { margin-top: 6px; font-size: 13px; line-height: 1.55; color: var(--body); overflow-wrap: anywhere; }
.ab-details ul { padding-inline-start: 18px; margin: 4px 0; }
@media (max-width: 1280px) and (min-width: 1001px) {
  .na-about { grid-template-columns: minmax(0, 1fr) 440px; }
  .ab-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .ab-stats, .ab-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ab-intro { flex-direction: column; }
}

/* ---------- Log in ---------- */
/* a two-part card over the old page's particle network: the dark side carries the brand and a live mini Newsmap */
.na-login { position: relative; display: flex !important; align-items: center; justify-content: center; overflow-y: auto; }
.login-particles { position: absolute; inset: 0; z-index: 0; }
.login-particles canvas { display: block; }
.login-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 42% minmax(0, 1fr);
  width: min(880px, 100%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16, 26, 35, 0.05), 0 18px 40px -16px rgba(16, 26, 35, 0.28);
}

/* dark side: brand, one line about the Newsmap, and the map itself filling the rest */
.login-side { display: flex; flex-direction: column; min-height: 500px; padding: 24px 24px 0; background: #1d2a35; color: #fff; }
.login-brand { display: flex; align-items: center; gap: 10px; }
.login-brand img { height: 44px; width: auto; display: block; }
.login-brand span { font-family: 'Outfit', var(--font); font-weight: 300; font-size: 20px; white-space: nowrap; }
.login-tag { margin: 14px 0 18px; font-size: 13px; line-height: 1.5; color: #b9c6d2; }
.login-mapwrap { position: relative; flex: 1; min-height: 0; margin: 0 -24px; }
.login-maplabel { position: absolute; z-index: 2; top: -18px; right: 24px; display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #8ea3b6; }
.login-maplabel::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #8ea3b6; }
.login-mapwrap:not(:has(.is-live)) .login-maplabel { opacity: 0; }   /* "Live" only once real stories are in */
.login-map { position: absolute; inset: 0; overflow: hidden; direction: ltr; }
/* tiles flush like the Newsmap, fading in from the top of the map */
.login-map { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%); mask-image: linear-gradient(180deg, transparent 0, #000 22%); }
.login-map .tile { position: absolute; overflow: hidden; padding: 5px 6px; box-shadow: inset -1px -1px 0 rgba(0, 0, 0, 0.28); }
.login-map .t { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; line-height: 1.16; color: rgba(255, 255, 255, 0.92); overflow-wrap: break-word; }
.login-map.is-live .tile { animation: login-tile-in 0.6s ease both; }
@keyframes login-tile-in { from { opacity: 0; } to { opacity: 1; } }

/* form side */
.login-body { display: flex; flex-direction: column; justify-content: center; padding: 34px 38px 30px; }
.login-body h1 { margin: 0 0 20px; font-size: 22px; font-weight: 700; color: var(--ink-strong); }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-field, .login-captcha { display: flex; flex-direction: column; gap: 5px; }
.login-form .lbl { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.login-form input[type="text"], .login-form input[type="password"] {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
}
.login-form input[type="text"]:focus, .login-form input[type="password"]:focus { outline: 2px solid var(--slate); outline-offset: 0; border-color: transparent; }
.login-form .input-validation-error { border-color: #b42318; }
.login-msg { font-size: 12.5px; color: #b42318; }
.login-msg:empty, .login-msg.field-validation-valid { display: none; }
.login-error { padding: 10px 12px; border-radius: 8px; background: #fdecea; color: #8a1c13; font-size: 13px; }
.login-error.validation-summary-valid { display: none; }
.login-error ul { margin: 0; padding: 0; list-style: none; }
.login-captcha .row { display: flex; align-items: center; gap: 8px; }
.login-captcha img { height: 42px; width: auto; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.login-remember { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.login-remember input { width: 16px; height: 16px; accent-color: var(--slate); margin: 0; }
.login-submit { justify-content: center; height: 42px; font-size: 15px; margin-top: 2px; }

/* phones and narrow windows: one column, the dark side becomes a band across the top with the map on its right */
@media (max-width: 760px) {
  .login-card { grid-template-columns: minmax(0, 1fr); max-width: 460px; }
  .login-side { position: relative; min-height: 0; height: 92px; padding: 0 20px; justify-content: center; }
  .login-tag, .login-maplabel { display: none; }
  .login-mapwrap { position: absolute; inset: 0 0 0 auto; width: 58%; margin: 0; }
  .login-map { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 55%); mask-image: linear-gradient(90deg, transparent 0, #000 55%); }
  .login-map .t { display: none; }
  .login-body { padding: 24px 22px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .login-map.is-live .tile { animation: none; }
}

/* ---------- Admin ---------- */
/* English-only tools: always left to right, whatever the edition. One pane per page, except Live updates (a
   dashboard) and the edit forms (form + live preview). Tabs for the admin sections sit in the sub-bar. */
.adm { direction: ltr; text-align: left; }
.adm-nav { display: flex; align-items: center; gap: 12px; min-width: 0; }
.adm-tag { flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; background: var(--slate); padding: 3px 7px; border-radius: 4px; }
.adm-tabs { display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.adm-tabs::-webkit-scrollbar { display: none; }
.adm-tabs a { padding: 12px 10px 9px; border-bottom: 3px solid transparent; color: var(--muted); font-size: 13.5px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.adm-tabs a:hover { color: var(--ink); }
.adm-tabs a[aria-current="page"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--slate); }

/* pane heads, buttons */
.adm-head { flex-wrap: wrap; gap: 10px 16px; padding: 11px 16px; }
.adm-titles { display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; min-width: 0; }
.adm-titles > .na-iconbtn { margin-inline-start: -6px; }
.adm-h1 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink-strong); }
.adm-titles .na-count a { color: inherit; }
.adm-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-inline-start: auto; }
.adm-tools .na-input, .adm-tools .na-select { height: 32px; }
.adm-search .na-input { width: 200px; }
.adm-btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.na-btn svg { flex: none; }
.adm-btn-danger { background: #b42318; }
.adm-btn-danger:hover { background: #8a1c13; }
.adm-danger, .na-btn.na-ghost.adm-danger { color: #b42318; }
.na-iconbtn.adm-danger:hover { background: #fdecea; }
.adm-disabled { opacity: 0.3; cursor: not-allowed; }
.adm-disabled:hover { background: transparent; }
.adm-dangerlink { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; color: #b42318; font-size: 13.5px; font-weight: 600; text-decoration: none; }
.adm-dangerlink:hover { color: #8a1c13; text-decoration: underline; }
.adm-pane-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 14px; border-top: 1px solid var(--divider); font-size: 12.5px; }
.adm-inline { display: inline-flex; margin: 0; }
.adm-muted { color: var(--muted); }
.adm-strong { font-weight: 600; color: var(--ink); }
.adm-sub { margin-top: 2px; font-size: 12.5px; }
.adm-nowrap { white-space: nowrap; }
.adm-clip { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* page layouts */
.adm-list, .adm-single, .adm-logs { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.adm-list > .adm-card { width: 100%; max-width: 1180px; justify-self: center; align-self: start; max-height: 100%; }
.adm-narrow > .adm-card { max-width: 920px; }
.adm-single > .adm-card { width: 100%; max-width: 900px; justify-self: center; align-self: start; max-height: 100%; }
.adm-edit { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: minmax(0, 1fr); }
.adm-confirm { display: flex !important; flex-direction: column; align-items: center; overflow-y: auto; }

/* tables */
.adm-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.adm-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--panel);
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.adm-table td { padding: 10px 12px; border-bottom: 1px solid var(--divider); vertical-align: top; color: var(--body); overflow-wrap: anywhere; }
.adm-table th:first-child, .adm-table td:first-child { padding-left: 16px; }
.adm-table th:last-child, .adm-table td:last-child { padding-right: 16px; }
.adm-table tbody tr:hover { background: #f7f9fb; }
.adm-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.adm-table a { color: var(--ink); text-decoration: none; }
.adm-table a:hover { color: var(--slate); text-decoration: underline; }
.adm-actions-col { width: 1%; }
.adm-table td.adm-actions { white-space: nowrap; text-align: right; padding-top: 6px; padding-bottom: 6px; vertical-align: middle; }
.adm-actions .na-iconbtn { vertical-align: middle; color: var(--muted); }
.adm-actions .na-iconbtn:hover { color: var(--slate); text-decoration: none; }
.adm-actions .na-iconbtn.adm-danger:hover { color: #b42318; background: #fdecea; }
.adm-actions .na-iconbtn.adm-disabled:hover { color: var(--muted); background: transparent; }
.adm-table.adm-mid td { vertical-align: middle; }
.adm-w-title { width: 28%; }
.adm-w-date { width: 118px; }
.adm-w-build { width: 104px; }
.adm-w-type { width: 92px; }
.adm-w-time { width: 168px; }
.adm-w-user { width: 150px; }
.adm-w-ip { width: 150px; }
.adm-type { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px; white-space: nowrap; }
.adm-role { display: inline-block; margin: 1px 4px 1px 0; padding: 2px 9px; border-radius: 999px; background: var(--selection); color: var(--slate); font-size: 12px; font-weight: 600; }
.adm-user { display: inline-flex; align-items: center; gap: 10px; }
.adm-avatar { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--slate); color: #fff; font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.adm-you { font-size: 11px; font-weight: 700; color: var(--live); background: rgba(46, 133, 64, 0.1); padding: 2px 6px; border-radius: 4px; }
.adm-inlineform { margin: 0; }

/* Live updates */
.adm-live { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr); }
.adm-stages { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); min-width: 0; }
.adm-processed, .adm-published { grid-column: span 6; }
.adm-dbsize { grid-column: span 5; }
.adm-tables { grid-column: span 7; }
.adm-stage { padding: 12px 14px; gap: 10px; }
.adm-stage-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.adm-state { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.adm-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--scroll-thumb); flex: none; }
.adm-state[data-state="running"] { color: var(--live); }
.adm-state[data-state="running"]::before { background: var(--live); box-shadow: 0 0 0 3px rgba(46, 133, 64, 0.18); animation: adm-pulse 1.6s ease-in-out infinite; }
.adm-state[data-state="ok"] { color: var(--ink); }
.adm-state[data-state="ok"]::before { background: var(--slate); }
.adm-state[data-state="stale"] { color: #a8650c; }
.adm-state[data-state="stale"]::before { background: #f0a030; }
.adm-state[data-state="none"]::before { background: #c9d2db; }
@keyframes adm-pulse { 50% { box-shadow: 0 0 0 6px rgba(46, 133, 64, 0.06); } }
.adm-stage-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.adm-stage-facts > div { min-width: 0; padding: 8px 10px; border-radius: 8px; background: #f5f7f9; }
.adm-stage-facts dt { font-size: 11px; color: var(--muted); }
.adm-stage-facts dd { margin: 2px 0 0; font-size: 15px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-stage-facts dd small { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.adm-runs { display: flex; align-items: flex-end; gap: 12px; min-height: 28px; }
.adm-runs .na-count { flex: none; white-space: nowrap; }
.adm-spark { flex: 1; min-width: 0; height: 28px; display: flex; align-items: flex-end; gap: 1px; }
.adm-spark i { flex: 1; min-width: 1px; max-width: 7px; min-height: 2px; background: var(--slate); opacity: 0.5; border-radius: 1px 1px 0 0; }
.adm-spark i.long { background: var(--accent); opacity: 0.85; }

/* charts (admin.js draws SVG at the element's pixel size) */
.adm-chart { position: relative; min-height: 0; }
.adm-chart-pane .adm-chart { flex: 1; margin: 6px 14px 8px 4px; }
.adm-chart svg { display: block; overflow: visible; }
.adm-chart .ax { font-size: 10.5px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.adm-chart .gl { stroke: var(--border); stroke-dasharray: 3 3; }
.adm-chart .base { stroke: var(--chart-axis); }
.adm-chart .area { fill: rgba(53, 83, 107, 0.14); }
.adm-chart .line { fill: none; stroke: var(--slate); stroke-width: 1.6; stroke-linejoin: round; }
.adm-chart .bar { fill: var(--slate); }
.adm-chart .bar.err { fill: var(--accent); }
.adm-chart .cursor { stroke: var(--ink); stroke-opacity: 0.35; }
.adm-chart .dot { fill: var(--slate); stroke: #fff; stroke-width: 2; }
.adm-tip {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 8px));
  background: var(--ink);
  color: #fff;
  font-size: 11.5px;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(16, 26, 35, 0.2);
}
.adm-tip b { font-weight: 700; }
.adm-chart-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
.adm-sizecol { width: 32%; }
.adm-size { display: flex; align-items: center; gap: 8px; }
.adm-size .bar { flex: 1; display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--divider); min-width: 40px; }
.adm-size .bar i { display: block; height: 100%; background: var(--slate); }
.adm-size .bar i + i { background: #8ea3b6; }
.adm-size .v { flex: none; width: 70px; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }

/* logs */
.adm-logpane .adm-head { border-bottom-color: var(--divider); }
.adm-logchart { flex: none; padding: 8px 14px 6px 4px; border-bottom: 1px solid var(--border); }
.adm-chart-sm { height: 92px; }
.adm-logtable th button { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.adm-logtable th button:hover { color: var(--ink); }
.adm-logtable th[aria-sort] button { color: var(--ink); }
.adm-logtable th[aria-sort="ascending"] button::after { content: "\2191"; }
.adm-logtable th[aria-sort="descending"] button::after { content: "\2193"; }
.adm-logtable td { padding-top: 7px; padding-bottom: 7px; font-size: 13px; }
.adm-logtable .t { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.adm-logtable .ip { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.adm-logtable tr.err .ev { color: #b42318; font-weight: 600; }
.adm-logtable tr.err .ev::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #b42318; margin-right: 7px; vertical-align: 1px; }
.adm-logtable tr.has-detail { cursor: pointer; }
.adm-logtable tr.has-detail .ev::after { content: "\203A"; margin-left: 6px; color: var(--muted); font-weight: 400; display: inline-block; transition: transform 0.15s; }
.adm-logtable tr.has-detail[aria-expanded="true"] .ev::after { transform: rotate(90deg); }
.adm-logtable tr.detail:hover { background: transparent; }
.adm-logtable tr.detail td { padding: 0 16px 12px; background: #f7f9fb; }
.adm-logtable pre { margin: 0; max-height: 320px; overflow: auto; padding: 10px 12px; background: #fff; border: 1px solid var(--border); border-radius: 8px; font: 12px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.adm-logtable .url a { word-break: break-all; }
.adm-logtable .kind { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 1px 6px; border-radius: 4px; background: var(--divider); color: var(--muted); }
.adm-logtable .kind.api { background: #e6eef5; color: var(--slate); }
.adm-pagebtns { display: inline-flex; gap: 4px; }
.adm-pagebtns .na-iconbtn[disabled] { opacity: 0.35; cursor: default; background: transparent; }

/* forms */
.adm-formbody { padding: 18px 20px 26px; }
.adm-form { display: flex; flex-direction: column; gap: 16px; max-width: 780px; }
.adm-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.adm-field .lbl { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.adm-field > .na-seg { align-self: flex-start; }
.adm-input { width: 100%; height: 38px; padding: 0 11px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font: inherit; font-size: 14px; color: var(--ink); }
.adm-input:focus, .adm-source:focus { outline: 2px solid var(--slate); outline-offset: 0; border-color: transparent; }
.adm-input.input-validation-error { border-color: #b42318; }
.adm-msg { font-size: 12.5px; color: #b42318; }
.adm-msg:empty, .adm-msg.field-validation-valid { display: none; }
.adm-error { padding: 10px 12px; border-radius: 8px; background: #fdecea; color: #8a1c13; font-size: 13px; }
.adm-error.validation-summary-valid { display: none; }
.adm-error ul { margin: 0; padding: 0; list-style: none; }
.adm-hint { font-size: 12px; line-height: 1.5; color: var(--muted); }
.adm-row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.adm-formactions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.adm-center { justify-content: center; }

/* rich-text field */
.adm-editor { border: 1px solid var(--border); border-radius: 8px; background: #fff; overflow: hidden; }
.adm-editor:focus-within { outline: 2px solid var(--slate); border-color: transparent; }
.adm-editor .adm-source:focus { outline: none; }
.adm-etools { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; padding: 5px 6px; border-bottom: 1px solid var(--divider); background: #f7f9fb; }
.adm-etools button { min-width: 30px; height: 30px; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }
.adm-etools button:hover { background: var(--selection); }
.adm-etools button[aria-pressed="true"] { background: var(--slate); color: #fff; }
.adm-etools button[disabled] { opacity: 0.35; }
.adm-etools .sep { width: 1px; height: 18px; margin: 0 4px; background: var(--border); }
.adm-etools .grow { flex: 1; }
.adm-etools .adm-srcbtn { font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; }
.adm-rich { min-height: 220px; max-height: 52vh; overflow-y: auto; padding: 12px 14px; outline: none; }
.adm-rich:empty::before { content: "Start typing\2026"; color: var(--muted); }
.adm-source { display: block; width: 100%; min-height: 220px; max-height: 52vh; padding: 12px 14px; border: 0; resize: vertical; background: #fff; color: var(--ink); font: 12.5px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; }
.adm-prose, .adm-rich { font-size: 14.5px; line-height: 1.62; color: var(--body); overflow-wrap: anywhere; }
.adm-prose h3, .adm-rich h3 { margin: 14px 0 6px; font-size: 16.5px; font-weight: 700; color: var(--ink); }
.adm-prose h4, .adm-prose h5, .adm-rich h4, .adm-rich h5 { margin: 12px 0 4px; font-size: 14.5px; font-weight: 700; color: var(--ink); }
.adm-prose p, .adm-rich p { margin: 0 0 10px; }
.adm-prose ul, .adm-prose ol, .adm-rich ul, .adm-rich ol { margin: 0 0 10px; padding-inline-start: 22px; }
.adm-prose blockquote, .adm-rich blockquote { margin: 0 0 10px; padding: 4px 12px; border-inline-start: 3px solid var(--border); color: var(--muted); }
.adm-prose pre, .adm-rich pre { margin: 0 0 10px; padding: 10px 12px; border-radius: 6px; background: #f5f7f9; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; }
.adm-prose code, .adm-rich code { padding: 1px 4px; border-radius: 4px; background: #f1f4f7; font: 12.5px ui-monospace, SFMono-Regular, Consolas, monospace; }
.adm-prose a, .adm-rich a { color: var(--slate); text-decoration: underline; }
.adm-prose > :first-child, .adm-rich > :first-child { margin-top: 0; }

/* previews */
.adm-preview { padding: 18px 22px 26px; max-width: 780px; }
.adm-preview-title { margin: 0 0 10px; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink-strong); }
.adm-preview-title:empty::before { content: "Untitled"; color: var(--muted); font-weight: 500; }
.adm-entrypreview { border-bottom: 0; padding: 18px 20px; }
.adm-entrypreview h3:empty::before { content: "Title"; color: var(--muted); font-weight: 500; }
.adm-entrypreview .ab-details:empty::before { content: "No details"; color: var(--muted); }

/* confirmation and small form cards */
.na-pane.adm-confirmcard, .na-pane.adm-formcard { height: auto; flex: none; margin-top: max(2vh, 4px); }
.adm-confirmcard { width: min(560px, 100%); padding: 28px 30px 26px; align-items: center; text-align: center; }
.adm-confirm-icon { width: 48px; height: 48px; margin-bottom: 12px; border-radius: 50%; background: #fdecea; color: #b42318; display: flex; align-items: center; justify-content: center; }
.adm-confirm-icon svg { width: 24px; height: 24px; }
.adm-what { margin: 8px 0 0; font-size: 14px; line-height: 1.55; color: var(--body); }
.adm-excerpt { width: 100%; margin: 16px 0 0; padding: 12px 14px; border-radius: 8px; background: #f5f7f9; text-align: left; font-size: 13.5px; line-height: 1.5; color: var(--body); display: flex; flex-direction: column; gap: 2px; }
.adm-confirmcard .adm-formactions { margin-top: 20px; }
.adm-formcard { width: min(480px, 100%); padding: 20px 24px 24px; gap: 12px; }
.adm-formcard-wide { width: min(680px, 100%); }
.adm-formcard .adm-what { margin: 0; font-size: 13.5px; color: var(--muted); }
.adm-formcard .adm-form { max-width: none; }

@media (max-width: 1280px) and (min-width: 1001px) {
  .adm-processed, .adm-published { grid-column: span 6; }
  .adm-dbsize { grid-column: span 6; }
  .adm-tables { grid-column: span 6; }
  .adm-search .na-input { width: 160px; }
}
@media (max-width: 1000px) {
  .adm-stages { grid-template-columns: minmax(0, 1fr); }
  .na-pane.adm-stage { height: auto; }
  .na-pane.adm-chart-pane { height: 300px; }
  .na-pane.adm-tables { height: min(80vh, 620px); }
  .na-pane.adm-formpane, .na-pane.adm-previewpane { height: auto; }
  .adm-formpane .na-pane-body, .adm-previewpane .na-pane-body { overflow: visible; }
  .na-pane.adm-logpane { height: min(90vh, 900px); }
  .adm-row2 { grid-template-columns: minmax(0, 1fr); }
  .adm-tools { margin-inline-start: 0; }
  .adm-logtable .adm-w-ip, .adm-logtable td.ip { display: none; }
}
@media (max-width: 700px) {
  .adm-num-table th:nth-child(n+4), .adm-num-table td:nth-child(n+4) { display: none; }
  .adm-num-table td:first-child { overflow-wrap: normal; word-break: normal; }
  .adm-size .bar { display: none; }
  .adm-sizecol { width: auto; }
}
@media (max-width: 560px) {
  .adm-search .na-input { width: 130px; }
  .adm-logtable .adm-w-user, .adm-logtable td.user, .adm-logtable .adm-w-type, .adm-logtable td.ty { display: none; }
  .adm-confirmcard { padding: 22px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .adm-state[data-state="running"]::before { animation: none; }
}
