/* YC.STUDIO 設計 tokens 與全站基礎（2026-09-22 定案，見 docs/design-guidelines.md）。
   只調整視覺：不改任何流程、欄位或權限。後載入，覆蓋舊樣式。 */
:root{
  --ds-green:#2E463B;--ds-green-2:#3D5B4F;--ds-ink:#1F302A;--ds-ink-2:#4A5A53;--ds-line:#DCDFD6;--ds-line-2:#E9EBE4;
  --ds-ground:#F6F5F0;--ds-surface:#FFFFFF;--ds-sage:#EEF1EA;--ds-gold:#AF8C49;--ds-gold-ink:#7A5E24;
  --ds-warn:#8E5410;--ds-warn-bg:#FBEFD9;--ds-bad:#9C3A2B;--ds-bad-bg:#F8E6E1;--ds-ok:#2C6A4D;--ds-ok-bg:#E3EFE7;--ds-unk:#4F5B66;--ds-unk-bg:#E8ECEF;
  --ds-sans:"Noto Sans TC","PingFang TC","Heiti TC","Microsoft JhengHei","Noto Sans CJK TC","Source Han Sans TC",system-ui,sans-serif;
  --ds-serif:"Noto Serif TC","Songti TC","Noto Serif CJK TC","PMingLiU",serif;
  /* 舊變數改指向新 tokens，讓既有頁面一起換色 */
  --ink:var(--ds-ink);--muted:var(--ds-ink-2);--paper:var(--ds-ground);--line:var(--ds-line);--gold:var(--ds-gold);--green:var(--ds-green);--wash:var(--ds-sage);--orange:var(--ds-warn);--red:var(--ds-bad);--radius:10px;
  font-family:var(--ds-sans);font-size:16px;font-weight:400;line-height:1.6;color:var(--ds-ink)
}
body{background:var(--ds-ground);color:var(--ds-ink)}
button,input,select,textarea{font-family:inherit}
.num,.tabular,td.nowrap,time{font-variant-numeric:tabular-nums}
:focus-visible{outline:3px solid var(--ds-gold);outline-offset:2px}
/* 側欄：品牌綠、名稱單行 */
.sidebar{background:var(--ds-green)}
.nav-button{color:#DDE3DA;font-weight:500;font-size:15.5px;border-radius:7px}
.nav-button.active{background:#44655A;color:#fff;font-weight:600}
.nav-button:hover{background:#3A5A4D;color:#fff}
.nav-button.active:after{background:var(--ds-gold)}
.nav-caption{display:none}
.brand{font-family:var(--ds-serif);letter-spacing:.5px}
.brand small{font-family:var(--ds-sans);letter-spacing:.5px;font-size:12px;color:#C9D3CB}
.brand-mark{font-family:var(--ds-serif);border-color:var(--ds-gold);color:#E2CFA2}
.sidebar-note,.sidebar-guide,.owner{font-size:13.5px}
/* 頁首：不再每頁重複英文眉題 */
.eyebrow{display:none}
h1{font-size:26px;font-weight:700;letter-spacing:0;color:var(--ds-ink)}
.subtitle{font-size:15.5px;color:var(--ds-ink-2);margin-top:4px}
.page-heading{margin-bottom:18px;align-items:flex-end}
.topbar{border-bottom-color:var(--ds-line);height:64px}
.breadcrumb,.breadcrumb strong{color:var(--ds-ink-2)}.breadcrumb strong{color:var(--ds-ink)}
.demo-pill{font-size:13px;letter-spacing:0;background:var(--ds-warn-bg);color:var(--ds-warn);border-color:transparent;font-weight:600}
.preview-note{font-size:14px;color:var(--ds-gold-ink);background:#FAF6EA}
.workspace-footer{font-size:12.5px;letter-spacing:.3px;color:var(--ds-ink-2)}
/* 元件 */
.card{border-color:var(--ds-line);border-radius:10px}
.button{border-color:var(--ds-line);border-radius:7px;color:var(--ds-ink);font-size:15px;font-weight:600;min-height:40px}
.button.small{font-size:14px;min-height:34px}
.button.primary{background:var(--ds-green);border-color:var(--ds-green);color:#fff}
.button.secondary{background:var(--ds-sage);border-color:var(--ds-line);color:var(--ds-green)}
.button.danger{color:var(--ds-bad);border-color:#E7C9C2}
.text-button{color:var(--ds-green);font-size:15px}
.badge{font-size:14px;font-weight:600;background:var(--ds-ok-bg);color:var(--ds-ok);border-radius:5px;padding:1px 8px;line-height:1.6}
.badge.amber{background:var(--ds-warn-bg);color:var(--ds-warn)}.badge.red{background:var(--ds-bad-bg);color:var(--ds-bad)}.badge.gray{background:var(--ds-unk-bg);color:var(--ds-unk)}
.notice{color:var(--ds-gold-ink)}
.fine,.table-footer,.field small,.count-label{font-size:14px;color:var(--ds-ink-2)}
.field{color:var(--ds-ink-2)}
.field input,.field select,.field textarea,.search{border-color:var(--ds-line);color:var(--ds-ink)}
.tab{font-size:15px;color:var(--ds-ink-2)}.tab.active{background:var(--ds-sage);color:var(--ds-green)}
.workspace th{color:var(--ds-ink-2)}
.table-name small,.member-item small,.task-row small,.quick-item small,.metric-foot,.section-head small{font-size:14px;color:var(--ds-ink-2)}
.event-row{font-size:15px}.event-row time{color:var(--ds-ink-2)}.event-row span{color:var(--ds-ink)}
.metric-value{font-family:var(--ds-serif);letter-spacing:-1px;color:var(--ds-green)}
.metric-value small{font-family:var(--ds-sans)}
.task-row .task-count{font-family:var(--ds-serif);font-variant-numeric:tabular-nums}
.task-icon{background:#F3EEDF;color:var(--ds-gold-ink)}
.avatar{background:var(--ds-sage);color:var(--ds-green);font-size:14px}
.empty{font-size:15px;color:var(--ds-ink-2)}
dialog{border-radius:12px}
.modal-head h2{font-size:21px}
@media(max-width:800px){.topbar{height:auto;min-height:56px}h1{font-size:23px}.button.small{min-height:44px}}
.modal-head button{color:var(--ds-ink-2)}
dialog .text-button{min-height:40px;padding:6px 2px}
@media(max-width:800px){dialog .text-button{min-height:44px}}
#toast{font-size:15px}
dialog table{font-size:15px}dialog th{font-size:14px;font-weight:600;letter-spacing:0;color:var(--ds-ink-2)}dialog td{padding:10px 12px}
.sum-row{font-size:16px;color:var(--ds-ink-2)}.sum-row span:last-child{font-variant-numeric:tabular-nums;color:var(--ds-ink)}.sum-total{font-size:20px;color:var(--ds-ink)}
.modal-detail dt{color:var(--ds-ink-2);font-size:14px}.modal-detail dd{color:var(--ds-ink)}
.text-button{min-height:40px;padding:6px 4px;font-weight:600}
@media(max-width:800px){.text-button{min-height:44px}}
.task-row button{min-width:40px;min-height:40px;color:var(--ds-ink-2)}.member-item button{min-height:40px;color:var(--ds-green);font-weight:600}
.metric-value small{color:var(--ds-ink-2)}.success-dot{color:var(--ds-ok)}
@media(max-width:800px){.task-row button,.member-item button{min-width:44px;min-height:44px}}
.date-keep{white-space:nowrap}
body.production .test-only{display:none!important}
.prod-only{display:none}body.production .prod-only{display:block}
.ops-status .badge{white-space:normal;word-break:break-all}

/* Historical matching keeps source evidence visible and choices explicit. */
.history-link-choice{display:flex;flex-shrink:0;align-items:flex-start;gap:12px;padding:12px 4px;border-bottom:1px solid var(--line,#DCDFD6);min-height:44px;overflow-wrap:anywhere;cursor:pointer}
.history-link-choice input{flex:0 0 auto;width:18px;height:18px;margin-top:4px}
.history-link-choice span{min-width:0;line-height:1.5}
#history-link-results{display:block;max-height:240px;overflow:auto}
#history-link-results input{min-height:18px;min-width:18px;width:18px;height:18px;padding:0}
#history-link-form .checkline input{width:22px;height:22px;flex:0 0 22px}
#history-link-form{margin-top:16px}

/* B37: compact operational review list, readable on narrow screens. */
.review-queue .tabs{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}
.review-queue [aria-pressed="true"]{background:var(--green,#2e463b);color:white}
.review-queue-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 0;border-bottom:1px solid #d9dfd7}
.review-queue-row>div{min-width:0;overflow-wrap:anywhere}
.review-queue-row strong{margin-right:12px}
.review-queue-row p{margin:6px 0 0}
.review-queue-row>button{flex-shrink:0}
@media(max-width:760px){.review-queue-row{align-items:flex-start;flex-direction:column}.review-queue-row>button{min-height:44px}.review-queue .tabs button{min-height:44px}}
