/* ed3 頁殼(臺灣專題頁 taiwan.html)。模塊樣式在 modules/<模塊>/module.css,這裡只管頁框與導航。 */
:root{
  color-scheme: light;
  --surface:#fcfcfb; --plane:#f9f9f7; --ink:#0b0b0b; --ink-2:#52514e; --muted:#898781;
  --grid:#e1e0d9; --axis:#c3c2b7; --ring:rgba(11,11,11,.10); --accent:#2a78d6; --chip:#eef3fa;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    color-scheme: dark;
    --surface:#1a1a19; --plane:#0d0d0d; --ink:#fff; --ink-2:#c3c2b7; --muted:#898781;
    --grid:#2c2c2a; --axis:#383835; --ring:rgba(255,255,255,.10); --accent:#3987e5; --chip:#1f2a3a;
  }
}
:root[data-theme="dark"]{
  color-scheme: dark;
  --surface:#1a1a19; --plane:#0d0d0d; --ink:#fff; --ink-2:#c3c2b7; --muted:#898781;
  --grid:#2c2c2a; --axis:#383835; --ring:rgba(255,255,255,.10); --accent:#3987e5; --chip:#1f2a3a;
}
*{box-sizing:border-box}
html,body{margin:0;background:var(--plane);color:var(--ink);font:15px/1.5 system-ui,-apple-system,"Segoe UI","PingFang TC","Noto Sans CJK TC",sans-serif}
.ed3-skip{position:absolute;left:-9999px}
.ed3-nav{background:var(--surface);border-bottom:1px solid var(--ring);position:sticky;top:0;z-index:30}
.ed3-nav .inner{max-width:1040px;margin:0 auto;padding:10px 16px;display:flex;flex-wrap:wrap;gap:4px 14px;align-items:baseline}
.ed3-nav .brand{font-weight:700;font-size:15px;color:var(--ink);text-decoration:none;margin-right:6px}
.ed3-nav a{color:var(--ink-2);text-decoration:none;font-size:14px;padding:2px 2px;border-bottom:2px solid transparent}
.ed3-nav a:hover{color:var(--ink)}
.ed3-nav a[aria-current="page"]{color:var(--ink);border-bottom-color:var(--accent);font-weight:600}
.ed3-nav .cur-note{margin-left:auto;font-size:12px;color:var(--muted)}
.ed3-nav .cur-note a{color:var(--muted);text-decoration:underline}
main{max-width:1040px;margin:0 auto;padding:20px 16px 40px}
.page-head h1{font-size:24px;line-height:1.3;margin:0;font-weight:700}
.page-head .lede{margin:6px 0 0;font-size:15px;color:var(--ink-2);line-height:1.6;max-width:46em}
.page-head .ed3-note{margin:8px 0 0;font-size:13px;color:var(--muted)}
.page-head .ed3-note a{color:var(--muted)}
section.ed3-module{margin-top:24px}
.ed3-err{display:none;margin:16px 0;padding:12px 14px;border:1px solid #b3261e;border-radius:8px;background:rgba(179,38,30,.06);color:#b3261e;font-size:14px}
.ed3-foot{margin-top:32px;padding-top:12px;border-top:1px solid var(--grid);color:var(--muted);font-size:12px;display:flex;flex-wrap:wrap;gap:6px 14px}
@media (max-width:480px){ main{padding:14px 12px 32px} .page-head h1{font-size:20px} .ed3-nav .inner{padding:8px 12px} }
@media (prefers-reduced-motion: reduce){ *{transition:none!important} }

/* V1 UI uses 16px rem spacing; keep the legacy shell font from shrinking it. */
html:has(.page-hero){font-size:16px}
.home-versions__title{margin:20px 0 8px;font-size:15px}
.home-versions__wrap{overflow-x:auto;max-width:100%}
.home-versions{border-collapse:collapse;font-size:13px;min-width:100%}
.home-versions th,.home-versions td{text-align:left;padding:6px 12px 6px 0;border-bottom:1px solid var(--grid);vertical-align:top}
.home-versions thead th{color:var(--muted);font-weight:500}
.home-versions code{font-size:12px;word-break:break-all}
.home-versions__note{color:var(--muted);font-size:12px;margin-top:8px}

/* 使用者 10-12:手機上頂部導航排成一行、可橫向滑動;字標固定在左 */
@media (max-width: 700px) {
  html body .ed3-nav .inner { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; white-space: nowrap; align-items: center !important; }
  html body .ed3-nav .inner::-webkit-scrollbar { display: none; }
  html body .ed3-nav .inner > * { flex: 0 0 auto !important; }
  html body .ed3-nav .inner { background: inherit; }
  /* 使用者 10-12:滑動時文字會從字標底下穿過重疊,字標底下加不透明遮罩(取導覽列底色)和一道淡陰影 */
  html body .ed3-nav .inner > .brand { flex-basis: auto !important; margin: 0 6px 0 0 !important; position: sticky; left: 0; z-index: 2; background: inherit; padding: 6px 10px 6px 0; box-shadow: 8px 0 8px -8px rgba(0,0,0,.35); }
  html body .ed3-nav .inner > .brand .cb-wordmark { width: 104px; height: auto; }
}

/* 10-12:導覽是 sticky,錨點或跳轉到各節時標題不被導覽蓋住 */
main [data-mod], main section[id], main [id^="case"] { scroll-margin-top: 96px; }
