:root {
  color-scheme: light;
  --bg: light-dark(#fff, #11141b);
  --surface: light-dark(#f7f9fc, #1a1e28);
  --text: light-dark(#192333, #edf1f8);
  --muted: light-dark(#677184, #a5b0c2);
  --line: light-dark(#e7ebf1, #303746);
  --accent: light-dark(#245ee9, #95b7ff);
  --accent-bg: light-dark(#eef4ff, #23324d);
  --green: light-dark(#27705a, #8bd9ba);
  --warning: light-dark(#8a571c, #e6bf87);
  --danger: light-dark(#a03c3c, #f2a1a1);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang TC', 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
  font-synthesis: none;
  font-size: 15px;
  line-height: 1.65;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; }
body:has(dialog[open]) { overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button, a, select, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button, select { min-height: 44px; }
button { border: 0; background: none; }
a { color: var(--accent); text-underline-offset: 4px; }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.45; letter-spacing: -.025em; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); flex: 0 0 auto; }
select { max-width: 100%; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); padding: 9px 28px 9px 12px; }
::selection { background: var(--accent-bg); color: var(--accent); }
.shell { max-width: 1280px; padding: 0 56px; margin: 0 auto; }
.skip { position: fixed; top: -80px; left: 16px; z-index: 50; padding: 12px 20px; background: var(--bg); }
.skip:focus { top: 12px; }
.topbar { min-height: 96px; display: flex; align-items: center; gap: 32px; border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 11px; align-items: center; text-decoration: none; color: var(--text); font-size: 20px; font-weight: 750; white-space: nowrap; }
.brand img { width: 36px; height: 36px; }
.brand small { display: block; font-size: 9px; letter-spacing: .13em; font-weight: 600; color: var(--muted); margin-top: 2px; }
.topbar nav { display: flex; align-self: stretch; align-items: stretch; gap: 32px; margin-left: auto; }
.topbar nav a { display: flex; align-items: center; gap: 6px; position: relative; text-decoration: none; font-size: 14px; font-weight: 550; color: var(--muted); white-space: nowrap; }
.topbar nav a[aria-current] { color: var(--accent); }
.topbar nav a[aria-current]::after { content: ''; position: absolute; bottom: -1px; height: 2px; background: var(--accent); left: 0; right: 0; }
#saved-count { background: var(--surface); padding: 0 6px; border-radius: 5px; font-size: 11px; }
.profile-open { margin-left: 12px; border: 1px solid var(--line); padding: 8px 14px; border-radius: 8px; font-size: 13px; white-space: nowrap; }
.profile-open:hover, .quiet-button:hover { background: var(--surface); }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding: 48px 0 32px; }
.eyebrow { color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.hero h1 { font-size: clamp(29px, 3.1vw, 42px); letter-spacing: -.04em; margin: 12px 0 14px; font-weight: 750; }
.hero p { color: var(--muted); font-size: 15px; max-width: 700px; }
.hero-note { color: var(--muted); white-space: nowrap; font-size: 11px; padding-bottom: 4px; }
.signal { display: inline-block; width: 6px; height: 6px; background: var(--green); border-radius: 50%; margin-right: 7px; vertical-align: middle; }
.search { border: 1px solid var(--line); border-radius: 10px; min-height: 60px; display: flex; align-items: center; gap: 14px; padding: 0 20px; margin: 2px 0 40px; background: var(--surface); }
.search:focus-within { border-color: var(--accent); outline: 2px solid var(--accent-bg); background: var(--bg); }
.search svg { height: 21px; width: 21px; color: var(--muted); flex: 0 0 auto; }
.search input { width: 100%; min-width: 0; height: 56px; border: 0; outline: 0; background: transparent; font-size: 15px; }
.search input::placeholder { color: var(--muted); }
.search-hint { font-size: 11px; color: var(--muted); white-space: nowrap; }
.workspace { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; }
.saved-workspace { grid-template-columns: 1fr; }
.filter-panel { position: sticky; top: 24px; }
.filter-panel > summary { display: none; }
.filter-heading { display: flex; align-items: center; justify-content: space-between; margin: -3px 0 22px; }
.filter-heading h2 { font-size: 14px; letter-spacing: 0; }
.reset-button { color: var(--muted); font-size: 12px; padding: 0 2px; }
.reset-button:hover { color: var(--accent); }
.filter-label { color: var(--muted); font-size: 12px; margin-bottom: 9px; }
.filter-label span { float: right; font-size: 10px; }
.roles { display: grid; gap: 5px; }
.role-button { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 7px; text-align: left; font-size: 13px; }
.role-button:hover { background: var(--surface); }
.role-button[aria-pressed=true] { color: var(--accent); background: var(--accent-bg); font-weight: 650; }
.role-indicator { width: 13px; height: 13px; border: 1px solid var(--line); border-radius: 4px; }
[aria-pressed=true] .role-indicator { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--accent-bg); }
.filter-panel .field { margin: 28px 0 20px; font-size: 12px; gap: 9px; }
.filter-panel select { font-size: 13px; }
.toggle-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; min-height: 44px; }
.toggle-label input { margin: 0; width: 16px; height: 16px; }
.profile-summary { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.profile-summary p { color: var(--muted); font-size: 12px; line-height: 1.8; }
.profile-summary button { font-size: 12px; padding: 10px 0; }
.privacy-note { font-size: 10px; color: var(--muted); margin-top: 18px; }
.result-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 48px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.result-bar h2 { font-size: 16px; font-weight: 650; }
.sort-label { display: flex; gap: 8px; align-items: center; font-size: 11px; color: var(--muted); }
.sort-label select { border: 0; font-size: 12px; min-height: 36px; padding: 5px 4px; color: var(--text); }
.op-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 170px; column-gap: 26px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.card-main { min-width: 0; }
.card-top { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; min-height: 27px; padding-right: 38px; }
.tag { color: var(--accent); background: var(--accent-bg); font-size: 10px; font-weight: 600; padding: 3px 7px; border-radius: 4px; line-height: 1.7; }
.card-kind { font-size: 10px; color: var(--muted); }
.save-button { position: absolute; right: 0; top: 21px; min-height: 44px; width: 44px; border-radius: 6px; display: grid; place-items: center; color: var(--muted); }
.save-button:hover, .save-button[aria-pressed=true] { background: var(--accent-bg); color: var(--accent); }
.save-button svg { height: 18px; width: 18px; }
.op-card h2 { font-size: 21px; margin-bottom: 8px; }
.title-action { display: block; text-align: left; font-weight: 650; letter-spacing: -.02em; line-height: 1.5; padding: 0; min-height: 44px; }
.title-action:hover { color: var(--accent); }
.summary { color: var(--muted); font-size: 13px; line-height: 1.8; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.benefit { font-size: 12px; color: var(--text); margin-top: 12px; line-height: 1.8; }
.card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; color: var(--muted); font-size: 10px; margin-top: 15px; }
.match-label { color: var(--muted); font-size: 11px; display: inline-flex; align-items: center; gap: 6px; }
.match-label::before { content: ''; width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.match-label.match { color: var(--green); }
.match-label.ineligible { color: var(--danger); }
.match-label.review { color: var(--warning); }
.card-side { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 50px 0 0 24px; border-left: 1px solid var(--line); }
.deadline-text { display: grid; gap: 6px; }
.deadline-text > span:first-child { font-size: 10px; color: var(--muted); }
.deadline-text strong { font-size: 15px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.deadline-text .round { font-size: 10px; color: var(--muted); }
.deadline-text.closed strong { color: var(--muted); }
.deadline-text.soon strong, .deadline-text.today strong { color: var(--warning); }
.text-action { color: var(--accent); font-size: 13px; font-weight: 600; padding: 5px 0; }
.text-action > span { margin-left: 8px; }
.card-action { margin-top: 14px; }
.saved-progress { width: 100%; font-size: 10px; color: var(--muted); margin-top: 16px; }
.mini-progress { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; margin: 10px 0; }
.mini-progress > span { display: block; height: 100%; background: var(--accent); transition: width .2s ease; }
.saved-note { margin-top: 24px; }
.timeline { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 16px; margin-bottom: 36px; }
.timeline button { display: flex; align-items: center; gap: 15px; text-align: left; padding: 20px; background: var(--surface); border-radius: 10px; }
.timeline time { color: var(--accent); font-size: 18px; white-space: nowrap; }
.timeline small { display: block; font-size: 10px; color: var(--muted); }
.timeline button > span:last-child { margin-left: auto; color: var(--accent); }
.footer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; color: var(--muted); font-size: 10px; margin-top: 70px; padding: 26px 0; border-top: 1px solid var(--line); }
.footer > span:first-child { font-weight: 600; color: var(--text); }
.footer button { font-size: 10px; color: var(--muted); padding: 6px 0; }
#theme-toggle { margin-left: auto; }
.muted, .fine { color: var(--muted); }
.fine { font-size: 11px; line-height: 1.8; }
.notice { background: var(--surface); border-radius: 8px; padding: 14px 18px; font-size: 12px; color: var(--muted); margin: 16px 0; }
.warning { color: var(--warning); }
.error { color: var(--danger); font-size: 12px; overflow-wrap: anywhere; }
.empty, .loading { padding: 70px 24px; text-align: center; }
.empty h1, .empty h2, .loading h1 { font-size: 24px; }
.empty p, .loading p { color: var(--muted); margin: 16px auto 24px; max-width: 460px; }
.primary-button, .quiet-button, .danger-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; border-radius: 8px; padding: 10px 16px; font-size: 13px; text-decoration: none; min-height: 44px; }
.primary-button { background: var(--accent); color: light-dark(#fff,#11141b); font-weight: 600; }
.primary-button:hover { filter: brightness(.94); }
.quiet-button { border: 1px solid var(--line); background: var(--bg); }
.danger-button { border: 1px solid var(--line); color: var(--danger); }
.source-tools { display: flex; align-items: center; gap: 16px; margin: 24px 0; }
.source-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.source-card { padding: 26px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.source-card h2 { font-size: 17px; margin-bottom: 12px; }
.source-card a { font-size: 12px; }
.source-card p { margin: 12px 0; }
dl { display: grid; grid-template-columns: 90px 1fr; font-size: 12px; gap: 7px; }
dt { color: var(--muted); }
dd { margin: 0; }
.section-title { font-size: 23px; margin-top: 44px; }
dialog { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 0; max-height: calc(100dvh - 64px); box-shadow: 0 24px 100px #172b4d26; }
dialog::backdrop { background: #172b4d66; }
.detail-dialog { width: min(1000px,calc(100% - 64px)); }
.profile-dialog { width: min(480px,calc(100% - 40px)); padding: 28px; }
.dialog-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 12px; }
.icon-button { font-size: 18px; min-width: 44px; border-radius: 8px; }
.icon-button:hover { background: var(--surface); }
.detail-header { padding: 24px 36px 28px; border-bottom: 1px solid var(--line); }
.detail-header h2 { font-size: 29px; margin-bottom: 12px; padding-right: 36px; }
.detail-header p { color: var(--muted); font-size: 14px; max-width: 700px; }
.detail-body { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); }
.detail-body > div { padding: 30px 36px; }
.detail-body section { margin-top: 28px; }
.detail-body h3 { font-size: 17px; margin-bottom: 16px; }
.detail-body section.detail-side { margin: 0; padding: 30px; background: var(--surface); }
.deadline-box { display: grid; gap: 5px; }
.deadline-box small { color: var(--muted); font-size: 12px; }
.deadline-box strong { font-size: 25px; letter-spacing: -.04em; }
.checks { list-style: none; padding: 0; margin: 18px 0; }
.checks li { display: flex; gap: 12px; padding: 13px 0; font-size: 13px; border-bottom: 1px solid var(--line); }
.checks li > div { min-width: 0; flex: 1; }
.rule-mark { display: grid; place-items: center; flex: 0 0 22px; height: 22px; border-radius: 50%; font-size: 11px; color: var(--muted); background: var(--surface); }
.rule-mark.pass { color: var(--green); }
.rule-mark.fail { color: var(--danger); }
.rule-answer { display: block; width: 100%; margin-top: 10px; font-size: 11px; }
.source-evidence { margin: 14px 0; font-size: 12px; }
.source-evidence summary { cursor: pointer; padding: 12px 0; color: var(--accent); }
.evidence-row { padding: 16px 0; border-top: 1px solid var(--line); }
.evidence-row strong, .evidence-row q { display: block; margin-bottom: 8px; }
.official-link { margin-top: 15px; }
.progress-caption { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; color: var(--muted); }
.step-list { margin: 20px 0; }
.step-list label { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; font-size: 13px; cursor: pointer; border-bottom: 1px solid var(--line); }
.step-list input { margin: 3px 0 0; }
.step-list input:checked + span { color: var(--muted); text-decoration: line-through; }
.next-step { font-size: 12px; color: var(--accent); margin: 20px 0; }
.workflow, .field { display: flex; flex-direction: column; gap: 8px; font-size: 12px; }
.workflow { margin-bottom: 14px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.profile-dialog h2 { font-size: 23px; margin: 12px 0; }
.profile-dialog p { font-size: 12px; margin: 12px 0; }
.profile-dialog .field { margin: 20px 0; }
fieldset { margin: 24px 0; border: 0; padding: 0; }
legend { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
fieldset label { display: flex; align-items: center; gap: 8px; padding: 7px 0; font-size: 13px; }
.dialog-actions { display: flex; gap: 12px; justify-content: space-between; margin-top: 26px; }
.toast { position: fixed; z-index: 100; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); width: max-content; background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 10px; font-size: 13px; box-shadow: 0 4px 24px #0002; }
@media (max-width:1100px) { .shell { padding: 0 32px; } .hero { display: block; } .hero-note { margin-top: 18px; } .workspace { gap: 30px; grid-template-columns: 200px minmax(0,1fr); } .saved-workspace { grid-template-columns: 1fr; } .op-card { grid-template-columns: minmax(0,1fr) 155px; gap: 20px; } .card-side { padding-left: 16px; } }
@media (min-width:900px) { .filter-panel:not([open]) > .filter-content { display: block; } }
@media (max-width:899px) {
  .topbar { min-height: 84px; gap: 20px; } .topbar nav { gap: 22px; } .brand { font-size: 18px; } .brand small { font-size: 8px; } .profile-open { margin-left: 0; }
  .workspace { display: block; } .filter-panel { position: static; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 8px; }
  .filter-panel > summary { display: flex; cursor: pointer; list-style: none; padding: 12px 16px; font-size: 13px; justify-content: space-between; align-items: center; min-height: 48px; }
  .filter-panel > summary::-webkit-details-marker { display: none; } .filter-panel summary span { font-size: 10px; color: var(--muted); }
  .filter-content { padding: 12px 16px 20px; } .roles { grid-template-columns: 1fr 1fr; gap: 8px; } .filter-heading { margin-bottom: 12px; } .profile-summary { margin-top: 16px; padding-top: 16px; } .privacy-note { margin-top: 10px; }
  .search { margin-bottom: 20px; } .hero { padding-top: 36px; } .hero-note { display: none; }
}
@media (max-width:640px) {
  .shell { padding: 0 22px; } .topbar { flex-wrap: wrap; gap: 0; padding-top: 20px; } .brand { font-size: 18px; } .brand img { width: 32px; height: 32px; } .brand small { font-size: 7px; letter-spacing: .11em; }
  .profile-open { margin-left: auto; font-size: 12px; padding: 6px 10px; min-height: 38px; } .topbar nav { order: 3; width: 100%; margin: 14px 0 0; justify-content: space-between; gap: 10px; } .topbar nav a { justify-content: center; font-size: 12px; padding: 12px 1px; }
  .hero { padding: 30px 0 22px; } .eyebrow { font-size: 9px; letter-spacing: .1em; } .hero h1 { font-size: 29px; line-height: 1.45; margin: 10px 0; } .hero p { font-size: 12px; line-height: 1.85; }
  .search { padding: 0 14px; gap: 10px; min-height: 52px; border-radius: 8px; margin: 0 0 14px; } .search input { font-size: 13px; height: 50px; } .search-hint { display: none; } .search svg { width: 18px; height: 18px; }
  .filter-panel { margin-bottom: 24px; } .filter-panel > summary { font-size: 12px; padding: 10px 14px; min-height: 44px; }
  .result-bar { padding-bottom: 12px; gap: 8px; } .result-bar h2 { font-size: 13px; } .sort-label > span { display: none; } .sort-label select { font-size: 11px; }
  .op-card { display: block; padding: 22px 0 20px; } .card-top { margin-bottom: 10px; } .op-card h2 { font-size: 20px; padding-right: 10px; } .summary { font-size: 13px; } .benefit { font-size: 13px; margin-top: 10px; } .card-meta { margin-top: 12px; gap: 7px 10px; }
  .card-side { padding: 16px 0 0; border-left: 0; flex-direction: row; align-items: flex-end; gap: 14px; } .deadline-text { gap: 3px; } .deadline-text strong { font-size: 13px; } .card-action { flex: 0 0 auto; min-height: 40px; margin: 0; font-size: 12px; } .deadline-text .round { display: none; } .save-button { top: 15px; }
  .saved-progress { max-width: 100px; font-size: 9px; } .timeline { grid-template-columns: 1fr; } .timeline button { padding: 14px; font-size: 12px; }
  .source-grid { grid-template-columns: 1fr; } .source-tools { align-items: flex-start; flex-direction: column; gap: 10px; } .source-card { padding: 22px 0; } .source-card h2 { font-size: 16px; }
  .footer { margin-top: 44px; padding: 24px 0; font-size: 9px; gap: 4px 18px; } .footer > span { width: 100%; } #theme-toggle { margin-left: 0; }
  .detail-dialog { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; margin: 0; } .detail-header { padding: 16px 22px 24px; } .detail-header h2 { font-size: 25px; padding: 0; } .detail-header p { font-size: 13px; }
  .detail-body { display: block; } .detail-body > div, .detail-body section.detail-side { padding: 24px 22px; } .detail-body section.detail-side { padding-bottom: max(32px,env(safe-area-inset-bottom)); } .profile-dialog { padding: 20px; } .profile-dialog h2 { font-size: 21px; }
  .toast { bottom: max(20px,env(safe-area-inset-bottom)); font-size: 12px; } .empty { padding: 48px 8px; } .empty h2 { font-size: 22px; } .empty p { font-size: 13px; }
}
@media (max-width:360px) { .shell { padding: 0 16px; } .hero h1 { font-size: 26px; } .brand { font-size: 16px; } .brand img { width: 30px; height: 30px; } .card-side { gap: 8px; } .saved-progress { max-width: 80px; } }
@media (prefers-reduced-motion:reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
