:root {
  --navy: #102a48;
  --navy-deep: #081d34;
  --blue: #1d63ad;
  --cyan: #079db8;
  --ice: #f5f9fd;
  --pale: #eaf4fc;
  --white: #fff;
  --muted: #5e6f82;
  --line: #cfdae8;
  --shell: min(1240px, calc(100% - 96px));
  --header-height: 92px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body { margin: 0; color: var(--navy); background: var(--white); font-family: "DM Sans", "Noto Sans TC", sans-serif; font-size: 16px; line-height: 1.9; -webkit-font-smoothing: antialiased; }
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
img { display: block; max-width: 100%; }
small, sub, sup { font-size: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.container { width: var(--shell); margin-inline: auto; }
.skip-link { position: fixed; z-index: 2000; top: 10px; left: 10px; padding: 9px 16px; color: var(--white); background: var(--navy); transform: translateY(-160%); transition: transform .2s; }
.skip-link:focus { transform: none; }
.eyebrow { margin: 0; color: var(--cyan); font-size: 14px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .65s ease, transform .65s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* Header */
.site-header { position: fixed; z-index: 1000; inset: 0 0 auto; height: var(--header-height); border-bottom: 1px solid rgba(16,42,72,.14); background: rgba(255,255,255,.82); backdrop-filter: blur(16px); transition: height .3s, background .3s, box-shadow .3s; }
.site-header.is-scrolled { height: 74px; background: rgba(255,255,255,.96); box-shadow: 0 8px 30px rgba(16,42,72,.08); }
.header-inner { display: flex; align-items: center; gap: 36px; width: min(calc(100% - 64px), 1380px); height: 100%; margin: auto; }
.brand { width: 176px; flex: 0 0 auto; }
.main-nav { display: flex; align-items: center; gap: clamp(20px,2.15vw,34px); margin-left: auto; }
.main-nav a { position: relative; display: flex; align-items: baseline; gap: 5px; padding: 27px 0; white-space: nowrap; }
.main-nav a::after { position: absolute; right: 100%; bottom: 19px; left: 0; height: 1px; background: var(--blue); content: ""; transition: right .3s var(--ease); }
.main-nav a:hover::after { right: 0; }
.main-nav b { font-size: 14px; font-weight: 600; letter-spacing: .03em; }
.header-tools { display: flex; align-items: center; gap: 16px; padding-left: 22px; border-left: 1px solid var(--line); white-space: nowrap; }
.group-link { display: inline-flex; align-items: center; gap: 15px; min-height: 40px; padding: 8px 14px; border: 1px solid var(--line); font-size: 14px; }
.group-link i { font-style: normal; }
.menu-toggle { display: none; width: 42px; height: 42px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.menu-toggle i,.menu-toggle i::before,.menu-toggle i::after { display: block; width: 24px; height: 1px; background: currentColor; transition: transform .25s, opacity .25s; }
.menu-toggle i { position: relative; margin: auto; }
.menu-toggle i::before,.menu-toggle i::after { position: absolute; left: 0; content: ""; }
.menu-toggle i::before { top: -7px; }
.menu-toggle i::after { top: 7px; }
.menu-open .menu-toggle i { background: transparent; }
.menu-open .menu-toggle i::before { top: 0; transform: rotate(45deg); }
.menu-open .menu-toggle i::after { top: 0; transform: rotate(-45deg); }

/* Hero */
.legal-hero { position: relative; min-height: 590px; padding-top: var(--header-height); overflow: hidden; background: var(--pale); }
.legal-hero-media,.legal-hero-wash { position: absolute; inset: var(--header-height) 0 0; }
.legal-hero-media { background: url("../images/banner.png") center 46% / cover no-repeat; transform: scale(1.02); }
.legal-hero-wash { background: linear-gradient(90deg,#fff 0%,rgba(255,255,255,.98) 38%,rgba(234,244,252,.78) 67%,rgba(234,244,252,.18) 100%); }
.legal-hero::after { position: absolute; right: -180px; bottom: -410px; width: 680px; height: 680px; border: 1px solid rgba(255,255,255,.55); border-radius: 50%; box-shadow: 0 0 0 105px rgba(255,255,255,.08),0 0 0 210px rgba(255,255,255,.04); content: ""; }
.legal-hero-inner { position: relative; z-index: 1; display: flex; align-items: flex-end; min-height: calc(590px - var(--header-height)); padding: 90px 0 78px; }
.legal-hero-copy { width: min(920px, 82%); }
.legal-hero h1 { margin: 20px 0 29px; font-size: clamp(55px,6.2vw,90px); font-weight: 400; line-height: 1.02; letter-spacing: -.058em; }
.legal-hero h1 em { color: var(--blue); font-style: normal; }
.legal-hero-intro { display: grid; grid-template-columns: 190px minmax(0,600px); gap: 42px; padding-top: 25px; border-top: 1px solid rgba(16,42,72,.22); }
.legal-hero-intro strong { font-size: 14px; font-weight: 500; letter-spacing: .08em; line-height: 1.65; }
.legal-hero-intro p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.95; }

/* Legal content */
.legal-main { padding: 118px 0 132px; background: var(--ice); }
.legal-layout { display: grid; grid-template-columns: 260px minmax(0,820px); gap: clamp(70px,8vw,130px); align-items: start; }
.legal-aside { position: sticky; top: 112px; }
.legal-aside-label { display: grid; grid-template-columns: auto 1fr; gap: 13px; align-items: center; margin-bottom: 25px; color: #91a4b7; font-size: 14px; letter-spacing: .14em; }
.legal-aside-label i { height: 1px; background: var(--line); }
.legal-toc { border-top: 1px solid var(--line); }
.legal-toc a { display: grid; grid-template-columns: 31px 1fr; gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 14px; line-height: 1.55; transition: color .2s, padding .2s; }
.legal-toc a span { color: #96a7b8; }
.legal-toc a:hover,.legal-toc a.is-active { padding-left: 6px; color: var(--blue); }
.legal-related { margin-top: 30px; padding: 20px; color: var(--white); background: var(--navy); }
.legal-related small { display: block; color: rgba(255,255,255,.52); font-size: 14px; letter-spacing: .12em; }
.legal-related a { display: flex; justify-content: space-between; gap: 18px; margin-top: 9px; font-size: 15px; }
.legal-related i { font-style: normal; }
.legal-document { min-width: 0; }
.document-lead { margin-bottom: 64px; padding: 34px 38px; border-left: 3px solid var(--cyan); background: var(--white); box-shadow: 0 18px 48px rgba(16,42,72,.07); }
.document-lead p { margin: 0 0 12px; color: var(--muted); font-size: 16px; line-height: 2; }
.document-lead p:last-child { margin-bottom: 0; }
.legal-section { padding: 0 0 57px; margin-bottom: 57px; border-bottom: 1px solid var(--line); scroll-margin-top: 112px; }
.legal-section:last-of-type { margin-bottom: 0; }
.section-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; color: #91a4b7; font-size: 14px; letter-spacing: .14em; }
.section-meta::after { width: 54px; height: 1px; background: var(--line); content: ""; }
.legal-section h2 { margin: 0 0 27px; font-size: clamp(28px,3vw,39px); font-weight: 400; line-height: 1.35; letter-spacing: -.03em; }
.legal-section h3 { margin: 34px 0 12px; color: var(--blue); font-size: 19px; font-weight: 500; line-height: 1.6; }
.legal-section p { margin: 0 0 17px; color: var(--muted); font-size: 16px; line-height: 2; }
.legal-section ul { display: grid; gap: 9px; margin: 20px 0 23px; padding: 0; list-style: none; }
.legal-section li { position: relative; padding-left: 22px; color: var(--muted); font-size: 16px; line-height: 1.85; }
.legal-section li::before { position: absolute; top: .88em; left: 0; width: 8px; height: 1px; background: var(--cyan); content: ""; }
.legal-section strong { color: var(--navy); font-weight: 500; }
.legal-contact { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; margin-top: 65px; padding: 38px; color: var(--white); background: linear-gradient(120deg,var(--navy-deep),var(--navy) 65%,var(--blue)); }
.legal-contact p { margin: 0; font-size: 24px; line-height: 1.55; }
.legal-contact small { display: block; margin-top: 8px; color: rgba(255,255,255,.58); font-size: 14px; }
.legal-contact a { display: flex; align-items: center; justify-content: space-between; gap: 35px; min-width: 205px; padding: 16px 0; border-top: 1px solid rgba(255,255,255,.35); border-bottom: 1px solid rgba(255,255,255,.35); font-size: 14px; }
.legal-contact i { font-size: 18px; font-style: normal; }

/* Footer */
.site-footer { padding: 78px 0 22px; background: var(--white); }
.footer-main { display: grid; grid-template-columns: 1.5fr repeat(3,1fr); gap: 60px; padding-bottom: 68px; }
.footer-brand img { width: 170px; }
.footer-brand p { margin: 30px 0 0; color: var(--blue); font-size: 18px; line-height: 1.3; }
.footer-column h3 { margin: 0 0 18px; color: #8292a3; font-size: 14px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.footer-column a { display: block; margin-bottom: 8px; color: var(--muted); font-size: 14px; }
.footer-column a:hover,.footer-column a[aria-current="page"] { color: var(--blue); }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 19px; border-top: 1px solid var(--line); color: #8292a3; font-size: 14px; letter-spacing: .08em; }
.footer-bottom p { margin: 0; }

@media (max-width: 1180px) {
  :root { --shell: min(100% - 52px,1240px); }
  .header-inner { width: min(calc(100% - 44px),1380px); gap: 22px; }
  .brand { width: 150px; }
  .main-nav { gap: 20px; }
  .legal-layout { grid-template-columns: 230px minmax(0,1fr); gap: 60px; }
}

@media (max-width: 900px) {
  :root { --header-height: 76px; --shell: calc(100% - 48px); }
  html { scroll-padding-top: 96px; }
  .site-header,.site-header.is-scrolled { height: var(--header-height); }
  .brand { width: 155px; }
  .header-tools { margin-left: auto; padding: 0; border: 0; }
  .group-link { display: none; }
  .menu-toggle { display: block; }
  .main-nav { position: fixed; inset: var(--header-height) 0 0; display: flex; align-items: stretch; flex-direction: column; gap: 0; margin: 0; padding: 38px 24px; background: rgba(255,255,255,.98); visibility: hidden; opacity: 0; transform: translateY(-10px); transition: opacity .25s, transform .25s, visibility .25s; }
  .menu-open .main-nav { height: 100vh; visibility: visible; opacity: 1; transform: none; }
  .main-nav a { justify-content: space-between; width: 100%; padding: 18px 4px; border-bottom: 1px solid var(--line); }
  .main-nav a::after { display: none; }
  .main-nav b { font-size: 21px; font-weight: 400; }
  .legal-hero { min-height: 550px; }
  .legal-hero-media,.legal-hero-wash { top: var(--header-height); }
  .legal-hero-inner { min-height: calc(550px - var(--header-height)); }
  .legal-hero-copy { width: 95%; }
  .legal-layout { grid-template-columns: 1fr; gap: 65px; }
  .legal-aside { position: static; }
  .legal-toc { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border-left: 1px solid var(--line); }
  .legal-toc a { padding: 12px; border-right: 1px solid var(--line); }
  .legal-toc a:hover,.legal-toc a.is-active { padding-left: 17px; }
  .footer-main { grid-template-columns: 1.2fr 1fr 1fr; }
  .footer-column:last-child { display: none; }
}

@media (max-width: 600px) {
  :root { --shell: calc(100% - 36px); }
  .header-inner { width: calc(100% - 32px); }
  .brand { width: 140px; }
  .legal-hero { min-height: 510px; }
  .legal-hero-inner { min-height: calc(510px - var(--header-height)); padding: 75px 0 55px; }
  .legal-hero-copy { width: 100%; }
  .legal-hero-media { background-position: 62% center; }
  .legal-hero-wash { background: linear-gradient(90deg,rgba(255,255,255,.98),rgba(234,244,252,.88)); }
  .legal-hero h1 { margin: 16px 0 24px; font-size: clamp(42px,13vw,52px); line-height: 1.05; }
  .legal-hero-intro { grid-template-columns: 1fr; gap: 10px; padding-top: 18px; }
  .legal-hero-intro p { font-size: 14px; line-height: 1.85; }
  .legal-main { padding: 75px 0 88px; }
  .legal-layout { gap: 52px; }
  .legal-toc { grid-template-columns: 1fr; }
  .legal-toc a { grid-template-columns: 30px 1fr; }
  .document-lead { margin-bottom: 50px; padding: 27px 24px; }
  .document-lead p { font-size: 15px; line-height: 1.9; }
  .legal-section { padding-bottom: 44px; margin-bottom: 44px; scroll-margin-top: 92px; }
  .legal-section h2 { margin-bottom: 22px; font-size: 28px; }
  .legal-section h3 { margin-top: 28px; font-size: 18px; }
  .legal-section p,.legal-section li { font-size: 15px; }
  .legal-contact { grid-template-columns: 1fr; padding: 29px 24px; }
  .legal-contact p { font-size: 22px; }
  .legal-contact a { width: 100%; min-width: 0; }
  .footer-main { grid-template-columns: 1fr; gap: 35px; padding: 60px 0 48px; }
  .footer-brand { padding-bottom: 10px; }
  .footer-column { padding-top: 22px; border-top: 1px solid var(--line); }
  .footer-column:last-child { display: block; }
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: 10px; }
}

@media (max-width: 560px) {
  .legal-hero { height: auto; min-height: 700px; max-height: none; }
  .legal-hero-inner { min-height: calc(700px - var(--header-height)); }
}

@media print {
  :root { --shell: 100%; }
  html { scroll-behavior: auto; }
  body { color: #111; background: #fff; font-family: "Noto Sans TC", sans-serif; }
  .site-header,.legal-aside,.legal-contact,.site-footer { display: none !important; }
  .legal-hero { min-height: 0; padding: 0 0 28px; background: #fff; }
  .legal-hero-media,.legal-hero-wash,.legal-hero::after { display: none; }
  .legal-hero-inner { display: block; min-height: 0; padding: 0; }
  .legal-hero-copy { width: 100%; }
  .legal-hero h1 { margin: 0 0 18px; font-size: 32px; letter-spacing: 0; }
  .legal-hero-intro { display: block; padding-top: 14px; }
  .legal-main { padding: 0; background: #fff; }
  .legal-layout { display: block; }
  .document-lead { padding: 18px 20px; box-shadow: none; }
  .legal-section { break-inside: avoid; scroll-margin-top: 0; }
  .reveal { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
