/* SvrGuard official site stylesheet — no external assets, system fonts only */

:root {
  --navy: #0d1b2a;
  --navy-2: #16283c;
  --accent: #2e9e6b;
  --accent-dark: #237a52;
  --danger: #c0392b;
  --ink: #1f2933;
  --ink-soft: #52606d;
  --line: #e4e7eb;
  --bg-soft: #f5f7fa;
  --max-w: 1080px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC",
    "Microsoft JhengHei", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  line-height: 1.7;
  background: #fff;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  letter-spacing: .02em;
}
/* The shield sits to the RIGHT of the wordmark. Sized in em so it tracks the
   wordmark instead of needing its own breakpoint. */
.brand-logo { height: 1.25em; width: auto; display: block; }
/* The shield above the homepage headline. Centred because the hero is. */
.hero-logo { display: block; margin: 0 auto 12px; height: 84px; width: auto; }
.brand:hover { text-decoration: none; }
.brand .dot { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a { color: #c9d4e0; font-size: .95rem; }
.site-nav a:hover { color: #fff; text-decoration: none; }
.site-nav a.active { color: #fff; border-bottom: 2px solid var(--accent); padding-bottom: 2px; }
.lang-switch {
  border: 1px solid #3a4d63;
  border-radius: 4px;
  padding: 2px 10px;
  font-size: .85rem;
  color: #c9d4e0;
}
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 70%);
  color: #fff;
  padding: 40px 0 32px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.6rem, 4.5vw, 2.6rem);
  line-height: 1.35;
  max-width: 800px;
  margin: 0 auto 18px;
}
.hero .sub {
  color: #aebdcc;
  font-size: 1.08rem;
  max-width: 680px;
  margin: 0 auto 30px;
}
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { border: 1px solid #55677c; color: #dfe7ee; }
.btn-ghost:hover { border-color: #fff; color: #fff; }

/* ---------- stat strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats > div { background: #fff; text-align: center; padding: 26px 10px; }
.stats .num { font-size: 2rem; font-weight: 700; color: var(--navy); }
.stats .lbl { color: var(--ink-soft); font-size: .9rem; }
.stats .note {
  grid-column: 1 / -1;
  background: var(--bg-soft);
  padding: 8px;
  font-size: .8rem;
  color: var(--ink-soft);
}

/* ---------- sections ---------- */
section.block { padding: 60px 0; }
section.block.alt { background: var(--bg-soft); }
.block h2 {
  font-size: 1.7rem;
  margin-bottom: 8px;
  color: var(--navy);
}
.block .lead { color: var(--ink-soft); margin-bottom: 28px; max-width: 760px; }
.block p { margin-bottom: 14px; max-width: 800px; }

.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 24px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}
.card h3 { font-size: 1.08rem; margin-bottom: 8px; color: var(--navy); }
.card p { font-size: .95rem; color: var(--ink-soft); margin-bottom: 0; }
.card .step-no {
  display: inline-block;
  width: 30px; height: 30px;
  line-height: 30px;
  text-align: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  margin-bottom: 10px;
}

/* ---------- screenshot frame ---------- */
.shot {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin: 20px 0;
  box-shadow: 0 6px 24px rgba(13, 27, 42, .08);
}
.shot img { width: 100%; }
.shot .caption {
  padding: 8px 14px;
  font-size: .85rem;
  color: var(--ink-soft);
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
}

/* ---------- boundary list ---------- */
.boundary { list-style: none; margin-top: 20px; }
.boundary li {
  padding: 12px 0 12px 34px;
  position: relative;
  border-bottom: 1px solid var(--line);
  max-width: 800px;
}
.boundary li::before {
  content: "✕";
  position: absolute;
  left: 4px;
  color: var(--danger);
  font-weight: 700;
}
.boundary li.yes::before { content: "✓"; color: var(--accent); }
.boundary li strong { color: var(--navy); }

/* ---------- pricing ---------- */
.price-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 30px 0;
  max-width: 760px;
}
.price-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px;
  background: #fff;
}
.price-card.pro { border: 2px solid var(--accent); position: relative; }
.price-card .tier { font-size: 1.1rem; font-weight: 700; color: var(--navy); }
.price-card .amount { font-size: 2.2rem; font-weight: 700; margin: 8px 0 2px; color: var(--navy); }
.price-card .per { color: var(--ink-soft); font-size: .9rem; margin-bottom: 16px; }
.price-card ul { list-style: none; }
.price-card li { padding: 7px 0 7px 26px; position: relative; font-size: .95rem; }
.price-card li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.price-card li.no { color: #9aa5b1; }
.price-card li.no::before { content: "—"; color: #9aa5b1; }

table.cmp {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
  margin: 24px 0;
}
table.cmp th, table.cmp td {
  border: 1px solid var(--line);
  padding: 10px 14px;
  text-align: left;
}
table.cmp th { background: var(--bg-soft); color: var(--navy); }
table.cmp td.c { text-align: center; }
.table-scroll { overflow-x: auto; }

/* ---------- code / install ---------- */
pre.code {
  background: var(--navy);
  color: #d7e3ee;
  border-radius: 8px;
  padding: 16px 20px;
  overflow-x: auto;
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
  font-size: .9rem;
  line-height: 1.6;
  margin: 12px 0 20px;
}
pre.code .cm { color: #7d93a8; }

/* ---------- legal pages ---------- */
.legal h2 { font-size: 1.25rem; margin: 30px 0 10px; }
.legal p, .legal li { max-width: 800px; color: var(--ink); }
.legal ul, .legal ol { margin: 0 0 14px 24px; }
.legal .updated { color: var(--ink-soft); font-size: .9rem; margin-bottom: 26px; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--navy);
  color: #8ea1b5;
  padding: 36px 0;
  font-size: .88rem;
  margin-top: 40px;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.site-footer a { color: #c9d4e0; margin-right: 18px; }

/* ---------- ordered steps inside a content block ----------
   The global reset strips list indentation, which left the marker and the
   paragraph after the list at almost the same x: a warning that followed a
   two-step list read as part of step 2. Indent the list so that what comes
   after it is visibly outside it.

   ⚠️ Ordered lists only. `.block ul` would also catch the pricing cards and
   the .boundary lists, which set their own list-style. */
.block ol:not(.steps) { margin: 0 0 14px 26px; }
.block ol:not(.steps) li { margin-bottom: 6px; }

/* ---------- anchor targets under a sticky header ----------
   The header is position:sticky, so jumping to #dsm-update or #no-browser
   lands the target underneath it: the heading a reader was sent to is the
   one thing they cannot see. Keep this above the header's own height. */
[id] { scroll-margin-top: 76px; }

/* ---------- platform picker (download page) ----------
   The picker is drawn by JS. Without JS every panel stays visible, which is
   the pre-2026-09-14 page: longer, but nothing is hidden behind a control
   that cannot be operated. */
.plat-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 26px;
}
/* ⚠️ `display: flex` overrides the `hidden` attribute, which is how the
   picker ships. Without this rule a reader with no JavaScript sees a row of
   buttons that switch nothing. */
.plat-pick[hidden] { display: none; }
.plat-pick button {
  font: inherit;
  font-size: .95rem;
  padding: 9px 16px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  border-radius: 6px;
  cursor: pointer;
}
.plat-pick button:hover { border-color: var(--accent); color: var(--ink); }
.plat-pick button[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* Panels carry their own heading, so a hidden one must take no space at all
   rather than collapse to an empty gap. */
.plat-panel[hidden] { display: none; }

/* The label that names which package a panel is about; without it a reader
   who arrives at #dsm-update cannot tell which tab they landed on. */
.plat-panel > h3:first-child { color: var(--navy); margin-bottom: 10px; }

/* ---------- version badge ----------
   Absent until the manifest answers. It is additive information: a page that
   printed "version unknown" would be saying something nobody asked. */
.ver {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent-dark);
  background: #e8f5ee;
  border-radius: 10px;
  vertical-align: middle;
}

/* ---------- collapsible detail ----------
   Written as <details open> in the markup so that a reader without JS sees
   everything. site.js closes them on load. */
details.fold {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 14px;
  max-width: 800px;
}
details.fold > summary {
  cursor: pointer;
  color: var(--accent-dark);
  font-size: .95rem;
  list-style: none;
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform .15s;
}
details.fold[open] > summary::before { content: "▾ "; }
details.fold > summary:hover { text-decoration: underline; }
details.fold > *:not(summary) { margin-top: 12px; }

/* ---------- numbered steps (start page) ---------- */
.steps { list-style: none; counter-reset: step; margin: 0; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 26px 52px;
  border-left: 2px solid var(--line);
  margin-left: 15px;
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: -16px;
  top: -2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps h3 { font-size: 1.05rem; color: var(--navy); margin-bottom: 6px; }
.steps p { margin-bottom: 10px; }

/* A sentence the reader must not skim past: the bind flow has a last button
   that is easy to miss, and missing it silently leaves the host unbound. */
.warn-note {
  border-left: 3px solid var(--danger);
  background: #fdf3f2;
  padding: 10px 14px;
  font-size: .95rem;
  max-width: 800px;
  margin-bottom: 12px;
}

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .plat-pick { gap: 6px; }
  .plat-pick button { padding: 8px 12px; font-size: .9rem; }
  .steps > li { padding-left: 44px; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 56px; left: 0; right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 14px 20px 20px;
    gap: 14px;
  }
  .site-nav.open { display: flex; }
  .hero { padding: 48px 0 40px; }
}
