/* ==========================================================================
   SIGNAL // FEED — style.css
   Instrument-panel editorial. Zero border-radius. Hairlines. Mono kickers.
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/inter-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/inter-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('assets/fonts/jetbrains-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('assets/fonts/jetbrains-mono-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Square-corner system ---------- */
*,
*::before,
*::after {
  border-radius: 0;
}

[hidden] {
  display: none !important;
}

/* ---------- Theme tokens ---------- */
:root {
  --bg: #0b0c0e;
  --panel: #121417;
  --panel2: #191c21;
  --line: #23262b;
  --ink: #e8eaec;
  --mute: #8d939b;
  --accent: #ffa028;
  --accent-ink: #0b0c0e;
  --head-bg: rgba(11, 12, 14, 0.84);

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --display: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --hair: 1px;
  --row-h: 76px;
  --thumb-w: 112px;
  --thumb-h: 76px;

  /* image placeholder (empty/failed thumbnails) */
  --ph-bg: #121417;
  --ph-line: #23262b;
  --ph-ink: #8d939b;

  /* popchat ui.css overrides */
  --bg-2: #0f1114;
  --surface: #121417;
  --text: #e8eaec;
  --muted: #8d939b;
  --accent-2: #ffa028;
  --radius: 0px;

  color-scheme: dark;
}

html[data-theme="dark"] {
  --bg: #0b0c0e;
  --panel: #121417;
  --panel2: #191c21;
  --line: #23262b;
  --ink: #e8eaec;
  --mute: #8d939b;
  --accent: #ffa028;
  --accent-ink: #0b0c0e;
  --head-bg: rgba(11, 12, 14, 0.84);
  --ph-bg: #121417;
  --ph-line: #23262b;
  --ph-ink: #8d939b;
  --bg-2: #0f1114;
  --surface: #121417;
  --text: #e8eaec;
  --muted: #8d939b;
  --accent-2: #ffa028;
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f5f5f2;
  --panel: #ffffff;
  --panel2: #ecece7;
  --line: #d8d8d2;
  --ink: #101214;
  --mute: #6b7076;
  --accent: #b35400;
  --accent-ink: #ffffff;
  --head-bg: rgba(245, 245, 242, 0.86);
  --ph-bg: #e9e9e3;
  --ph-line: #d8d8d2;
  --ph-ink: #8d939b;
  --bg-2: #efefeb;
  --surface: #ffffff;
  --text: #101214;
  --muted: #6b7076;
  --accent-2: #b35400;
  color-scheme: light;
}

/* dark default when nothing has been resolved yet */
@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]):not([data-theme="light"]) {
    --bg: #f5f5f2;
    --panel: #ffffff;
    --panel2: #ecece7;
    --line: #d8d8d2;
    --ink: #101214;
    --mute: #6b7076;
    --accent: #b35400;
    --accent-ink: #ffffff;
    --head-bg: rgba(245, 245, 242, 0.86);
    --ph-bg: #e9e9e3;
    --ph-line: #d8d8d2;
    --ph-ink: #8d939b;
    color-scheme: light;
  }
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="dark"]):not([data-theme="light"]) {
    --bg: #0b0c0e;
    --panel: #121417;
    --panel2: #191c21;
    --line: #23262b;
    --ink: #e8eaec;
    --mute: #8d939b;
    --accent: #ffa028;
    --accent-ink: #0b0c0e;
    --head-bg: rgba(11, 12, 14, 0.84);
    --ph-bg: #121417;
    --ph-line: #23262b;
    --ph-ink: #8d939b;
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  transition: background-color 140ms linear, color 140ms linear;
}

h1, h2, h3, h4, p, figure, blockquote {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

button {
  font-family: inherit;
}

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

/* page column */
.app {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Header ---------- */
header,
.hdr {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: calc(10px + env(safe-area-inset-top)) 0 10px;
  background: var(--head-bg);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: var(--hair) solid var(--line);
}

header > :first-child,
.hdr > :first-child {
  margin-right: auto;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}

.brand b,
.brand strong {
  font-weight: 700;
  color: var(--accent);
}

.brand .sub {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--mute);
}

/* ---------- Square buttons ---------- */
.btn-q {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 8px 11px;
  margin: 0;
  background: transparent;
  color: var(--ink);
  border: var(--hair) solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 120ms linear, border-color 120ms linear, color 120ms linear;
}

.btn-q:hover {
  background: var(--panel2);
  border-color: var(--mute);
  color: var(--ink);
}

.btn-q:active {
  background: var(--panel);
}

.btn-q:disabled,
.btn-q[aria-disabled="true"] {
  opacity: 0.45;
  cursor: default;
}

.btn-q .dotmark {
  width: 5px;
  height: 5px;
  background: var(--accent);
  display: inline-block;
}
dc5|
/* ---------- Visual style picker ---------- */
select#style-select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 34px;
  padding-right: 24px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 13px) calc(50% - 1px), calc(100% - 9px) calc(50% - 1px);
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
  text-overflow: ellipsis;
}

select#style-select:hover {
  background-color: var(--panel2);
}

select#style-select option {
  background: var(--panel);
  color: var(--ink);
  font-family: var(--mono);
  letter-spacing: 0.08em;
}
dc5|

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  border-bottom: var(--hair) solid var(--line);
  margin: 0;
  padding: 0;
  background: transparent;
}

.tabs::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.tab {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 14px 11px;
  margin: 0 0 -1px 0;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--mute);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: color 120ms linear, border-color 120ms linear;
}

.tab:hover {
  color: var(--ink);
}

.tab[aria-selected="true"] {
  color: var(--ink);
  font-weight: 700;
  border-bottom-color: var(--accent);
}

.tab .count {
  font-size: 9px;
  color: var(--mute);
  letter-spacing: 0.08em;
}

/* ---------- Chips (subreddits, filters) ---------- */
.chip {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  margin: 0;
  background: transparent;
  border: var(--hair) solid var(--line);
  color: var(--mute);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  transition: color 120ms linear, border-color 120ms linear, background-color 120ms linear;
}

.chip:hover {
  color: var(--ink);
  border-color: var(--mute);
}

.chip[aria-selected="true"],
.chip.is-on,
.chip.is-active {
  color: var(--accent);
  border-color: var(--accent);
}

.chiprow,
.chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-bottom: var(--hair) solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

.chiprow::-webkit-scrollbar,
.chips::-webkit-scrollbar {
  display: none;
}

/* ---------- Stamps / kickers / numerals / tags ---------- */
.stamp {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  line-height: 1.5;
  white-space: nowrap;
}

.stamp b {
  font-weight: 700;
  color: var(--ink);
}

.idx {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  text-align: right;
  line-height: 1;
  user-select: none;
}

.tag-read {
  display: inline-block;
  padding: 1px 5px;
  border: var(--hair) solid var(--accent);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.5;
  white-space: nowrap;
}

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  flex: 0 0 auto;
}

/* ---------- Generic open button (headlines) ---------- */
.js-open {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: color 120ms linear;
}

.js-open:hover {
  color: var(--accent);
}

/* ---------- SOURCE / DISCUSS links ---------- */
.links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 8px;
  border: var(--hair) solid var(--line);
  background: transparent;
  color: var(--mute);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: color 120ms linear, border-color 120ms linear, background-color 120ms linear;
}

.links a:hover {
  color: var(--ink);
  border-color: var(--mute);
  background: var(--panel2);
}

.links a:first-child:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- Lead card ---------- */
.lead {
  position: relative;
  display: block;
  margin: 18px 0 6px;
  padding: 18px;
  background: var(--panel);
  border: var(--hair) solid var(--line);
  min-height: 0;
  overflow: visible;
  transition: border-color 120ms linear;
}

.lead:empty {
  display: none;
}

.lead .stamp {
  margin-bottom: 8px;
}

.lead-title {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  font-family: var(--font);
  font-size: clamp(19px, 2.6vw, 27px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}

.lead .js-open.lead-title:hover,
.lead-title:hover {
  color: var(--accent);
}

.lead .meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}

.lead .links {
  margin-top: 12px;
}

.lead .links a {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 9.5px;
}

/* lead photo box (fixed footprint, placeholder texture) */
.lead .lead-media,
.lead .media,
.lead figure,
.lead .lead-photo,
.lead .thumb {
  position: relative;
  display: block;
  width: 100%;
  min-height: 170px;
  max-height: 300px;
  margin: 0 0 14px;
  overflow: hidden;
  background: var(--panel2) url('assets/art/placeholder.png') center / cover no-repeat;
  border: var(--hair) solid var(--line);
  border-radius: 0;
}

.lead img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1;
  transition: opacity 160ms linear;
  border-radius: 0;
}

.lead img.is-loaded {
  opacity: 1;
}

.lead-body,
.lead .body {
  min-width: 0;
}

@media (min-width: 800px) {
  .lead {
    min-height: 232px;
    padding-right: 376px;
  }

  .lead .lead-media,
  .lead .media,
  .lead figure,
  .lead .lead-photo,
  .lead .thumb,
  .lead > img {
    position: absolute;
    top: 18px;
    right: 18px;
    bottom: 18px;
    width: 340px;
    height: auto;
    max-height: none;
    min-height: 0;
    margin: 0;
  }
}

/* ---------- Feed rows ---------- */
#feed {
  display: block;
  margin: 0;
  padding: 0;
}

.item {
  position: relative;
  display: grid;
  grid-template-columns: 28px 112px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 8px 4px;
  margin: 0;
  background: transparent;
  border-bottom: var(--hair) solid var(--line);
  transition: background-color 120ms linear, opacity 160ms linear;
}

.item:hover {
  background: var(--panel);
}

.item .idx {
  grid-column: 1;
  align-self: center;
}

.item .thumb,
.item .item-thumb {
  grid-column: 2;
  position: relative;
  width: 112px;
  height: 76px;
  min-width: 112px;
  overflow: hidden;
  background: var(--panel2) url('assets/art/placeholder.png') center / cover no-repeat;
  display: block;
  flex: 0 0 auto;
  border-radius: 0;
}

.item .thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 1;
  transition: opacity 160ms linear;
  border-radius: 0;
}

.item .thumb img.is-loaded {
  opacity: 1;
}

/* story photos always paint: no fade-from-zero, no blend, no black fill */
.item .thumb img,
.lead .thumb img,
.lead img {
  opacity: 1;
  filter: none;
  mix-blend-mode: normal;
  background: transparent;
  border-radius: 0;
}

.item .body,
.item .item-main,
.item .main {
  grid-column: 3;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.item .title,
.item .js-open {
  grid-column: 3;
  min-width: 0;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item .meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.item .meta .stamp {
  font-size: 9.5px;
}

.item .domain,
.item .srcname {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
}

.item .links {
  grid-column: 4;
  justify-self: end;
  justify-content: flex-end;
}

.item.is-read {
  opacity: 0.4;
}

.item.is-read:hover {
  opacity: 0.65;
}

.item.is-read .thumb img {
  filter: saturate(0.35);
}

/* ---------- Skeletons ---------- */
.skel {
  position: relative;
  display: block;
  min-height: 76px;
  margin: 0;
  padding: 8px 4px;
  border-bottom: var(--hair) solid var(--line);
  overflow: hidden;
  background: linear-gradient(
    90deg,
    var(--panel) 0%,
    var(--panel2) 42%,
    var(--panel) 84%
  );
  background-size: 300% 100%;
  background-repeat: no-repeat;
  animation: skelShimmer 1.2s linear infinite;
}

.skel::before {
  content: "";
  position: absolute;
  left: 44px;
  top: 50%;
  transform: translateY(-50%);
  width: 112px;
  height: 60px;
  background: var(--panel2);
  opacity: 0.6;
}

.skel::after {
  content: "";
  position: absolute;
  left: 168px;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  height: 10px;
  background: var(--panel2);
  opacity: 0.6;
}

@keyframes skelShimmer {
  0% {
    background-position: 140% 0;
  }
  100% {
    background-position: -140% 0;
  }
}

/* ---------- Reader overlay ---------- */
#reader,
.reader {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  background: var(--bg);
  color: var(--ink);
  padding: 0;
  margin: 0;
}

#reader[hidden],
.reader[hidden] {
  display: none !important;
}

.reader-bar {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 10px;
  padding-top: calc(6px + env(safe-area-inset-top));
  background: var(--panel);
  border-bottom: var(--hair) solid var(--line);
  overflow: hidden;
}

.reader-bar > * {
  flex: 0 0 auto;
}

#reader-title,
.reader-head h2 {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 46vw;
  margin: 0;
}

#reader-meta {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}

#reader-close,
.reader-bar .btn-q,
.reader-bar button {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 38px;
  padding: 0 12px;
  background: transparent;
  border: var(--hair) solid var(--line);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  transition: background-color 120ms linear, border-color 120ms linear, color 120ms linear;
}

#reader-close:hover,
.reader-bar .btn-q:hover,
.reader-bar button:hover {
  background: var(--panel2);
  border-color: var(--mute);
}

#reader .reader-bar a,
.reader .reader-bar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border: var(--hair) solid var(--line);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
  transition: background-color 120ms linear, border-color 120ms linear, color 120ms linear;
}

#reader .reader-bar a:hover {
  background: var(--panel2);
  border-color: var(--mute);
}

.reader-stage {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  display: block;
}

.reader-frame,
#reader-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}

#reader-blocked,
.reader-blocked {
  position: absolute;
  inset: auto 12px 12px 12px;
  left: auto;
  bottom: auto;
  transform: none;
  z-index: 2;
  margin: 0 auto;
  max-width: min(520px, calc(100vw - 24px));
  padding: 12px 16px;
  background: var(--panel);
  border: var(--hair) solid var(--line);
  border-left: 2px solid var(--accent);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  line-height: 1.6;
  text-transform: uppercase;
  text-align: center;
}

#reader-blocked[hidden] {
  display: none !important;
}

/* ---------- Add-source modal ---------- */
#src-modal,
.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

#src-modal[hidden],
.modal[hidden] {
  display: none !important;
}

#src-modal .panel,
#src-modal .modal-panel,
#src-modal .card,
#src-modal > div:not(.backdrop):not(.scrim) {
  position: relative;
  width: 420px;
  max-width: 100%;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 18px;
  background: var(--panel);
  border: var(--hair) solid var(--line);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

#src-modal h2,
#src-modal h3,
#src-modal .title,
#src-modal .stamp:first-child {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 10px;
}

#src-modal p,
#src-modal .muted {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--mute);
  line-height: 1.6;
  margin: 0 0 12px;
  text-transform: none;
}

#src-url {
  display: block;
  width: 100%;
  padding: 11px 12px;
  margin: 0 0 6px;
  background: var(--bg);
  border: var(--hair) solid var(--line);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1.3;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 120ms linear, background-color 120ms linear;
}

#src-url::placeholder {
  color: var(--mute);
  opacity: 0.8;
}

#src-url:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--panel2);
}

#src-error {
  display: block;
  min-height: 16px;
  margin: 4px 0 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.5;
}

#src-error:empty {
  min-height: 0;
  margin: 4px 0 6px;
}

#src-submit,
#src-cancel {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 14px;
  margin: 0 6px 0 0;
  background: transparent;
  border: var(--hair) solid var(--line);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  transition: background-color 120ms linear, border-color 120ms linear, color 120ms linear;
}

#src-submit:hover,
#src-cancel:hover {
  background: var(--panel2);
  border-color: var(--mute);
}

#src-submit {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

#src-submit:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  filter: brightness(1.08);
}

#src-list {
  display: block;
  margin: 16px 0 0;
  padding: 0;
  border-top: var(--hair) solid var(--line);
  list-style: none;
}

#src-list:empty {
  display: none;
}

#src-list li,
#src-list > div,
#src-list > .row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 0;
  border-bottom: var(--hair) solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  list-style: none;
}

#src-list li > span:first-child,
#src-list > div > span:first-child {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#src-list button,
#src-list .btn-q {
  appearance: none;
  flex: 0 0 auto;
  min-height: 28px;
  padding: 4px 9px;
  background: transparent;
  border: var(--hair) solid var(--line);
  color: var(--mute);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  transition: color 120ms linear, border-color 120ms linear;
}

#src-list button:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- Toast ---------- */
#toast,
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 80;
  transform: translate(-50%, 10px);
  max-width: min(440px, calc(100vw - 28px));
  padding: 10px 14px;
  background: var(--panel);
  border: var(--hair) solid var(--line);
  border-left: 2px solid var(--accent);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms linear, transform 120ms linear;
}

#toast.is-on,
.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Scrollbars (subtle, square) ---------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--line);
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--mute);
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  body {
    font-size: 14px;
  }

  .lead {
    padding: 14px;
    margin-top: 14px;
  }

  .lead .lead-media,
  .lead .media,
  .lead figure,
  .lead .lead-photo,
  .lead .thumb {
    min-height: 150px;
    max-height: 220px;
  }

  .item {
    gap: 10px;
  }

  .item .domain,
  .item .srcname {
    max-width: 150px;
  }

  #reader-meta {
    max-width: 130px;
  }
}

@media (max-width: 560px) {
  .app {
    padding: 0 12px;
  }

  header,
  .hdr {
    gap: 6px;
  }

  .brand {
    font-size: 11px;
    letter-spacing: 0.18em;
  }

  .btn-q {
    min-height: 32px;
    padding: 7px 9px;
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .tab {
    padding: 12px 11px 10px;
    font-size: 9.5px;
    letter-spacing: 0.12em;
  }

  .item {
    grid-template-columns: 84px minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 64px;
    padding: 8px 2px;
  }

  .item .idx {
    display: none;
  }

  .item .thumb,
  .item .item-thumb {
    grid-column: 1;
    width: 84px;
    height: 64px;
    min-width: 84px;
  }

  .item .body,
  .item .item-main,
  .item .main,
  .item .title,
  .item .js-open {
    grid-column: 2;
  }

  .item .title,
  .item .js-open {
    font-size: 13.5px;
    line-height: 1.28;
    -webkit-line-clamp: 3;
  }

  .item .links {
    grid-column: 3;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }

  .item .links a {
    min-height: 24px;
    padding: 4px 6px;
    font-size: 8px;
    letter-spacing: 0.1em;
  }

  .item .meta .stamp,
  .item .domain,
  .item .srcname {
    font-size: 8.5px;
  }

  .skel::before {
    left: 8px;
    width: 84px;
    height: 48px;
  }

  .skel::after {
    left: 102px;
    right: 10px;
  }

  .reader-bar .stamp,
  #reader-meta {
    display: none;
  }

  #reader-title,
  .reader-head h2 {
    font-size: 13px;
    max-width: 40vw;
  }

  .reader-acts .btn-q,
  #reader-close {
    padding: 6px 8px;
    font-size: 11px;
    min-height: 32px;
    letter-spacing: 0.08em;
  }

  .reader-bar {
    gap: 6px;
    padding: 6px 8px;
    padding-top: calc(6px + env(safe-area-inset-top));
  }

  #src-modal,
  .modal {
    padding: 12px;
    align-items: flex-end;
  }

  #src-modal .panel,
  #src-modal .modal-panel,
  #src-modal .card,
  #src-modal > div:not(.backdrop):not(.scrim) {
    width: 100%;
    padding: 14px;
    max-height: calc(100vh - 32px);
  }

  .lead-title {
    font-size: 18px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .skel {
    animation: none !important;
    background: var(--panel2);
  }

  .item .thumb img,
  .lead img,
  .item,
  #toast {
    transition: none !important;
  }
}
