:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --ink: #1f2933;
  --muted: #657080;
  --line: #d8dde6;
  --accent: #126b5f;
  --accent-2: #334f9f;
  --danger: #9f3a38;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}
a { color: inherit; }
.app-body {
  height: 100vh;
  overflow: hidden;
}
.shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0;
}
.daily-browser {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
}
.topbar, .reader-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.eyebrow, .meta, .status, .card p {
  color: var(--muted);
  font-size: 13px;
}
h1, h2, p { margin: 0; }
h1 { font-size: 34px; line-height: 1.15; }
h2 { font-size: 19px; }
.browser-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 64px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.browser-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}
.browser-title h1 {
  font-size: 20px;
  white-space: nowrap;
}
.browser-grid {
  display: grid;
  grid-template-columns: 220px 312px minmax(0, 1fr);
  min-height: 0;
}
.pane {
  min-height: 0;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}
.pane-title {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.source-list,
.report-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 10px;
  list-style: none;
  max-height: calc(100vh - 113px);
  overflow: auto;
}
.report-item {
  display: grid;
  gap: 6px;
}
.mobile-report-actions {
  display: none;
  gap: 8px;
  padding: 0 2px 4px;
}
.mobile-report-actions a {
  flex: 1;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  font-size: 14px;
}
.source-button,
.report-button {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.source-button {
  display: grid;
  gap: 4px;
  padding: 12px;
}
.report-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  padding: 10px 12px;
}
.source-button:hover,
.source-button.is-active,
.report-button:hover,
.report-button.is-active {
  border-color: var(--line);
  background: var(--surface-2);
}
.source-button.is-active,
.report-button.is-active {
  border-color: var(--accent);
}
.source-name,
.report-date {
  font-weight: 650;
}
.source-latest,
.source-count,
.report-kind,
.report-title {
  color: var(--muted);
  font-size: 12px;
}
.source-count {
  justify-self: start;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface-2);
}
.report-title {
  grid-column: 1 / -1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  background: #fff;
}
.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.preview-heading {
  min-width: 0;
}
.preview-heading h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.preview-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 22px;
}
.card, .archive-table, .empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.card {
  display: grid;
  gap: 14px;
  padding: 20px;
  text-decoration: none;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
}
.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.archive-link {
  margin-top: 18px;
}
.archive-table {
  width: 100%;
  margin-top: 22px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}
.archive-table th,
.archive-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.archive-table tr:last-child td { border-bottom: 0; }
.reader-body { height: 100vh; overflow: hidden; }
.reader-bar {
  height: 56px;
  padding: 0 16px;
  background: var(--surface);
}
.reader-frame {
  width: 100%;
  height: calc(100vh - 56px);
  border: 0;
  background: #fff;
}
.empty-state { margin: 24px; padding: 20px; color: var(--muted); }
@media (max-width: 720px) {
  .topbar, .reader-bar { align-items: stretch; flex-direction: column; height: auto; padding: 14px; }
  .reader-frame { height: calc(100vh - 126px); }
  h1 { font-size: 28px; }
  .app-body {
    height: auto;
    overflow: auto;
  }
  .daily-browser {
    height: auto;
  }
  .browser-topbar,
  .preview-header {
    align-items: stretch;
    flex-direction: column;
    height: auto;
    padding: 14px;
  }
  .browser-title {
    display: grid;
    gap: 4px;
  }
  .browser-grid {
    grid-template-columns: 1fr;
  }
  .pane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .preview-pane {
    display: none;
  }
  .source-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }
  .report-list {
    max-height: none;
  }
  .mobile-report-actions {
    display: flex;
  }
  .preview-actions {
    justify-content: flex-start;
  }
}
