:root {
  color-scheme: light;
  --navy: #132236;
  --navy-deep: #101b2a;
  --ink: #202b39;
  --muted: #566372;
  --gold: #d6b57a;
  --brown: #755522;
  --line: #dedbd3;
  --paper: #f6f4ef;
  --card: #fffefa;
  --body: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif;
  --display: "Noto Serif TC", "PMingLiU", "Songti TC", Georgia, serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.65 var(--body); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .64; }
a { color: inherit; }
:focus-visible { outline: 3px solid #96712e; outline-offset: 3px; }
.frame { width: min(1200px, calc(100% - 80px)); margin-inline: auto; }
.masthead {
  color: #fffdf8;
  background: radial-gradient(ellipse at 90% 5%, #334052 0, transparent 48%),
    repeating-linear-gradient(128deg, transparent 0 28px, #ffffff04 28px 29px),
    linear-gradient(122deg, var(--navy-deep), var(--navy));
  border-bottom: 2px solid #ae8b54;
}
.bar { display: flex; min-height: 76px; justify-content: space-between; align-items: center; gap: 14px; border-bottom: 1px solid #ffffff24; }
.wordmark { display: flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: .09em; }
.seal { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #d6b57a99; color: var(--gold); font: 700 17px var(--display); }
.local { display: flex; align-items: center; gap: 8px; color: #dfd8c9; font-size: 12px; letter-spacing: .06em; }
.local span { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.intro { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding: 39px 0 28px; animation: reveal .42s ease-out both; }
.eyebrow { margin: 0 0 5px; color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: .18em; }
.eyebrow.ink { color: var(--brown); }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2 { font-family: var(--display); letter-spacing: .035em; line-height: 1.18; }
h1 { font-size: clamp(42px, 6.3vw, 68px); }
h2 { font-size: clamp(24px, 3.2vw, 34px); }
.intro-copy { margin-top: 12px; color: #e1dcd2; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 40px; border-radius: 5px; padding: 7px 14px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.gold { background: var(--gold); border: 1px solid var(--gold); color: #172332; }
.gold:hover { background: #e4c896; }
.outline { border: 1px solid #cfcac0; background: #fffefa; color: var(--navy); }
.outline:hover { border-color: #ae8b54; background: #f9f4e9; }
.metrics { display: flex; padding: 0 0 27px; }
.metrics div { min-width: 105px; padding-inline: 20px; border-inline-start: 1px solid #ffffff24; }
.metrics div:first-child { padding-inline-start: 0; border: 0; }
.metrics dt { color: #d6d4cd; font-size: 12px; letter-spacing: .06em; }
.metrics dd { color: #f5dbac; font: 29px/1.35 Georgia, var(--display); font-variant-numeric: tabular-nums; }
.workspace { display: grid; grid-template-columns: minmax(190px, 242px) minmax(0, 1fr); gap: 35px; padding-block: 31px 36px; }
.rail { min-width: 0; padding-right: 19px; border-right: 1px solid var(--line); }
.section-label { display: flex; align-items: baseline; gap: 9px; font-size: 14px; font-weight: 700; letter-spacing: .07em; }
.section-label span { color: var(--brown); font-family: Georgia, serif; }
.topics { display: grid; gap: 5px; margin-top: 12px; }
.topic { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 6px; padding: 7px 9px; min-height: 41px; border: 1px solid transparent; border-radius: 4px; background: none; text-align: start; font-size: 13px; }
.topic span:last-child { font-size: 11px; font-variant-numeric: tabular-nums; }
.topic:hover { background: #ece7da; }
.topic[aria-pressed="true"] { background: var(--navy); color: white; }
.deck-label { margin-top: 27px; padding-top: 17px; border-top: 1px solid var(--line); }
.rail-copy { margin-top: 8px; color: var(--muted); font-size: 12px; }
.decks { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.decks li { display: flex; gap: 6px; justify-content: space-between; align-items: center; font-size: 12px; }
.decks a { flex: none; color: var(--brown); text-underline-offset: 3px; }
.decks li > span:last-child:not(:first-child) { color: var(--muted); flex: none; font-size: 11px; }
.note { font-size: 11px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 10px; margin-bottom: 19px; }
.refresh { min-height: 36px; padding-inline: 11px; }
.filters { display: grid; grid-template-columns: minmax(155px, 1fr) minmax(109px, auto) minmax(109px, auto); gap: 8px; }
.filters label { min-width: 0; }
input, select, textarea { width: 100%; min-width: 0; border: 1px solid #cfcac0; border-radius: 5px; background: var(--card); padding: 8px 10px; }
.filters input, .filters select { height: 43px; }
.search { position: relative; }
.search svg { position: absolute; top: 12px; left: 11px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 37px; }
.filters select { max-width: 170px; font-size: 13px; }
.results-head { display: flex; justify-content: space-between; gap: 8px; margin: 14px 0 9px; color: var(--muted); font-size: 13px; }
.text-button { border: 0; padding: 0; background: transparent; color: var(--brown); text-decoration: underline; text-underline-offset: 3px; }
.results { display: grid; gap: 11px; }
.entry { background: var(--card); border: 1px solid var(--line); border-left: 3px solid #ba9862; border-radius: 5px; padding: 17px 19px; overflow-wrap: anywhere; }
.entry-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 7px; font-size: 12px; }
.topic-chip { color: var(--brown); font-weight: 700; }
.entry-status { background: #e5eee6; color: #25513c; border-radius: 4px; padding: 2px 7px; }
.entry-status.pending { background: #f4ead5; color: #6f4b14; }
.entry h3 { color: var(--navy); font-size: 19px; line-height: 1.4; }
.source-date, .entry-detail dt { color: var(--muted); font-size: 12px; }
.source-date { margin-top: 5px; }
.summary { margin-block: 10px; white-space: pre-wrap; }
.tags { list-style: none; display: flex; gap: 5px; flex-wrap: wrap; margin: 8px 0; padding: 0; }
.tag { display: inline-block; border: 1px solid #e6e1d5; border-radius: 4px; padding: 2px 7px; color: var(--navy); background: #f6f3e9; font-size: 12px; }
details { margin-top: 11px; }
summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--navy); }
.entry-detail dl { display: grid; gap: 4px; margin: 8px 0 12px; }
.entry-detail dd { white-space: pre-wrap; }
.entry-detail ul { margin: 0; padding-left: 20px; }
.entry-actions { display: flex; justify-content: space-between; align-items: center; gap: 9px; margin-top: 12px; }
.source-link { color: var(--brown); font-size: 13px; font-weight: 700; text-underline-offset: 3px; }
.edit { min-height: 32px; padding-block: 3px; }
.empty { display: grid; justify-items: center; text-align: center; gap: 9px; min-height: 225px; padding: 30px 18px; background: var(--card); border: 1px dashed #c7bca7; border-radius: 5px; align-content: center; }
.empty-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #c9b188; color: var(--brown); font: 700 20px var(--display); transform: rotate(-4deg); }
.empty h3 { font-size: 18px; }
.empty p { color: var(--muted); font-size: 13px; }
.notice { padding: 8px 12px; border-left: 3px solid #b5935b; background: #f1ead9; margin-bottom: 10px; }
.notice.problem, .error { color: #822b25; }
.footer { border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 8px; padding: 15px 0 20px; color: var(--muted); font-size: 12px; }
dialog { width: min(680px, calc(100% - 28px)); max-height: calc(100% - 28px); padding: 0; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 22px 75px #0b17274d; background: var(--card); color: var(--ink); }
dialog::backdrop { background: #101b2ac4; }
.editor-header, .editor-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 21px; background: #f6f2e8; }
.editor-header { border-bottom: 1px solid var(--line); }
.editor-footer { border-top: 1px solid var(--line); }
.fields { padding: 18px 21px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fields label { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 3px; font-weight: 700; font-size: 13px; }
.fields input, .fields select, .fields textarea { grid-column: 1 / -1; font-weight: 400; }
.fields textarea { resize: vertical; }
.wide { grid-column: 1 / -1; }
.hint { font-size: 11px; font-weight: 400; color: var(--muted); }
.error { margin: 0 21px 14px; font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@keyframes reveal { from { opacity: .35; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 820px) {
  .frame { width: calc(100% - 42px); }
  .workspace { grid-template-columns: 178px minmax(0, 1fr); gap: 21px; }
  .rail { padding-right: 12px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .search { grid-column: 1 / -1; }
  .filters select { max-width: none; }
}
@media (max-width: 570px) {
  .frame { width: calc(100% - 30px); }
  .bar { min-height: 60px; }
  .intro { padding-block: 26px 22px; flex-wrap: wrap; }
  .intro-copy { font-size: 13px; }
  .metrics { padding-bottom: 19px; }
  .metrics div { min-width: 0; padding-inline: 15px; }
  .workspace { display: flex; flex-direction: column; gap: 24px; padding-top: 21px; }
  .rail { border: 0; border-bottom: 1px solid var(--line); padding: 0 0 16px; }
  .topics, .decks { grid-template-columns: 1fr 1fr; }
  .deck-label { margin-top: 14px; padding-top: 10px; }
  .entry { padding: 13px; }
  .fields, .editor-header, .editor-footer { padding-inline: 14px; }
  .fields label:not(.wide) { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { .intro { animation: none; } }

.view-tabs { display: flex; gap: 8px; }
.view-tabs a { padding: 12px 22px; border-radius: 6px 6px 0 0; color: #e1dcd2; font-size: 16px; font-weight: 700; text-decoration: none; }
.view-tabs a:hover { background: #ffffff12; }
.view-tabs a[aria-current="page"] { color: var(--navy); background: var(--paper); }
.radar-workspace { padding-block: 32px; }
.radar-caption { margin-top: 12px; color: var(--muted); font-size: 14px; }
.radar-filters { display: grid; grid-template-columns: minmax(200px, 1.4fr) minmax(200px, 1fr) minmax(145px, .6fr) minmax(145px, .6fr); gap: 12px; padding: 19px; background: #eeebe3; border: 1px solid var(--line); border-radius: 6px; }
.radar-filters label { display: grid; gap: 6px; min-width: 0; font-size: 14px; font-weight: 700; }
.radar-filters input, .radar-filters select { height: 45px; font-size: 15px; font-weight: 400; }
.report-card { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 6px; border-left: 3px solid #527466; overflow: hidden; }
.report-card > summary { padding: 20px 24px; list-style: none; cursor: pointer; }
.report-card > summary::-webkit-details-marker { display: none; }
.report-card > summary:hover { background: #f8f6ef; }
.report-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 14px; font-weight: 400; }
.report-time { font-variant-numeric: tabular-nums; color: var(--muted); }
.report-topic { color: #36574a; font-weight: 700; }
.report-title { display: block; margin-top: 9px; color: var(--navy); font-size: 20px; line-height: 1.5; overflow-wrap: anywhere; }
.report-preview { display: block; margin-top: 9px; max-width: 1000px; color: var(--muted); font-size: 16px; font-weight: 400; line-height: 1.7; overflow-wrap: anywhere; }
.report-read { display: block; margin-top: 11px; color: var(--brown); font-size: 14px; }
.report-card[open] .report-read, .report-card[open] .report-preview { display: none; }
.report-card[open] > summary { border-bottom: 1px solid var(--line); background: #f4f2eb; }
.report-body { padding: 24px; font-size: 16px; line-height: 1.9; overflow-wrap: anywhere; }
.report-body > * + * { margin-top: 15px; }
.report-body h3 { font-size: 22px; line-height: 1.6; }
.report-body h4 { font-size: 19px; line-height: 1.6; color: #36574a; }
.report-body ul, .report-body ol { padding-left: 24px; }
.report-body li + li { margin-top: 8px; }
.report-body a { color: #325f75; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.report-body blockquote { margin-inline: 0; padding-left: 16px; border-left: 3px solid #b6c6bd; color: var(--muted); }
.report-body pre { white-space: pre-wrap; background: #eeebe3; padding: 12px; border-radius: 4px; }
.report-body hr { border: 0; border-top: 1px solid var(--line); }
.report-table { max-width: 100%; overflow-x: auto; }
.report-table table { border-collapse: collapse; width: 100%; font-size: 15px; }
.report-table th, .report-table td { text-align: left; padding: 9px; border: 1px solid var(--line); }
.report-table th { background: #eeebe3; }
.radar-pagination { display: flex; justify-content: center; padding-block: 22px 8px; }
@media (max-width: 1000px) { .radar-filters { grid-template-columns: 1fr 1fr; } }
@media (max-width: 570px) {
  .radar-workspace { padding-top: 24px; }
  .radar-workspace .section-head { align-items: start; flex-wrap: wrap; }
  .radar-filters { padding: 13px; gap: 12px 8px; }
  .radar-search, .radar-filters label:nth-child(2) { grid-column: 1 / -1; }
  .report-card > summary, .report-body { padding: 16px; }
  .report-title { font-size: 18px; }
  .view-tabs a { padding-inline: 16px; }
}
