/* =====================================================================
   SecureByte Networks - layout and components
   ---------------------------------------------------------------------
   Shared by every theme. Colors, fonts and corner shapes come from
   css/themes.css, so this file rarely needs editing for a new look.

   Contents
     1. Base            7. Services pages       13. Footer
     2. Header & menu   8. Diagrams              14. Theme preview banner
     3. Buttons         9. About page            15. Theme picker page
     4. Hero           10. Contact & form        16. Utilities, motion, print
     5. Sections       11. Notices
     6. Home blocks    12. Photos (media)
   ===================================================================== */

/* ---------- 1. Base ---------- */
:root {
  --link: var(--page-link);
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --danger: #B42318;
  --success: #15803D;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
  letter-spacing: var(--heading-tracking);
  line-height: var(--heading-line);
  color: var(--heading);
  margin: 0 0 0.45em;
  text-wrap: balance;
}
h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 {
  font-family: var(--h3-font);
  font-weight: var(--h3-weight);
  letter-spacing: var(--h3-tracking);
  font-size: 1.25rem;
  line-height: 1.3;
}
h4 { font-family: var(--font-body); font-weight: 600; font-size: 1rem; letter-spacing: 0; line-height: 1.4; }

p { margin: 0 0 1em; }
p, li, dd { text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 600; color: var(--heading); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
main:focus { outline: none; }
::selection { background: var(--accent); color: var(--accent-ink); }

.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

.icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.sr-only {
  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: 16px;
  top: 12px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-button);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:not(:focus) {
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Dark "band" context: hero, highlighted sections and footer use the
   theme's band colors. Everything inside picks them up automatically. */
.band,
.hero,
.site-footer {
  --bg: var(--band-bg);
  --bg-alt: var(--band-bg-2);
  --surface: var(--band-surface);
  --surface-2: var(--band-bg-2);
  --text: var(--band-text);
  --heading: var(--band-heading);
  --muted: var(--band-muted);
  --border: var(--band-border);
  --border-strong: var(--band-border-strong);
  --link: var(--band-link);
  --danger: #FF9A90;
  --success: #4ADE80;
  background-color: var(--bg);
  color: var(--text);
}


/* ---------- 2. Header & menu ---------- */
site-header, site-footer { display: block; }
site-header { position: sticky; top: 0; z-index: 50; min-height: var(--header-h); }

.site-header {
  position: relative;
  background: var(--header-bg);
  color: var(--header-text);
  border-bottom: 1px solid var(--header-border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  margin-right: auto;
  color: inherit;
  text-decoration: none;
}
.brand__mark { width: 34px; height: 34px; }
.brand__mark-bg { fill: var(--accent); stroke: var(--accent); stroke-width: 1.2; stroke-linejoin: round; }
.brand__mark-trace { fill: none; stroke: var(--accent-ink); stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.brand__mark-node { fill: var(--accent-ink); }
.brand__name {
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
  font-size: 1.14rem;
  letter-spacing: -0.012em;
  line-height: 1;
  white-space: nowrap;
}
.brand__sub { font-family: var(--font-body); font-weight: 500; letter-spacing: 0; opacity: 0.78; }

.site-nav__list { display: flex; align-items: center; gap: 2px; list-style: none; }
.site-nav__item { position: relative; }
.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--header-text);
  font: inherit;
  font-size: 0.97rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.site-nav__link:hover { background: color-mix(in srgb, var(--header-text) 8%, transparent); }
.site-nav__link[aria-current="page"]::after,
.site-nav__toggle.is-current::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.site-nav__toggle .icon { width: 16px; height: 16px; transition: transform 0.15s ease; }
.site-nav__toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
.site-nav__sub {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 240px;
  padding: 8px;
  list-style: none;
  background: var(--header-bg);
  border: 1px solid var(--header-border);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  display: none;
}
.site-nav__group.is-open .site-nav__sub { display: block; }
.site-nav__sub .site-nav__link { display: flex; width: 100%; }
.site-nav__sub .site-nav__link[aria-current="page"]::after { left: 14px; right: auto; width: 18px; }
.site-nav__cta { margin-left: 10px; }
.site-nav__cta .button { min-height: 44px; padding: 0.55em 1.2em; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--header-border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--header-text);
  cursor: pointer;
}
.nav-toggle .icon--close { display: none; }
.site-header.is-open .nav-toggle .icon--menu { display: none; }
.site-header.is-open .nav-toggle .icon--close { display: block; }

@media (max-width: 1020px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
    display: none;
  }
  .site-header.is-open .site-nav { display: block; }
  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: min(100% - 2 * var(--gutter), var(--max));
    margin: 0 auto;
    padding: 8px 0 22px;
  }
  .site-nav__link {
    width: 100%;
    min-height: 52px;
    padding: 0 2px;
    border-radius: 0;
    border-bottom: 1px solid var(--header-border);
    font-size: 1.05rem;
  }
  .site-nav__link:hover { background: transparent; }
  .site-nav__link[aria-current="page"]::after,
  .site-nav__toggle.is-current::after {
    left: auto; right: 4px; top: 50%; bottom: auto;
    width: 8px; height: 8px; border-radius: 50%;
    transform: translateY(-50%);
  }
  .site-nav__toggle { justify-content: space-between; }
  .site-nav__toggle.is-current::after { right: 30px; }
  .site-nav__sub {
    position: static;
    min-width: 0;
    padding: 0 0 0 16px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }
  .site-nav__sub .site-nav__link[aria-current="page"]::after { left: auto; right: 4px; width: 8px; }
  .site-nav__cta { margin: 18px 0 0; }
  .site-nav__cta .button { width: 100%; min-height: 50px; }
}


/* ---------- 3. Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 50px;
  padding: 0.7em 1.4em;
  border: 2px solid transparent;
  border-radius: var(--radius-button);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.button .icon { width: 20px; height: 20px; }
.button--primary { background: var(--accent); color: var(--accent-ink); }
.button--primary:hover { background: var(--accent-hover); }
.button--secondary { background: transparent; color: var(--heading); border-color: var(--border-strong); }
.button--secondary:hover { border-color: var(--heading); }
.button--small { min-height: 42px; padding: 0.5em 1em; font-size: 0.95rem; }
.button[disabled] { opacity: 0.7; cursor: progress; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 30px; }


/* ---------- 4. Hero ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero--home {
  /* The headline is sized so its longest line fits the text column. */
  --hero-gap: clamp(32px, 5vw, 72px);
  --hero-col: calc((min(100vw - 2 * var(--gutter), var(--max)) - var(--hero-gap)) * 0.5555);
  padding-block: clamp(48px, 7vw, 104px) clamp(64px, 8vw, 116px);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: var(--hero-gap, clamp(32px, 5vw, 72px));
  align-items: center;
}
.hero h1 { margin-bottom: 0.42em; }
.hero--home h1 { font-size: max(1.6rem, min(calc(var(--hero-col) / var(--hero-ratio, 11.5)), var(--h1-home))); }
.hero__line { display: block; }
.hero__lede { max-width: 36em; font-size: clamp(1.1rem, 1rem + 0.45vw, 1.32rem); line-height: 1.55; color: var(--text); }
.hero__audience { max-width: 36em; color: var(--muted); margin: 0; }
.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 38px;
  padding-top: 24px;
  list-style: none;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.93rem;
}
.hero__facts li { display: flex; align-items: flex-start; gap: 9px; line-height: 1.4; }
@media (min-width: 901px) {
  .hero__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}
.hero__facts .icon { width: 20px; height: 20px; color: var(--accent); }
.hero__art { position: relative; min-width: 0; }

.hero--page { padding-block: clamp(48px, 6.5vw, 96px); }
.hero--page h1 { max-width: 17em; }
.hero--page .hero__lede { max-width: 40em; margin-bottom: 0; }

.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.jump a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-button);
  color: var(--text);
  font-size: 0.93rem;
  font-weight: 500;
  text-decoration: none;
}
.jump a:hover { border-color: var(--accent); color: var(--heading); }

/* Optional background photo for any hero: see README "Add a picture". */
.hero__photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero--photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 88%, transparent) 45%, color-mix(in srgb, var(--bg) 60%, transparent) 100%);
}

@media (max-width: 900px) {
  .hero--home { --hero-col: calc(100vw - 2 * var(--gutter)); }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { max-width: 600px; }
}


/* ---------- 5. Sections ---------- */
.section { padding-block: var(--section-pad); }
.section--alt { --step-num-bg: var(--bg-alt); background: var(--bg-alt); }
.section--tight-bottom { padding-bottom: calc(var(--section-pad) * 0.5); }
.hero--notfound { display: flex; align-items: center; min-height: 56vh; }
.section-head { max-width: 46rem; margin-bottom: clamp(32px, 4.5vw, 60px); }
.section-head p { margin: 0; color: var(--muted); font-size: 1.125rem; }
.section-head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px 40px;
  max-width: none;
}
.section-head--row > div { max-width: 46rem; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5.5vw, 88px);
  align-items: center;
}
.split--top { align-items: start; }
.split--media-wide { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.lead { font-size: 1.15rem; }
.muted { color: var(--muted); }

.ticks { display: grid; gap: 9px; list-style: none; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.42em;
  width: 13px;
  height: 7px;
  border-left: 2px solid var(--link);
  border-bottom: 2px solid var(--link);
  transform: rotate(-45deg);
}
.ticks--columns { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 40px; }
@media (max-width: 700px) { .ticks--columns { grid-template-columns: 1fr; } }

.cta__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) auto;
  gap: 28px 48px;
  align-items: center;
}
.cta h2 { margin-bottom: 0.3em; }
.cta p { max-width: 38em; margin: 0; color: var(--muted); font-size: 1.1rem; }
.cta .actions { margin-top: 0; }
.cta__alt { margin-top: 14px !important; font-size: 0.98rem !important; }
@media (max-width: 820px) { .cta__inner { grid-template-columns: 1fr; } }


/* ---------- 6. Home blocks ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
@media (max-width: 920px) { .cards { grid-template-columns: 1fr; } }
.cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) { .cards--2 { grid-template-columns: 1fr; } }
.card {
  display: flex;
  flex-direction: column;
  padding: clamp(26px, 2.6vw, 38px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
}
.card__icon {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 24px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--heading);
}
.card__icon .icon { width: 27px; height: 27px; }
.card h3 { font-size: 1.4rem; margin-bottom: 0.4em; }
.card > p { color: var(--muted); }
.card .ticks { margin: 4px 0 28px; font-size: 0.98rem; }
.card__link { margin-top: auto; font-weight: 600; }

.features { display: grid; gap: 24px; margin-top: 34px; list-style: none; }
.feature { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.feature > .icon { width: 26px; height: 26px; margin-top: 1px; color: var(--accent); }
.feature h3 { margin: 0 0 3px; font-family: var(--font-body); font-size: 1.08rem; font-weight: 600; letter-spacing: 0; }
.feature p { margin: 0; color: var(--muted); }

.runbook {
  margin: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}
.runbook__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 22px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.runbook__title { font-weight: 600; color: var(--heading); font-size: 0.98rem; }
.runbook__badge {
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--heading);
  font-size: 0.8rem;
  font-weight: 600;
}
.runbook__list { padding: 6px 22px; list-style: none; }
.runbook__item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px dashed var(--border);
}
.runbook__item:last-child { border-bottom: 0; }
.runbook__check {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
}
.runbook__check .icon { width: 15px; height: 15px; stroke-width: 2.6; }
.runbook__item strong { display: block; font-size: 1rem; }
.runbook__item > div > span { color: var(--muted); font-size: 0.94rem; }
.runbook__foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.92rem;
}
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 22%, transparent);
}

.benefits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(22px, 2.6vw, 40px); list-style: none; }
@media (max-width: 1000px) { .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .benefits { grid-template-columns: 1fr; } }
.benefit { padding-top: 24px; border-top: 2px solid var(--heading); }
.benefit > .icon { width: 28px; height: 28px; margin-bottom: 18px; color: var(--link); }
.benefit h3 { font-size: 1.22rem; margin-bottom: 0.35em; }
.benefit p { margin: 0; color: var(--muted); }

.steps {
  --steps-gap: clamp(18px, 2.2vw, 32px);
  display: grid;
  grid-template-columns: repeat(var(--steps-count, 4), minmax(0, 1fr));
  gap: var(--steps-gap);
  list-style: none;
}
.steps--5 { --steps-count: 5; }
.step { position: relative; padding-top: 66px; }
.step__num {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--step-num-bg, var(--bg));
  color: var(--heading);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0;
}
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 22px;
  left: 56px;
  right: calc(-1 * var(--steps-gap) + 10px);
  height: 2px;
  background: var(--border-strong);
}
.step h3 { font-size: 1.25rem; margin-bottom: 0.35em; }
.step p { margin: 0; color: var(--muted); }
@media (max-width: 900px) {
  .steps, .steps--5 { grid-template-columns: 1fr; gap: 28px; }
  .step { padding: 0 0 0 66px; min-height: 46px; }
  .step:not(:last-child)::after { top: 56px; bottom: -18px; left: 22px; right: auto; width: 2px; height: auto; }
}


/* ---------- 7. Services pages ---------- */
.pairs { border-top: 1px solid var(--border); }
.pairs__head,
.pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px clamp(20px, 4vw, 64px);
}
.pairs__head { padding: 14px 0; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 0.92rem; font-weight: 600; }
.pair { padding: 22px 0; border-bottom: 1px solid var(--border); }
.pairs__head + .pairs { border-top: 0; }
.pair dt { color: var(--heading); font-weight: 600; font-size: 1.06rem; }
.pair dd { margin: 0; color: var(--muted); }
@media (max-width: 720px) {
  .pairs__head { display: none; }
  .pair { grid-template-columns: 1fr; gap: 6px; }
}

.services { border-top: 1px solid var(--border); }
.service {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 18px clamp(22px, 3.2vw, 52px);
  padding-block: clamp(28px, 3.2vw, 42px);
  border-bottom: 1px solid var(--border);
}
.service__title { display: flex; align-items: flex-start; gap: 14px; }
.service__title .icon { width: 28px; height: 28px; margin-top: 1px; color: var(--link); }
.service h3 { margin: 0; font-size: 1.3rem; }
.service__body p { margin: 0 0 0.85em; }
.service__outcome { margin: 0 !important; padding-left: 14px; border-left: 3px solid var(--accent); color: var(--heading); font-weight: 500; }
.service .ticks { color: var(--muted); font-size: 0.97rem; }
@media (max-width: 1000px) {
  .service { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .service__title { grid-column: 1 / -1; }
}
@media (max-width: 640px) { .service { grid-template-columns: 1fr; } }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; list-style: none; }
@media (max-width: 1000px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } }
.tile { padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--card-shadow); }
.tile > .icon { margin-bottom: 14px; color: var(--link); }
.tile h3 { font-size: 1.08rem; margin-bottom: 0.3em; }
.tile p { margin: 0; color: var(--muted); font-size: 0.97rem; }

.platforms { border-top: 1px solid var(--border); }
.platforms > div {
  display: grid;
  grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.4fr);
  gap: 8px 40px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.platforms dt { font-weight: 600; color: var(--heading); }
.platforms dd { margin: 0; color: var(--muted); }
@media (max-width: 640px) { .platforms > div { grid-template-columns: 1fr; } }
.fine-print { margin-top: 20px; color: var(--muted); font-size: 0.9rem; }


/* ---------- 8. Diagrams (network art) ---------- */
.diagram { margin: 0; }
.diagram__panel {
  padding: clamp(16px, 3vw, 32px);
  background: var(--art-bg);
  border: 1px solid var(--art-chip-stroke);
  border-radius: var(--radius-lg);
}
.diagram--spaced { max-width: 920px; margin: clamp(40px, 5vw, 64px) auto 0; }
.diagram figcaption { margin-top: 12px; color: var(--muted); font-size: 0.92rem; }

.netmap { display: block; width: 100%; height: auto; overflow: visible; }
.netmap .link { fill: none; stroke: var(--art-line); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.netmap .link--tunnel { stroke-dasharray: 2 7; }
.netmap .flow { fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 2 16; }
.netmap .flow--alt { stroke: var(--accent-2); }
.netmap .flow--deny { stroke: var(--art-muted); stroke-dasharray: 2 9; }
.netmap .chip-bg { fill: var(--art-chip); stroke: var(--art-chip-stroke); stroke-width: 1.5; rx: var(--chip-rx, 10px); }
.netmap .chip--key .chip-bg { stroke: var(--accent); stroke-width: 2.2; }
.netmap .chip-icon { color: var(--art-icon); fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.netmap .chip--key .chip-icon { color: var(--accent); }
.netmap .chip-label { fill: var(--art-text); font-family: var(--font-body); font-size: 13.5px; font-weight: 600; }
.netmap .chip-sub { fill: var(--art-muted); font-family: var(--font-body); font-size: 11.5px; font-weight: 500; }
.netmap .tag-bg { fill: var(--art-tag); stroke: var(--art-line); stroke-width: 1; rx: 10px; }
.netmap .tag { fill: var(--art-muted); font-family: var(--font-body); font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; }
.netmap .zone { fill: none; stroke: var(--art-line); stroke-width: 1.25; stroke-dasharray: 5 6; rx: var(--chip-rx, 10px); }
.netmap .zone-label { fill: var(--art-muted); font-family: var(--font-body); font-size: 12px; font-weight: 600; }
.netmap .deny-mark { stroke: var(--art-muted); stroke-width: 2.4; stroke-linecap: round; }

@media (prefers-reduced-motion: no-preference) {
  .netmap--animated .link:not(.link--tunnel) {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: netmap-draw 0.9s cubic-bezier(0.6, 0, 0.2, 1) forwards;
    animation-delay: calc(var(--d, 0) * 1s);
  }
  .netmap--animated .link--tunnel,
  .netmap--animated .chip,
  .netmap--animated .tag-group {
    opacity: 0;
    animation: netmap-fade 0.5s ease forwards;
    animation-delay: calc(var(--d, 0) * 1s);
  }
  .netmap--animated .flow {
    opacity: 0;
    animation: netmap-fade 0.6s ease 1.8s forwards, netmap-flow var(--speed, 1.6s) linear 1.8s infinite;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .netmap--flows .flow { animation: netmap-flow var(--speed, 1.6s) linear infinite; }
}
@keyframes netmap-draw { to { stroke-dashoffset: 0; } }
@keyframes netmap-fade { to { opacity: 1; } }
@keyframes netmap-flow { to { stroke-dashoffset: -36; } }


/* Layered view (home page hero): the layers we cover, cloud to users.
   Edit the layers in index.html; colors come from the theme's diagram tokens. */
.stack {
  --spine: 34px;
  position: relative;
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0 0 0 var(--spine);
  list-style: none;
}
.stack::before,
.stack::after {
  content: "";
  position: absolute;
  top: 30px;
  bottom: 30px;
  pointer-events: none;
}
.stack::before { left: 11px; width: 2px; background: var(--art-line); }
.stack::after {
  left: 10px;
  width: 4px;
  background: radial-gradient(circle, var(--stack-flow, var(--accent)) 1.5px, transparent 1.9px) center top / 4px 16px repeat-y;
}
.stack__layer {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 11px 18px;
  background: var(--art-chip);
  border: 1.5px solid var(--art-chip-stroke);
  border-radius: var(--chip-rx, 10px);
}
.stack__layer::before {
  content: "";
  position: absolute;
  top: calc(50% - 1px);
  left: calc(-1 * var(--spine) + 12px);
  width: calc(var(--spine) - 13.5px);
  height: 2px;
  background: var(--art-line);
}
.stack__layer--key { border: 2px solid var(--stack-key, var(--accent)); }
.stack__icon { display: inline-grid; color: var(--art-icon); }
.stack__icon .icon { width: 22px; height: 22px; }
.stack__layer--key .stack__icon { color: var(--stack-key, var(--accent)); }
.stack__name { display: block; color: var(--art-text); font-size: 1rem; font-weight: 600; line-height: 1.3; }
.stack__desc { display: block; color: var(--art-muted); font-size: 0.875rem; line-height: 1.4; }
.stack__layer:nth-child(1) { --i: 0; }
.stack__layer:nth-child(2) { --i: 1; }
.stack__layer:nth-child(3) { --i: 2; }
.stack__layer:nth-child(4) { --i: 3; }
.stack__layer:nth-child(5) { --i: 4; }
.stack__layer:nth-child(6) { --i: 5; }
@media (prefers-reduced-motion: no-preference) {
  .stack__layer { animation: stack-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }
  .stack::after { animation: netmap-fade 0.6s ease 0.6s both, stack-flow 1.4s linear 0.6s infinite; }
}
@keyframes stack-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes stack-flow { to { background-position: center 32px; } }
@media (max-width: 520px) {
  .stack { --spine: 24px; gap: 10px; }
  .stack::before { left: 6px; }
  .stack::after { left: 5px; }
  .stack__layer { gap: 12px; min-height: 56px; padding: 10px 14px; }
  .stack__layer::before { left: calc(-1 * var(--spine) + 7px); width: calc(var(--spine) - 8.5px); }
}


/* ---------- 9. About page ---------- */
.glance { margin: 0; padding: clamp(22px, 2.6vw, 32px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--card-shadow); }
.glance > div { padding: 14px 0; border-bottom: 1px solid var(--border); }
.glance > div:first-child { padding-top: 0; }
.glance > div:last-child { padding-bottom: 0; border-bottom: 0; }
.glance dt { color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.glance dd { margin: 2px 0 0; color: var(--heading); font-weight: 500; }

.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3vw, 48px) clamp(24px, 3vw, 48px); list-style: none; }
@media (max-width: 900px) { .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .principles { grid-template-columns: 1fr; } }
.principle > .icon { width: 28px; height: 28px; margin-bottom: 14px; color: var(--link); }
.principle h3 { font-size: 1.18rem; margin-bottom: 0.35em; }
.principle p { margin: 0; color: var(--muted); }



/* ---------- 10. Contact & form ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 920px) { .contact-grid { grid-template-columns: 1fr; } }

.form {
  padding: clamp(24px, 3.2vw, 44px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
}
.form h2 { font-size: clamp(1.5rem, 1.25rem + 0.8vw, 1.9rem); margin-bottom: 0.25em; }
.form__intro { color: var(--muted); margin-bottom: 26px; }
.form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; }
.field { display: grid; gap: 8px; align-content: start; }
.field--full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form__grid { grid-template-columns: 1fr; } }

.field label { color: var(--heading); font-size: 0.97rem; font-weight: 600; }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}
.field textarea { min-height: 170px; resize: vertical; line-height: 1.55; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--muted); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline-offset: 1px; border-color: var(--focus); }
.field [aria-invalid="true"] { border-color: var(--danger); border-width: 2px; }
.field__hint { margin: 0; color: var(--muted); font-size: 0.92rem; }
.field__error { display: flex; gap: 6px; margin: 0; color: var(--danger); font-size: 0.93rem; font-weight: 500; }
.field__error[hidden] { display: none; }
.field__error .icon { width: 18px; height: 18px; margin-top: 2px; }

.select { position: relative; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; }
.select::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.form__footer { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 28px; }
.form__privacy { margin: 0; color: var(--muted); font-size: 0.92rem; }
.form__summary { margin-bottom: 26px; }
.form__summary ul { display: grid; gap: 4px; margin: 6px 0 0; padding-left: 20px; }
.form__status:empty { display: none; }
.form__status { margin-top: 24px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.contact-aside { display: grid; gap: 34px; }
.contact-aside h2 { font-size: 1.35rem; margin-bottom: 0.7em; }
.contact-list { display: grid; gap: 18px; list-style: none; }
.contact-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; }
.contact-list .icon { color: var(--link); margin-top: 1px; }
.contact-list strong { display: block; font-size: 0.95rem; }
.contact-list a, .contact-list span { overflow-wrap: anywhere; }
.next-steps { display: grid; gap: 14px; list-style: none; counter-reset: next; }
.next-steps li { position: relative; padding-left: 40px; counter-increment: next; color: var(--muted); }
.next-steps li::before {
  content: counter(next);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--heading);
  font-size: 0.88rem;
  font-weight: 700;
}


/* ---------- 11. Notices ---------- */
.notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 18px 20px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
}
.notice:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
.notice > .icon { margin-top: 1px; color: var(--link); }
.notice h3 { margin: 0 0 4px; font-family: var(--font-body); font-size: 1.05rem; font-weight: 600; letter-spacing: 0; }
.notice p { margin: 0 0 0.5em; }
.notice p:last-child { margin-bottom: 0; }
.notice--error { border-color: var(--danger); }
.notice--error > .icon { color: var(--danger); }
.notice--success { border-color: var(--success); }
.notice--success > .icon { color: var(--success); }
.notice__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* Placeholder values (text in [square brackets] in site-settings.js, or class="placeholder") */
.placeholder {
  padding: 0 0.3em;
  border-radius: 3px;
  outline: 2px dashed color-mix(in srgb, var(--accent) 75%, transparent);
  outline-offset: 1px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}


/* ---------- 12. Photos (media) ---------- */
.media { margin: 0; }
.media img { width: 100%; height: auto; border-radius: var(--radius-lg); object-fit: cover; }
.media--wide img { aspect-ratio: 16 / 9; }
.media--square img { aspect-ratio: 1 / 1; }
.media figcaption { margin-top: 10px; color: var(--muted); font-size: 0.92rem; }


/* ---------- 13. Footer ---------- */
.site-footer { padding-block: clamp(52px, 6vw, 80px) 30px; font-size: 0.97rem; }
.footer__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr) minmax(0, 1.1fr); gap: 36px clamp(28px, 4vw, 64px); }
.footer__brand .brand { margin-bottom: 16px; color: var(--heading); }
.footer__tagline { max-width: 26em; color: var(--muted); }
.footer__title { margin-bottom: 14px; font-family: var(--font-body); font-size: 0.97rem; font-weight: 600; letter-spacing: 0; color: var(--heading); }
.footer__list { display: grid; gap: 10px; list-style: none; }
.footer__list a { color: var(--text); text-decoration: none; }
.footer__list a:hover { color: var(--heading); text-decoration: underline; }
.footer__contact li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; }
.footer__contact .icon { width: 20px; height: 20px; margin-top: 2px; color: var(--muted); }
.footer__contact span, .footer__contact a { overflow-wrap: anywhere; }
.footer__bottom {
  display: grid;
  gap: 8px;
  margin-top: 52px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.86rem;
}
.footer__bottom p { margin: 0; max-width: 80em; }
@media (max-width: 820px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }


/* ---------- 14. Theme preview banner (only when previewing ?theme=) ---------- */
.preview-bar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 80;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 16px;
  width: min(100% - 24px, 760px);
  padding: 12px 16px;
  transform: translateX(-50%);
  background: #111318;
  color: #F2F3F5;
  border: 1px solid #343842;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.95rem;
}
.preview-bar p { margin: 0; }
.preview-bar a { color: #FFFFFF; font-weight: 600; }
.preview-bar__links { display: flex; gap: 16px; }


/* ---------- 15. Theme picker page (themes.html) ---------- */
.picker-intro { max-width: 46rem; }
.picker-how {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
}
@media (max-width: 760px) { .picker-how { grid-template-columns: 1fr; } }
.picker-how > div { padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.picker-how h2 { font-family: var(--font-body); font-size: 1rem; font-weight: 600; letter-spacing: 0; margin-bottom: 6px; }
.picker-how p { margin: 0; color: var(--muted); }
.picker-how code, .theme-option code {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--heading);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.theme-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 2.5vw, 32px); }
@media (max-width: 860px) { .theme-grid { grid-template-columns: 1fr; } }
.theme-option {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
}
.theme-option.is-current { border: 2px solid var(--accent); }
.theme-option__preview {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.theme-option__preview iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 1280px;
  height: 800px;
  border: 0;
  transform-origin: 0 0;
  pointer-events: none;
}
.theme-option__body { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 24px; flex: 1; }
.theme-option__title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.theme-option__title h2 { margin: 0; font-family: var(--font-body); font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; }
.theme-option__badge { padding: 3px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 0.8rem; font-weight: 600; }
.theme-option__swatches { display: flex; gap: 6px; }
.theme-option__swatches span { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.15); }
.theme-option__body p { margin: 0; color: var(--muted); }
.theme-option__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 10px; }
.theme-option__use { margin-top: 6px; }

.accent-tool {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 32px;
  align-items: center;
  margin-top: clamp(36px, 4vw, 56px);
  padding: clamp(22px, 2.6vw, 32px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
@media (max-width: 760px) { .accent-tool { grid-template-columns: 1fr; } }
.accent-tool h2 { font-size: 1.4rem; margin-bottom: 0.3em; }
.accent-tool p { margin: 0; color: var(--muted); }
.accent-tool__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.accent-tool input[type="color"] { width: 52px; height: 50px; padding: 4px; border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg); cursor: pointer; }
.accent-tool input[type="text"] { width: 120px; min-height: 50px; padding: 10px 12px; border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); font: inherit; }
.accent-tool__result { grid-column: 1 / -1; }


/* ---------- 16. Utilities, motion, print ---------- */
[hidden] { display: none !important; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

@media print {
  site-header, .nav-toggle, .preview-bar, .hero__art, .cta { display: none !important; }
  .hero, .band, .site-footer { background: none !important; color: #000 !important; }
  body { font-size: 11pt; }
  a { color: #000; }
}
