/* NetScan website - "Blueprint" design. Plain CSS, no build step. */

/* ---------- Theme tokens ---------- */
:root {
  color-scheme: light;
  --bg: #eef3fb;
  --fg: #0f1f3d;
  --dim: #44587c;
  --line: #c6d3ea;
  --acc: #2158d6;
  --acc2: #0b7372;
  --teal: #0ea5a4;
  --card: rgba(255, 255, 255, .82);
  --card-solid: #ffffff;
  --grid: #d9e3f3;
  --btn: #2563eb;
  --btn-fg: #ffffff;
  --code: #e3eaf7;
  --shadow: 0 1px 2px rgba(15, 31, 61, .06), 0 12px 32px -12px rgba(15, 31, 61, .22);
  --coffee: #ffdd00;
  --coffee-fg: #1a1a1a;
  --warn-bg: #fff6db;
  --warn-line: #e8c96a;
  --radius: 14px;
  --gutter: 16px;
  --max: 1080px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1226;
  --fg: #e4edff;
  --dim: #9aaed4;
  --line: #22396c;
  --acc: #7aa7ff;
  --acc2: #3ddbd0;
  --teal: #3ddbd0;
  --card: rgba(14, 27, 58, .82);
  --card-solid: #0e1b3a;
  --grid: #12214a;
  --btn: #2a62e0;
  --btn-fg: #ffffff;
  --code: #15264d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -14px rgba(0, 0, 0, .7);
  --warn-bg: #2a2410;
  --warn-line: #6b5a1c;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a1226;
    --fg: #e4edff;
    --dim: #9aaed4;
    --line: #22396c;
    --acc: #7aa7ff;
    --acc2: #3ddbd0;
    --teal: #3ddbd0;
    --card: rgba(14, 27, 58, .82);
    --card-solid: #0e1b3a;
    --grid: #12214a;
    --btn: #2a62e0;
    --btn-fg: #ffffff;
    --code: #15264d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -14px rgba(0, 0, 0, .7);
    --warn-bg: #2a2410;
    --warn-line: #6b5a1c;
  }
}

/* Theme-matched images: .only-light / .only-dark (logo, screenshots). Follows the toggle too. */
.only-dark { display: none !important; }
:root[data-theme="dark"] .only-light { display: none !important; }
:root[data-theme="dark"] .only-dark { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-light { display: none !important; }
  :root:not([data-theme="light"]) .only-dark { display: block !important; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background-color: var(--bg);
  color: var(--fg);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--acc); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--acc); outline-offset: 2px; border-radius: 4px; }
code, kbd, .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .92em; }
code { background: var(--code); padding: .1em .35em; border-radius: 5px; overflow-wrap: anywhere; }
kbd {
  display: inline-block; min-width: 1.7em; text-align: center;
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px;
  background: var(--card-solid); padding: 0 .4em; line-height: 1.6;
}
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h2 { font-size: clamp(24px, 3.4vw, 30px); margin: 0 0 6px; }
h3 { font-size: 18px; margin: 0 0 6px; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.dim, .lead { color: var(--dim); }
.lead { font-size: 18px; max-width: 60ch; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--gutter); top: -60px; z-index: 100;
  background: var(--btn); color: var(--btn-fg); padding: 10px 16px; border-radius: 10px; font-weight: 600;
}
.skip-link:focus { top: 10px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .site-header { background: var(--bg); }
}
.header-inner { display: flex; align-items: center; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; margin-right: auto;
  color: var(--fg); text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: .01em;
}
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  display: block; padding: 6px 10px; border-radius: 8px; color: var(--dim); text-decoration: none; font-weight: 500;
}
.site-nav a:hover { color: var(--fg); background: var(--card); }
.site-nav a[aria-current="page"] { color: var(--fg); background: var(--card); box-shadow: inset 0 -2px 0 var(--acc); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  background: var(--card); border: 1px solid var(--line); color: var(--fg);
  border-radius: 10px; cursor: pointer; font-size: 18px; line-height: 1; padding: 0;
}
.icon-btn:hover { border-color: var(--acc); }
.nav-toggle { display: none; }
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 900px) {
  .js .nav-toggle { display: inline-grid; }
  .js .site-nav { order: 10; flex-basis: 100%; display: none; padding: 0 0 12px; }
  .js .site-nav.open { display: block; }
  .js .site-nav ul { flex-direction: column; gap: 2px; }
  .js .site-nav a { padding: 10px 12px; }
  .site-nav { order: 10; flex-basis: 100%; }
}
@media (max-width: 480px) {
  .btn-coffee .label-long { display: none; }
}
@media (min-width: 481px) {
  .btn-coffee .label-short { display: none; }
}
@media (max-width: 400px) {
  /* Icon only on the narrowest phones; the text stays for screen readers. */
  .site-header .btn-coffee { padding: 8px 10px; }
  .site-header .btn-coffee .label-short {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .brand { font-size: 17px; gap: 8px; }
  .header-inner { gap: 8px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--fg); font-weight: 600; text-decoration: none;
  font-size: 16px; line-height: 1.3; cursor: pointer; text-align: center;
}
.btn:hover { border-color: var(--acc); text-decoration: none; }
.btn.primary { background: var(--btn); border-color: var(--btn); color: var(--btn-fg); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.is-disabled, .btn[aria-disabled="true"] {
  background: transparent; color: var(--dim); border-style: dashed; cursor: not-allowed; filter: none;
}
.btn-coffee {
  background: var(--coffee); border-color: var(--coffee); color: var(--coffee-fg);
}
.btn-coffee:hover { filter: brightness(1.04); border-color: #e0c200; }
.btn-coffee svg { width: 18px; height: 18px; flex: none; }
.site-header .btn-coffee { padding: 8px 14px; font-size: 15px; }
.btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

/* ---------- Cards and sections ---------- */
main { display: block; }
.section { padding: 64px 0 0; }
.section-head { margin-bottom: 22px; }
.section-head p { color: var(--dim); margin: 0; max-width: 70ch; }
.card {
  border: 1px solid var(--line); background: var(--card); border-radius: var(--radius); padding: 20px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.card p:last-child { margin-bottom: 0; }
.card > h3 { margin-top: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.tag {
  display: inline-block; border: 1px solid var(--line); background: var(--card);
  border-radius: 99px; padding: 2px 12px; color: var(--acc2); font-size: 13px; font-weight: 600;
}
.ico {
  width: 36px; height: 36px; border-radius: 9px; border: 1.5px solid var(--acc);
  display: grid; place-items: center; color: var(--acc); margin-bottom: 12px;
}
.ico svg { width: 20px; height: 20px; }
.feature p { color: var(--dim); }
.pill {
  display: inline-block; font-size: 12px; font-weight: 600; border-radius: 99px; padding: 0 8px;
  border: 1px solid var(--line); color: var(--dim); vertical-align: 2px; margin-left: 4px;
}

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; padding: 48px 0 8px; }
.hero h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.05; margin: .35em 0; letter-spacing: -.02em; }
.hero h1 span { color: var(--acc); }
.hero-meta { color: var(--dim); font-size: 14px; margin-top: 14px; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; padding-top: 28px; } }

.graph { border: 1px solid var(--line); background: var(--card); border-radius: 16px; padding: 10px; box-shadow: var(--shadow); }
.graph svg { width: 100%; height: auto; display: block; }
.graph .e { stroke: var(--line); stroke-width: 2; }
.graph .n { fill: var(--bg); stroke: var(--acc); stroke-width: 2.5; }
.graph .n2 { stroke: var(--teal); }
.graph .old { stroke: var(--dim); stroke-dasharray: 3 3; opacity: .7; }
.graph .hub { fill: var(--acc); }
.graph .ring { fill: none; stroke: var(--acc); stroke-width: 2; opacity: 0; transform-origin: 220px 165px; }
.graph text { fill: var(--dim); font: 12px ui-monospace, Menlo, monospace; }
.graph .lbl { fill: var(--fg); font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  .graph .ring { animation: ping 3.2s ease-out infinite; }
  .graph .ring.r2 { animation-delay: 1.6s; }
}
@keyframes ping { 0% { transform: scale(.4); opacity: .7; } 100% { transform: scale(6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Screenshots ---------- */
.shots { display: grid; gap: 22px; }
.shot { margin: 0; }
.shot figcaption { color: var(--dim); font-size: 14px; margin-top: 10px; text-align: center; }
.frame {
  border: 1px solid var(--line); background: var(--card-solid); border-radius: 16px;
  box-shadow: var(--shadow); overflow: hidden; line-height: 0;
}
.frame img { width: 100%; height: auto; display: block; }
.frame.phone { border-radius: 28px; padding: 6px; }
.frame.phone img { border-radius: 22px; }
.frame.tablet { border-radius: 22px; padding: 6px; }
.frame.tablet img { border-radius: 16px; }
.shots-row { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; align-items: start; }
.phones { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 820px) {
  .shots-row { grid-template-columns: 1fr; }
  .phones { max-width: 520px; margin: 0 auto; width: 100%; }
}

/* ---------- Download ---------- */
.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.dl .card { display: flex; flex-direction: column; }
.dl ul { padding-left: 20px; color: var(--dim); margin: 0 0 1em; }
.dl .btn { margin-top: auto; align-self: flex-start; }
.dl-note { font-size: 14px; color: var(--dim); margin-top: 10px; }
.sha { font-size: 13px; color: var(--dim); margin-top: 10px; overflow-wrap: anywhere; }
.callout {
  border: 1px solid var(--warn-line); background: var(--warn-bg); border-radius: 12px; padding: 14px 18px; margin-top: 16px;
}
.callout h3 { font-size: 16px; margin: 0 0 6px; }
.callout ol { margin: 0; padding-left: 22px; }

/* ---------- Support ---------- */
.support {
  display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center;
  border: 1px solid var(--line); background: var(--card); border-radius: 18px; padding: 26px; box-shadow: var(--shadow);
}
.support .cup { width: 64px; height: 64px; color: var(--acc); }
.support p { margin: 0; color: var(--dim); }
.support h2 { margin-bottom: 6px; }
@media (max-width: 720px) { .support { grid-template-columns: 1fr; text-align: left; } .support .cup { width: 48px; height: 48px; } }

/* ---------- FAQ ---------- */
details {
  border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 0; margin-bottom: 10px;
}
summary {
  cursor: pointer; font-weight: 600; padding: 14px 44px 14px 18px; list-style: none; position: relative;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  color: var(--acc); font-size: 20px; font-weight: 400;
}
details[open] summary::after { content: "\2212"; }
details > div { padding: 0 18px 16px; color: var(--dim); }
details > div p:last-child { margin-bottom: 0; }
.faq-group { margin-top: 36px; }
.faq-group h2 { font-size: 22px; margin-bottom: 14px; }

/* ---------- Manual / doc pages ---------- */
.page-head { padding: 40px 0 8px; }
.page-head h1 { font-size: clamp(32px, 5vw, 48px); margin: .2em 0 .3em; letter-spacing: -.02em; }
.doc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 36px; align-items: start; padding-top: 24px; }
.toc {
  position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto;
  border: 1px solid var(--line); background: var(--card); border-radius: var(--radius); padding: 14px 16px; font-size: 15px;
}
.toc h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin: 0 0 8px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin: 3px 0; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
@media (max-width: 900px) {
  .doc { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .toc { position: static; max-height: none; }
}
.doc-body section { padding-top: 8px; margin-bottom: 40px; }
.doc-body h2 { padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.doc-body h3 { margin-top: 24px; }
.doc-body ul, .doc-body ol { padding-left: 22px; }
.doc-body li { margin: 4px 0; }
.doc-body > section > p, .doc-body li { max-width: 75ch; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card); margin: 12px 0 18px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--dim); }
.status-icons td:first-child { white-space: nowrap; }
.note {
  border-left: 3px solid var(--acc); background: var(--card); padding: 10px 14px; border-radius: 0 10px 10px 0; margin: 14px 0;
}
.back-top { font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 80px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 90%, transparent); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 18px 32px; padding: 26px 0 34px; color: var(--dim); font-size: 14px; }
.footer-inner p { margin: 0 0 6px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-brand { display: flex; align-items: center; gap: 8px; color: var(--fg); font-weight: 600; margin-bottom: 6px; }
.footer-brand img { width: 22px; height: 22px; border-radius: 5px; }
.site-footer .btn-coffee { padding: 8px 14px; font-size: 15px; align-self: start; }
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr; } }
