:root {
  font: 16px/1.6 Inter, "PingFang TC", "Noto Sans TC", system-ui, sans-serif;
  color: #172940;
  background: #f1f5f8;
  color-scheme: light;
  --muted: #485e72;
  --line: #cfdce6;
  --accent: #145c8c;
  --paper: #fff;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #2372a8; outline-offset: 4px; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 760px;
  padding: 22px 24px;
  margin: auto;
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 750; color: inherit; text-decoration: none; letter-spacing: -.02em; }
.local { color: var(--muted); background: #e8eff5; border-radius: 5px; padding: 2px 8px; font-size: .85rem; }
main { width: min(calc(100% - 32px), 680px); margin: 48px auto 64px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.8rem, 5vw, 2.55rem); letter-spacing: -.035em; line-height: 1.2; }
h2 { font-size: 1.125rem; }
h3 { font-size: 1rem; }
.intro { color: var(--muted); margin: 12px 0 24px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 13px; padding: clamp(18px, 4vw, 32px); }
.file-picker {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
  border: 1px dashed #8daac0;
  border-radius: 8px;
  background: #f3f8fc;
  padding: 30px 12px;
  cursor: pointer;
  overflow-wrap: anywhere;
  text-align: center;
}
.file-picker:hover { background: #e8f2f9; }
.file-picker:focus-within { outline: 3px solid #2372a8; outline-offset: 3px; }
.file-picker input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-label { color: #114f7b; font-weight: 700; }
.muted, .privacy p { color: var(--muted); font-size: .9rem; }
.privacy { margin: 22px 0; }
.privacy p, .report-section p { margin-top: 6px; }
.consent { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; cursor: pointer; }
.consent input { width: 17px; height: 17px; accent-color: var(--accent); }
button {
  min-height: 44px;
  padding: 8px 18px;
  background: var(--accent);
  border: 1px solid transparent;
  border-radius: 7px;
  color: white;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
button:disabled { background: #e0e8ef; color: #526678; cursor: default; }
.feedback { color: #9a302a; margin-top: 10px; }
.feedback:empty, #copy-status:empty { display: none; }
.report-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
#risk { font-size: 1.55rem; color: #475968; }
#risk[data-level="high"] { color: #a22932; }
#risk[data-level="medium"] { color: #845006; }
#risk[data-level="low"] { color: #235a3e; }
.metadata { display: grid; grid-template-columns: minmax(6em, auto) minmax(0, 1fr); gap: 5px 16px; margin: 14px 0 0; }
.metadata dt { color: var(--muted); }
.metadata dd { margin: 0; overflow-wrap: anywhere; }
.report-section { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; }
#evidence { padding-left: 1.3em; overflow-wrap: anywhere; }
.link-section { margin-top: 22px; }
.link-control { display: flex; gap: 8px; margin: 6px 0; }
.link-control input { min-width: 0; flex: 1; border-radius: 6px; border: 1px solid var(--line); background: white; padding: 8px; font: inherit; color: inherit; }
.secondary { color: var(--accent); background: var(--paper); border-color: var(--line); }
.back { display: inline-block; margin-top: 16px; }
@media (max-width: 500px) {
  main { margin-top: 32px; }
  .metadata { gap: 5px 9px; font-size: .95rem; }
}
