:root {
  color-scheme: light;
  --ink: #14213d;
  --muted: #526070;
  --line: #d9e2ec;
  --blue: #1464a5;
  --teal: #0f9f9a;
  --green: #3f8f5f;
  --amber: #c88719;
  --bg: #f7fafc;
  --panel: #ffffff;
  --soft: #eef6f7;
  --shadow: 0 18px 48px rgba(20, 33, 61, .12);
  --code: #0d1726;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Microsoft JhengHei", "Noto Sans TC", "Noto Sans SC", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3, p, .lead { overflow-wrap: anywhere; }
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 66px;
  padding: 12px 56px;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.28);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: .95rem;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--blue); }
.nav-cta {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 6px;
  color: #fff;
  background: var(--blue);
  font-weight: 700;
}
.lang-switch {
  display: inline-flex;
  gap: 6px;
  padding-left: 4px;
  color: var(--muted);
}
.lang-switch a {
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: .84rem;
}
.lang-switch a.active {
  color: #fff;
  border-color: var(--teal);
  background: var(--teal);
}
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(9, 28, 50, .88) 0%, rgba(9, 28, 50, .72) 44%, rgba(9, 28, 50, .2) 100%),
    var(--hero-image, url("/assets/hrm-dashboard-hero.png")) center right / cover no-repeat;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 120px;
  background: linear-gradient(180deg, rgba(247,250,252,0), var(--bg));
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  min-height: var(--hero-height, 620px);
  display: flex;
  align-items: center;
  padding: 88px 56px 116px;
  margin: 0 auto;
}
.hero-copy { width: min(720px, 100%); min-width: 0; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-weight: 700;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: var(--teal);
}
h1 {
  margin: 0 0 18px;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: 0;
}
.lead {
  margin: 0 0 30px;
  color: rgba(255,255,255,.9);
  font-size: 1.18rem;
}
.actions, .cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 6px;
  font-weight: 700;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(10px);
}
.button.primary { border-color: var(--teal); color: #fff; background: var(--teal); }
.button.light { border-color: var(--line); color: var(--ink); background: #fff; }
main { background: var(--bg); }
section { padding: 68px 56px; }
.section-inner { max-width: 1180px; margin: 0 auto; }
.section-head { max-width: 880px; margin: 0 auto 30px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.section-head h2, h2 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  line-height: 1.2;
  letter-spacing: 0;
}
.section-head p, .muted { margin: 0; color: var(--muted); font-size: 1.04rem; }
.feature-grid, .focus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.modules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.feature-card, .module, .focus, .access-item, .doc-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(20,33,61,.06);
}
.feature-card img, .module img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #e7eef3;
}
.feature-body, .module-body, .focus, .access-item, .doc-card { padding: 22px; }
.feature-body strong, .focus strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.12rem;
}
.module h3 { margin: 0 0 8px; font-size: 1.35rem; line-height: 1.3; }
.feature-body p, .module p, .focus p, .access-item p, .doc-card p { margin: 0; color: var(--muted); }
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: #16656a;
  font-size: .88rem;
  font-weight: 700;
}
.metric-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  max-width: 1180px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}
.metric { min-height: 132px; padding: 24px; background: #fff; }
.metric span { display: block; color: var(--teal); font-size: 1.55rem; font-weight: 800; line-height: 1.2; }
.metric small { display: block; margin-top: 6px; color: var(--muted); font-size: .95rem; }
.workflow, .flow-wrap {
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.workflow-inner {
  display: grid;
  grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr);
  gap: 32px;
  align-items: start;
}
.workflow-copy p { margin: 0 0 20px; color: var(--muted); }
.list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.list li { padding-left: 16px; border-left: 4px solid var(--teal); color: var(--muted); }
.visual-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.visual-stack img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: #e7eef3;
}
.access {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.link-button {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin-top: 16px;
  padding: 9px 14px;
  border-radius: 6px;
  color: #fff;
  background: var(--blue);
  font-weight: 700;
}
.flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}
.step { min-height: 190px; padding: 22px; background: #fff; }
.step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  border-radius: 8px;
  color: #fff;
  background: var(--teal);
  font-weight: 800;
}
.step strong { display: block; margin-bottom: 8px; color: var(--blue); font-size: 1.05rem; }
.step p { margin: 0; color: var(--muted); }
.doc-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  max-width: 1080px;
  margin: 0 auto;
}
.toc {
  position: sticky;
  top: 84px;
  align-self: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.toc a { display: block; padding: 7px 0; color: var(--muted); font-size: 14px; }
.doc { display: grid; gap: 18px; }
code { font-family: Consolas, "Courier New", monospace; }
pre {
  overflow: auto;
  margin: 12px 0 0;
  padding: 16px;
  border-radius: 8px;
  color: #e6edf3;
  background: var(--code);
  line-height: 1.5;
}
table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th, td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #eef6f7; }
.notice { padding: 14px 16px; border-left: 4px solid var(--amber); background: #fff7e6; color: #62420e; }
.notice.ok { border-left-color: var(--teal); background: #edfafa; color: #0d5553; }
footer {
  padding: 30px 56px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
}
@media (max-width: 980px) {
  .nav { padding: 12px 28px; align-items: flex-start; flex-direction: column; gap: 12px; }
  .nav-links { flex-wrap: wrap; white-space: normal; }
  .hero-inner { min-height: 560px; padding: 76px 28px 96px; }
  section { padding: 56px 28px; }
  .feature-grid, .metric-band, .flow, .focus-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow-inner, .doc-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
  .access { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .hero {
    background:
      linear-gradient(90deg, rgba(9,28,50,.9) 0%, rgba(9,28,50,.72) 100%),
      var(--hero-image, url("/assets/hrm-dashboard-hero.png")) center / cover no-repeat;
  }
  .hero-inner { min-height: 500px; padding: 58px 20px 76px; }
  .lead { font-size: 1rem; }
  section { padding: 46px 20px; }
  .feature-grid, .metric-band, .modules, .flow, .focus-grid, .visual-stack { grid-template-columns: 1fr; }
  footer { padding: 24px 20px; }
}
