:root {
  color-scheme: light;
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f1ea;
  color: #161616;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.86), rgba(244, 241, 234, 0.92)),
    repeating-linear-gradient(115deg, rgba(80, 68, 52, 0.04) 0 1px, transparent 1px 88px);
}

button,
input,
select {
  font: inherit;
}

.shell {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 48px;
}

.masthead {
  display: grid;
  grid-template-columns: minmax(220px, 420px) 1fr;
  align-items: end;
  gap: 28px;
  padding: 16px 0 24px;
}

.masthead.compact {
  grid-template-columns: 1fr;
  align-items: start;
  gap: 16px;
}

.brand {
  color: inherit;
  text-decoration: none;
  letter-spacing: 0;
}

.brand span {
  display: block;
  color: #a3342b;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(42px, 5vw, 82px);
  line-height: 0.95;
}

.compact .brand strong {
  font-size: clamp(34px, 4vw, 58px);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

.nav a {
  border: 1px solid #cfc7ba;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.76);
  color: #161616;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.nav a[aria-current="page"] {
  border-color: #161616;
  background: #161616;
  color: #fff;
}

.private-badge {
  width: fit-content;
  border: 1px solid #161616;
  padding: 10px 15px;
  background: #161616;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.tagline {
  margin: 0;
  max-width: 640px;
  color: #55504a;
  font-size: 18px;
  line-height: 1.5;
}

.page-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 22px 0 16px;
}

.page-title p {
  order: 2;
  margin: 0;
  color: #756e64;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.page-title h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 84px);
  line-height: 0.95;
}

.date-nav {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  border: 1px solid #d8d2c6;
  padding: 10px;
  background: rgba(255, 255, 255, 0.78);
}

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

.current-date {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid #d8d2c6;
  padding: 0 14px;
  background: #f4f1ea;
  color: #161616;
  font-size: 18px;
  font-weight: 900;
}

.date-picker-row {
  width: min(260px, 100%);
}

.date-nav select {
  width: min(220px, 100%);
}

.date-nav .select-menu {
  width: min(260px, 100%);
}

.date-nav button {
  min-height: 44px;
  border: 1px solid #161616;
  padding: 0 14px;
  background: #fff;
  color: #161616;
  font-weight: 800;
  cursor: pointer;
}

.date-nav button:disabled {
  border-color: #d8d2c6;
  color: #9a9288;
  cursor: default;
}

.topic-tabs {
  display: grid;
  gap: 1px;
  margin-bottom: 16px;
  border: 1px solid #d8d2c6;
  background: #d8d2c6;
}

.topic-tabs {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.topic-tabs button {
  min-height: 52px;
  border: 0;
  background: rgba(255, 255, 255, 0.86);
  color: #161616;
  font-weight: 900;
  cursor: pointer;
}

.topic-tabs button.is-active {
  background: #161616;
  color: #fff;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid #d8d2c6;
  background: #d8d2c6;
}

.hub-grid a,
.hub-grid article {
  min-height: 210px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.86);
  color: #161616;
  text-decoration: none;
}

.hub-grid a {
  cursor: pointer;
}

.hub-grid span {
  color: #a3342b;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hub-grid strong {
  display: block;
  margin-top: 18px;
  font-size: 28px;
  line-height: 1.05;
}

.hub-grid p {
  margin: 14px 0 0;
  color: #5f584f;
  line-height: 1.65;
}

.searchbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 170px 210px 210px;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d8d2c6;
  background: rgba(250, 248, 243, 0.94);
  backdrop-filter: blur(10px);
}

label {
  display: grid;
  gap: 6px;
}

label span {
  color: #756e64;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cfc7ba;
  border-radius: 0;
  padding: 0 13px;
  background: #fff;
  color: #161616;
}

.native-select-hidden {
  display: none;
}

.select-menu {
  position: relative;
  width: 100%;
}

.select-menu-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cfc7ba;
  padding: 0 44px 0 13px;
  background: #fff;
  color: #161616;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.select-menu-button::after {
  content: "⌄";
  position: absolute;
  right: 14px;
  top: 10px;
  color: #5f584f;
  font-size: 18px;
  font-weight: 900;
}

.select-menu-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  display: none;
  max-height: min(360px, 62vh);
  overflow: auto;
  border: 1px solid #cfc7ba;
  background: #fff;
  box-shadow: 0 14px 32px rgba(45, 38, 30, 0.16);
}

.select-menu.is-open .select-menu-list {
  display: grid;
}

.select-menu-option {
  min-height: 44px;
  border: 0;
  border-bottom: 1px solid #e5ded3;
  padding: 0 13px;
  background: #fff;
  color: #161616;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.select-menu-option[aria-selected="true"] {
  background: #161616;
  color: #fff;
}

.topic-updatebar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  border: 1px solid #d8d2c6;
  padding: 10px 13px;
  background: rgba(255, 255, 255, 0.78);
}

.topic-updatebar span {
  color: #756e64;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.topic-updatebar strong {
  font-size: 14px;
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid #a3342b;
  outline-offset: 2px;
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(420px, 2fr) minmax(240px, 1fr);
  gap: 1px;
  margin-top: 16px;
  border: 1px solid #d8d2c6;
  background: #d8d2c6;
}

.today-layout {
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
}

.panel {
  min-height: 640px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.82);
}

.archive-panel {
  min-height: auto;
  margin-top: 16px;
  border: 1px solid #d8d2c6;
}

.feed {
  background: rgba(255, 255, 255, 0.92);
}

.panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-head p {
  order: 2;
  margin: 0;
  color: #817970;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  text-transform: uppercase;
}

.panel-head h1 {
  margin: 0;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.05;
}

.stack {
  display: grid;
  gap: 12px;
}

.news-stack {
  gap: 14px;
}

.more-collected {
  margin-top: 18px;
  border-top: 1px solid #d8d2c6;
  padding-top: 14px;
}

.more-collected-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.more-collected-head h2 {
  margin: 0;
  font-size: 18px;
}

.more-collected-head a,
.feed-meta-link {
  color: #a3342b;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.compact-link-list {
  display: grid;
  border: 1px solid #ded8cd;
  background: #fff;
}

.compact-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid #eee8df;
  padding: 10px 12px;
}

.compact-link-row:last-child {
  border-bottom: 0;
}

.compact-link-title {
  overflow: hidden;
  color: #161616;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.compact-link-title:hover {
  color: #a3342b;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.compact-link-meta {
  color: #756e64;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.compact-empty {
  padding: 12px;
}

.news-card {
  border: 1px solid #ded8cd;
  padding: 16px;
  background: #fff;
}

.compact-card {
  display: flex;
  min-height: 205px;
  flex-direction: column;
}

.topic-card {
  border: 1px solid #ded8cd;
  background: #fff;
}

.feed .news-card {
  padding: 20px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.meta-row span,
.meta-row a,
.topic {
  border: 1px solid #ddd5ca;
  padding: 4px 8px;
  color: #5e574f;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.source {
  color: #a3342b !important;
}

.meta-row .source-link {
  color: #a3342b;
}

.meta-row .origin-link {
  border-color: #d7c8b7;
  background: #faf7f0;
  color: #6a5c49;
}

.news-card h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.feed .news-card h2 {
  font-size: 22px;
}

.topic-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 58px;
  border: 0;
  padding: 14px 16px;
  background: transparent;
  color: #161616;
  cursor: pointer;
  text-align: left;
}

.topic-row span {
  font-size: 20px;
  font-weight: 900;
  line-height: 1.35;
}

.topic-row strong {
  color: #a3342b;
  font-size: 14px;
  line-height: 1.5;
  text-align: right;
}

.topic-detail {
  display: none;
  border-top: 1px solid #ebe6dd;
  padding: 14px 16px 16px;
}

.topic-card.is-open .topic-detail {
  display: block;
}

.load-more-row {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.load-more-row button {
  min-height: 44px;
  border: 1px solid #161616;
  padding: 0 22px;
  background: #fff;
  color: #161616;
  font-weight: 900;
  cursor: pointer;
}

.load-more-row button:hover {
  background: #161616;
  color: #fff;
}

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

.summary,
.signal,
.detail,
.topic-note {
  margin: 10px 0 0;
  color: #4f4a44;
  line-height: 1.7;
}

.key-figures {
  margin: 10px 0 0;
  border-left: 3px solid #a3342b;
  padding-left: 10px;
  color: #3d3832;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.5;
}

.compact-card .summary {
  display: -webkit-box;
  max-height: 4.9em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.signal {
  width: fit-content;
  border: 1px solid #d8d2c6;
  padding: 6px 9px;
  background: #f7f3ea;
  color: #232323;
  font-size: 14px;
  font-weight: 700;
}

.detail {
  display: none;
  border-top: 1px solid #ebe6dd;
  padding-top: 10px;
  color: #5f584f;
}

.news-card.is-open .detail {
  display: block;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.card-actions button,
.card-actions a,
.plain-button {
  border: 1px solid #161616;
  border-radius: 999px;
  padding: 7px 12px;
  background: #fff;
  color: #161616;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.plain-button {
  align-self: end;
  min-height: 44px;
  border-radius: 0;
  padding: 0 14px;
}

.card-actions .topic {
  margin-left: auto;
  border-color: transparent;
  background: #f4f1ea;
}

.upcoming-card {
  border-left: 4px solid #a3342b;
  border-top: 1px solid #ded8cd;
  border-right: 1px solid #ded8cd;
  border-bottom: 1px solid #ded8cd;
  padding: 14px 14px 14px 16px;
  background: #fff;
}

.upcoming-date {
  width: fit-content;
  border: 1px solid #ddd5ca;
  padding: 3px 8px;
  color: #a3342b;
  font-size: 12px;
  font-weight: 900;
}

.upcoming-card h2 {
  margin: 10px 0 0;
  font-size: 18px;
  line-height: 1.35;
}

.upcoming-card p {
  display: -webkit-box;
  max-height: 4.9em;
  margin: 8px 0 0;
  overflow: hidden;
  color: #5f584f;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.upcoming-source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  color: #6f675d;
  font-size: 13px;
  font-weight: 800;
}

.upcoming-source a {
  color: #a3342b;
  text-decoration: none;
}

.upcoming-source .upcoming-origin {
  color: #6a5c49;
}

.topic-actions {
  flex-wrap: wrap;
}

.compact-tabs {
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
}

.compact-tabs button {
  min-height: 44px;
}

.topic-datebar {
  margin-bottom: 16px;
}

.topic-note:empty {
  display: none;
}

.topic-explain {
  margin-top: 8px;
  color: #403b35;
}

.topic-explain strong {
  font-weight: 900;
}

.recent-panel {
  margin-top: 18px;
}

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

.recent-grid .news-card {
  min-height: 260px;
}

.source-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 16px;
  border: 1px solid #d8d2c6;
  background: #d8d2c6;
}

.audit-toolbar {
  width: min(320px, 100%);
  margin-bottom: 16px;
}

.audit-stats {
  margin-top: 0;
  margin-bottom: 16px;
}

.audit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  border: 1px solid #d8d2c6;
  background: #d8d2c6;
}

.audit-grid .panel {
  min-height: auto;
}

.audit-list {
  display: grid;
  gap: 8px;
}

.audit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #e4ded5;
  padding: 10px 12px;
  background: #fff;
}

.audit-row span {
  line-height: 1.45;
}

.audit-row strong {
  color: #a3342b;
  font-size: 18px;
}

.audit-samples {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.audit-sample {
  min-height: 0;
}

.audit-sample h2 {
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.4;
}

.sample-reason {
  margin: 8px 0 0;
  color: #a3342b;
  font-size: 14px;
  font-weight: 800;
}

.audit-sample a {
  display: inline-block;
  margin-top: 10px;
  color: #a3342b;
  font-weight: 800;
}

.source-strip div {
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.82);
}

.source-strip span {
  display: block;
  font-size: 28px;
  font-weight: 900;
}

.source-strip small {
  color: #6f675d;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.empty {
  border: 1px dashed #cfc7ba;
  padding: 18px;
  color: #70685e;
  line-height: 1.6;
  background: #fff;
}

.review-note {
  border: 1px solid #d8d2c6;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.78);
}

.review-note p {
  margin: 0;
  color: #5f584f;
  line-height: 1.65;
}

.review-toolbar {
  grid-template-columns: 180px minmax(220px, 1fr) 190px 180px 150px;
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.review-actions button,
.review-actions a {
  border: 1px solid #161616;
  border-radius: 999px;
  padding: 7px 12px;
  background: #fff;
  color: #161616;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.review-actions button.is-active {
  border-color: #a3342b;
  background: #a3342b;
  color: #fff;
}

.homepage-actions {
  border-top: 1px solid #ebe6dd;
  padding-top: 12px;
}

.homepage-actions button:first-child {
  border-color: #a3342b;
  color: #a3342b;
}

.homepage-actions button:nth-child(2) {
  border-color: #6b6258;
}

.homepage-status {
  border-color: #a3342b !important;
  color: #a3342b !important;
}

.review-reason {
  margin: 12px 0 0;
  color: #6b6258;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.55;
}

.review-status {
  background: #f4f1ea;
}

@media (max-width: 1080px) {
  .searchbar {
    grid-template-columns: 1fr 1fr;
  }

  .review-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard,
  .today-layout,
  .audit-grid,
  .recent-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    min-height: auto;
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 24px, 1440px);
    padding-top: 20px;
  }

  .searchbar {
    position: static;
  }

  .masthead,
  .hub-grid,
  .topic-tabs,
  .searchbar,
  .review-toolbar,
  .source-strip,
  .audit-samples {
    grid-template-columns: 1fr;
  }

  .date-nav button {
    padding: 0 8px;
  }

  .date-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }

  .current-date {
    grid-column: 1 / -1;
    justify-content: center;
    order: -1;
    font-size: 16px;
    padding: 0 10px;
  }

  .date-picker-row,
  .date-nav .select-menu {
    width: 100%;
  }

  .more-collected-head,
  .compact-link-row {
    grid-template-columns: 1fr;
  }

  .more-collected-head {
    display: grid;
  }

  .compact-link-title {
    white-space: normal;
  }

  .compact-link-meta {
    white-space: normal;
  }

  .nav {
    justify-content: flex-start;
  }

  .page-title {
    display: block;
  }

  .page-title p {
    margin-top: 8px;
  }

  .brand strong {
    font-size: 46px;
  }

  .panel {
    padding: 18px;
  }

  .panel-head {
    display: block;
  }

  .panel-head p {
    margin-top: 6px;
    text-align: left;
  }

  .topic-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .topic-row strong {
    text-align: left;
  }
}
