:root {
  --ink: #17231f;
  --ink-soft: #59675f;
  --paper: #f3f1e9;
  --surface: #fffef9;
  --surface-muted: #f7f7f1;
  --line: #d8ddd5;
  --line-strong: #bec8c0;
  --forest: #173d32;
  --forest-deep: #0d2b23;
  --mint: #b9f2d0;
  --lime: #d8ff72;
  --coral: #e5654f;
  --blue: #3178c6;
  --shadow: 0 24px 70px rgb(21 37 31 / 12%);
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--paper);
}

body {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
}

button,
input {
  font: inherit;
}

button,
.button-link,
.header-action-link {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  color: white;
  background: var(--forest);
  font-weight: 750;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

button:hover,
.button-link:hover,
.header-action-link:hover {
  background: var(--forest-deep);
  box-shadow: 0 8px 22px rgb(13 43 35 / 18%);
  transform: translateY(-1px);
}

button:focus-visible,
input:focus-visible,
a:focus-visible,
.headline-scroll:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
}

.eyebrow {
  margin: 0 0 7px;
  color: #607269;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.brand-mark {
  position: relative;
  z-index: 1;
  display: grid;
  width: 58px;
  height: 58px;
  border-radius: 17px 17px 17px 5px;
  color: var(--forest-deep);
  background: var(--lime);
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  box-shadow: 0 12px 30px rgb(0 0 0 / 16%);
  place-items: center;
}

.brand-mark-small {
  width: 36px;
  height: 36px;
  border-radius: 10px 10px 10px 4px;
  font-size: 0.7rem;
  box-shadow: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 0.93rem;
  font-weight: 820;
  text-decoration: none;
}

.auth-page {
  background: var(--forest-deep);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(380px, 0.75fr);
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

.auth-story {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  overflow: hidden;
  padding: clamp(28px, 5vw, 76px);
  color: white;
  background:
    radial-gradient(circle at 82% 18%, rgb(216 255 114 / 28%) 0 10%, transparent 35%),
    radial-gradient(circle at 18% 82%, rgb(185 242 208 / 16%) 0 12%, transparent 38%),
    linear-gradient(135deg, #102f27, #1d5443 62%, #15372e);
}

.auth-story::after {
  position: absolute;
  right: -9vw;
  bottom: -18vw;
  width: min(48vw, 640px);
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 50%;
  box-shadow: 0 0 0 7vw rgb(255 255 255 / 3%), 0 0 0 14vw rgb(255 255 255 / 2%);
  content: "";
  aspect-ratio: 1;
}

.auth-story-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin-block: clamp(70px, 16vh, 180px);
}

.auth-story .eyebrow {
  color: var(--mint);
}

.auth-story h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(3.2rem, 7vw, 7.8rem);
  font-weight: 780;
  letter-spacing: -0.075em;
  line-height: 0.88;
}

.auth-lede {
  max-width: 650px;
  margin: 34px 0 0;
  color: rgb(255 255 255 / 78%);
  font-size: clamp(1.05rem, 1.6vw, 1.45rem);
  line-height: 1.55;
}

.privacy-note {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgb(255 255 255 / 64%);
  font-size: 0.88rem;
}

.auth-panel {
  display: grid;
  min-width: 0;
  padding: clamp(28px, 5vw, 84px);
  background: var(--paper);
  place-items: center;
}

.login-card {
  width: min(100%, 480px);
}

.login-card h2 {
  margin: 0;
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  letter-spacing: -0.055em;
  line-height: 1;
}

.form-intro {
  margin: 18px 0 34px;
  color: var(--ink-soft);
  line-height: 1.55;
}

.form-alert {
  margin: 0 0 24px;
  padding: 14px 16px;
  border: 1px solid #efb5a9;
  border-radius: 12px;
  color: #742a1e;
  background: #fff0ec;
  font-size: 0.92rem;
  line-height: 1.45;
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-form label {
  font-size: 0.88rem;
  font-weight: 780;
}

.login-form input[type="password"] {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border: 1px solid #bdc7bf;
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: inset 0 1px 2px rgb(21 37 31 / 4%);
}

.login-form input[type="password"]:hover {
  border-color: #87998f;
}

.login-form button {
  width: 100%;
  margin-top: 8px;
}

.form-footnote {
  margin: 22px 0 0;
  color: #718078;
  font-size: 0.78rem;
  line-height: 1.5;
}

.app-page {
  overflow: hidden;
  background: var(--paper);
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

.news-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
}

.app-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 62px;
  padding: 11px clamp(16px, 2.5vw, 36px);
  border-bottom: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: 0 2px 12px rgb(23 35 31 / 5%);
}

.header-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.mobile-menu-toggle,
.mobile-menu-close {
  display: none;
}

.mobile-menu-icon {
  display: grid;
  width: 18px;
  gap: 4px;
}

.mobile-menu-icon > span {
  height: 2px;
  border-radius: 999px;
  background: currentcolor;
}

.mobile-menu-close-icon {
  position: relative;
  width: 16px;
  height: 16px;
}

.mobile-menu-close-icon::before,
.mobile-menu-close-icon::after {
  position: absolute;
  top: 7px;
  left: 1px;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: currentcolor;
  content: "";
}

.mobile-menu-close-icon::before {
  transform: rotate(45deg);
}

.mobile-menu-close-icon::after {
  transform: rotate(-45deg);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.sync-button,
.bulk-summary-button,
.button-secondary {
  min-height: 38px;
  padding: 0 15px;
  font-size: 0.79rem;
}

.sync-button {
  background: var(--forest);
}

.bulk-summary-control {
  display: flex;
  align-items: center;
  gap: 9px;
}

.bulk-summary-button {
  color: var(--forest-deep);
  background: var(--lime);
}

.bulk-summary-button:hover {
  color: white;
}

.bulk-summary-status-shell:empty {
  display: none;
}

.mobile-bulk-summary-status .bulk-summary-status-shell {
  position: static;
  width: auto;
  margin: 0 9px 12px;
}

.mobile-bulk-summary-status .bulk-summary-status {
  width: 100%;
  box-shadow: none;
}

.bulk-summary-status {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) 88px;
  align-items: center;
  width: min(34vw, 430px);
  min-height: 38px;
  gap: 10px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink-soft);
  background: var(--surface-muted);
  font-size: 0.68rem;
  line-height: 1.25;
}

.bulk-summary-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.bulk-summary-copy strong,
.bulk-summary-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bulk-summary-copy strong {
  color: var(--ink);
  font-size: 0.72rem;
}

.bulk-summary-status progress {
  width: 88px;
  height: 7px;
  accent-color: var(--forest);
}

.bulk-summary-running {
  border-color: #b7c8f0;
  background: #f0f5ff;
}

.bulk-summary-succeeded {
  border-color: #b8d8c5;
  background: #eff9f2;
}

.bulk-summary-warning {
  border-color: #e2ca8d;
  background: #fff8df;
}

.bulk-summary-failed {
  border-color: #efb5a9;
  background: #fff0ec;
}

.button-secondary {
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: transparent;
}

.button-secondary:hover {
  border-color: var(--forest);
  color: white;
  background: var(--forest);
}

.news-workspace {
  display: grid;
  grid-template-columns: clamp(220px, 17.5vw, 270px) minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.source-sidebar {
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 10px 22px;
  border-right: 1px solid var(--line-strong);
  background: #f2f4ef;
  scrollbar-color: #aeb8b0 transparent;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.sidebar-heading {
  padding: 0 9px 9px;
}

.sidebar-heading h1 {
  margin: 0;
  font-size: 1.02rem;
  letter-spacing: -0.035em;
}

.source-tree {
  display: grid;
  gap: 1px;
}

.category-group {
  margin-top: 3px;
}

.nav-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 30px;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 5px;
  color: #33453d;
  font-size: 0.75rem;
  line-height: 1.25;
  text-decoration: none;
}

.nav-link > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--forest-deep);
  background: rgb(255 255 255 / 65%);
}

.nav-link.active {
  color: white;
  background: var(--forest);
  font-weight: 760;
}

.nav-all,
.nav-selected,
.category-link {
  font-weight: 720;
}

.feed-links {
  position: relative;
  display: grid;
  gap: 1px;
  margin: 1px 0 2px 10px;
  padding-left: 8px;
  border-left: 1px solid #c7cec8;
}

.feed-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
}

.source-selector {
  display: grid;
  width: 20px;
  height: 27px;
  cursor: pointer;
  place-items: center;
}

.source-selector input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--forest);
  cursor: pointer;
}

.source-selector input[aria-busy="true"] {
  opacity: 0.55;
}

.feed-link {
  min-width: 0;
  min-height: 27px;
  padding-block: 4px;
  color: #56665e;
  font-size: 0.71rem;
}

.nav-count {
  min-width: 20px;
  padding: 1px 5px;
  border-radius: 999px;
  color: #5d6b64;
  background: rgb(255 255 255 / 64%);
  font-size: 0.66rem;
  font-variant-numeric: tabular-nums;
  font-weight: 760;
  text-align: center;
}

.nav-link.active .nav-count {
  color: var(--forest-deep);
  background: var(--lime);
}

.news-main {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--surface);
  container-name: news-pane;
  container-type: inline-size;
}

.news-main.reader-open {
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
}

.reader-resize-enabled .news-main.reader-open {
  grid-template-rows: minmax(min(140px, calc((100% - 10px) / 2)), 1fr) 10px minmax(min(160px, calc((100% - 10px) / 2)), 1fr);
}

.reader-resize-enabled .news-main.reader-open.reader-resized {
  grid-template-rows: minmax(0, 1fr) 10px var(--reader-pane-height);
}

.headline-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.reader-open .list-header {
  min-height: 52px;
  align-items: center;
  padding-block: 7px;
}

.reader-open .list-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.reader-open .list-title .eyebrow,
.reader-open .sync-status {
  display: none;
}

.reader-open .list-header h2 {
  font-size: 1.08rem;
  letter-spacing: -0.025em;
}

.reader-open .result-count {
  margin: 0;
  font-size: 0.68rem;
}

.list-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 84px;
  gap: 22px;
  padding: 13px clamp(18px, 2vw, 28px);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.list-header h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.result-count {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.sync-status {
  display: grid;
  max-width: min(48vw, 610px);
  gap: 3px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
  background: var(--surface-muted);
  font-size: 0.7rem;
  line-height: 1.35;
}

.sync-status strong {
  color: var(--ink);
  font-size: 0.72rem;
}

.sync-status.sync-failed {
  border-color: #edb5aa;
  color: #74392e;
  background: #fff2ee;
}

.sync-status.sync-running {
  border-color: #a9c5e2;
  background: #eef6ff;
}

.sync-status.sync-succeeded {
  border-color: #b9d5c4;
  background: #eff9f2;
}

.headline-scroll {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  background: var(--surface);
  overscroll-behavior: contain;
  scrollbar-color: #aeb8b0 transparent;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.headline-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.headline-row {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 42px;
  gap: 10px;
  padding: 4px clamp(18px, 2vw, 28px);
  border-bottom: 1px solid #e1e6e2;
  background: #fcfdfa;
}

.reader-open .headline-row {
  min-height: 40px;
  padding-block: 3px;
}

.headline-row:nth-child(even) {
  background: #f8faf7;
}

.headline-row:hover {
  background: #f1f6f1;
}

.headline-row.unread {
  background: #f4f9f5;
}

.unread-indicator {
  width: 6px;
  height: 6px;
  border: 1px solid #b5c0b8;
  border-radius: 50%;
  background: transparent;
}

.headline-row.unread .unread-indicator {
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 0 0 3px rgb(49 120 198 / 10%);
}

.headline-copy {
  min-width: 0;
}

.headline-title {
  display: block;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #334139;
  background: transparent;
  box-shadow: none;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 570;
  line-height: 1.25;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.headline-row.unread .headline-title {
  color: #10251d;
  font-weight: 790;
}

.headline-title:hover {
  color: #175d9b;
  background: transparent;
  box-shadow: none;
  text-decoration: underline;
  text-underline-offset: 2px;
  transform: none;
}

.headline-title[aria-busy="true"] {
  opacity: 0.55;
  cursor: progress;
}

.headline-row.selected {
  box-shadow: inset 3px 0 var(--blue);
  background: #eaf4ff;
}

.headline-meta {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 5px;
  margin-top: 2px;
  overflow: hidden;
  color: #758078;
  font-size: 0.61rem;
  line-height: 1.25;
  white-space: nowrap;
}

.feed-name {
  overflow: hidden;
  color: #53645b;
  font-weight: 720;
  text-overflow: ellipsis;
}

.starred {
  padding: 1px 5px;
  border-radius: 999px;
  color: #674d09;
  background: #fff0ac;
  font-size: 0.6rem;
  font-weight: 760;
}

.headline-row time {
  color: #7a867f;
  font-size: 0.61rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.reader-resizer {
  display: none;
}

.reader-resize-enabled .reader-open > .reader-resizer {
  position: relative;
  display: grid;
  z-index: 2;
  width: 100%;
  min-width: 0;
  cursor: row-resize;
  touch-action: none;
  place-items: center;
  border: 0;
  background: #d8ded9;
  box-shadow: 0 -4px 14px rgb(24 42 34 / 7%);
}

.reader-resize-enabled .reader-open > .reader-resizer::after {
  width: 48px;
  height: 3px;
  border-radius: 999px;
  background: #7c8b82;
  content: "";
}

.reader-resize-enabled .reader-open > .reader-resizer:hover,
.reader-resize-enabled .reader-open > .reader-resizer:focus-visible {
  background: #c8d1ca;
}

.reader-resize-enabled .reader-open > .reader-resizer:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: -2px;
}

body.reader-resizing {
  cursor: row-resize;
  user-select: none;
}

.reader-slot {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-top: 3px solid #9ca9a1;
  background: white;
  box-shadow: 0 -4px 14px rgb(24 42 34 / 7%);
}

.reader-resize-enabled .reader-open > .reader-slot {
  border-top: 0;
}

.reader-slot:empty {
  display: none;
}

.reader-pane {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  outline: none;
}

.reader-pane:focus-visible {
  box-shadow: inset 0 0 0 3px var(--coral);
}

.reader-pane.reader-loading {
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
}

.reader-loading-state {
  display: grid;
  justify-items: center;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.reader-loading-state p {
  margin: 0;
}

.reader-loading-indicator {
  width: 24px;
  height: 24px;
  border: 3px solid #d3dbd5;
  border-top-color: var(--forest);
  border-radius: 50%;
  animation: reader-loading-spin 700ms linear infinite;
}

@keyframes reader-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.reader-header {
  display: flex;
  min-width: 0;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px clamp(18px, 2vw, 28px);
  border-bottom: 1px solid var(--line);
  background: #f4f6f2;
}

.reader-heading {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.reader-title-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.reader-label {
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid #afc3b8;
  border-radius: 4px;
  color: #36564a;
  background: #e7efe9;
  font-size: 0.56rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.reader-heading h3 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  font-size: 0.9rem;
  letter-spacing: -0.015em;
  line-height: 1.2;
  scrollbar-width: none;
  text-overflow: clip;
  white-space: nowrap;
}

.reader-heading h3::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.reader-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 0 0;
  color: #6f7e76;
  font-size: 0.6rem;
}

.reader-meta > span:first-child {
  color: #40544a;
  font-weight: 750;
}

.reader-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.reader-source,
.reader-close {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: #35483f;
  background: white;
  font-size: 0.65rem;
  font-weight: 720;
  text-decoration: none;
  white-space: nowrap;
}

.reader-source:hover,
.reader-close:hover {
  border-color: var(--forest);
  color: white;
  background: var(--forest);
}

.reader-tabs {
  display: flex;
  min-height: 34px;
  align-items: end;
  gap: 2px;
  padding: 4px clamp(18px, 2vw, 28px) 0;
  border-bottom: 1px solid var(--line-strong);
  background: #f7f8f5;
}

.reader-tab {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  padding: 0 13px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  color: #65736b;
  font-size: 0.68rem;
  font-weight: 760;
  text-decoration: none;
}

.reader-tab:hover {
  color: var(--forest-deep);
  background: #edf2ed;
}

.reader-tab.active {
  margin-bottom: -1px;
  border-color: var(--line-strong);
  color: #18372b;
  background: white;
}

.reader-panels,
.reader-panel,
.summary-slot,
.summary-state {
  min-width: 0;
  min-height: 0;
}

.reader-panels {
  display: grid;
  overflow: hidden;
}

.reader-panel {
  display: grid;
  grid-area: 1 / 1;
  overflow: hidden;
}

.reader-panel[hidden] {
  display: none;
}

.summary-slot,
.summary-state {
  display: grid;
  height: 100%;
  overflow: hidden;
}

.summary-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 28px;
  color: var(--ink-soft);
}

.summary-progress h4,
.summary-message h4 {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
}

.summary-progress p,
.summary-message p,
.summary-note {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 0.74rem;
  line-height: 1.5;
}

.summary-message {
  display: grid;
  max-width: 580px;
  margin: auto;
  padding: 32px;
  text-align: center;
  justify-items: center;
}

.summary-error {
  color: #74392e;
}

.summary-start {
  display: inline-flex;
  min-height: 31px;
  align-items: center;
  margin-top: 14px;
  padding: 0 13px;
  border: 1px solid var(--forest);
  border-radius: 5px;
  color: white;
  background: var(--forest);
  font-size: 0.69rem;
  font-weight: 760;
  text-decoration: none;
}

.summary-start:hover {
  background: var(--forest-deep);
}

.bigger-summary-empty {
  display: grid;
  max-width: 590px;
  margin: auto;
  padding: 30px;
  text-align: center;
  justify-items: center;
}

.bigger-summary-empty h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.bigger-summary-empty p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.5;
}

.bigger-summary-generate {
  display: grid;
  min-width: min(230px, 100%);
  min-height: 124px;
  align-content: center;
  justify-items: center;
  gap: 8px;
  margin-top: 22px;
  padding: 18px 24px;
  border: 1px solid var(--forest);
  border-radius: 9px;
  color: white;
  background: var(--forest);
  font-size: 0.76rem;
  font-weight: 780;
  text-decoration: none;
  box-shadow: 0 8px 24px rgb(30 75 57 / 15%);
}

.bigger-summary-generate .reload-sign {
  font-size: 2.35rem;
  font-weight: 500;
  line-height: 1;
}

.bigger-summary-generate:hover {
  background: var(--forest-deep);
}

.summary-actions {
  width: min(100%, 720px);
  margin: 18px auto 0;
}

.summary-refresh {
  display: inline-flex;
  min-height: 31px;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: #35483f;
  background: white;
  font-size: 0.67rem;
  font-weight: 740;
  text-decoration: none;
}

.summary-refresh:hover {
  border-color: var(--forest);
  color: white;
  background: var(--forest);
}

.summary-result {
  min-height: 0;
  overflow: auto;
  padding: 24px 32px 48px;
  scrollbar-color: #aeb8b0 transparent;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.summary-result-meta,
.summary-note,
.summary-content,
.summary-tags {
  width: min(100%, 720px);
  margin-inline: auto;
}

.summary-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  color: #77847d;
  font-size: 0.61rem;
}

.summary-content,
.reader-content {
  color: #26352e;
  font-size: 0.89rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.62;
}

.summary-content {
  margin-top: 13px;
  white-space: pre-wrap;
}

.summary-tags {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.summary-tag-group {
  min-width: 0;
}

.summary-tags h5 {
  margin: 0 0 8px;
  color: #617068;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.summary-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.summary-tag {
  padding: 4px 8px;
  border: 1px solid #c7d5cc;
  border-radius: 999px;
  color: #315044;
  background: #edf3ee;
  font-size: 0.65rem;
  font-weight: 680;
  line-height: 1.2;
}

.summary-note {
  margin-top: 18px;
}

.bigger-summary-result .summary-result-meta,
.bigger-summary-result .summary-note,
.bigger-summary-result .summary-content,
.bigger-summary-result .summary-actions {
  width: min(100%, 820px);
}

.rating-slot,
.rating-state {
  display: grid;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.rating-editor {
  width: min(100%, 620px);
  margin: auto;
  padding: 28px 32px 42px;
  overflow: auto;
  text-align: center;
  scrollbar-color: #aeb8b0 transparent;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.rating-heading h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.rating-heading p,
.rating-help {
  margin: 7px auto 0;
  color: var(--ink-soft);
  font-size: 0.73rem;
  line-height: 1.5;
}

.rating-time {
  display: inline-block;
  margin-top: 7px;
  color: #77847d;
  font-size: 0.61rem;
}

.rating-stars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 20px;
}

.rating-star {
  display: inline-grid;
  width: 46px;
  height: 46px;
  border: 1px solid #c7cec8;
  border-radius: 8px;
  color: #aab2ac;
  background: #f8faf7;
  font-size: 1.75rem;
  line-height: 1;
  text-decoration: none;
  place-items: center;
}

.rating-star.selected {
  border-color: #d09e20;
  color: #a87600;
  background: #fff2b8;
}

.rating-star:hover,
.rating-star:focus-visible {
  border-color: #b18108;
  color: #7d5b05;
  background: #ffe895;
}

.rating-labels {
  display: flex;
  justify-content: space-between;
  width: min(100%, 250px);
  margin: 6px auto 0;
  color: #77847d;
  font-size: 0.59rem;
}

.rating-reason-label {
  display: block;
  margin-top: 22px;
  color: #40544a;
  font-size: 0.68rem;
  font-weight: 780;
  text-align: left;
}

.rating-reason {
  width: 100%;
  min-height: 86px;
  margin-top: 6px;
  resize: vertical;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: white;
  font: inherit;
  font-size: 0.76rem;
  line-height: 1.45;
}

.rating-reason:focus {
  border-color: var(--forest);
  outline: 2px solid rgb(50 109 82 / 18%);
}

.rating-read-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid #e1b47a;
  border-radius: 6px;
  color: #6f4919;
  background: #fff8e8;
  font-size: 0.69rem;
  text-align: left;
}

.rating-read-warning a,
.rating-clear {
  flex: 0 0 auto;
  color: #175d9b;
  font-weight: 740;
  text-underline-offset: 2px;
}

.rating-actions {
  margin-top: 18px;
}

.rating-failed .rating-heading p {
  color: #74392e;
}

.reader-scroll {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: #fff;
  overscroll-behavior: contain;
  scrollbar-color: #aeb8b0 transparent;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.reader-content {
  width: min(100%, 820px);
  margin: 0 auto;
  padding: 24px 32px 54px;
  overflow-wrap: anywhere;
}

.reader-content p,
.reader-content ul,
.reader-content ol {
  margin-block: 0 1em;
}

.reader-content > :first-child {
  margin-top: 0;
}

.reader-content > :last-child {
  margin-bottom: 0;
}

.reader-content h1,
.reader-content h2,
.reader-content h3,
.reader-content h4 {
  margin-block: 1.3em 0.55em;
  color: #13271f;
  font-size: 1.15em;
  line-height: 1.25;
}

.reader-content a {
  color: #175d9b;
  text-underline-offset: 2px;
}

.reader-content img,
.reader-content video {
  max-width: 100%;
  height: auto;
}

.reader-content pre,
.reader-content table {
  display: block;
  max-width: 100%;
  overflow: auto;
}

.reader-content blockquote {
  margin: 1.1em 0;
  padding-left: 16px;
  border-left: 3px solid var(--line-strong);
  color: #56665e;
}

.reader-message {
  display: grid;
  min-height: 0;
  padding: 32px;
  text-align: center;
  place-content: center;
}

.reader-message h4 {
  margin: 0;
  font-size: 1.15rem;
}

.reader-message p {
  max-width: 520px;
  margin: 8px auto 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.5;
}

.reader-error {
  color: #74392e;
  background: #fff7f4;
}

.empty-state {
  display: grid;
  width: min(100% - 36px, 540px);
  min-height: 100%;
  margin: auto;
  padding: clamp(40px, 8vw, 100px) 20px;
  text-align: center;
  place-content: center;
}

.empty-state h3 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  letter-spacing: -0.055em;
}

.empty-state p:last-child {
  max-width: 460px;
  margin: 15px auto 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.55;
}

.pagination {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  min-height: 50px;
  gap: 10px;
  padding: 6px clamp(18px, 2vw, 28px);
  border-top: 1px solid var(--line-strong);
  background: #f5f6f1;
  font-size: 0.73rem;
}

.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.page-number,
.page-gap,
.page-step {
  display: inline-grid;
  min-width: 29px;
  min-height: 29px;
  padding: 0 7px;
  border-radius: 5px;
  color: #46564e;
  text-decoration: none;
  place-items: center;
}

.page-number:hover,
.page-step:hover {
  color: var(--forest-deep);
  background: white;
}

.page-number.current {
  color: white;
  background: var(--forest);
  font-weight: 780;
}

.page-step {
  min-width: 66px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 700;
}

.page-step.disabled {
  color: #9ba49e;
  background: transparent;
}

.page-summary {
  color: #6d7a73;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.reader-open .pagination {
  min-height: 44px;
  padding-block: 5px;
}

@container news-pane (min-width: 800px) {
  .headline-row,
  .reader-open .headline-row {
    min-height: 32px;
    padding-block: 2px;
  }

  .headline-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(12px, 2cqw, 28px);
  }

  .headline-meta {
    justify-content: flex-end;
    max-width: min(32cqw, 360px);
    margin-top: 0;
  }

  .feed-name,
  .category-name {
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.reader-open .page-number,
.reader-open .page-gap,
.reader-open .page-step {
  min-height: 27px;
}

.message-page {
  display: grid;
  background:
    radial-gradient(circle at top left, rgb(185 242 208 / 35%), transparent 36%),
    var(--paper);
  place-items: center;
}

.message-shell {
  display: grid;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 28px;
  place-items: center;
}

.message-card {
  width: min(100%, 620px);
  padding: clamp(30px, 6vw, 68px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.message-card .brand-mark {
  margin-bottom: 36px;
}

.message-card h1 {
  margin: 0;
  font-size: clamp(2.3rem, 6vw, 4.8rem);
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.message-card > p:not(.eyebrow) {
  margin: 24px 0 30px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  text-decoration: none;
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-story {
    min-height: 42vh;
    padding: 28px;
  }

  .auth-story-copy {
    margin: 64px 0 20px;
  }

  .auth-story h1 {
    font-size: clamp(3rem, 14vw, 6.2rem);
  }

  .privacy-note {
    display: none;
  }

  .auth-panel {
    padding: 52px 28px 64px;
  }

  .news-workspace {
    grid-template-columns: 225px minmax(0, 1fr);
  }

  .sync-status {
    max-width: 45vw;
  }

  .bulk-summary-control {
    position: relative;
  }

  .bulk-summary-status-shell {
    position: fixed;
    z-index: 6;
    top: 70px;
    right: 12px;
    width: min(350px, calc(100vw - 24px));
  }

  .bulk-summary-status {
    width: 100%;
    box-shadow: 0 10px 30px rgb(13 43 35 / 16%);
  }
}

@media (max-width: 720px) {
  .app-page {
    overflow: auto;
  }

  .news-shell {
    display: block;
    height: auto;
  }

  .app-header {
    position: sticky;
    top: 0;
  }

  .news-workspace {
    display: block;
    height: auto;
    overflow: visible;
  }

  .source-sidebar {
    max-height: 34vh;
    padding-bottom: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
  }

  .mobile-nav-enabled .mobile-menu-toggle {
    display: grid;
    width: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 10px;
    place-items: center;
  }

  .mobile-nav-enabled .brand-mark-small {
    display: none;
  }

  .mobile-nav-enabled .source-sidebar {
    position: fixed;
    z-index: 30;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    padding: calc(10px + env(safe-area-inset-top)) calc(10px + env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) calc(10px + env(safe-area-inset-left));
    border: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-100%);
    transition: opacity 160ms ease, transform 180ms ease;
    scrollbar-gutter: auto;
  }

  .mobile-nav-enabled .source-sidebar.mobile-menu-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
  }

  .mobile-nav-enabled .mobile-menu-close {
    position: sticky;
    z-index: 1;
    top: 0;
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
    border: 1px solid var(--line-strong);
    color: var(--forest-deep);
    background: var(--surface);
    box-shadow: 0 6px 18px rgb(13 43 35 / 12%);
  }

  body.mobile-menu-open {
    overflow: hidden;
  }

  .sidebar-heading {
    padding-top: 2px;
  }

  .news-main {
    height: auto;
    min-height: 66vh;
  }

  .news-main.reader-open {
    height: calc(100vh - 62px);
    height: calc(100dvh - 62px);
    min-height: 620px;
    scroll-margin-top: 62px;
  }

  .list-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .sync-status {
    width: 100%;
    max-width: none;
  }

  .headline-scroll {
    max-height: 62vh;
  }

  .reader-open .list-header {
    align-items: center;
    flex-direction: row;
  }

  .reader-open .headline-scroll {
    max-height: none;
  }

  .headline-row {
    grid-template-columns: 10px minmax(0, 1fr);
  }

  .headline-row time {
    grid-column: 2;
  }

  .reader-header {
    display: grid;
    grid-template-areas:
      "reader-title reader-title"
      "reader-meta reader-actions";
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 8px;
    row-gap: 6px;
    justify-content: normal;
    padding-right: 12px;
    padding-left: 12px;
  }

  .reader-heading {
    display: contents;
  }

  .reader-title-line {
    grid-area: reader-title;
  }

  .reader-label {
    display: none;
  }

  .reader-meta {
    grid-area: reader-meta;
    margin-top: 0;
  }

  .reader-actions {
    grid-area: reader-actions;
    gap: 5px;
    justify-content: flex-end;
  }

  .reader-source,
  .reader-close {
    min-height: 27px;
    padding-right: 7px;
    padding-left: 7px;
    font-size: 0.61rem;
  }

  .reader-content {
    padding: 20px 18px 36px;
  }

  .pagination {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .page-summary {
    display: none;
  }
}

@media (max-width: 480px) {
  .auth-story {
    min-height: 360px;
  }

  .auth-story h1 {
    letter-spacing: -0.065em;
  }

  .auth-panel {
    padding-right: 22px;
    padding-left: 22px;
  }

  .brand > span:last-child {
    display: none;
  }

  .mobile-nav-enabled .header-brand .brand {
    display: none;
  }

  .app-header {
    padding-right: 12px;
    padding-left: 12px;
  }

  .sync-button,
  .bulk-summary-button,
  .button-secondary {
    padding: 0 9px;
    font-size: 0.72rem;
  }

  .header-actions {
    gap: 5px;
  }

  .headline-row {
    padding-right: 14px;
    padding-left: 14px;
  }

  .headline-meta > span:nth-child(2),
  .headline-meta > span:nth-child(3) {
    display: none;
  }

  .pagination {
    gap: 5px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .page-numbers {
    overflow: hidden;
  }

  .page-number,
  .page-gap {
    min-width: 27px;
    padding: 0 5px;
  }

  .message-shell {
    padding: 16px;
  }
}

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