:root {
  color-scheme: light;
  --canvas: #f2f5f2;
  --surface: #ffffff;
  --surface-soft: #e9efec;
  --surface-strong: #dfe7e3;
  --ink: #17211f;
  --ink-soft: #3d4a46;
  --muted: #6a7672;
  --faint: #929d99;
  --line: #d8e0dc;
  --line-strong: #bcc9c3;
  --header: #14201d;
  --header-soft: #1d2d29;
  --teal: #14756d;
  --teal-strong: #0d5a54;
  --teal-soft: #d9eeea;
  --coral: #d4573f;
  --coral-soft: #f7e3df;
  --gold: #a46f13;
  --gold-soft: #f5ead2;
  --blue: #2c6f91;
  --blue-soft: #deebf1;
  --danger: #b93f34;
  --shadow: 0 12px 30px rgba(23, 33, 31, 0.08);
  --shadow-soft: 0 5px 16px rgba(23, 33, 31, 0.06);
  --header-height: 68px;
  --content-width: 1440px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #101614;
  --surface: #18201e;
  --surface-soft: #202b28;
  --surface-strong: #293632;
  --ink: #edf3f0;
  --ink-soft: #c0ccc7;
  --muted: #93a29c;
  --faint: #6f7d78;
  --line: #2d3b37;
  --line-strong: #42534d;
  --header: #0b100f;
  --header-soft: #17201d;
  --teal: #4fb9ac;
  --teal-strong: #72d0c5;
  --teal-soft: #183d38;
  --coral: #f0785f;
  --coral-soft: #472821;
  --gold: #ddb45d;
  --gold-soft: #41351e;
  --blue: #71b6d8;
  --blue-soft: #213a46;
  --danger: #ff8d80;
  --shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 6px 18px rgba(0, 0, 0, 0.22);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  transition: background-color 180ms ease, color 180ms ease;
}

body.reader-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button {
  border: 0;
}

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

img {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--teal) 36%, transparent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 3000;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--teal);
  border-radius: 4px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto minmax(260px, 1fr);
  align-items: center;
  min-height: var(--header-height);
  padding: 0 max(22px, calc((100vw - var(--content-width)) / 2));
  color: #f3f7f5;
  background: var(--header);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: 0 0 38px;
  color: #79d5ca;
  background: #20332e;
  border: 1px solid #3a514a;
  border-radius: 6px;
  font-size: 18px;
}

.brand-mark::after {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 5px;
  height: 5px;
  background: #ef765f;
  border: 1px solid var(--header);
  border-radius: 50%;
  content: "";
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.brand-copy strong {
  overflow: hidden;
  color: #ffffff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy small {
  margin-top: 5px;
  color: #8fa69f;
  font-size: 9px;
  font-weight: 700;
}

.top-nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 24px;
}

.top-nav a {
  position: relative;
  display: flex;
  align-items: center;
  color: #9eb0aa;
  font-size: 13px;
  font-weight: 600;
}

.top-nav a:hover,
.top-nav a.active {
  color: #ffffff;
}

.top-nav a.active::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #57c0b4;
  content: "";
}

.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 9px;
  flex-shrink: 0;
}

.live-state {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 6px;
  color: #afbeb9;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.live-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  background: #e0ad43;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(224, 173, 67, 0.12);
}

.live-state.connected .live-dot {
  background: #5ac2a0;
  box-shadow: 0 0 0 4px rgba(90, 194, 160, 0.14);
}

.live-state.stale .live-dot,
.live-state.error .live-dot {
  background: #ef806b;
  box-shadow: 0 0 0 4px rgba(239, 128, 107, 0.14);
}

.icon-button {
  position: relative;
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: 0 0 38px;
  color: #d4dfdb;
  background: var(--header-soft);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.icon-button:hover {
  color: #ffffff;
  background: #263a35;
  border-color: rgba(255, 255, 255, 0.2);
}

.icon-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  color: #ffffff;
  background: var(--coral);
  border: 2px solid var(--header);
  border-radius: 8px;
  font-size: 9px;
  font-weight: 800;
  line-height: 13px;
  text-align: center;
}

.icon-count:empty,
.icon-count[data-count="0"] {
  display: none;
}

.command-band {
  color: #f2f7f5;
  background: #1b2925;
  border-bottom: 1px solid #263a34;
}

.command-inner {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(430px, 1.45fr) minmax(300px, 0.9fr);
  align-items: end;
  gap: 34px;
  width: min(100% - 44px, var(--content-width));
  min-height: 180px;
  margin: 0 auto;
  padding: 30px 0 32px;
}

.command-inner > *,
.featured-paper > *,
.feed-controls,
.select-control {
  min-width: 0;
}

.workspace-heading h1,
.feed-toolbar h2,
.tools-heading h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-weight: 600;
}

.workspace-heading h1 {
  color: #ffffff;
  font-size: 30px;
  line-height: 1.2;
}

.eyebrow,
.section-kicker {
  margin: 0 0 7px;
  color: var(--teal);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.command-band .eyebrow {
  color: #65c9bd;
}

.workspace-date {
  margin: 8px 0 0;
  color: #94aaa3;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.search-shell {
  min-width: 0;
}

.search-modes {
  display: inline-flex;
  margin-bottom: 8px;
  background: #111b18;
  border: 1px solid #31443e;
  border-radius: 5px;
  padding: 3px;
}

.search-mode {
  min-height: 28px;
  padding: 0 12px;
  color: #90a39d;
  background: transparent;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
}

.search-mode:hover {
  color: #ffffff;
}

.search-mode.active {
  color: #14201d;
  background: #6cc9bd;
}

.search-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 42px;
  align-items: center;
  min-height: 52px;
  padding-left: 16px;
  background: #f7faf8;
  border: 1px solid #f7faf8;
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search-row:focus-within {
  border-color: #6cc9bd;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2), 0 0 0 3px rgba(108, 201, 189, 0.15);
}

.search-row > i {
  color: #71817b;
  font-size: 14px;
}

.search-row input {
  width: 100%;
  min-width: 0;
  height: 50px;
  padding: 0 10px;
  color: #17211f;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 14px;
}

.search-row input::placeholder {
  color: #899690;
}

.search-submit {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #ffffff;
  background: var(--coral);
  border-radius: 5px;
  transition: background-color 160ms ease, transform 160ms ease;
}

.search-submit:hover {
  background: #bd4935;
  transform: translateX(1px);
}

.signal-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(76px, 1fr));
  border-top: 1px solid #35463f;
  border-bottom: 1px solid #35463f;
}

.signal-metric {
  min-width: 0;
  padding: 12px 13px;
  border-left: 1px solid #35463f;
}

.signal-metric:last-child {
  border-right: 1px solid #35463f;
}

.signal-metric span,
.signal-metric strong {
  display: block;
}

.signal-metric span {
  overflow: hidden;
  color: #8fa39c;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal-metric strong {
  margin-top: 4px;
  color: #ffffff;
  font-family: Georgia, serif;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.signal-metric.accent strong {
  color: #f3947f;
}

/* ===== Personal navigation deck ===== */
.home-deck {
  position: relative;
  color: #edf4f1;
  background: #1b2925;
  border-bottom: 1px solid #31443e;
}

.home-deck::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: #55bdb1;
  content: "";
  opacity: 0.55;
}

.home-deck-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 34px;
  width: min(100% - 44px, var(--content-width));
  margin: 0 auto;
  padding: 34px 0 36px;
}

.home-main {
  min-width: 0;
}

.home-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 22px;
}

.home-heading h1,
.quick-nav-header h2,
.academic-title-block h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-weight: 600;
}

.home-heading h1 {
  color: #ffffff;
  font-size: 31px;
  line-height: 1.2;
}

.home-context {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: #9bada7;
  text-align: right;
}

.home-context strong {
  color: #d7e2de;
  font-size: 11px;
  font-weight: 700;
}

.home-context .workspace-date {
  margin-top: 3px;
}

.web-search-shell {
  min-width: 0;
}

.web-engines {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 9px;
  padding: 3px;
  overflow-x: auto;
  background: #121c19;
  border: 1px solid #334740;
  border-radius: 6px;
  scrollbar-width: none;
}

.web-engines::-webkit-scrollbar {
  display: none;
}

.web-engine {
  display: inline-flex;
  min-width: max-content;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  color: #91a49d;
  background: transparent;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.web-engine:hover {
  color: #ffffff;
  background: #20312c;
}

.web-engine.active {
  color: #10201c;
  background: #70cec2;
}

.web-search-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 48px;
  align-items: center;
  min-width: 0;
  min-height: 58px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 7px;
  box-shadow: 0 15px 34px rgba(0, 0, 0, 0.2);
}

.web-search-row:focus-within {
  border-color: #70cec2;
  box-shadow: 0 15px 34px rgba(0, 0, 0, 0.22), 0 0 0 3px rgba(112, 206, 194, 0.14);
}

.engine-mark {
  display: grid;
  height: 34px;
  place-items: center;
  color: #4e625c;
  border-right: 1px solid #dce4e0;
  font-size: 16px;
}

.web-search-row input {
  width: 100%;
  min-width: 0;
  height: 56px;
  padding: 0 16px;
  color: #17211f;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 15px;
}

.web-search-row input::placeholder {
  color: #7f8d88;
}

.web-search-submit {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #ffffff;
  background: var(--coral);
  border-radius: 5px;
  transition: background-color 150ms ease, transform 150ms ease;
}

.web-search-submit:hover {
  background: #bc4835;
  transform: translateX(1px);
}

.home-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.home-shortcuts a {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  color: #9fb1ab;
  background: #22332e;
  border: 1px solid #344a43;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}

.home-shortcuts a:hover {
  color: #ffffff;
  border-color: #61b8ad;
}

.companion-console {
  min-width: 0;
  padding: 14px;
  background: #111b18;
  border: 1px solid #3a4d47;
  border-radius: 7px;
  box-shadow: 0 15px 34px rgba(0, 0, 0, 0.17);
}

.companion-header {
  display: flex;
  min-height: 24px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #6ec8bc;
  font-size: 9px;
  font-weight: 800;
}

.companion-header span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.companion-header strong {
  color: #f18a74;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.pet-stage {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  min-height: 128px;
  align-items: center;
  margin-top: 7px;
  overflow: hidden;
  background: #182622;
  border: 1px solid #2f443e;
  border-radius: 5px;
}

.pet-stage::before {
  position: absolute;
  right: 0;
  bottom: 31px;
  left: 0;
  height: 1px;
  background: #2d403a;
  box-shadow: 0 -31px 0 #263a34, 0 -62px 0 #263a34;
  content: "";
}

.pet-stage::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 111px;
  width: 1px;
  background: #2f443e;
  content: "";
}

.pet-scanline {
  position: absolute;
  z-index: 1;
  right: 0;
  left: 0;
  height: 1px;
  background: #62c9bc;
  opacity: 0.45;
  animation: pet-scan 4.5s linear infinite;
}

.pet-button {
  position: relative;
  z-index: 2;
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  justify-self: center;
  color: #80d9ce;
  background: #203a34;
  border: 1px solid #477067;
  border-radius: 7px;
  font-size: 48px;
  animation: pet-idle 3.2s ease-in-out infinite;
}

.pet-button:hover {
  color: #ffffff;
  background: #285046;
  border-color: #79d1c5;
}

.pet-button.reacting {
  animation: pet-react 620ms ease;
}

.pet-identity {
  position: relative;
  z-index: 2;
  min-width: 0;
  padding: 0 14px;
}

.pet-identity h2 {
  margin: 0;
  color: #ffffff;
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: 600;
}

.pet-identity span {
  display: block;
  margin-top: 4px;
  color: #8ca19a;
  font-size: 9px;
}

.pet-message {
  min-height: 34px;
  padding: 10px 1px 5px;
  overflow: hidden;
  color: #9fb1ab;
  font-size: 10px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pet-progress {
  height: 4px;
  overflow: hidden;
  background: #273833;
  border-radius: 2px;
}

.pet-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: #6ccbc0;
  transition: width 260ms ease;
}

.pet-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 7px;
  color: #71877f;
  font-size: 9px;
}

.pet-stats strong {
  color: #d9e4e0;
  font-variant-numeric: tabular-nums;
}

.quick-nav-band {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.quick-nav-inner {
  width: min(100% - 44px, var(--content-width));
  margin: 0 auto;
  padding: 31px 0 36px;
}

.quick-nav-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 17px;
}

.quick-nav-header h2,
.academic-title-block h2 {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.25;
}

.quick-category-tabs {
  display: flex;
  gap: 3px;
  padding: 3px;
  overflow-x: auto;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 5px;
  scrollbar-width: none;
}

.quick-category-tabs::-webkit-scrollbar {
  display: none;
}

.quick-category-tabs button {
  min-width: max-content;
  min-height: 30px;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
}

.quick-category-tabs button:hover {
  color: var(--ink);
}

.quick-category-tabs button.active {
  color: #ffffff;
  background: var(--teal-strong);
}

.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.quick-link-card {
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr) 10px;
  min-width: 0;
  min-height: 67px;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.quick-link-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.quick-link-icon {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 5px;
  font-size: 16px;
}

.tone-blue { color: var(--blue); background: var(--blue-soft); }
.tone-teal { color: var(--teal); background: var(--teal-soft); }
.tone-coral { color: var(--coral); background: var(--coral-soft); }
.tone-gold { color: var(--gold); background: var(--gold-soft); }
.tone-indigo { color: #5969a3; background: #e4e6f2; }
.tone-pink { color: #bd5575; background: #f4e1e7; }
.tone-ink { color: var(--ink); background: var(--surface-strong); }

[data-theme="dark"] .tone-indigo { color: #aab8ed; background: #2b3148; }
[data-theme="dark"] .tone-pink { color: #ec9bb3; background: #422936; }

.quick-link-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.quick-link-copy strong,
.quick-link-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-link-copy strong {
  color: var(--ink);
  font-size: 11px;
}

.quick-link-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.quick-link-arrow {
  color: var(--faint);
  font-size: 8px;
}

.academic-head {
  color: #edf4f1;
  background: #20312c;
  border-bottom: 1px solid #31453f;
}

.academic-head-inner {
  display: grid;
  grid-template-columns: 260px minmax(360px, 1fr) 330px;
  align-items: end;
  gap: 30px;
  width: min(100% - 44px, var(--content-width));
  margin: 0 auto;
  padding: 29px 0 31px;
}

.academic-title-block {
  min-width: 0;
}

.academic-title-block .eyebrow {
  color: #65c9bd;
}

.academic-title-block h2 {
  color: #ffffff;
}

.academic-title-block > span {
  display: block;
  margin-top: 6px;
  color: #8fa39c;
  font-size: 10px;
}

.academic-search {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) 38px;
  min-width: 0;
  min-height: 45px;
  align-items: center;
  padding-left: 13px;
  overflow: hidden;
  background: #f7faf8;
  border: 1px solid #f7faf8;
  border-radius: 6px;
}

.academic-search:focus-within {
  border-color: #65c9bd;
  box-shadow: 0 0 0 3px rgba(101, 201, 189, 0.13);
}

.academic-search > i {
  color: #778780;
  font-size: 12px;
}

.academic-search input {
  width: 100%;
  min-width: 0;
  height: 43px;
  padding: 0 8px;
  color: #17211f;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 12px;
}

.academic-search input::placeholder {
  color: #8a9692;
}

.academic-search button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #ffffff;
  background: var(--teal-strong);
  border-radius: 4px;
}

@keyframes pet-scan {
  from { top: 0; }
  to { top: 100%; }
}

@keyframes pet-idle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes pet-react {
  0%, 100% { transform: rotate(0) scale(1); }
  30% { transform: rotate(-6deg) scale(1.07); }
  65% { transform: rotate(6deg) scale(1.07); }
}

.workspace {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 36px;
  width: min(100% - 44px, var(--content-width));
  margin: 0 auto;
  padding: 36px 0 68px;
}

.filter-rail {
  min-width: 0;
}

.rail-section {
  padding: 0 0 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.rail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 27px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.rail-reset {
  padding: 2px 0;
  color: var(--teal);
  background: transparent;
  font-size: 11px;
}

.rail-reset:hover {
  color: var(--teal-strong);
  text-decoration: underline;
}

.topic-list {
  display: grid;
  gap: 3px;
}

.topic-button,
.ledger-row {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px;
  color: var(--ink-soft);
  background: transparent;
  border-left: 3px solid transparent;
  border-radius: 3px;
  font-size: 12px;
  text-align: left;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.topic-button:hover,
.ledger-row:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.topic-button.active,
.ledger-row.active {
  color: var(--teal-strong);
  background: var(--teal-soft);
  border-left-color: var(--teal);
  font-weight: 700;
}

.topic-button span:first-child,
.ledger-row span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.topic-button i,
.ledger-row i {
  width: 15px;
  color: var(--faint);
  text-align: center;
}

.topic-button.active i,
.ledger-row.active i {
  color: var(--teal);
}

.topic-count,
.ledger-row strong {
  flex: 0 0 auto;
  color: var(--faint);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.source-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.source-note > i {
  margin-top: 3px;
  color: var(--teal);
  font-size: 13px;
}

.source-note div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.source-note strong {
  color: var(--ink-soft);
  font-size: 11px;
}

.source-note span {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.4;
}

.feed-column {
  min-width: 0;
}

.feed-toolbar {
  display: flex;
  min-height: 54px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 20px;
}

.feed-toolbar h2,
.tools-heading h2 {
  font-size: 26px;
  line-height: 1.25;
}

.feed-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.select-control {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.select-control select {
  height: 38px;
  padding: 0 34px 0 12px;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  outline: 0;
  appearance: none;
  font-size: 12px;
}

.select-control select:hover,
.select-control select:focus {
  border-color: var(--teal);
}

.select-control i {
  position: absolute;
  right: 12px;
  color: var(--faint);
  pointer-events: none;
  font-size: 9px;
}

.refresh-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  color: #ffffff;
  background: var(--teal-strong);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  transition: background-color 150ms ease;
}

.refresh-button:hover {
  background: var(--teal);
}

.refresh-button.loading i {
  animation: spin 850ms linear infinite;
}

.refresh-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.mobile-topics {
  display: none;
}

.featured-paper {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 32px;
  min-height: 255px;
  padding: 30px;
  margin-bottom: 22px;
  overflow: hidden;
  color: #edf4f1;
  background: #1d2c28;
  border: 1px solid #30443e;
  border-radius: 7px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 100%;
}

.featured-paper::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  background: var(--coral);
  content: "";
}

.featured-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  color: #f48d78;
  font-size: 10px;
  font-weight: 800;
}

.featured-paper h3 {
  max-width: 920px;
  margin: 0;
  color: #ffffff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 600;
  line-height: 1.35;
}

.featured-paper h3 button {
  display: block;
  width: 100%;
  overflow-wrap: anywhere;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
}

.featured-paper h3 button:hover {
  color: #8bd6cc;
}

.featured-authors {
  margin: 12px 0 0;
  overflow: hidden;
  color: #9fb2ab;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.featured-abstract {
  display: -webkit-box;
  max-width: 950px;
  margin: 16px 0 0;
  overflow: hidden;
  color: #c2cfca;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  line-height: 1.7;
}

.featured-actions,
.paper-actions,
.reader-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.featured-actions {
  margin-top: 20px;
}

.action-button,
.action-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 11px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.action-button:hover,
.action-link:hover {
  color: var(--teal-strong);
  background: var(--teal-soft);
  border-color: var(--teal);
}

.featured-actions .action-button,
.featured-actions .action-link {
  color: #dbe6e2;
  background: #283a35;
  border-color: #3c514b;
}

.featured-actions .action-button:hover,
.featured-actions .action-link:hover {
  color: #ffffff;
  background: #315149;
  border-color: #67b7ab;
}

.action-button.primary,
.reader-actions .primary {
  color: #ffffff;
  background: var(--teal-strong);
  border-color: var(--teal-strong);
}

.action-button.primary:hover,
.reader-actions .primary:hover {
  color: #ffffff;
  background: var(--teal);
}

.action-button.saved {
  color: var(--coral);
  background: var(--coral-soft);
  border-color: color-mix(in srgb, var(--coral) 40%, var(--line));
}

.featured-aside {
  align-self: stretch;
  padding-left: 24px;
  border-left: 1px solid #394b46;
}

.featured-aside-label {
  color: #80948d;
  font-size: 9px;
  font-weight: 800;
}

.featured-reason {
  margin: 8px 0 22px;
  color: #cbd7d3;
  font-size: 12px;
  line-height: 1.65;
}

.featured-score {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: #f4937f;
}

.featured-score strong {
  font-family: Georgia, serif;
  font-size: 38px;
  font-weight: 500;
  line-height: 1;
}

.featured-score span {
  color: #84978f;
  font-size: 10px;
}

.paper-list {
  display: grid;
  gap: 10px;
}

.paper-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  min-width: 0;
  padding: 21px 22px 19px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.paper-item:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.paper-index {
  color: var(--faint);
  font-family: Georgia, serif;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.paper-body {
  min-width: 0;
}

.paper-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.paper-topic-label {
  padding: 2px 6px;
  color: var(--teal-strong);
  background: var(--teal-soft);
  border-radius: 3px;
}

.paper-code-label {
  padding: 2px 6px;
  color: var(--coral);
  background: var(--coral-soft);
  border-radius: 3px;
}

.paper-version {
  color: var(--gold);
}

.paper-item h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.42;
}

.paper-title-button {
  display: block;
  padding: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  overflow-wrap: anywhere;
  text-align: left;
}

.paper-title-button:hover {
  color: var(--teal-strong);
}

.paper-authors {
  margin: 7px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paper-summary {
  display: -webkit-box;
  margin: 12px 0 0;
  overflow: hidden;
  color: var(--ink-soft);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  line-height: 1.72;
}

.paper-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.paper-signals {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
}

.paper-signals span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.paper-actions {
  flex: 0 0 auto;
}

.paper-actions .action-button,
.paper-actions .action-link {
  min-width: 34px;
  min-height: 32px;
  padding: 0 9px;
}

.loading-state {
  display: grid;
  gap: 10px;
}

.skeleton-paper {
  min-height: 198px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.skeleton-paper::after {
  display: block;
  width: 55%;
  height: 100%;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface-strong) 60%, transparent), transparent);
  content: "";
  animation: shimmer 1.25s infinite;
}

.empty-state,
.error-state {
  min-height: 220px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.empty-state:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: center;
}

.empty-state > i {
  margin-bottom: 8px;
  color: var(--faint);
  font-size: 24px;
}

.empty-state strong,
.error-state strong {
  color: var(--ink);
  font-size: 14px;
}

.empty-state span,
.error-state span {
  font-size: 11px;
}

.error-state:not([hidden]) {
  display: flex;
  gap: 16px;
  padding: 28px;
}

.error-state > i {
  color: var(--danger);
  font-size: 22px;
}

.error-state > div {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.error-state button,
.load-more {
  min-height: 38px;
  padding: 0 15px;
  color: var(--teal-strong);
  background: var(--teal-soft);
  border: 1px solid color-mix(in srgb, var(--teal) 45%, var(--line));
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
}

.load-more {
  display: block;
  width: 100%;
  height: 45px;
  margin-top: 14px;
  color: var(--ink-soft);
  background: var(--surface);
  border-color: var(--line);
}

.load-more:hover,
.error-state button:hover {
  color: var(--teal-strong);
  border-color: var(--teal);
}

.tools-band {
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.tools-inner {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 36px;
  width: min(100% - 44px, var(--content-width));
  margin: 0 auto;
  padding: 46px 0 54px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.tool-link {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 14px;
  min-width: 0;
  min-height: 70px;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.tool-link:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.tool-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 5px;
}

.tool-icon.semantic { color: var(--blue); background: var(--blue-soft); }
.tool-icon.code { color: var(--coral); background: var(--coral-soft); }
.tool-icon.connected { color: var(--teal); background: var(--teal-soft); }
.tool-icon.hf { color: var(--gold); background: var(--gold-soft); }
.tool-icon.overleaf { color: #257b54; background: #deeee5; }
.tool-icon.zotero { color: #a94840; background: #f2e1df; }

[data-theme="dark"] .tool-icon.overleaf { color: #80d1a8; background: #203b2d; }
[data-theme="dark"] .tool-icon.zotero { color: #ef9389; background: #412724; }

.tool-link > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.tool-link strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-link small {
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-link > i {
  color: var(--faint);
  font-size: 9px;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
  padding: 0 max(22px, calc((100vw - var(--content-width)) / 2));
  color: #87968f;
  background: var(--header);
  font-size: 10px;
}

.reader-backdrop {
  position: fixed;
  z-index: 1800;
  inset: 0;
  background: rgba(6, 10, 9, 0.62);
  backdrop-filter: blur(3px);
}

.reader-backdrop:not([hidden]) {
  display: block;
}

.reader-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1900;
  display: flex;
  width: min(760px, 94vw);
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -24px 0 64px rgba(0, 0, 0, 0.22);
  transform: translateX(102%);
  transition: transform 220ms ease;
}

.reader-panel.open {
  transform: translateX(0);
}

.reader-header {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 24px;
  color: #d9e4e0;
  background: var(--header);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.reader-header > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.reader-label {
  color: #64c7bb;
  font-size: 9px;
  font-weight: 800;
}

#readerId {
  overflow: hidden;
  color: #90a59e;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reader-close {
  background: #263630;
}

.reader-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 34px 42px 70px;
}

.reader-topic-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 10px;
}

.reader-scroll h2 {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
  font-weight: 600;
  line-height: 1.36;
}

.reader-authors {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.reader-actions {
  margin: 22px 0 28px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.reader-section {
  margin: 28px 0;
}

.reader-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 13px;
  color: var(--ink);
  font-size: 13px;
}

.reader-section h3 i {
  color: var(--teal);
}

.insight-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.insight-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 15px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.insight-row strong {
  color: var(--teal-strong);
  font-size: 10px;
}

.insight-row p {
  margin: 0;
  color: var(--ink-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  line-height: 1.7;
}

.reader-abstract,
.translation-content {
  margin: 0;
  color: var(--ink-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.9;
}

.translation-box {
  min-height: 68px;
  padding: 16px;
  color: var(--ink-soft);
  background: var(--teal-soft);
  border-left: 3px solid var(--teal);
  border-radius: 3px;
}

.translation-box.loading {
  color: var(--muted);
}

.translation-box.error {
  color: var(--danger);
  background: var(--coral-soft);
  border-left-color: var(--danger);
}

.translation-trigger {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  color: var(--teal-strong);
  background: var(--teal-soft);
  border: 1px solid color-mix(in srgb, var(--teal) 40%, var(--line));
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.reader-note {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  padding: 13px 14px;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 5px;
  outline: 0;
  font-size: 12px;
  line-height: 1.65;
}

.reader-note:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 15%, transparent);
}

.note-status {
  display: block;
  min-height: 18px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
  text-align: right;
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2500;
  display: grid;
  width: min(340px, calc(100vw - 36px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 13px;
  color: #eaf1ee;
  background: #18231f;
  border: 1px solid #344a43;
  border-radius: 5px;
  box-shadow: var(--shadow);
  font-size: 11px;
  animation: toast-in 180ms ease;
}

.toast i {
  color: #67c7bb;
}

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

@keyframes shimmer {
  from { transform: translateX(-110%); }
  to { transform: translateX(200%); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1120px) {
  .app-header {
    grid-template-columns: 1fr auto;
  }

  .top-nav {
    display: none;
  }

  .command-inner {
    grid-template-columns: minmax(190px, 0.65fr) minmax(410px, 1.35fr);
  }

  .signal-metrics {
    grid-column: 1 / -1;
  }

  .command-inner {
    gap: 22px 30px;
  }

  .tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  :root {
    --header-height: 60px;
  }

  .app-header {
    padding: 0 16px;
  }

  .brand-copy small,
  .live-state {
    display: none;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    font-size: 16px;
  }

  .command-inner {
    grid-template-columns: 1fr;
    width: calc(100% - 32px);
    max-width: var(--content-width);
    padding: 26px 0;
  }

  .workspace-heading h1 {
    font-size: 27px;
  }

  .search-shell {
    width: 100%;
  }

  .signal-metrics {
    grid-column: auto;
  }

  .workspace {
    display: block;
    width: calc(100% - 32px);
    max-width: var(--content-width);
    padding-top: 28px;
  }

  .filter-rail {
    display: none;
  }

  .mobile-topics {
    display: flex;
    gap: 6px;
    margin: 0 -16px 18px;
    padding: 0 16px 5px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .mobile-topics::-webkit-scrollbar {
    display: none;
  }

  .mobile-topic {
    min-height: 32px;
    flex: 0 0 auto;
    padding: 0 10px;
    color: var(--ink-soft);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
  }

  .mobile-topic.active {
    color: #ffffff;
    background: var(--teal-strong);
    border-color: var(--teal-strong);
  }

  .featured-paper {
    grid-template-columns: 1fr;
  }

  .featured-aside {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    padding: 17px 0 0;
    border-top: 1px solid #394b46;
    border-left: 0;
  }

  .featured-reason {
    margin-bottom: 0;
  }

  .tools-inner {
    display: block;
    width: calc(100% - 32px);
    max-width: var(--content-width);
  }

  .tools-heading {
    margin-bottom: 18px;
  }
}

@media (max-width: 620px) {
  .brand-copy strong {
    font-size: 15px;
  }

  .header-actions {
    gap: 6px;
  }

  .icon-button {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .command-inner {
    min-height: 0;
  }

  .search-modes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .search-mode {
    min-width: 0;
    padding-right: 5px;
    padding-left: 5px;
  }

  .search-row,
  .search-shell,
  .feed-controls {
    max-width: 100%;
  }

  .select-control select {
    min-width: 0;
  }

  .refresh-button {
    width: 38px;
    padding: 0;
    justify-content: center;
    flex: 0 0 38px;
  }

  .refresh-button span {
    display: none;
  }

  .signal-metric {
    padding: 10px;
  }

  .signal-metric strong {
    font-size: 21px;
  }

  .feed-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .feed-controls {
    width: 100%;
  }

  .select-control {
    flex: 1;
  }

  .select-control select {
    width: 100%;
  }

  .featured-paper {
    grid-template-columns: minmax(0, 1fr);
    padding: 24px 22px;
  }

  .featured-paper h3 {
    font-size: 21px;
  }

  .featured-actions .action-button span,
  .featured-actions .action-link span {
    display: none;
  }

  .paper-item {
    grid-template-columns: 32px minmax(0, 1fr);
    padding: 18px 14px 17px 0;
  }

  .paper-item h3 {
    font-size: 17px;
  }

  .paper-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .paper-actions {
    width: 100%;
  }

  .paper-actions .action-button,
  .paper-actions .action-link {
    flex: 1;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .reader-panel {
    width: 100%;
  }

  .reader-scroll {
    padding: 27px 20px 60px;
  }

  .reader-scroll h2 {
    font-size: 23px;
  }

  .insight-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

@media (max-width: 1120px) {
  .home-deck-inner {
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 24px;
  }

  .quick-links-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .academic-head-inner {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .academic-head-inner .signal-metrics {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .home-deck-inner,
  .academic-head-inner {
    grid-template-columns: minmax(0, 1fr);
    width: calc(100% - 32px);
    max-width: var(--content-width);
  }

  .companion-console {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(240px, 1.2fr);
    gap: 0 16px;
  }

  .companion-header,
  .pet-stage {
    grid-column: 1;
  }

  .pet-message,
  .pet-progress,
  .pet-stats {
    grid-column: 2;
  }

  .pet-message {
    align-self: end;
    white-space: normal;
  }

  .quick-nav-inner {
    width: calc(100% - 32px);
    max-width: var(--content-width);
  }

  .quick-nav-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .quick-category-tabs {
    width: 100%;
  }

  .quick-links-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .academic-head-inner .signal-metrics {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .home-deck-inner {
    padding-top: 27px;
    padding-bottom: 29px;
  }

  .home-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 17px;
  }

  .home-heading h1 {
    font-size: 27px;
  }

  .home-context {
    align-items: flex-start;
    text-align: left;
  }

  .web-engines {
    margin-right: -16px;
    margin-left: -16px;
    padding-right: 16px;
    padding-left: 16px;
    background: transparent;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .web-search-row {
    grid-template-columns: 40px minmax(0, 1fr) 44px;
  }

  .web-search-row input {
    padding-right: 8px;
    padding-left: 10px;
    font-size: 13px;
  }

  .home-shortcuts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .home-shortcuts a {
    justify-content: center;
    padding: 0 4px;
  }

  .companion-console {
    display: block;
  }

  .pet-stage {
    grid-template-columns: 100px minmax(0, 1fr);
  }

  .pet-stage::after {
    left: 99px;
  }

  .pet-button {
    width: 76px;
    height: 76px;
    font-size: 42px;
  }

  .quick-nav-inner {
    padding-top: 27px;
  }

  .quick-links-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-link-card {
    grid-template-columns: 36px minmax(0, 1fr);
    min-height: 62px;
    gap: 8px;
    padding: 8px;
  }

  .quick-link-icon {
    width: 36px;
    height: 36px;
  }

  .quick-link-arrow {
    display: none;
  }

  .academic-head-inner {
    padding-top: 25px;
    padding-bottom: 27px;
  }

  .academic-search {
    grid-template-columns: 22px minmax(0, 1fr) 36px;
  }
}

@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;
  }
}
