/* 洺沂 MIGHTY MARINE｜手機優先；主色深海軍藍 #0E2A47、輔色浪花青 #1C8C9E（logo 方案 E）
   浪花青直接當白底文字對比只有 4:1，連結與按鈕底色改用加深的 --teal-ink（≥4.5:1） */
:root {
  --navy: #0E2A47;
  --navy-2: #163a5f;
  --teal: #1C8C9E;
  --teal-light: #2BB3C0;
  --teal-ink: #146F7E;
  --ink: #1D2A36;
  --muted: #5A6B7D;
  --line: #D9E2EA;
  --band: #F2F6F9;
  --bg: #FFFFFF;
  --font: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Noto Sans Mono CJK TC", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.75 var(--font); }
img { max-width: 100%; height: auto; }
a { color: var(--teal-ink); text-underline-offset: 2px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--teal-ink); outline-offset: 2px; }   /* 亮青對白只有 2.5:1，淺底焦點框用加深青 */
.page-head :focus-visible, .site-foot :focus-visible { outline-color: #fff; }
h1, h2 { line-height: 1.3; color: var(--navy); margin: 0 0 .6em; }
.sec h2::after { content: ""; display: block; width: 40px; height: 3px; margin-top: .4em; background: var(--teal); border-radius: 2px; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.small { font-size: .9rem; color: var(--muted); }

.skip { position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

/* 頁首：手機兩行（logo＋語言｜選單），寬螢幕一行；不用 JS */
.site-head { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-head .wrap { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "brand lang" "nav nav"; align-items: center; gap: 4px 12px; padding-top: 12px; }
.brand { grid-area: brand; justify-self: start; display: block; padding: 4px 0; }
.brand img { display: block; height: 36px; width: auto; }
nav { grid-area: nav; display: flex; flex-wrap: wrap; gap: 0 16px; font-size: .92rem; }
nav a { color: var(--ink); text-decoration: none; padding: 10px 0 8px; border-bottom: 3px solid transparent; }
nav a:hover { color: var(--teal-ink); }
nav a[aria-current="page"] { color: var(--navy); font-weight: 700; border-bottom-color: var(--teal); }
.lang { grid-area: lang; display: inline-flex; align-items: center; min-height: 32px; padding: 2px 14px; border: 2px solid var(--teal-ink); border-radius: 999px; color: var(--teal-ink); font-size: .85rem; font-weight: 700; text-decoration: none; }
.lang:hover { background: var(--teal-ink); color: #fff; }
@media (min-width: 960px) {
  .site-head .wrap { grid-template-columns: auto 1fr auto; grid-template-areas: "brand nav lang"; gap: 0 28px; padding-top: 0; }
  .brand img { height: 40px; }
  nav { justify-content: flex-end; gap: 0 24px; font-size: .97rem; }
  nav a { padding: 24px 0 21px; }
}

/* 頁面標題帶；首頁主視覺（沒有照片：hero-waves.svg 是 logo 三道浪的放大版＋底部浪，只當裝飾背景） */
.page-head { background: url(/assets/hero-waves.svg) right bottom / auto 100% no-repeat, var(--navy); color: #fff; padding: 40px 0 36px; border-bottom: 6px solid var(--teal); }
.page-head h1 { color: #fff; }
.page-head .lead { font-size: 1.05rem; color: #E3ECF3; max-width: 46em; }
.hero { padding: 64px 0 60px; background: url(/assets/hero-waves.svg) right center / cover no-repeat, linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 60%, var(--teal-ink) 140%); }
.hero h1 { font-size: 2rem; max-width: 16em; }
@media (max-width: 719px) { .hero { background-size: 760px auto, auto; background-position: right bottom, 0 0; } }   /* 手機上浪紋縮小靠右下，不壓標題 */

/* 按鈕 */
.buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.2em 0 .6em; }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 10px 22px; border-radius: 6px; font-weight: 700; text-decoration: none; border: 2px solid transparent; line-height: 1.4; }
.btn-primary { background: var(--teal-ink); color: #fff; }
.btn-primary:hover { background: var(--navy); color: #fff; }
.btn-ghost { border-color: currentColor; color: var(--teal-ink); }
.btn-ghost:hover { background: var(--teal-ink); border-color: var(--teal-ink); color: #fff; }
.page-head .btn-ghost { color: #fff; }
.page-head .btn-ghost:hover { background: #fff; border-color: #fff; color: var(--navy); }
.page-head .btn-primary:hover { background: #fff; color: var(--navy); }

/* 區段 */
.sec { padding: 36px 0; }
.sec + .sec { border-top: 1px solid var(--line); }
.band, .cta { background: var(--band); }

.cards, .features, .steps, .items { list-style: none; margin: 0; padding: 0; }
.cards { display: grid; grid-template-columns: 1fr; gap: 12px; }
.cards a { display: block; height: 100%; padding: 16px 18px; border: 1px solid var(--line); border-top: 4px solid var(--teal); border-radius: 6px; text-decoration: none; color: var(--ink); background: var(--bg); }
.cards a { transition: box-shadow .15s, transform .15s; }
.cards a:hover { border-color: var(--teal); box-shadow: 0 6px 18px rgba(14, 42, 71, .12); transform: translateY(-2px); }
.cards strong::after { content: "→" / ""; margin-left: .4em; color: var(--teal-ink); }   /* 「/ ""」：箭頭不朗讀 */
.cards strong, .features strong, .steps strong { display: block; color: var(--navy); font-size: 1.05rem; margin-bottom: 4px; }
.cards span, .features span, .steps span { display: block; color: var(--muted); }

.features { display: grid; grid-template-columns: 1fr; gap: 16px; }
.features li { padding: 14px 18px; background: var(--bg); border-left: 4px solid var(--teal); border-radius: 0 6px 6px 0; }

.steps { counter-reset: step; display: grid; grid-template-columns: 1fr; gap: 16px; }
.steps li { counter-increment: step; position: relative; padding-left: 52px; min-height: 40px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }

.items { counter-reset: item; }
.items li { counter-increment: item; position: relative; padding-left: 2em; margin-bottom: .9em; }
.items li::before { content: counter(item) "."; position: absolute; left: 0; font-weight: 700; color: var(--navy); }

.facts { margin: 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 1fr; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 700; color: var(--navy); }
.facts dd { margin: 0; }

.table-wrap { overflow-x: auto; margin: 0 0 .8em; border: 1px solid var(--line); border-radius: 6px; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.wide table { min-width: 640px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
thead th { background: var(--navy); color: #fff; font-weight: 700; }
tbody th { color: var(--navy); width: 34%; }
.wide tbody th { width: auto; white-space: nowrap; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

.template { font: .92rem/1.7 var(--mono); background: var(--band); border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 6px; padding: 14px 16px; white-space: pre-wrap; word-break: break-word; margin: .4em 0 0; }

/* 頁尾 */
.site-foot { background: var(--navy); color: #C9D6E2; padding: 32px 0; font-size: .9rem; border-top: 6px solid var(--teal); }
.site-foot .wrap { display: grid; gap: 16px; }
.foot-logo { display: block; height: 30px; width: auto; }
.site-foot p { margin: 0 0 .3em; }
.site-foot a { color: #fff; }

@media (min-width: 720px) {
  h1 { font-size: 2.1rem; }
  .hero h1 { font-size: 2.6rem; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .facts div { grid-template-columns: 12em 1fr; }
  .site-foot .wrap { grid-template-columns: auto 1fr; gap: 40px; }
  .page-head { padding: 52px 0 44px; }
  .hero { padding: 96px 0 88px; }
}
@media (prefers-reduced-motion: reduce) {
  .cards a { transition: none; }
  .cards a:hover { transform: none; }
}
@media (min-width: 1000px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .steps li { padding-left: 0; padding-top: 50px; }
}
@media print {
  .site-head nav, .lang, .skip, .buttons { display: none; }
  .page-head, .hero, .site-foot { background: none; color: var(--ink); border: 0; }
  .page-head h1, .page-head .lead { color: var(--navy); }
  .site-foot { color: var(--ink); }
  .site-foot a { color: var(--ink); }
  .foot-logo { display: none; }   /* 反白 logo 在白紙上看不到 */
}
