/* 三份不用登入的線上手冊共用（學校管理員、老師、學生；規格書合約第 8 點，2026-11-19）。
   桌面、手機都能讀，可直接用瀏覽器列印或存成 PDF。 */
:root {
  color-scheme: light dark;
  --bg: #f7f8fb; --card: #ffffff; --fg: #1c2333; --muted: #5b6478; --line: #dde1ea;
  --link: #2346b5; --accent: #0e7490; --accent-soft: #e6f6f9; --note: #fff8e6; --note-line: #f2d98a; --on-accent: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1a3f; --card: #13224f; --fg: #e8ecf7; --muted: #a3afcf; --line: #26366d;
    --link: #9fb7ff; --accent: #67d4e8; --accent-soft: #163a56; --note: #3a3217; --note-line: #7a6a2a; --on-accent: #0d1a3f;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.8 -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}
a { color: var(--link); text-underline-offset: 3px; }

.guide-top {
  border-bottom: 1px solid var(--line); background: var(--card);
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
}
.guide-top-inner { max-width: 44rem; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.guide-brand { font-weight: 800; color: var(--fg); text-decoration: none; margin-right: auto; }
.guide-roles { display: flex; flex-wrap: wrap; gap: 6px; }
.guide-roles a { font-size: 0.9rem; text-decoration: none; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.guide-roles a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 700; }

.guide { max-width: 44rem; margin: 0 auto; padding: 40px max(16px, env(safe-area-inset-right, 0px)) 64px max(16px, env(safe-area-inset-left, 0px)); }
.guide-kicker { color: var(--muted); font-size: 0.9rem; margin: 0; font-weight: 700; }
.guide h1 { font-size: 2rem; line-height: 1.3; margin: 0 0 8px; text-wrap: balance; }
.guide-lead { color: var(--muted); margin: 0 0 1.6em; }
.guide-toc { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin: 0 0 2em; }
.guide-toc p { margin: 0 0 4px; font-weight: 700; font-size: 0.95rem; }
.guide-toc ol { margin: 0; padding-left: 1.4em; }
.guide-toc li { margin: 2px 0; }
.guide h2 { font-size: 1.3rem; margin: 2.4em 0 0.6em; padding-top: 0.6em; border-top: 1px solid var(--line); }
.guide h2:first-of-type { border-top: 0; padding-top: 0; }
.guide h3 { font-size: 1.05rem; margin: 1.4em 0 0.3em; }
.guide p, .guide li { margin: 0.5em 0; }
.guide ul, .guide ol { padding-left: 1.4em; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 2rem 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.steps > li:last-child { border-bottom: 0; }
.steps > li::before { content: counter(step); width: 2rem; height: 2rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 800; display: grid; place-items: center; }
.steps b { display: block; }
.note { background: var(--note); border: 1px solid var(--note-line); border-radius: 10px; padding: 10px 14px; margin: 1em 0; }
.guide table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.guide-table { overflow-x: auto; }
.guide th, .guide td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.guide th { color: var(--muted); font-weight: 700; white-space: nowrap; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.95em; background: var(--accent-soft); padding: 1px 6px; border-radius: 6px; }

.guide-foot { margin-top: 3em; padding-top: 1em; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92rem; }
.guide-foot p { margin: 0.3em 0; }
.guide-login { display: inline-block; margin-top: 10px; padding: 10px 18px; border-radius: 10px; background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 700; }

@media print {
  .guide-top, .guide-login { display: none; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .guide { padding: 0; max-width: none; }
  .guide h2 { break-after: avoid; }
  .steps > li { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
