:root {
  color-scheme: light;
  --header-height: 0px;
  --masthead-height: 13.0979vw;
  --sidebar-width: clamp(210px, calc(12.5vw + 20px), 250px);
  --sidebar-top-gap: 0px;
  --ink: #142124;
  --muted: #65706b;
  --paper: #f5efe3;
  --panel: rgba(255, 251, 244, 0.95);
  --panel-solid: #fffaf1;
  --line: rgba(175, 132, 62, 0.28);
  --line-strong: rgba(181, 119, 35, 0.62);
  --deep: #042729;
  --deep-2: #073538;
  --gold: #c9872f;
  --gold-soft: #f1c46f;
  --bronze: #9b6b25;
  --green: #12655c;
  --red: #b0302b;
  --shadow: 0 16px 42px rgba(20, 33, 36, 0.12);
  --chat-page: #e2e7da;
  --chat-panel: #e8e4d6;
  --chat-log: #dce5d9;
  --chat-assistant: #eee8d9;
  --chat-input: #e6ecdf;
  --chat-user: #28514f;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: #071f21;
  font-family:
    "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.site-header {
  position: relative;
  z-index: 30;
  overflow: visible;
  height: var(--masthead-height);
  padding: 0;
  background: #06282b;
  border-bottom: 1px solid rgba(221, 163, 70, 0.72);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.site-header::after {
  display: none;
}

.masthead-picture {
  display: block;
  width: 100%;
  height: 100%;
}

.masthead-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.layout-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: calc(100vh - var(--masthead-height));
  min-height: calc(100dvh - var(--masthead-height));
}

.side-rail {
  position: sticky;
  top: 0;
  align-self: stretch;
  z-index: 20;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: calc(100vh - var(--masthead-height));
  height: calc(100dvh - var(--masthead-height));
  min-height: calc(100vh - var(--masthead-height));
  min-height: calc(100dvh - var(--masthead-height));
  margin-top: 0;
  overflow: hidden;
  padding: 10px;
  color: rgba(255, 250, 235, 0.94);
  background:
    linear-gradient(180deg, rgba(1, 29, 31, 0.92), rgba(3, 47, 50, 0.97)),
    radial-gradient(circle at 25% 10%, rgba(218, 154, 63, 0.14), transparent 34%),
    #042729;
  border-right: 1px solid rgba(228, 176, 91, 0.34);
  border-radius: 0;
  box-shadow: inset -12px 0 28px rgba(0, 0, 0, 0.22);
}

.side-rail::before {
  position: absolute;
  inset: 0;
  width: 100%;
  pointer-events: none;
  content: "";
  border-radius: inherit;
  background-image:
    linear-gradient(rgba(4, 39, 41, 0.78), rgba(4, 39, 41, 0.9)),
    url("../images/panel-pattern.png");
  background-size: cover;
  background-position: center;
  mix-blend-mode: screen;
  opacity: 0.16;
}

.rail-head,
.market-nav {
  position: relative;
  z-index: 1;
}

.rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  margin-bottom: 10px;
  padding: 0 6px;
  font-size: 15px;
  font-weight: 900;
}

.rail-badge {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(241, 196, 111, 0.44);
  border-radius: 50%;
  color: #052326;
  background: linear-gradient(180deg, #e7d9b2, #97a9a1);
  font-size: 12px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.market-nav {
  display: grid;
  flex: 1;
  height: 100%;
  gap: 8px;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  min-height: 0;
  overflow: hidden;
}

.nav-item,
.nav-subitem {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(241, 196, 111, 0.22);
  border-radius: 8px;
  color: rgba(255, 250, 235, 0.9);
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
  font-weight: 900;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.nav-item {
  gap: 8px;
  padding: 0 10px;
  font-size: 15px;
}

.nav-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  color: var(--gold-soft);
  font-size: 15px;
}

.nav-item:hover,
.nav-item.is-active,
.nav-subitem:hover,
.nav-subitem.is-active {
  color: #ffcf72;
  border-color: rgba(241, 196, 111, 0.72);
  background:
    linear-gradient(90deg, rgba(241, 196, 111, 0.18), rgba(255, 255, 255, 0.05)),
    rgba(255, 255, 255, 0.055);
  transform: translateX(2px);
}

.nav-group {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(241, 196, 111, 0.54) rgba(0, 0, 0, 0.12);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  border: 1px solid rgba(241, 196, 111, 0.18);
  border-radius: 8px;
  padding: 8px 8px 10px;
  background: rgba(0, 0, 0, 0.14);
}

.nav-group::-webkit-scrollbar {
  width: 5px;
}

.nav-group::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.12);
}

.nav-group::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(241, 196, 111, 0.54);
}

.nav-group::after {
  flex: 0 1 20%;
  min-height: 0;
  content: "";
}

.nav-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  margin-bottom: 4px;
  color: rgba(255, 250, 235, 0.96);
  font-size: 15px;
  font-weight: 900;
}

.nav-subitem {
  position: relative;
  flex: 1 1 31px;
  max-height: 53px;
  min-height: 31px;
  margin-top: 3px;
  border-color: transparent;
  padding: 0 6px 0 28px;
  background: transparent;
  font-size: 13px;
}

.nav-subitem::before {
  position: absolute;
  left: 13px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  content: "";
  background: var(--gold-soft);
}

.main-stage {
  position: relative;
  grid-column: 2;
  min-width: 0;
  min-height: calc(100vh - var(--masthead-height));
  min-height: calc(100dvh - var(--masthead-height));
  padding: 0 20px 16px;
  background:
    linear-gradient(90deg, rgba(255, 249, 239, 0.94), rgba(255, 249, 239, 0.91)),
    url("../images/panel-pattern.png");
  background-size: cover;
  background-position: center;
  border-top-left-radius: 18px;
}

.content-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 24px;
  margin-bottom: 2px;
  flex-wrap: nowrap;
}

.crumb-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-height: 22px;
  color: #273436;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.crumb-icon {
  color: #173c3b;
  font-size: 17px;
}

.toolbar-actions {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 10px;
}

.refresh-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.refresh-group[hidden] {
  display: none;
}

.history-toolbar {
  min-width: 0;
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.history-toolbar[hidden] {
  display: none;
}

.history-current-button,
.history-more-button {
  flex: 0 0 auto;
  min-height: 28px;
  border: 1px solid rgba(166, 112, 32, 0.42);
  border-radius: 8px;
  padding: 0 10px;
  color: #102125;
  background: rgba(255, 253, 248, 0.92);
  font-size: 12px;
  font-weight: 900;
}

.history-current-button[hidden] {
  display: none;
}

.history-current-button:hover,
.history-current-button.is-active,
.history-more-button:hover {
  color: #fff7df;
  background: linear-gradient(180deg, var(--green), #0b403c);
}

.history-more-button[hidden] {
  display: none;
}

.history-more-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.history-index,
.history-date {
  min-width: 0;
  flex: 0 1 420px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.history-date {
  flex: 0 0 170px;
}

.history-index span,
.history-date span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.history-index select,
.history-date input {
  min-width: 0;
  width: 100%;
  height: 28px;
  border: 1px solid rgba(175, 132, 62, 0.34);
  border-radius: 8px;
  padding: 0 28px 0 10px;
  color: #213133;
  background: rgba(255, 253, 248, 0.94);
  outline: none;
  font-size: 12px;
  font-weight: 800;
}

.history-index select:focus,
.history-date input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 135, 47, 0.13);
}

.event-reader {
  display: grid;
  gap: 12px;
}

.event-top-block {
  margin-top: 0;
  box-shadow: none;
}

.event-top-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.event-card {
  min-width: 0;
  border: 1px solid rgba(175, 132, 62, 0.3);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 253, 248, 0.82);
}

.event-card strong {
  display: block;
  color: #102125;
  font-size: 13px;
  line-height: 1.35;
}

.event-card small,
.event-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.status-pill,
.article-status,
.status-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 8px;
  padding: 0 12px;
  color: #fff7df;
  background: linear-gradient(180deg, var(--green), #0b403c);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(241, 196, 111, 0.18);
}

.refresh-button,
.chat-form button,
.card-link {
  min-height: 30px;
  border: 1px solid rgba(166, 112, 32, 0.58);
  border-radius: 8px;
  color: #102125;
  background: linear-gradient(180deg, #ffe4a2, #c6862d);
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(77, 48, 15, 0.14);
}

.refresh-button {
  padding: 0 13px;
  white-space: nowrap;
}

.refresh-button:hover,
.chat-form button:hover,
.card-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(77, 48, 15, 0.18);
}

.refresh-button.is-active {
  box-shadow:
    inset 0 0 0 1px rgba(255, 250, 224, 0.58),
    0 10px 20px rgba(77, 48, 15, 0.18);
}

.refresh-button:disabled,
.chat-form button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.update-confirm-dialog {
  width: min(460px, calc(100% - 32px));
  max-width: none;
  border: 1px solid rgba(201, 135, 47, 0.68);
  border-radius: 14px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  box-shadow: 0 28px 80px rgba(0, 18, 20, 0.38);
}

.update-confirm-dialog::backdrop {
  background: rgba(0, 23, 25, 0.68);
  backdrop-filter: blur(3px);
}

.update-confirm-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  margin: 0;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(255, 251, 242, 0.98), rgba(247, 237, 217, 0.98)),
    url("../images/panel-pattern.png");
}

.update-confirm-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(201, 135, 47, 0.72);
  border-radius: 50%;
  color: #fff8e7;
  background: linear-gradient(180deg, #c9872f, #8e5919);
  font-size: 23px;
  font-weight: 900;
  box-shadow: 0 9px 22px rgba(96, 57, 13, 0.22);
}

.update-confirm-copy h2 {
  margin: 5px 0 0;
  color: #102b2d;
  font-size: 21px;
  line-height: 1.3;
}

.update-confirm-copy > p:not(.section-kicker) {
  margin: 10px 0 0;
  color: #3e4d4f;
  font-size: 14px;
  line-height: 1.65;
}

.update-confirm-copy .update-confirm-note {
  color: #8b5a1d;
  font-size: 12px;
  font-weight: 800;
}

.update-confirm-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.update-confirm-actions button {
  min-height: 40px;
  border-radius: 9px;
  font-weight: 900;
}

.update-cancel-button {
  border: 1px solid rgba(75, 94, 94, 0.32);
  color: #314143;
  background: rgba(255, 255, 255, 0.72);
}

.update-accept-button {
  border: 1px solid rgba(166, 112, 32, 0.62);
  color: #102125;
  background: linear-gradient(180deg, #ffe4a2, #c6862d);
  box-shadow: 0 9px 20px rgba(77, 48, 15, 0.16);
}

.update-cancel-button:hover {
  background: #fff;
}

.update-accept-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(77, 48, 15, 0.22);
}

.view-panel {
  display: none;
}

.view-panel.is-active {
  display: block;
}

.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 16%, rgba(240, 181, 78, 0.24), transparent 32%),
    linear-gradient(120deg, rgba(3, 35, 36, 0.76), rgba(238, 223, 195, 0.58)),
    url("../images/panel-pattern.png");
  background-repeat: no-repeat, no-repeat, repeat;
  background-size: cover, cover, 960px auto;
  background-position: center, center, center top;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.login-panel {
  width: min(520px, 100%);
  overflow: hidden;
  border: 1px solid rgba(229, 178, 94, 0.4);
  border-radius: 12px;
  background: rgba(255, 252, 246, 0.96);
  box-shadow: 0 24px 70px rgba(8, 35, 34, 0.3);
}

.login-brand {
  position: relative;
  width: 100%;
  aspect-ratio: 1039 / 259;
  overflow: hidden;
  background: #062b2a;
  border-bottom: 1px solid rgba(229, 178, 94, 0.52);
}

.login-brand-picture {
  display: block;
  width: 100%;
  height: 100%;
}

.login-brand-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.login-form {
  display: grid;
  gap: 16px;
  padding: 26px;
}

.login-form h1 {
  margin: 4px 0 0;
  color: #102125;
  font-size: 30px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: #243638;
  font-weight: 900;
}

.login-form input {
  height: 42px;
  border: 1px solid rgba(175, 132, 62, 0.36);
  border-radius: 8px;
  padding: 0 12px;
  color: #102125;
  background: rgba(255, 253, 248, 0.95);
  font: inherit;
  outline: none;
}

.login-form input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 135, 47, 0.16);
}

@media (max-width: 420px) {
  .login-shell {
    padding: 18px;
  }

}

.login-error {
  min-height: 18px;
  margin: 0;
  color: #a13b28;
  font-size: 13px;
  font-weight: 900;
}

.login-submit {
  min-height: 42px;
}

.home-hero,
.summary-block,
.module-card,
.report-reader,
.assistant-card,
.contact-strip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.home-hero {
  position: relative;
  overflow: hidden;
  padding: 2px 20px 10px;
}

.home-hero::after,
.report-reader::after,
.assistant-card::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(194, 132, 41, 0.08), transparent 20%, transparent 80%, rgba(18, 101, 92, 0.07)),
    repeating-linear-gradient(0deg, transparent 0 34px, rgba(155, 107, 37, 0.035) 34px 35px, transparent 35px 70px);
}

.home-hero > *,
.report-reader > *,
.assistant-card > * {
  position: relative;
  z-index: 1;
}

.section-kicker {
  margin: 0;
  color: var(--bronze);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-hero h1 {
  margin: 1px 0 0;
  font-size: clamp(21px, 1.75vw, 27px);
  line-height: 1.16;
  letter-spacing: 0;
}

.home-hero p:not(.section-kicker) {
  max-width: 1120px;
  margin: 6px 0 0;
  color: #3f4c4e;
  font-size: 14px;
  line-height: 1.62;
}

.report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.summary-block {
  margin-top: 7px;
  padding: 12px 18px 15px;
}

.block-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 9px;
}

.block-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.block-mark {
  color: var(--gold);
  font-size: 23px;
  line-height: 1;
}

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

.summary-item {
  border: 1px solid rgba(175, 132, 62, 0.22);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.54);
  color: #334042;
  font-size: 14px;
  line-height: 1.62;
}

.summary-item strong {
  display: block;
  margin-bottom: 5px;
  color: #132c2d;
}

.module-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin-top: 10px;
}

.module-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  min-height: 188px;
  padding: 14px;
}

.module-card h3 {
  margin: 0;
  color: #142124;
  font-size: 18px;
  line-height: 1.35;
}

.module-card .module-card-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.module-tag {
  flex: 0 0 auto;
  border: 1px solid rgba(18, 101, 92, 0.18);
  border-radius: 8px;
  padding: 4px 8px;
  color: var(--green);
  background: rgba(18, 101, 92, 0.08);
  font-size: 12px;
  font-weight: 900;
}

.module-card p {
  margin: 8px 0 0;
  color: #465254;
  font-size: 14px;
  line-height: 1.58;
}

.module-card ul {
  margin: 9px 0 0;
  padding-left: 18px;
  color: #273436;
  font-size: 14px;
  line-height: 1.58;
}

.module-card li + li {
  margin-top: 4px;
}

.card-link {
  justify-self: start;
  align-self: end;
  margin-top: 10px;
  padding: 0 14px;
}

.skeleton-card {
  grid-column: 1 / -1;
}

.contact-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
  padding: 16px 20px;
}

.contact-strip div {
  min-width: 0;
}

.contact-strip strong {
  display: block;
  margin-bottom: 6px;
  color: var(--bronze);
  font-size: 12px;
}

.contact-strip span {
  color: #273436;
  font-size: 14px;
  line-height: 1.55;
}

.report-reader,
.assistant-card {
  position: relative;
  overflow: hidden;
  padding: 18px 22px 22px;
}

.reader-head,
.assistant-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.reader-head h2,
.assistant-head h2 {
  margin: 4px 0 0;
  font-size: clamp(20px, 1.75vw, 27px);
  line-height: 1.25;
  letter-spacing: 0;
}

.assistant-head {
  margin-bottom: 10px;
}

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

.assistant-head h2 {
  margin-top: 4px;
  font-size: 24px;
  line-height: 1.25;
}

.brief-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  border-top: 1px solid rgba(175, 132, 62, 0.28);
  border-bottom: 1px solid rgba(175, 132, 62, 0.28);
  padding: 10px 0;
}

.brief-item {
  min-height: 74px;
  border-right: 1px solid rgba(175, 132, 62, 0.24);
  padding: 3px 11px 3px 0;
  color: #344143;
  font-size: 14px;
  line-height: 1.58;
}

.brief-item:last-child {
  border-right: 0;
}

.brief-item strong {
  display: block;
  margin-bottom: 7px;
  color: var(--bronze);
  font-size: 12px;
}

.empty-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

.fund-focus {
  margin-top: 12px;
  border-left: 4px solid var(--gold);
  border-radius: 0 8px 8px 0;
  padding: 10px 12px 10px 14px;
  background:
    linear-gradient(90deg, rgba(241, 196, 111, 0.21), transparent 72%),
    rgba(255, 255, 255, 0.45);
}

.fund-focus strong,
.article-notes strong {
  display: block;
  margin-bottom: 8px;
}

.fund-focus p,
.article-notes p {
  margin: 0;
  color: #4d5a5c;
  font-size: 14px;
  line-height: 1.62;
}

.article-body {
  margin-top: 16px;
  color: #253032;
  font-size: 14.5px;
  line-height: 1.78;
}

.article-body h3 {
  margin: 17px 0 7px;
  color: #142124;
  font-size: 17px;
  line-height: 1.4;
}

.article-body h3::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border: 1px solid rgba(155, 107, 37, 0.5);
  border-radius: 2px;
  content: "";
  background: linear-gradient(135deg, var(--green), var(--gold));
  transform: rotate(45deg) translateY(-1px);
}

.article-body p {
  margin: 7px 0;
}

.article-notes {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 14px;
  margin-top: 18px;
  border-top: 1px solid rgba(175, 132, 62, 0.32);
  padding-top: 13px;
}

.article-notes section {
  min-width: 0;
}

.source-list {
  margin: 8px 0 0;
  padding-left: 22px;
  color: #2d3a3c;
  font-size: 14px;
  line-height: 1.5;
}

.source-list li + li {
  margin-top: 8px;
}

.source-list a {
  color: #07554f;
  font-weight: 900;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.source-list a:hover {
  color: var(--bronze);
  text-decoration: underline;
}

.source-meta {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.assistant-card {
  display: grid;
  grid-template-rows: auto minmax(150px, 1fr) auto;
  height: calc(100vh - 194px);
  min-height: 0;
  padding: 18px 24px 20px;
  border-color: rgba(111, 126, 91, 0.42);
  background:
    linear-gradient(135deg, var(--chat-panel), var(--chat-page)),
    url("../images/panel-pattern.png");
  background-size: cover;
  background-position: center;
  box-shadow: 0 16px 42px rgba(28, 48, 43, 0.13);
}

.main-stage.is-assistant-mode {
  padding-top: 0;
  background:
    linear-gradient(115deg, var(--chat-page), var(--chat-panel)),
    url("../images/panel-pattern.png");
  background-size: cover;
  background-position: center;
}

.main-stage.is-assistant-mode .content-toolbar {
  display: none;
}

.main-stage.is-assistant-mode .assistant-card {
  height: calc(100vh - var(--masthead-height) - 16px);
}

.assistant-actions .status-pill {
  min-height: 28px;
}

.status-dot {
  background: linear-gradient(180deg, #153637, #081f21);
}

.chat-new-button {
  min-height: 28px;
  border: 1px solid rgba(101, 122, 93, 0.46);
  border-radius: 8px;
  padding: 0 11px;
  color: #183735;
  background: rgba(222, 230, 216, 0.96);
  font-weight: 900;
}

.chat-new-button:hover {
  border-color: var(--gold);
  background: #e9e3cf;
}

.chat-new-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.chat-log {
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid rgba(107, 128, 98, 0.4);
  border-radius: 8px;
  padding: 10px;
  background:
    radial-gradient(circle at 12% 8%, rgba(241, 196, 111, 0.1), transparent 28%),
    linear-gradient(180deg, var(--chat-log), #e2e2d0);
  box-shadow: inset 0 1px 8px rgba(28, 48, 43, 0.06);
}

.chat-message {
  width: fit-content;
  max-width: 92%;
  border-radius: 8px;
  padding: 9px 11px;
  line-height: 1.62;
  box-shadow: 0 6px 16px rgba(20, 33, 36, 0.06);
}

.chat-message p {
  margin: 0;
  white-space: pre-wrap;
}

.chat-message .chat-content {
  min-width: 0;
  overflow-wrap: anywhere;
}

.chat-message .chat-content > * + * {
  margin-top: 8px;
}

.chat-message .chat-content h3 {
  margin: 0;
  color: #123536;
  font-size: 15px;
  line-height: 1.45;
}

.chat-message .chat-content ul,
.chat-message .chat-content ol {
  margin: 0;
  padding-left: 22px;
}

.chat-message .chat-content li + li {
  margin-top: 4px;
}

.chat-message .chat-content blockquote {
  margin: 0;
  border-left: 3px solid var(--gold);
  padding: 5px 9px;
  color: #4d5a5c;
  background: rgba(241, 196, 111, 0.12);
}

.chat-message .chat-content code {
  border-radius: 4px;
  padding: 1px 4px;
  color: #0b403c;
  background: rgba(18, 101, 92, 0.09);
  font: 0.92em/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.chat-message .chat-content pre {
  overflow-x: auto;
  margin: 0;
  border-radius: 7px;
  padding: 10px 12px;
  color: #f9f2df;
  background: #102a2c;
}

.chat-message .chat-content pre code {
  padding: 0;
  color: inherit;
  background: transparent;
}

.chat-message .chat-content a {
  color: #07554f;
  font-weight: 800;
  text-decoration: underline;
}

.chat-thinking {
  color: var(--muted);
  font-style: italic;
}

.chat-message small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.chat-message.assistant {
  border: 1px solid rgba(151, 125, 73, 0.3);
  color: var(--ink);
  background: var(--chat-assistant);
}

.chat-message.user {
  align-self: flex-end;
  color: #fff7df;
  background: linear-gradient(180deg, #315b57, var(--chat-user));
}

.chat-message.user small {
  color: rgba(255, 247, 223, 0.72);
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  gap: 8px;
  align-self: end;
  margin-top: 10px;
}

.chat-form textarea {
  width: 100%;
  height: 52px;
  min-height: 52px;
  max-height: 52px;
  resize: none;
  border: 1px solid rgba(102, 124, 94, 0.5);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--chat-input);
  outline: none;
  font-size: 14px;
  line-height: 1.45;
  caret-color: #0b514c;
}

.chat-form textarea::placeholder {
  color: #69746b;
  opacity: 1;
}

.chat-form button {
  height: 52px;
  min-height: 52px;
  padding: 0 12px;
  font-size: 14px;
}

.chat-form textarea:focus {
  border-color: #4d7a6f;
  box-shadow: 0 0 0 3px rgba(77, 122, 111, 0.16);
}

.site-footer {
  display: none;
  justify-content: space-between;
  gap: 16px;
  margin-left: var(--sidebar-width);
  border-top: 1px solid rgba(175, 132, 62, 0.26);
  padding: 16px 28px 28px;
  color: rgba(255, 250, 235, 0.72);
  background: #071f21;
  font-size: 13px;
}

@media (max-width: 1180px) {
  :root {
    --header-height: 0px;
    --sidebar-width: clamp(204px, calc(18vw + 20px), 230px);
  }

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

  .summary-list,
  .contact-strip,
  .article-notes {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 820px) and (min-width: 861px) {
  .side-rail {
    padding: 8px;
  }

  .rail-head {
    min-height: 28px;
    margin-bottom: 6px;
    padding: 0 4px;
    font-size: 14px;
  }

  .rail-badge {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }

  .market-nav {
    gap: 6px;
  }

  .nav-item {
    min-height: 34px;
    padding: 0 8px;
    font-size: 14px;
  }

  .nav-group {
    padding: 5px 6px 6px;
  }

  .nav-group-title {
    min-height: 24px;
    margin-bottom: 2px;
    font-size: 13px;
  }

  .nav-subitem {
    flex-basis: 26px;
    max-height: 42px;
    min-height: 26px;
    margin-top: 1px;
    padding-left: 24px;
    font-size: 12px;
  }

  .nav-subitem::before {
    left: 11px;
    width: 5px;
    height: 5px;
  }
}

@media (max-height: 620px) and (min-width: 861px) {
  .rail-head {
    display: none;
  }
}

@media (max-width: 860px) {
  :root {
    --header-height: 0px;
    --masthead-height: 19.4577vw;
    --mobile-navigation-height: 101px;
  }

  .masthead-image {
    object-fit: contain;
  }

  .layout-shell {
    display: block;
  }

  .side-rail {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    padding: 7px 8px 8px;
    border-right: 0;
    border-bottom: 1px solid rgba(228, 176, 91, 0.34);
  }

  .side-rail::before {
    display: none;
  }

  .rail-head {
    display: none;
  }

  .market-nav {
    display: grid;
    height: auto;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(2, 40px);
    gap: 5px;
    overflow: visible;
  }

  .nav-group {
    display: contents;
  }

  .nav-group::after {
    display: none;
  }

  .nav-group-title {
    display: none;
  }

  .nav-item,
  .nav-subitem {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 40px;
    min-height: 40px;
    margin: 0;
    padding: 0 3px;
    overflow: hidden;
    font-size: 0;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
  }

  .nav-item::after,
  .nav-subitem::after {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0 3px;
    content: attr(data-short-label);
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
  }

  .nav-subitem::before,
  .nav-icon {
    display: none;
  }

  .nav-item:hover,
  .nav-item.is-active,
  .nav-subitem:hover,
  .nav-subitem.is-active {
    transform: none;
  }

  .main-stage {
    padding: 16px;
  }

  .main-stage.is-assistant-mode {
    height: calc(100dvh - var(--masthead-height) - var(--mobile-navigation-height));
    min-height: calc(100dvh - var(--masthead-height) - var(--mobile-navigation-height));
    padding: 8px;
  }

  .main-stage.is-assistant-mode #assistantView,
  .main-stage.is-assistant-mode .assistant-card {
    height: 100%;
    min-height: 0;
  }

  .site-footer {
    margin-left: 0;
  }
}

@media (max-width: 620px) {
  :root {
    --header-height: 0px;
  }

  .content-toolbar,
  .reader-head,
  .assistant-head,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-actions {
    justify-content: flex-start;
  }

  .main-stage {
    padding: 10px;
  }

  .content-toolbar {
    gap: 7px;
  }

  .crumb-line {
    display: none;
  }

  .toolbar-actions {
    width: 100%;
    gap: 5px;
  }

  .refresh-group {
    min-width: 0;
    width: auto;
    flex: 1 1 auto;
    gap: 4px;
    justify-content: flex-start;
  }

  .refresh-button {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 4px;
    font-size: 11px;
  }

  .toolbar-actions .status-pill,
  .toolbar-actions .history-current-button {
    min-height: 30px;
    padding: 0 6px;
    font-size: 11px;
  }

  .toolbar-actions .history-current-button {
    flex: 0 0 auto;
  }

  .history-toolbar {
    width: 100%;
    order: 3;
    flex-wrap: wrap;
  }

  .history-index {
    flex: 1 1 auto;
  }

  .history-date {
    flex: 1 1 160px;
  }

  .home-hero,
  .summary-block,
  .report-reader,
  .assistant-card {
    padding: 14px;
  }

  .assistant-card {
    height: auto;
  }

  .module-overview,
  .event-top-list,
  .brief-list,
  .summary-list {
    grid-template-columns: 1fr;
  }

  .main-stage.is-assistant-mode .assistant-card {
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 100%;
    padding: 10px;
  }

  .main-stage.is-assistant-mode .assistant-head {
    gap: 5px;
    margin-bottom: 7px;
  }

  .main-stage.is-assistant-mode .assistant-head .section-kicker {
    display: none;
  }

  .main-stage.is-assistant-mode .assistant-head h2 {
    margin: 0;
    font-size: 19px;
  }

  .main-stage.is-assistant-mode .assistant-actions {
    width: 100%;
    gap: 5px;
  }

  .main-stage.is-assistant-mode .assistant-actions .status-dot,
  .main-stage.is-assistant-mode .assistant-actions .status-pill,
  .main-stage.is-assistant-mode .chat-new-button {
    min-height: 27px;
    padding: 0 7px;
    font-size: 10px;
  }

  .main-stage.is-assistant-mode .chat-log {
    min-height: 0;
    padding: 8px;
  }

  .main-stage.is-assistant-mode .chat-form {
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 7px;
    margin-top: 7px;
  }

  .main-stage.is-assistant-mode .chat-form textarea,
  .main-stage.is-assistant-mode .chat-form button {
    height: 60px;
    min-height: 60px;
    max-height: 60px;
  }

  .brief-item {
    border-right: 0;
    border-bottom: 1px solid rgba(175, 132, 62, 0.26);
    padding: 8px 0;
  }

  .brief-item:last-child {
    border-bottom: 0;
  }

  .update-confirm-dialog {
    width: calc(100% - 20px);
  }

  .update-confirm-card {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 11px;
    padding: 17px;
  }

  .update-confirm-mark {
    width: 34px;
    height: 34px;
    font-size: 19px;
  }

  .update-confirm-copy h2 {
    margin-top: 3px;
    font-size: 19px;
  }
}

@media (max-width: 360px) {
  .nav-item::after,
  .nav-subitem::after {
    font-size: 11px;
  }
}
