/* Kids Safe PC — shared styles
   Plain CSS, no build step. Light & dark aware. */

:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #f0f2f7;
  --border: #e2e6ee;
  --text: #1a2233;
  --text-muted: #5a6478;
  --brand: #2f6df6;
  --brand-ink: #1b4fd1;
  --accent: #12a594;
  --warn-bg: #fff6e6;
  --warn-border: #f2c66a;
  --warn-ink: #7a5200;
  --danger: #d6455d;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20, 30, 60, .05), 0 8px 24px rgba(20, 30, 60, .06);
  --maxw: 1000px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1220;
    --surface: #161b2e;
    --surface-2: #1d2438;
    --border: #2a3450;
    --text: #e8ecf6;
    --text-muted: #9aa5bd;
    --brand: #6b9bff;
    --brand-ink: #9bbcff;
    --accent: #3fd0bd;
    --warn-bg: #2e2413;
    --warn-border: #6b5320;
    --warn-ink: #f2c66a;
    --danger: #ff7a90;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-ink); }

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

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 62px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  font-size: 1.05rem;
  letter-spacing: -.01em;
}
.brand .logo {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border-radius: 9px;
  color: #fff; font-size: 17px;
}
.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
  align-items: center;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: .92rem;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--brand-ink); background: color-mix(in srgb, var(--brand) 12%, transparent); }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--text);
  cursor: pointer;
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 62px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 14px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 12px; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 64px 0 40px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: 0 0 16px;
}
.hero p.lead {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 28px;
}
.hero .cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .98rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .08s, box-shadow .15s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--brand-ink); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }

/* ---------- Sections ---------- */
section { padding: 24px 0; }
.section-title {
  font-size: 1.5rem;
  letter-spacing: -.01em;
  margin: 8px 0 6px;
}
.section-sub { color: var(--text-muted); margin: 0 0 24px; }

/* ---------- Card grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow);
  transition: transform .12s, border-color .15s;
}
a.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.card .ico {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 11px;
  font-size: 22px;
  background: var(--surface-2);
  margin-bottom: 4px;
}
.card h3 { margin: 0; font-size: 1.12rem; }
.card p { margin: 0; color: var(--text-muted); font-size: .95rem; }
.card .meta { margin-top: auto; font-size: .82rem; color: var(--brand-ink); font-weight: 600; padding-top: 6px; }

/* ---------- Guide layout ---------- */
.guide {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  padding: 36px 0 60px;
  align-items: start;
}
.toc {
  position: sticky;
  top: 82px;
  font-size: .9rem;
}
.toc h4 {
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .72rem;
  color: var(--text-muted);
  margin: 0 0 10px;
}
.toc a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  padding: 5px 10px;
  border-left: 2px solid var(--border);
  border-radius: 0 6px 6px 0;
}
.toc a:hover { color: var(--text); background: var(--surface-2); }
.toc a.active { color: var(--brand-ink); border-left-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }

.article { min-width: 0; }
.article h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); letter-spacing: -.02em; margin: 0 0 6px; }
.article .subtitle { color: var(--text-muted); font-size: 1.1rem; margin: 0 0 28px; }
.article h2 {
  font-size: 1.35rem;
  margin: 44px 0 12px;
  padding-top: 8px;
  letter-spacing: -.01em;
  scroll-margin-top: 82px;
}
.article h3 { font-size: 1.08rem; margin: 26px 0 8px; }
.article p, .article li { color: var(--text); }
.article ul, .article ol { padding-left: 22px; }
.article li { margin: 6px 0; }
.article li::marker { color: var(--brand); }

.badge {
  display: inline-block;
  font-size: .74rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.badge.time { color: var(--accent); }

/* Steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 12px 0; }
.steps > li {
  position: relative;
  padding: 2px 0 18px 46px;
  margin: 0;
  border-left: 2px solid var(--border);
  margin-left: 15px;
}
.steps > li:last-child { border-left-color: transparent; }
.steps > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: -16px; top: -2px;
  width: 30px; height: 30px;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: .85rem; font-weight: 700;
}
.steps > li strong { display: block; margin-bottom: 2px; }

/* Callouts */
.note, .warn, .tip {
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 18px 0;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: .95rem;
}
.note { border-left: 4px solid var(--brand); }
.tip { border-left: 4px solid var(--accent); }
.warn {
  border-left: 4px solid var(--warn-border);
  background: var(--warn-bg);
  color: var(--warn-ink);
}
/* Only the leading strong is the callout's heading; bold used mid-sentence stays inline. */
.note > strong:first-child,
.warn > strong:first-child,
.tip > strong:first-child { display: block; margin-bottom: 3px; }

code {
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: .88em;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}

.path {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: .86em;
  background: var(--surface-2);
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 32px 0;
  color: var(--text-muted);
  font-size: .9rem;
}
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--text-muted); }

.disclaimer {
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text-muted);
  font-size: .88rem;
  margin: 28px 0 0;
}

@media (max-width: 860px) {
  .guide { grid-template-columns: 1fr; gap: 12px; }
  .toc { position: static; margin-bottom: 12px; }
  .toc-list { display: flex; flex-wrap: wrap; gap: 4px; }
  .toc a { border-left: none; border: 1px solid var(--border); border-radius: 8px; }
}

.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 0; }

/* ---------- Settings tables ---------- */
.tbl {
  overflow-x: auto;
  margin: 14px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.tbl table {
  border-collapse: collapse;
  width: 100%;
  min-width: 620px;
  font-size: .9rem;
}
.tbl th,
.tbl td {
  text-align: left;
  vertical-align: top;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
}
.tbl thead th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl td:first-child { font-weight: 600; }
.tbl td .why {
  display: block;
  margin-top: 3px;
  font-weight: 400;
  color: var(--text-muted);
  font-size: .85rem;
}
.tbl .val { white-space: nowrap; }

/* Verdict colouring for recommended values */
.v-block { color: var(--warn-ink); font-weight: 700; }
.v-friends { color: var(--brand-ink); font-weight: 700; }
.v-open { color: var(--text-muted); font-weight: 600; }

.tbl-note {
  color: var(--text-muted);
  font-size: .86rem;
  margin: -4px 0 18px;
}

@media (max-width: 860px) {
  .tbl table { min-width: 560px; }
}

/* ---------- Downloads ---------- */
.dl-list { display: grid; gap: 10px; margin: 14px 0 6px; }

.dl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 14px 16px;
}

.dl-info { min-width: 0; flex: 1 1 260px; }
.dl-info strong { display: block; }
.dl-info .dl-meta {
  color: var(--text-muted);
  font-size: .86rem;
  margin-top: 3px;
}
.dl .btn { flex: 0 0 auto; }

.dl-size {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: .82rem;
  color: var(--text-muted);
}
