/* The web reader: Home, Feeds and Settings behind a bottom bar, like the app. Tokens come from style.css.
   House Apple rules: 8 point grid, 20 side margin, 680 reading column, 44 to 48 point controls, one radius set
   (groups 20, controls round, images 12), inset hairlines, liquid glass on what floats. */
.screen { max-width: 680px; margin: 0 auto; padding: var(--sp-6) 20px 128px; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
.screen[hidden] { display: none; }
.head { display: flex; align-items: center; gap: var(--sp-3); min-height: 48px; margin-bottom: var(--sp-4); }
.head h1 { font-size: 34px; line-height: 41px; letter-spacing: -.022em; flex: 1; }
.icon-btn { width: 44px; height: 44px; border-radius: var(--r-pill); border: 0; background: var(--surface); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s ease; }
.icon-btn:hover { background: color-mix(in srgb, var(--text) 8%, var(--surface)); }
.icon-btn svg { width: 20px; height: 20px; }

/* inset grouped lists: rows 12 by 16, a hairline between rows inset 16 from the start, no borders */
.group { background: var(--surface); border-radius: var(--r-group); overflow: hidden; }
.group + .label, .note + .label { margin-top: var(--sp-5); }
.label { font-size: 13px; line-height: 18px; color: var(--sub); margin: 0 var(--sp-4) var(--sp-2); }
.note { font-size: 13px; line-height: 18px; color: var(--sub); margin: var(--sp-2) var(--sp-4) 0; }
ul.rows { list-style: none; }
ul.rows li + li { background: linear-gradient(var(--line), var(--line)) 16px 0 / calc(100% - 16px) 1px no-repeat; }
.row { display: flex; gap: var(--sp-3); align-items: center; width: 100%; min-height: 48px; text-align: left;
  background: none; border: 0; padding: var(--sp-3) var(--sp-4); font: inherit; color: var(--text); transition: background .2s ease; }
button.row { cursor: pointer; }
button.row:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.row .txt { flex: 1; min-width: 0; }
.row b { display: block; font-size: 17px; line-height: 24px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row small { display: block; color: var(--sub); font-size: 13px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .thumb { flex: 0 0 56px; width: 56px; height: 56px; object-fit: cover; border-radius: 12px; background: var(--line); }
.row .mono { display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent); }
.row .chev { color: var(--sub); flex: none; font-size: 20px; }
a.row { text-decoration: none; }
a.row:hover { text-decoration: none; background: color-mix(in srgb, var(--text) 4%, transparent); }
.act { flex: none; min-height: 44px; background: none; border: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; padding: 0 var(--sp-2); }
.row a { color: var(--accent); }
.add { display: flex; gap: var(--sp-2); padding: 0 var(--sp-2) 0 var(--sp-4); align-items: center; min-height: 48px; }
.add input { flex: 1; min-width: 0; height: 48px; border: 0; background: none; font: inherit; font-size: 17px; color: var(--text); }
.add input:focus-visible { outline: none; }
.add:focus-within { box-shadow: 0 0 0 4px var(--ring); border-radius: var(--r-group); }
.muted { color: var(--sub); padding: var(--sp-4); }

.story-bar { display: flex; justify-content: space-between; margin-bottom: var(--sp-3); }
.back-btn { min-height: 44px; background: none; border: 0; color: var(--accent); font: inherit; font-size: 17px; font-weight: 600; cursor: pointer; padding: 0; }
.article { font-size: var(--read-size, 17px); line-height: 1.5; }
.article h2 { font-family: var(--display); text-transform: none; letter-spacing: -.02em; font-size: 28px; line-height: 32px; margin-bottom: var(--sp-2); }
.article .meta { color: var(--sub); font-size: 13px; line-height: 18px; margin-bottom: var(--sp-5); }
.article p { margin-bottom: var(--sp-4); }
.article img { max-width: 100%; height: auto; max-height: 50vh; object-fit: cover; border-radius: 12px; }
.article pre, .article table { display: block; overflow-x: auto; }
.stepper { display: flex; gap: var(--sp-2); }
.stepper button { min-width: 56px; height: 44px; border-radius: var(--r-pill); border: 0; background: var(--bg); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; transition: background .2s ease; }
.stepper button:hover { background: color-mix(in srgb, var(--text) 8%, var(--bg)); }

/* liquid glass: translucent so the list shows through, a bright top edge, a soft shadow */
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(var(--sp-4), env(safe-area-inset-bottom));
  display: flex; gap: var(--sp-1); padding: var(--sp-1); border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .26); backdrop-filter: blur(30px) saturate(190%) brightness(1.3); -webkit-backdrop-filter: blur(30px) saturate(190%) brightness(1.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 0 0 .5px rgba(0, 0, 0, .08), 0 8px 24px rgba(0, 0, 0, .12); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-1); min-width: 88px; min-height: 52px;
  padding: var(--sp-1) var(--sp-3); border-radius: var(--r-pill); color: var(--text); font-size: 11px; line-height: 12px; font-weight: 600; transition: background .2s ease, color .2s ease; }
.tabbar a:hover { text-decoration: none; }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--accent); background: rgba(255, 255, 255, .5); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabbar { background: rgba(28, 28, 30, .34); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 0 0 .5px rgba(255, 255, 255, .08), 0 8px 24px rgba(0, 0, 0, .4); }
  :root:not([data-theme="light"]) .tabbar a[aria-current="page"] { background: rgba(255, 255, 255, .12); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Home, Saved and History are plain lists, flush with the view: no card, rows edge to edge, hairlines inset to
   the text. News-app rows (Mobbin study): outlet and time above the headline, picture on the right. */
#home { padding-top: max(var(--sp-2), env(safe-area-inset-top)); }
.plain { padding-left: 0; padding-right: 0; }
.plain > .head, .plain > .back-btn, .plain > .story-bar { padding: 0 20px; }
.plain .group { background: none; border-radius: 0; }
.plain .row { padding: var(--sp-3) 20px; }
.plain ul.rows li + li { background: linear-gradient(var(--line), var(--line)) 20px 0 / calc(100% - 40px) 1px no-repeat; }
.kick { display: block; font-size: 13px; line-height: 18px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.kick .src { color: var(--accent); font-weight: 600; }
.kick .saved { color: var(--accent); }
.row.read .title, .hero.read h3 { color: var(--sub); }
.row.read .thumb { opacity: .6; }
.row .thumb.icon { object-fit: contain; padding: 14px; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.hero { display: block; width: 100%; text-align: left; background: none; border: 0; padding: var(--sp-2) 20px var(--sp-4); font: inherit; color: var(--text); cursor: pointer; }
.hero img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; margin-bottom: var(--sp-2); background: var(--surface); }
.hero h3 { font-family: var(--display); font-size: 22px; line-height: 28px; letter-spacing: -.02em; font-weight: 700; }
.story-bar .txt { flex: 1; }
.story-bar { gap: var(--sp-4); }
.pull { height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; transition: height .2s ease; }
.pull .spin { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); opacity: .5; }
.pull.ready .spin { opacity: 1; }
.pull.busy { height: 48px; }
.pull.busy .spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* account fields sit in the grouped list like Settings rows in the app */
.acct input { flex: 1; min-width: 0; height: 44px; border: 0; background: none; font: inherit; font-size: 17px; color: var(--text); }
.acct input:focus-visible { outline: none; }
.acct .row:focus-within { box-shadow: inset 0 0 0 4px var(--ring); }
.act:disabled { opacity: .4; cursor: default; }
.act.danger { color: #d70015; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .act.danger { color: #ff6961; } }

/* capsule search, 44 points, leading magnifier (house Apple rules) */
.search { display: flex; align-items: center; gap: var(--sp-2); height: 44px; margin: var(--sp-2) 20px var(--sp-2); padding: 0 14px; border-radius: var(--r-pill); background: var(--surface); color: var(--sub); }
.search svg { width: 18px; height: 18px; flex: none; }
.search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 17px; color: var(--text); height: 44px; }
.search input:focus-visible { outline: none; }
.search:focus-within { box-shadow: 0 0 0 4px var(--ring); }

/* coverage: lean bar and every outlet's headline by side (Ground News style) */
.leanbar { width: 100%; }
.leanbar .track { display: flex; gap: 2px; height: 8px; border-radius: var(--r-pill); overflow: hidden; background: var(--line); }
.leanbar .track.empty { opacity: .4; }
.leanbar .track span { flex-basis: 6px; }
.leanbar .left { background: #0074D9; } .leanbar .center { background: color-mix(in srgb, var(--sub) 60%, transparent); } .leanbar .right { background: #d70015; }
.leanbar .legend { display: flex; justify-content: space-between; font-size: 13px; line-height: 18px; color: var(--sub); margin-top: var(--sp-2); }
.coverage { margin-top: var(--sp-6); padding-top: var(--sp-5); border-top: 1px solid var(--line); }
.coverage h3 { font-family: var(--display); font-size: 22px; line-height: 28px; letter-spacing: -.02em; margin-bottom: var(--sp-3); }
.coverage .note-line { font-size: 13px; line-height: 18px; color: var(--sub); margin: var(--sp-2) 0 0; }
.coverage .label { margin: var(--sp-5) var(--sp-4) var(--sp-2); }
.coverage .group { background: var(--surface); border-radius: var(--r-group); overflow: hidden; }
.coverage .cov-title { display: block; font-size: 17px; line-height: 22px; color: var(--text); }
