@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;600;700&display=swap");

:root {
  --bg: #f6f5f2;
  --paper: #fffefd;
  --ink: #1c1b18;
  --ink-soft: #5c5a54;
  --muted: #7a7872;
  --line: #e2e0da;
  --line-dark: #c9c6be;
  --orange: #c56e3c;
  --orange-soft: #fff1e8;
  --teal: #315f61;
  --teal-soft: #e8f1f0;
  --footer: #171715;
  --footer-text: #f4f3f0;
  --type-section: clamp(24px, 2.8vw, 30px);
  --type-title: 18px;
  --type-body: 16px;
  --type-meta: 13px;
  --radius-lg: 20px;
  --sans: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(23, 23, 21, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 23, 21, .028) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
}
a { color: inherit; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 16px 0 0;
  background: linear-gradient(180deg, rgba(244, 243, 240, .97) 72%, rgba(244, 243, 240, 0));
  backdrop-filter: blur(10px);
}
.nav-inner {
  min-height: 54px;
  padding: 0 2px 14px;
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid rgba(185, 182, 174, .72);
}
.brand {
  display: inline-flex;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0;
}
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a {
  padding: 8px 11px;
  border-radius: 9px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}
.nav-links a:hover { background: #f2f0eb; color: var(--ink); }
.nav-links .nav-cta {
  margin-left: 8px;
  padding-inline: 14px;
  border: 1px solid rgba(215, 123, 69, .56);
  border-radius: 999px;
  background: rgba(255, 254, 253, .48);
  color: #b95f2c;
}
.nav-links .nav-cta:hover { border-color: var(--orange); background: var(--orange-soft); color: #a44f21; }

.back {
  display: inline-flex;
  margin: 28px 0 18px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}
.back:hover { color: var(--ink); }

.case-hero { max-width: 720px; }
.keep-together { display: inline-block; }
.kicker { margin: 0 0 10px; color: var(--orange); font: 600 12px/1.5 var(--sans); letter-spacing: .06em; }
.case-hero h1 {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: 0;
  text-wrap: pretty;
}
.lead {
  max-width: 42em;
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.85;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.tag {
  padding: 6px 10px;
  border: 1px solid #cbd8d6;
  border-radius: 999px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 500;
}
.tag.warm { border-color: #edd2c1; color: #a75a2d; background: #fffaf6; }

.cover {
  position: relative;
  height: 280px;
  margin: 28px 0 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background-color: #f4f2ed;
  background-image:
    linear-gradient(rgba(23,23,21,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23,23,21,.04) 1px, transparent 1px);
  background-size: 15px 15px;
}
.mini-ui {
  position: relative;
  z-index: 2;
  width: min(420px, 78%);
  min-height: 150px;
  padding: 18px;
  border: 1px solid rgba(23,23,21,.14);
  border-radius: 16px;
  background: rgba(255,255,255,.9);
}
.mini-top { display: flex; gap: 4px; margin-bottom: 14px; }
.mini-top i { width: 6px; height: 6px; border-radius: 50%; background: #cbc8c0; }
.cover-hermes { background-color: #e7efed; }
.agent-map { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; align-items: center; margin-top: 18px; }
.agent-dot { aspect-ratio: 1; display: grid; place-items: center; border: 1px solid #aac2bd; border-radius: 50%; background: white; color: var(--teal); font: 700 12px/1 var(--mono); }
.agent-line { height: 1px; margin: 14px 5% 0; background: #aac2bd; }
.cover-scale { background-color: #f5eadf; }
.scale-display { width: 78%; margin: 8px auto 13px; padding: 8px 10px; border-radius: 7px; background: #242521; color: #d9f09b; text-align: right; font: 700 18px/1 var(--mono); }
.bars { display: flex; align-items: end; gap: 5px; height: 42px; padding: 0 10px; }
.bars i { flex: 1; height: var(--h); border-radius: 3px 3px 0 0; background: var(--orange); }
.cover-dispatch { background-color: #edeaf4; }
.dispatch-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.dispatch-grid i { height: 22px; border-radius: 4px; background: #e7e4df; }
.dispatch-grid i:nth-child(3n+1) { background: #cfc4e7; }
.dispatch-grid i:nth-child(5) { background: var(--orange); }
.cover-lims { background-color: #e6eef4; }
.rows { display: grid; gap: 9px; }
.row { height: 12px; border-radius: 3px; background: #e5e3de; }
.row::before { content: ""; display: block; width: var(--w); height: 100%; border-radius: inherit; background: #7294ad; }
.cover-pdf { background-color: #f3e8e5; }
.pdf-flow { display: flex; align-items: center; justify-content: center; gap: 14px; height: 96px; }
.doc { width: 52px; height: 68px; display: grid; place-items: center; border: 1px solid #dfaaa0; border-radius: 6px; background: white; color: #bb5647; font: 800 11px/1 var(--mono); }
.flow-arrow { color: var(--muted); font-size: 26px; }
.code-box { padding: 10px 12px; border-radius: 7px; background: #252521; color: #f0c99e; font: 700 11px/1.4 var(--mono); }
.cover-dashboard { background-color: #e7eee7; }
.dashboard { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dash-panel { min-height: 72px; padding: 10px; border-radius: 6px; background: #eef1eb; }
.dash-panel:first-child { background: #d9e6d8; }
.spark { height: 40px; border-bottom: 2px solid #58835e; transform: skewY(-12deg); }
.donut { width: 42px; height: 42px; margin: 8px auto; border: 9px solid #9db49e; border-right-color: var(--orange); border-radius: 50%; }
.cover-leave { background-color: #eef0e3; }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.calendar i { aspect-ratio: 1; border-radius: 3px; background: #ebe9e3; }
.calendar i:nth-child(10), .calendar i:nth-child(17), .calendar i:nth-child(19) { background: #e7a472; }
.calendar i:nth-child(12), .calendar i:nth-child(25) { background: #89aaa4; }
.cover-excel { background-color: #e3efe9; }
.formula { margin-bottom: 9px; padding: 8px 10px; border-radius: 4px; background: #e8eee9; color: #28704e; font: 700 12px/1 var(--mono); }
.sheet { display: grid; grid-template-columns: repeat(5,1fr); gap: 4px; }
.sheet i { height: 12px; border-radius: 2px; background: #e5e3dd; }
.sheet i:nth-child(5n+1) { background: #8bb39d; }

.case-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(240px, .72fr);
  gap: clamp(36px, 6vw, 72px);
  align-items: start;
  margin: 48px 0 80px;
}
.prose h2 {
  margin: 32px 0 10px;
  font-family: var(--sans);
  font-size: var(--type-section);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
}
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li {
  color: var(--ink-soft);
  font-size: var(--type-body);
  line-height: 1.8;
}
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 14px; padding-left: 1.2em; }
.prose li { margin: 0 0 8px; }
.prose strong { color: var(--ink); font-weight: 700; }

.side-card {
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
}
.side-card + .side-card { margin-top: 14px; }
.side-card h2 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}
.meta { display: grid; gap: 10px; }
.meta div { display: grid; gap: 3px; }
.meta dt { color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.meta dd { margin: 0; font-size: 14px; font-weight: 600; }
.side-card p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.65; }

footer { padding: 30px 0 32px; background: var(--footer); color: var(--footer-text); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.footer-name { font-size: 16px; font-weight: 700; }
.footer-meta { margin-top: 5px; color: rgba(244,243,240,.56); font-size: var(--type-meta); }
.footer-actions { display: flex; align-items: center; gap: 28px; }
.footer-contact-link { padding-bottom: 3px; border-bottom: 1px solid rgba(244,243,240,.34); color: var(--footer-text); font-size: 14px; font-weight: 500; text-decoration: none; }
.footer-links { display: flex; align-items: center; gap: 16px; }
.footer-links a { color: rgba(244,243,240,.68); font-size: 13px; font-weight: 500; text-decoration: none; }
.footer-links a:hover { color: var(--footer-text); }

@media (max-width: 980px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .case-layout { grid-template-columns: 1fr; margin-top: 36px; }
}
@media (max-width: 700px) {
  .shell { width: min(100% - 24px, 1180px); }
  .cover { height: 220px; }
  .case-hero h1 { font-size: 26px; line-height: 1.35; }
  footer .footer-inner { flex-direction: column; align-items: flex-start; gap: 22px; }
}
