/* AI News: Today (one list ranked by usefulness for your role, or the same stories as swipe cards) and the story page.
   Built on app.css tokens. Rank numerals and the one primary action are terracotta; "why it matters" notes are peach. */
:root { --peach: #DFA78F; --peach-soft: rgba(223, 167, 143, .22); --plate: #F8F4EF; }
:root[data-theme="dark"] { --peach-soft: rgba(223, 167, 143, .14); --plate: #F3EBE3; }
:root[data-theme="dark"] .plate, :root[data-theme="dark"] .rk img, :root[data-theme="dark"] .xh img { filter: brightness(.88); }
[hidden]:not(dialog) { display: none !important; }
.news-app { --side-w: 320px; }
.news-app .me { text-decoration: none; color: inherit; }
.news-app .me:hover b { text-decoration: underline; text-underline-offset: .18em; }
.toast a { white-space: nowrap; }
#eli-body p + p { margin-top: 12px; }
.news-col { max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); }
.serif { font-family: var(--sans); font-weight: 600; letter-spacing: -.01em; }
.nx-meta { font-size: 13px; font-weight: 500; color: var(--faint); min-width: 0; overflow-wrap: break-word; } /* wraps (3 Oct): a long publisher on one line widened the whole page on a phone */
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); flex-shrink: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--sand); color: var(--ink); font-size: 12.5px; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.pill.soft { background: var(--sand-2); }
.pill.peach { background: var(--peach-soft); }
.pill.dev { background: var(--warn-soft); }
.pill.dev::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #C77700; }
.plate { display: block; width: 100%; border-radius: 20px; overflow: hidden; background: var(--plate); object-fit: cover; }
.impact { display: inline-flex; align-items: flex-end; gap: 8px; font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.impact .bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 15px; }
.impact .bars i { width: 4px; border-radius: 2px; background: var(--line-strong); }
.impact .bars i:nth-child(1) { height: 7px; } .impact .bars i:nth-child(2) { height: 11px; } .impact .bars i:nth-child(3) { height: 15px; }
.impact .bars i.on { background: var(--accent); }
.agree { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.agree .ico { width: 15px; height: 15px; color: var(--ok); }
.agree.one .ico { color: #C77700; }
.tbtn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--ink); }
@media (hover: hover) { .tbtn:hover:not(:disabled) { background: var(--sand-2); } }
.tbtn .ico { width: 20px; height: 20px; }
.tbtn[aria-pressed="true"] { background: var(--sand); color: var(--accent-ink); }
.tbtn.filled { background: var(--sand-2); }
.tbtn.dark { background: var(--ink); color: var(--ground); }
@media (hover: hover) { .tbtn.dark:hover:not(:disabled) { background: var(--accent-hover); color: var(--on-accent); } }
.tbtn:disabled { opacity: .35; cursor: default; }
.tbtn.dark:disabled { background: var(--sand-2); color: var(--ink); }
.btn-lg { min-height: 52px; padding: 0 22px; border-radius: 16px; font-size: 15.5px; font-weight: 600; text-decoration: none; }
.btn-sand { background: var(--sand); color: var(--ink); }
.btn-sand:hover { background: var(--sand-2); box-shadow: 0 0 0 1px var(--line-strong); }
.btn-outline { background: transparent; color: var(--accent-ink); border-color: var(--accent); }
.btn-outline:hover { background: var(--peach-soft); }
a.btn { text-decoration: none; }

/* ---------- masthead ---------- */
.nx-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nx-head h1 { margin: 0; font: 600 36px/1 var(--sans); letter-spacing: -.015em; }
.nx-head .date { margin-left: 10px; font-size: 13.5px; font-weight: 500; color: var(--faint); white-space: nowrap; }
.nx-title { display: flex; align-items: baseline; min-width: 0; }
.nx-actions { display: flex; align-items: center; gap: 4px; }
.streak { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 11px; border-radius: 999px; background: var(--peach-soft); color: var(--ink); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.streak .ico { width: 16px; height: 16px; color: var(--accent); }
.streak[hidden] { display: none; }
.nx-lead { margin: 14px 0 0; font-size: 15px; color: var(--muted); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; padding: 2px 0; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex-shrink: 0; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); font-size: 14px; font-weight: 500; white-space: nowrap; scroll-snap-align: start; transition: background .15s, color .15s, border-color .15s; }
.chips button:hover { border-color: var(--ink); }
.chips button[aria-pressed="true"], .chips button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.chips.small button { height: 34px; padding: 0 12px; font-size: 13.5px; }
.nx-controls { display: grid; gap: 12px; margin-top: 10px; }
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--sand-2); border: 1px solid var(--line); }
.seg2 button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 500; }
.seg2 button .ico { width: 17px; height: 17px; }
.seg2 button[aria-pressed="true"] { background: var(--sheet); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(61, 47, 42, .08); }
:root[data-theme="dark"] .seg2 button[aria-pressed="true"] { background: var(--ink); color: var(--ground); box-shadow: none; }
.seg3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- the ranked list ---------- */
.rank { list-style: none; margin: 18px 0 0; padding: 0; }
.rank > li { border-top: 1px solid var(--line); }
.rank > li:first-child { border-top: 0; }
.rk { display: grid; grid-template-columns: 34px minmax(0, 1fr) 68px; gap: 12px; align-items: start; padding: 14px 0; color: var(--ink); text-decoration: none; }
.rk .n { font: 600 28px/1 var(--sans); color: var(--accent); }
.rk .t { display: grid; gap: 5px; min-width: 0; }
.rk h3 { margin: 0; font: 600 18px/1.18 var(--sans); letter-spacing: -.003em; text-wrap: balance; }
.rk:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.rk .why { font-size: 14px; line-height: 1.45; color: var(--muted); }
.rk .row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.rk img { width: 68px; height: 68px; border-radius: 14px; object-fit: cover; background: var(--plate); }
.rk .mono { font: 500 12.5px/1.3 var(--mono); color: var(--muted); }
.rk .amount { font: 600 20px/1.1 var(--sans); color: var(--ink); }
.rk.first { grid-template-columns: 34px minmax(0, 1fr); padding-top: 4px; }
.rk.first .n { font-size: 40px; }
.rk.first .plate { width: 100%; height: auto; aspect-ratio: 16 / 9.5; border-radius: 20px; }
.rk.first h3 { font-size: 24px; line-height: 1.12; }
.rk.first .why { font-size: 15px; }
.trend { margin: 6px 0 4px; padding: 18px; border-radius: var(--r-lg); background: var(--sand-2); border: 1px solid var(--line); }
.trend h2, .side h2 { margin: 0; font: 600 22px/1.12 var(--sans); }
.trend p { margin: 4px 0 8px; font-size: 13.5px; color: var(--muted); }
.trend ul, .side-trend { list-style: none; margin: 0; padding: 0; }
.trend li + li, .side-trend li + li { border-top: 1px solid var(--line); }
.tr { display: grid; gap: 5px; padding: 11px 0; color: var(--ink); text-decoration: none; }
.tr b { font: 600 16px/1.2 var(--sans); }
.tr:hover b { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.tr span { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.src { width: 22px; height: 22px; border-radius: 6px; display: inline-grid; place-items: center; background: var(--sand); color: var(--muted); flex-shrink: 0; }
.src .ico { width: 12px; height: 12px; }
.rising { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: var(--accent-ink); font-weight: 600; }
.rising .ico { width: 15px; height: 15px; }
.empty { display: grid; justify-items: start; gap: 12px; padding: 28px 0; }
.empty h2 { margin: 0; font: 600 28px/1.12 var(--sans); }
.empty p { margin: 0; color: var(--muted); max-width: 46ch; }
.empty .plate { max-width: 420px; aspect-ratio: 4 / 3; }

/* ---------- swipe cards ---------- */
.deck { position: relative; margin-top: 18px; outline: none; }
.deck-stage { position: relative; height: 560px; touch-action: pan-y; }
.deck-card { position: absolute; inset: 0 0 26px; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 22px; background: var(--sheet); box-shadow: 0 0 0 1px var(--line); transition: transform .32s cubic-bezier(.16, 1, .3, 1), opacity .32s; will-change: transform; }
.deck-card[data-pos="1"] { transform: translateY(13px) scale(.955); opacity: 1; background: var(--sand-2); z-index: 1; }
.deck-card[data-pos="2"] { transform: translateY(26px) scale(.91); background: var(--sand); z-index: 0; }
.deck-card[data-pos="0"] { z-index: 3; }
.deck-card[data-pos="1"] > *, .deck-card[data-pos="2"] > * { visibility: hidden; }
.deck-card[data-pos="gone"] { transform: translateX(-115%) rotate(-6deg); opacity: 0; z-index: 4; pointer-events: none; }
.deck-card[data-pos="hidden"] { opacity: 0; pointer-events: none; transform: translateY(26px) scale(.9); }
.deck-card .plate { height: auto; flex: 1 1 150px; min-height: 150px; max-height: 240px; border-radius: 14px; object-position: center 40%; }
.deck-card h3 { margin: 0; font: 600 24px/1.12 var(--sans); text-wrap: balance; }
.deck-card h3 a { text-decoration: none; }
.deck-card h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .15em; }
.deck-card p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.deck-card .note { margin-top: auto; }
.note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--peach-soft); color: var(--ink); font-size: 14.5px; line-height: 1.5; }
.note .ico { width: 17px; height: 17px; margin-top: 2px; color: var(--accent-ink); }
.note b { font-weight: 600; }
.deck-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.deck-count { font-size: 14px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.deck-end { position: absolute; inset: 0 0 26px; display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 22px; background: var(--sheet); box-shadow: 0 0 0 1px var(--line); z-index: 2; }
.deck-end[hidden] { display: none; }
.deck-end .plate { height: 190px; border-radius: 16px; }
.deck-end h3 { margin: 0; font: 600 32px/1.1 var(--sans); }
.deck-end p { margin: 0; color: var(--muted); }
.deck-end .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; }
.deck-end .btns.one { grid-template-columns: 1fr; }
#trend-inline:not(:empty) { margin-top: 18px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.week span { display: grid; justify-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.week i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1px dashed var(--line-strong); color: var(--on-accent); }
.week i.on { border: 0; background: var(--accent); }
.week i .ico { width: 15px; height: 15px; }

/* ---------- story page ---------- */
.news-app .main { container-type: inline-size; }
.st-bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -26px calc((100% - 100cqw) / 2 - clamp(16px, 3vw, 40px)) 0; padding: 8px calc(clamp(8px, 2vw, 32px) + (100cqw - 100%) / 2); background: color-mix(in srgb, var(--ground) 92%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border-radius: 12px; color: var(--ink); font-size: 15px; font-weight: 500; text-decoration: none; }
.back:hover { background: var(--sand-2); }
.back .ico { width: 20px; height: 20px; }
.st-acts { display: flex; align-items: center; gap: 2px; }
.story { display: grid; grid-template-columns: minmax(0, 1fr); padding-top: 14px; }
.story > .plate { aspect-ratio: 16 / 9; max-height: 420px; }
.st-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 18px; }
.story h1 { margin: 12px 0 0; font: 600 clamp(28px, 4.6vw, 44px)/1.1 var(--sans); letter-spacing: -.015em; text-wrap: balance; }
.st-dek { margin: 12px 0 0; font-size: 17.5px; line-height: 1.55; color: var(--muted); text-wrap: pretty; }
.st-conf { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.st-conf .seg2 { min-width: min(100%, 360px); }
.card-sand { margin-top: 18px; padding: 18px; border-radius: var(--r-lg); background: var(--sand-2); box-shadow: 0 0 0 1px var(--line); }
.card { padding: 18px; border-radius: var(--r-lg); background: var(--sheet); box-shadow: 0 0 0 1px var(--line); }
.tl-label, .story .tl-label { margin: 0 0 10px; font: 700 13px/1.3 var(--sans); letter-spacing: 0; color: var(--accent-ink); }
.bul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.bul li { display: flex; gap: 10px; font-size: 16px; line-height: 1.5; }
.bul li::before { content: ""; width: 6px; height: 6px; margin-top: 9px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.story h2 { margin: 40px 0 0; font: 600 28px/1.12 var(--sans); letter-spacing: -.01em; }
.story h2 + .sub { margin: 6px 0 0; font-size: 15px; color: var(--muted); }
.prose p { margin: 14px 0 0; font-size: 17.5px; line-height: 1.65; text-wrap: pretty; max-width: 40em; }
.xh { margin: 20px 0 0; border-radius: 16px; overflow: hidden; background: #FFFFFF; box-shadow: 0 0 0 1px var(--line); }
.xh img { display: block; width: 100%; height: auto; }
.xh button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.whynow { display: flex; gap: 12px; margin-top: 20px; padding: 16px; border-radius: 18px; background: var(--peach-soft); }
.whynow .ico { width: 19px; height: 19px; margin-top: 2px; color: var(--accent-ink); }
.whynow h3 { margin: 0; font-size: 15px; font-weight: 600; }
.whynow p { margin: 4px 0 0; font-size: 15.5px; line-height: 1.55; }
.tline { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 12px; margin-top: 18px; padding-bottom: 4px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.tline::-webkit-scrollbar { display: none; }
.tline::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: var(--line-strong); }
.tline li { position: relative; display: grid; align-content: start; gap: 8px; scroll-snap-align: start; list-style: none; }
.tline i { width: 14px; height: 14px; border-radius: 50%; background: var(--sheet); border: 2px solid var(--ink); }
.tline li:last-child i { background: var(--accent); border-color: var(--accent); }
.tline b { font-size: 13.5px; font-weight: 700; }
.tline li:last-child b { color: var(--accent-ink); }
.tline span { font-size: 14px; line-height: 1.45; color: var(--muted); padding-right: 8px; }
.role-card { display: grid; gap: 12px; margin-top: 14px; }
.role-card .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.role-card h3 { margin: 0; font: 600 20px/1.12 var(--sans); text-wrap: balance; }
.role-card p { margin: 0; font-size: 16px; line-height: 1.55; }
.role-card .todo { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.role-card h4 { margin: 0; font-size: 14px; font-weight: 600; }
.role-mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.role-mini .card { padding: 14px; display: grid; gap: 6px; align-content: start; }
.role-mini b { font-size: 12.5px; font-weight: 700; color: var(--accent-ink); }
.role-mini p { margin: 0; font-size: 14.5px; line-height: 1.5; }
.learn { display: grid; grid-auto-flow: column; grid-auto-columns: min(290px, 82%); gap: 12px; margin-top: 16px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; padding-bottom: 4px; }
.learn::-webkit-scrollbar { display: none; }
.learn .card { display: grid; align-content: start; gap: 10px; min-height: 230px; scroll-snap-align: start; }
.learn .card:first-child { background: var(--sand-2); }
.learn .n { font: 600 38px/1 var(--sans); color: var(--accent); }
.learn h3 { margin: 0; font: 600 20px/1.15 var(--sans); }
.learn p { margin: 0; font-size: 15px; line-height: 1.55; }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line-strong); transition: width .2s, background .2s; }
.dots i.on { width: 18px; background: var(--accent); }
.cmp { margin-top: 16px; padding: 6px 18px 16px; overflow-x: auto; }
.cmp table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.cmp th, .cmp td { padding: 11px 10px 11px 0; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmp thead th { font-weight: 700; }
.cmp thead th:nth-child(2) { color: var(--accent-ink); }
.cmp tbody th { font-weight: 500; color: var(--muted); }
.cmp tbody td:nth-child(2) { font-weight: 600; }
.cmp .src-note { margin: 10px 0 0; font-size: 13px; color: var(--faint); }
.play pre { margin: 0; padding: 14px; border-radius: 12px; background: var(--ground); box-shadow: 0 0 0 1px var(--line); font: 12.5px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.play { display: grid; gap: 12px; margin-top: 14px; }
.play .top { display: flex; align-items: center; justify-content: space-between; }
.play .top b { font-size: 13px; color: var(--muted); }
.play small { font-size: 13px; color: var(--faint); }
.next { display: grid; gap: 10px; margin-top: 14px; }
.next a { display: grid; grid-template-columns: 44px minmax(0, 1fr) 20px; gap: 12px; align-items: center; padding: 14px; border-radius: 18px; background: var(--sheet); box-shadow: 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; }
.next a:hover { box-shadow: 0 0 0 1px var(--line-strong); }
.next .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--sand-2); color: var(--accent-ink); }
.next small { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.next b { font-size: 15.5px; font-weight: 600; }
.take { margin-top: 40px; padding: 22px; border-radius: 24px; background: #3D2F2A; color: #F8F4EF; display: grid; gap: 16px; }
.take .who { display: flex; align-items: center; gap: 12px; }
.take .who img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: center 18%; background: var(--peach); }
.take h2 { margin: 0; color: #F8F4EF; font-size: 26px; }
.take .who small { display: block; font-size: 13px; color: rgba(248, 244, 239, .74); }
.take .body { display: grid; gap: 14px; padding: 18px; border-radius: 16px; background: #FFFDFC; color: #3D2F2A; }
.take h3 { margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.take .body p { margin: 0; font-size: 16px; line-height: 1.55; }
.take .pred { padding: 12px; border-radius: 12px; border: 1px dashed rgba(61, 47, 42, .3); }
.take .pl i { display: block; height: 11px; margin-top: 7px; border-radius: 6px; background: #EADFD6; }
.take .foot { font-size: 13px; color: rgba(248, 244, 239, .74); }
.sources { list-style: none; margin: 14px 0 0; padding: 0; counter-reset: s; }
.sources li { counter-increment: s; display: grid; grid-template-columns: 26px minmax(0, 1fr) 20px; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.sources li:first-child { border-top: 0; }
.sources li::before { content: counter(s); font-size: 13px; font-weight: 700; color: var(--faint); padding-top: 2px; }
.sources a { color: var(--ink); text-decoration: none; font-size: 15.5px; font-weight: 600; line-height: 1.35; }
.sources a:hover { text-decoration: underline; }
.sources small { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--muted); }
.sources .ico { width: 18px; height: 18px; color: var(--muted); margin-top: 2px; }
.graph { position: relative; margin-top: 14px; min-height: 280px; border-radius: 20px; background: var(--sand-2); box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.graph svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.graph line { stroke: var(--line-strong); stroke-width: 1.5; }
.graph .me { position: absolute; left: 50%; top: 50%; translate: -50% -50%; padding: 8px 12px; border-radius: 12px; background: var(--ink); color: var(--ground); font-size: 13px; font-weight: 600; white-space: nowrap; margin: 0; }
.graph .node { position: absolute; width: calc(50% - 28px); max-width: 220px; padding: 9px 11px; border-radius: 12px; background: var(--sheet); box-shadow: 0 0 0 1px var(--line); color: var(--ink); font-size: 13px; line-height: 1.35; text-decoration: none; }
.graph a.node:hover { box-shadow: 0 0 0 1px var(--ink); }
.graph .node small { display: block; font-size: 11.5px; font-weight: 700; color: var(--accent-ink); }
.graph .node:nth-of-type(1) { left: 12px; top: 12px; } .graph .node:nth-of-type(2) { right: 12px; top: 12px; }
.graph .node:nth-of-type(3) { left: 12px; bottom: 12px; } .graph .node:nth-of-type(4) { right: 12px; bottom: 12px; }
.details { display: grid; gap: 10px; margin-top: 18px; }
.details .card { display: grid; gap: 8px; }
.details dl { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; font-size: 15px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; font-weight: 500; }
.ask-bar { position: sticky; bottom: 0; z-index: 8; margin: 36px calc(-1 * clamp(16px, 3vw, 40px)) 0; padding: 12px clamp(16px, 3vw, 40px) 18px; background: linear-gradient(to top, var(--ground) 72%, transparent); }
.ask-bar button { display: flex; align-items: center; gap: 10px; width: 100%; height: 56px; padding: 0 8px 0 16px; border-radius: 18px; border: 1px solid var(--line-strong); background: var(--sheet); color: var(--muted); font-size: 15.5px; text-align: left; box-shadow: 0 8px 24px rgba(61, 47, 42, .08); }
.ask-bar button:hover { color: var(--ink); border-color: var(--ink); }
.ask-bar .ico { width: 19px; height: 19px; color: var(--ria); }
.ask-bar span.go { margin-left: auto; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--sand); color: var(--ink); }
.ask-bar span.go .ico { color: var(--ink); width: 18px; height: 18px; }

/* side column (desktop) */
.side .card { padding: 18px; }
.side .card h2 { font: 600 16px/1.3 var(--sans); }
.side .card p { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.side .sources li { grid-template-columns: 20px minmax(0, 1fr) 16px; gap: 8px; padding: 10px 0; }
.side .sources a { font-size: 14px; }
.side-ask { display: grid; gap: 10px; }
.side-ask .qs { display: grid; gap: 6px; }
.qbtn { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--sheet); color: var(--ink); font-size: 14px; text-align: left; text-decoration: none; }
.qbtn:hover { border-color: var(--ink); }
.qbtn .ico { width: 16px; height: 16px; color: var(--muted); }

/* ---------- dialogs: share, ask, search, explain ---------- */
.nx-dlg { width: min(520px, calc(100vw - 24px)); max-height: min(88vh, 760px); padding: 0; border: 0; border-radius: 24px; background: var(--ground); color: var(--ink); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .5); overflow: auto; }
.nx-dlg::backdrop { background: rgba(28, 22, 19, .45); }
.nx-dlg .in { display: grid; gap: 14px; padding: 18px 20px 22px; }
.nx-dlg .hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nx-dlg h2 { margin: 0; font: 600 26px/1.12 var(--sans); }
.nx-dlg p { margin: 0; color: var(--muted); }
.share-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.share-grid a, .share-grid button { display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 76px; padding: 8px; border-radius: 16px; border: 1px solid var(--line-strong); background: var(--sheet); color: var(--ink); font-size: 12.5px; font-weight: 500; text-align: center; text-decoration: none; }
.share-grid a:hover, .share-grid button:hover { border-color: var(--ink); }
.share-grid .ico, .share-grid svg { width: 20px; height: 20px; }
.qcard { width: 100%; aspect-ratio: 1; border-radius: 18px; background: #3D2F2A; }
.eli .xh { margin-top: 0; margin-bottom: 14px; }
.eli p { color: var(--ink); font-size: 17px; line-height: 1.6; }
.search-in { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 8px 0 14px; border-radius: 16px; border: 1px solid var(--ink); background: var(--sheet); }
.search-in .ico { width: 20px; height: 20px; color: var(--accent-ink); }
.search-in input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; font-size: 16px; outline: none; }
.search-in input::placeholder { color: var(--faint); }
.examples { display: flex; flex-wrap: wrap; gap: 8px; }
.examples button { min-height: 38px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--sand-2); color: var(--ink); font-size: 13.5px; text-align: left; }
.examples button:hover { border-color: var(--line-strong); }
.hits { list-style: none; margin: 0; padding: 0 0 0 24px; position: relative; }
.hits::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: 16px; width: 2px; background: var(--line-strong); }
.hits a { position: relative; display: grid; gap: 3px; padding: 11px 0; color: var(--ink); text-decoration: none; }
.hits a::before { content: ""; position: absolute; left: -24px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--sheet); border: 2px solid var(--ink); }
.hits a:hover b { text-decoration: underline; }
.hits small { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.hits b { font-size: 15px; font-weight: 500; line-height: 1.4; }
.hint-line { font-size: 13.5px; color: var(--muted); }
.saved-list { list-style: none; margin: 16px 0 0; padding: 0; }
.saved-list li + li { border-top: 1px solid var(--line); }
.saved-list .rk { grid-template-columns: 72px minmax(0, 1fr) 44px; align-items: center; }
.saved-list .rk img { width: 72px; height: 72px; }

.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.deck-card h3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.head-preview { display: flex; align-items: center; gap: 7px; margin: 8px 0 0; font-size: 12.5px; color: var(--faint); }
.head-preview .ico { width: 15px; height: 15px; }
.head-preview[hidden] { display: none; }
@media (min-width: 1180px) {
  .trend-li { display: none; }
  .story .in-article, .ask-bar { display: none; }
}
@media (min-width: 761px) {
  .nx-head h1 { font-size: 40px; }
  /* the stage holds only absolutely placed cards, so it needs an explicit width inside the start-aligned grid */
  .deck-stage { height: 520px; width: 100%; max-width: 460px; }
  .deck-nav { width: 100%; max-width: 460px; }
  .deck { display: grid; justify-items: center; }
  .rk.first .plate { aspect-ratio: 16 / 8; }
  .rk.first h3 { font-size: clamp(28px, 2.5vw, 36px); line-height: 1.1; }
  .rk.first .why { font-size: 16.5px; }
}
@media (max-width: 760px) {
  .nx-head h1 { font-size: 34px; white-space: nowrap; } /* a page title on a phone: 34px, as an iPhone app's large title */
  .nx-title { flex-direction: column; align-items: flex-start; gap: 3px; }
  .nx-head .date { margin-left: 0; min-height: 21px; } /* the issue's date and the topic chips fill in after the page loads: */
  #cats:empty { min-height: 38px; }                      /* their room is kept, so the page doesn't jump (CLS 0.25 on a phone) */
  .deck-stage { height: clamp(440px, calc(100dvh - 318px), 560px); }
  .deck-card { gap: 10px; padding: 14px; }
  .rk:not(.first) .why { display: none; }
  .deck-card .plate { flex-basis: 118px; min-height: 118px; }
  .deck-card h3 { font-size: 20px; }
  .deck-card .clamp { -webkit-line-clamp: 3; }
  .deck-card .note { padding: 10px 12px; font-size: 14px; }
  /* the Ask Ria corner button sits at the right edge above the tab bar, where Next would be: Save and Next move left of it (1 Oct) */
  .deck-nav { padding-right: 62px; }
  .chips.bleed { margin-right: -16px; padding-right: 16px; }
  .st-bar { margin-top: -16px; }
  .story h2 { font-size: 24px; }
  .prose p { font-size: 17px; }
  .xh.bleed { margin-left: -16px; margin-right: -16px; border-radius: 0; box-shadow: 0 1px 0 var(--line), 0 -1px 0 var(--line); }
  .ask-bar { bottom: calc(66px + env(safe-area-inset-bottom, 0px)); margin-bottom: 0; }
  .tline { margin-right: -16px; padding-right: 16px; }
  .learn { margin-right: -16px; padding-right: 16px; }
}
@media (prefers-reduced-motion: reduce) { .deck-card { transition: none; } }

.gate-in { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.gate-btns { display: grid; grid-template-columns: 1fr auto; gap: 10px; }

/* Reading needs a free account: the way in, on Today and under a story's TL;DR */
.news-gate { display: grid; gap: 10px; margin: 18px 0 6px; padding: 22px; border-radius: var(--r-lg); background: var(--sheet); box-shadow: 0 0 0 1px var(--line); }
.news-gate h2 { margin: 0; font: 600 28px/1.12 var(--sans); letter-spacing: -.01em; }
.news-gate p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
.news-gate .gate-btns { margin-top: 6px; }
#news-gate .news-gate { margin: 4px 0 20px; }
@media (min-width: 761px) { .news-gate .gate-btns { grid-template-columns: auto auto; justify-content: start; } }
.news-app[data-locked] { --side-w: 0px; }
.news-app[data-locked] #side { display: none; }
/* a signed-in reader's page swaps the teaser for the whole story; don't flash the sign-up box first */
html[data-auth] .ssr-gate { display: none; }
@media (max-width: 374px) { .nx-head h1 { font-size: 30px; } } /* one line beside the header's buttons on a 320px phone */
