/* Look 2a Minimal: white page, navy and orange, Noto Serif TC titles, dashed orange circle (design 2a). */
:root {
  --bg: #fff; --text: #3C3939; --ink: #1B1B27; --muted: #5E5B5B; --accent: #28437E; --orange: #F39800;
  --rule: #E1E1EA; --line: #C9C7CF; --soft: #E9ECF2; --panel: #F5F5F7; --card: #fff; --drop: #E9ECF2;
  --err: #B3261E; --done: #28437E; --now: #B86E00; --next: #C9C7CF; --mark-fg: #fff;
  --on-bg: #28437E; --on-fg: #fff; --on-bd: #28437E; --off-bg: #fff; --off-fg: #3C3939; --off-bd: #D5D5DE;
  --nav-on: #28437E; --nav-done: #28437E; --nav-off: #9A97A3;
  --cta: #28437E; --cta-fg: #fff; --cta-off: #E1E1EA; --cta-off-fg: #9A97A3;
  --sans: 'Noto Sans TC', 'Microsoft JhengHei', sans-serif; --display: 'Noto Serif TC', 'Noto Sans TC', serif;
  --mono: 'IBM Plex Mono', monospace;
}

/* ---- layout shared by the three looks (same markup; colours and fonts from the variables above) ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--orange); }
input, select, button, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3.2); opacity: 0; } }
@keyframes chev { 0%, 100% { opacity: .18; } 50% { opacity: 1; } }
@keyframes blink { 50% { opacity: .15; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.page { min-height: 100vh; position: relative; overflow: clip; display: flex; flex-direction: column; }
.deco { display: none; position: absolute; pointer-events: none; }
.hdr { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 24px clamp(20px, 6vw, 80px); }
.wordmark { display: flex; align-items: baseline; gap: 10px; color: var(--ink); }
.wm-zh { font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: .08em; color: var(--accent); }
.wm-en { font-size: 13px; color: var(--muted); letter-spacing: .04em; }
.hdr-right { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.user-name { color: var(--ink); font-weight: 500; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--orange); }
.btn-primary { display: inline-flex; align-items: center; gap: 14px; background: var(--cta); color: var(--cta-fg); border: 0; padding: 15px 30px; font-size: 15px; font-weight: 700; cursor: pointer; transition: gap .3s, background .3s, box-shadow .3s; }
.btn-primary:hover { gap: 22px; color: var(--cta-fg); }
.btn-primary:disabled { background: var(--cta-off); color: var(--cta-off-fg); cursor: not-allowed; }
.btn-ghost { display: inline-flex; align-items: center; background: transparent; color: var(--accent); border: 1px solid var(--accent); padding: 14px 26px; font-size: 15px; cursor: pointer; }
.btn-ghost:hover { background: var(--soft); }
.chev { display: inline-flex; letter-spacing: -.12em; font-weight: 700; }
.chev i { font-style: normal; animation: chev 1.4s infinite; }
.chev i:nth-child(2) { animation-delay: .15s; }
.chev i:nth-child(3) { animation-delay: .3s; color: var(--orange); }
/* start page */
.start { position: relative; z-index: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 56px clamp(20px, 6vw, 80px) 96px; display: flex; flex-wrap: wrap; gap: 64px; }
.start-left { flex: 1 1 380px; display: flex; flex-direction: column; gap: 24px; min-width: 0; position: relative; }
.start-right { flex: 1 1 440px; display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.kicker { display: flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: .18em; color: var(--muted); }
.pulse { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); }
.pulse::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--orange); animation: pulse 2.4s ease-out infinite; }
.hero-chars, .brush-band { display: none; }
.start-title { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(40px, 6vw, 64px); line-height: 1.15; color: var(--ink); letter-spacing: .06em; animation: rise .9s .1s both; }
.start-sub { font-size: 20px; font-weight: 300; color: var(--accent); }
.start-lead { margin: 0; font-size: 16px; line-height: 1.8; color: var(--muted); max-width: 460px; }
.motto { display: flex; flex-direction: column; gap: 4px; font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--accent); letter-spacing: .1em; }
.motto small { font-family: var(--sans); font-weight: 400; font-size: 13px; color: var(--muted); letter-spacing: 0; }
.panel { display: flex; flex-direction: column; }
.panel-head { font-size: 12px; letter-spacing: .12em; color: var(--muted); padding: 10px 0; border-bottom: 1px solid var(--rule); }
.start-steps, .start-programs { list-style: none; margin: 0; padding: 0; }
.ss-go { color: inherit; text-decoration: none; cursor: pointer; }
.ss-go:hover .ss-label { color: var(--accent); }
.start-steps .ss-go { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 4px 14px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.ss-n { grid-row: span 2; font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--accent); }
.ss-num { display: none; }
.ss-label { font-size: 17px; font-weight: 500; color: var(--ink); }
.ss-sub { font-size: 13px; color: var(--muted); }
.start-programs li { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 15px; color: var(--ink); }
.term-table { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.term-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.term-headrow { font-size: 12px; letter-spacing: .08em; color: var(--muted); padding: 10px 0; }
.term-name { font-weight: 500; color: var(--ink); }
.term-dates { color: var(--muted); font-size: 14px; }
.start-actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
/* the form */
.app { position: relative; z-index: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 12px clamp(20px, 6vw, 80px) 96px; display: flex; flex-direction: column; gap: 48px; }
.steps-nav { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.nav-step { background: none; border: 0; border-bottom: 2px solid var(--rule); padding: 0 0 12px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-width: 0; color: var(--nav-off); }
.nav-step.done { color: var(--nav-done); border-bottom-color: var(--nav-done); }
.nav-step.on { color: var(--nav-on); border-bottom-color: var(--nav-on); }
.nav-n { font-size: 13px; font-weight: 700; display: flex; gap: 6px; }
.nav-label { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-body { display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.aside { flex: 1 1 240px; max-width: 360px; display: flex; flex-direction: column; gap: 18px; }
.step-kicker { font-size: 13px; letter-spacing: .18em; color: var(--muted); text-transform: uppercase; }
.step-title { font-family: var(--display); font-weight: 700; font-size: 44px; line-height: 1.15; color: var(--ink); letter-spacing: .04em; }
.step-intro { margin: 0; font-size: 15px; line-height: 1.8; color: var(--muted); }
.save-state { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.save-state .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: blink 2s infinite; }
.content { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.notice { border-left: 3px solid var(--now); padding: 6px 0 6px 16px; font-size: 14px; line-height: 1.7; }
.notice.ok { border-left-color: var(--done); }
.banner { border-left: 2px solid var(--err); padding: 6px 0 6px 16px; font-size: 15px; color: var(--err); }
.banner ul { margin: 8px 0 0; padding-left: 18px; }
.err { color: var(--err); font-size: 13px; }
.hint { font-size: 13px; color: var(--muted); line-height: 1.6; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 28px 32px; }
.span2 { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.lbl { font-size: 13px; color: var(--ink); font-weight: 500; display: flex; gap: 6px; }
.req { color: var(--orange); }
.field input, .field select, .field textarea, .cell input, .cell select { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 8px 0; font-size: 17px; color: var(--ink); background: transparent; outline: none; transition: border-color .3s, padding .3s; }
.field input:focus, .field select:focus, .cell input:focus, .cell select:focus, .field textarea:focus { border-bottom-color: var(--accent); padding-left: 6px; }
.field.has-err input, .field.has-err select { border-bottom-color: var(--err); }
.field input:disabled, .field select:disabled { color: var(--muted); border-bottom-style: dashed; }
.locked-note { font-size: 13px; color: var(--muted); }
.sec-head { padding-top: 18px; border-top: 1px solid var(--rule); }
.sec-zh { font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--ink); letter-spacing: .04em; }
.opts { display: flex; gap: 10px; flex-wrap: wrap; }
.opt { cursor: pointer; white-space: nowrap; padding: 10px 18px; font-size: 15px; border: 1px solid var(--off-bd); background: var(--off-bg); color: var(--off-fg); }
.opt.on { border-color: var(--on-bd); background: var(--on-bg); color: var(--on-fg); }
.opt:disabled, .card:disabled, .check:disabled { cursor: not-allowed; opacity: .6; }
.check { display: flex; gap: 12px; align-items: center; background: none; border: 0; padding: 4px 0; cursor: pointer; text-align: left; font-size: 15px; }
.check .box { width: 20px; height: 20px; flex-shrink: 0; border: 1px solid var(--accent); display: flex; align-items: center; justify-content: center; font-size: 13px; }
.check.on .box { background: var(--on-bg); color: var(--on-fg); border-color: var(--on-bd); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.card { text-align: left; cursor: pointer; padding: 22px; border: 1px solid var(--off-bd); background: var(--off-bg); color: var(--off-fg); display: flex; flex-direction: column; gap: 10px; }
.card.on { border-color: var(--on-bd); background: var(--on-bg); color: var(--on-fg); }
.card-lvl { font-size: 11px; letter-spacing: .14em; opacity: .8; text-transform: uppercase; }
.card-name { font-size: 16px; font-weight: 500; line-height: 1.5; }
.rows { display: flex; flex-direction: column; gap: 16px; }
.row { background: var(--panel); padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.row-head { display: flex; justify-content: space-between; align-items: center; }
.row-title { font-size: 13px; font-weight: 700; color: var(--accent); }
.row-cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 16px 24px; }
.cell { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); min-width: 0; justify-content: flex-end; }
.cell.span-all { grid-column: 1 / -1; }
.cell input, .cell select { font-size: 16px; padding: 6px 0; }
.add { align-self: flex-start; padding: 10px 18px; }
.rate { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; }
.rate-group { display: flex; flex-direction: column; gap: 10px; }
.rate-title { font-weight: 700; color: var(--ink); }
.rate-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rate-row.has-err .rate-skill { color: var(--err); }
.rate-skill { width: 72px; font-size: 14px; }
.rate .opt { padding: 6px 10px; font-size: 13px; }
.step-actions { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 12px; }
.step-actions #next { margin-left: auto; }
/* documents */
.docs { display: flex; flex-direction: column; gap: 16px; }
.docs-progress { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.bar { flex: 1; height: 4px; background: var(--rule); position: relative; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--done); }
.doc { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 18px; border: 1px solid var(--rule); background: var(--card); }
.doc.drag { background: var(--drop); border-color: var(--accent); border-style: dashed; }
.doc.has-err { border-color: var(--err); }
.doc-n { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--accent); }
.doc-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.doc-name { display: flex; gap: 8px; flex-wrap: wrap; font-weight: 500; color: var(--ink); }
.doc-code { font-family: var(--mono); color: var(--muted); }
.doc-status { font-size: 13px; color: var(--muted); }
.doc-status.st-accepted, .doc-status.st-uploaded, .doc-status.st-resubmitted { color: var(--done); }
.doc-status.st-needs_action, .doc-status.st-flagged { color: var(--err); }
.versions { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.versions a { font-family: var(--mono); word-break: break-all; }
.ver-meta { display: block; color: var(--muted); font-size: 12px; }
.doc-pick { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 16px; border: 1px solid var(--accent); color: var(--accent); cursor: pointer; font-size: 14px; white-space: nowrap; }
.doc-pick small { font-size: 11px; color: var(--muted); }
.doc-pick.disabled { opacity: .5; cursor: not-allowed; }
.file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.message { border: 1px solid var(--now); padding: 14px 18px; display: flex; flex-direction: column; gap: 6px; }
.message-head { font-size: 12px; color: var(--now); font-weight: 700; }
.message-text { white-space: pre-wrap; }
/* review and status */
.review, .status { display: flex; flex-direction: column; gap: 24px; }
.rv-sec, .status-card { border-top: 1px solid var(--rule); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.rv-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--ink); }
.rv-n { color: var(--accent); }
.rv-st { font-family: var(--sans); font-size: 13px; font-weight: 400; }
.rv-st.ok { color: var(--done); }
.rv-st.bad { color: var(--err); }
.kv { display: grid; grid-template-columns: minmax(120px, 200px) minmax(0, 1fr); gap: 12px; font-size: 15px; padding: 4px 0; }
.kv .k { color: var(--muted); font-size: 13px; }
.kv .v { color: var(--ink); word-break: break-word; }
.mono { font-family: var(--mono); }
.summary { display: flex; flex-direction: column; gap: 4px; margin-bottom: 24px; padding: 16px 20px; background: var(--panel); }
.declare { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.stages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.stage { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 2px 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule); color: var(--muted); }
.stage .hint { grid-column: 2 / -1; }
.stage-mark { grid-row: span 2; width: 32px; height: 32px; border-radius: 50%; border: 1px solid currentColor; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.stage-name { color: var(--ink); font-weight: 500; }
.stage.done { color: var(--done); }
.stage.done .stage-mark { background: var(--done); color: var(--mark-fg); border-color: var(--done); }
.stage.now { color: var(--now); }
.stage.waiting, .stage.failed { color: var(--err); }
.stage-state { font-size: 13px; }
.tasks, .history, .cr-list { display: flex; flex-direction: column; gap: 8px; }
.tasks-title, .cr-list-head { font-weight: 700; color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.task { display: flex; justify-content: space-between; gap: 16px; background: transparent; border: 1px solid var(--err); padding: 12px 16px; cursor: pointer; text-align: left; }
.cr-row, .ev { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto auto; gap: 12px; font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.ev { grid-template-columns: 140px 90px minmax(0, 1fr); }
.cr-reason, .ev-what { word-break: break-word; white-space: pre-wrap; }
.cr-st.pending { color: var(--now); }
.cr-st.approved, .cr-st.done { color: var(--done); }
.cr-at, .ev-at, .ev-who { color: var(--muted); font-size: 13px; }
/* correction form */
.cr-panel { position: fixed; inset: 0; z-index: 20; background: rgba(15, 24, 48, .45); display: flex; align-items: center; justify-content: center; padding: 20px; }
.cr-box { width: min(520px, 100%); background: var(--card); color: var(--text); padding: 28px; display: flex; flex-direction: column; gap: 16px; border: 1px solid var(--rule); }
.cr-title { font-family: var(--display); font-weight: 700; font-size: 24px; color: var(--ink); }
.cr-help { margin: 0; font-size: 14px; color: var(--muted); }
.cr-box textarea { border: 1px solid var(--line); padding: 10px; resize: vertical; }
.cr-actions { display: flex; justify-content: space-between; gap: 12px; }
@media (max-width: 720px) {
  .steps-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .doc { grid-template-columns: minmax(0, 1fr); }
  .doc-n { display: none; }
  .ev, .cr-row { grid-template-columns: minmax(0, 1fr); }
}

/* ---- 2a decorations ---- */
.deco-a { display: block; right: -290px; top: -330px; width: 700px; height: 700px; }
.deco-a .disc { position: absolute; left: 30px; top: 30px; width: 640px; height: 640px; border-radius: 50%; background: #F5F5F7; }
.deco-a .ring { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed #F39800; opacity: .7; animation: spin 90s linear infinite; }
.btn-primary:hover { background: #15213F; }
html[lang="zh-Hant"] .start-title { max-width: 4.5em; } /* 雙聯學程 / 入學申請 on two lines, as in the design */

/* ---- dark (owner, 2026-10-25; shared/theme.js): the same navy dark as look 3 (look-3.css), the look's own layout ----
   deep navy page, near-white text, a light MCU blue for links, marks and the main button (navy text on it), orange kept */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0F1830; --text: #D5D8E2; --ink: #F3F4F8; --muted: #A6ABBB; --accent: #9DB4E8;
  --rule: #2A3658; --line: #46527A; --soft: #22305A; --panel: #16213F; --card: #16213F; --drop: #22305A;
  --err: #FF8A80; --done: #9DB4E8; --now: #FFB547; --next: #3A4670; --mark-fg: #0F1830;
  --on-bg: #9DB4E8; --on-fg: #0F1830; --on-bd: #9DB4E8; --off-bg: transparent; --off-fg: #D5D8E2; --off-bd: #3A4670;
  --nav-on: #9DB4E8; --nav-done: #9DB4E8; --nav-off: #8C92A6;
  --cta: #9DB4E8; --cta-fg: #0F1830; --cta-off: #2A3658; --cta-off-fg: #8C92A6;
}
html[data-theme="dark"] .cr-panel { background: rgba(5, 9, 20, .6); }
html[data-theme="dark"] .deco-a .disc { background: var(--panel); }
html[data-theme="dark"] .btn-primary:hover { background: #C3D2F2; }
html[data-theme="dark"] .btn-primary .chev i:nth-child(3) { color: #A85A00; }   /* orange on light blue: the darker orange */
