/* ============================================================
   Total Security WP — sub-page shell
   Shared by docs / changelog / security / privacy / license /
   pro / download / 404.
   Deliberately does NOT load Three.js or GSAP: these are
   read-first pages and should paint instantly.
   ============================================================ */

html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  background: #05070c;
  color: #cbd5e1;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* Base reset. The home page gets this from Tailwind's preflight, which these
   pages deliberately do not load — without it anchors render underlined and
   <button> inherits the UA's opaque grey "buttonface" background. */
a { text-decoration: none; color: inherit; }
button {
  font: inherit; color: inherit; background: transparent;
  border: 0; padding: 0; cursor: pointer;
}
img, svg { display: block; max-width: 100%; }
*, *::before, *::after { box-sizing: border-box; }

::selection { background: rgba(77,179,255,0.28); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1c2b38; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #4db3ff; }

/* Ambient backdrop — cheap CSS stand-in for the home page's 3D scene */
.page-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 500px at 78% -8%, rgba(77,179,255,0.10), transparent 62%),
    radial-gradient(760px 460px at 8% 4%, rgba(34,197,143,0.07), transparent 60%),
    linear-gradient(#05070c, #05070c);
}
.page-bg::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(77,179,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77,179,255,0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 72%);
}

/* ---------------- Header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid rgba(27,40,54,0.7);
  background: rgba(5,7,12,0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.header-inner {
  max-width: 1120px; margin: 0 auto;
  padding: 0 1.25rem; height: 60px;
  display: flex; align-items: center; gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.brand span {
  font-family: 'Space Grotesk', sans-serif; font-weight: 600;
  color: #fff; font-size: .9rem; letter-spacing: -.01em;
}
.header-nav { display: none; gap: .25rem; margin-left: auto; align-items: center; }
@media (min-width: 900px) { .header-nav { display: flex; } }
.header-link {
  font-size: .82rem; color: #94a3b8; padding: .4rem .7rem;
  border-radius: .5rem; transition: color .15s, background-color .15s;
}
.header-link:hover { color: #e2e8f0; background: rgba(255,255,255,0.04); }
.header-link.is-active { color: #4db3ff; background: rgba(77,179,255,0.09); }
.header-cta {
  font-size: .8rem; font-weight: 600; padding: .45rem 1rem;
  border-radius: .55rem; background: #4db3ff; color: #05070c;
  transition: filter .15s; white-space: nowrap;
}
.header-cta:hover { filter: brightness(1.1); }
.header-menu-btn {
  margin-left: auto; width: 38px; height: 38px; border-radius: .55rem;
  border: 1px solid #1b2836; display: flex; align-items: center; justify-content: center;
  color: #cbd5e1;
}
@media (min-width: 900px) { .header-menu-btn { display: none; } }
.header-drawer {
  display: none; border-top: 1px solid rgba(27,40,54,0.7);
  padding: .6rem 1.25rem 1rem; background: rgba(5,7,12,0.96);
}
.header-drawer.is-open { display: block; }
.header-drawer a {
  display: block; padding: .55rem .25rem; font-size: .9rem; color: #94a3b8;
  border-bottom: 1px solid rgba(27,40,54,0.5);
}
.header-drawer a:last-child { border-bottom: 0; }
.header-drawer a:hover { color: #4db3ff; }

/* ---------------- Page frame ---------------- */
.page-wrap { position: relative; z-index: 10; }
.page-main { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }

.page-hero { padding: 3.5rem 0 2.25rem; border-bottom: 1px solid rgba(27,40,54,0.6); }
.page-eyebrow {
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px;
  letter-spacing: .18em; text-transform: uppercase; color: #4db3ff; margin-bottom: .7rem;
}
.page-eyebrow.is-emerald { color: #22c58f; }
.page-eyebrow.is-pro { color: #d9b45c; }
.page-title {
  font-family: 'Space Grotesk', sans-serif; font-weight: 600;
  font-size: clamp(1.9rem, 4.2vw, 2.9rem); line-height: 1.08;
  letter-spacing: -.02em; color: #fff;
}
.page-lede { margin-top: .9rem; max-width: 46rem; color: #94a3b8; font-size: 1rem; line-height: 1.65; }

.breadcrumb { font-size: .78rem; color: #64748b; margin-bottom: 1rem; }
.breadcrumb a { color: #64748b; }
.breadcrumb a:hover { color: #4db3ff; }

/* ---------------- Docs two-column ---------------- */
.docs-layout { display: grid; grid-template-columns: 1fr; gap: 2.5rem; padding: 2.5rem 0 4rem; }
@media (min-width: 1000px) { .docs-layout { grid-template-columns: 232px 1fr; gap: 3rem; } }

/* A grid item defaults to `min-width: auto`, meaning it refuses to shrink below
   its widest child. The tables (min-width 520px) and <pre> blocks therefore
   forced the whole column past the viewport on phones — and because the column
   itself grew, the inner `overflow-x: auto` never engaged. These resets let the
   column shrink so those children scroll inside themselves instead. */
.docs-layout > * { min-width: 0; }
.prose, .prose > section, .card-grid > * { min-width: 0; }
.prose > section > * { max-width: 100%; }

.docs-toc { display: none; }
@media (min-width: 1000px) {
  .docs-toc {
    display: block; position: sticky; top: 84px; align-self: start;
    max-height: calc(100vh - 110px); overflow-y: auto; padding-right: .5rem;
  }
}
.toc-group {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .16em;
  color: #475569; text-transform: uppercase; margin: 1.4rem 0 .5rem;
}
.toc-group:first-child { margin-top: 0; }
.toc-link {
  display: block; font-size: .82rem; color: #94a3b8; padding: .3rem .6rem;
  border-left: 2px solid rgba(27,40,54,0.9); border-radius: 0 .35rem .35rem 0;
  transition: color .15s, background-color .15s, border-color .15s;
}
.toc-link:hover { color: #e2e8f0; background: rgba(255,255,255,0.03); }
.toc-link.is-active { color: #4db3ff; border-color: #4db3ff; background: rgba(77,179,255,0.07); }

/* ---------------- Prose ---------------- */
.prose { max-width: 46rem; }
.prose > section { scroll-margin-top: 90px; padding-bottom: 2.75rem; }
.prose h2 {
  font-family: 'Space Grotesk', sans-serif; font-weight: 600; color: #fff;
  font-size: 1.5rem; letter-spacing: -.015em; margin: 2.25rem 0 .9rem;
  padding-top: .4rem;
}
.prose > section:first-child h2 { margin-top: 0; }
.prose h3 {
  font-family: 'Space Grotesk', sans-serif; font-weight: 600; color: #e2e8f0;
  font-size: 1.02rem; margin: 1.7rem 0 .55rem;
}
.prose p { color: #94a3b8; line-height: 1.72; margin-bottom: 1rem; font-size: .935rem; }
.prose a { color: #4db3ff; }
.prose a:hover { text-decoration: underline; }
.prose strong, .prose b { color: #e2e8f0; font-weight: 600; }
.prose ul, .prose ol { margin: 0 0 1.15rem 0; padding-left: 1.15rem; }
.prose ul { list-style: none; padding-left: 0; }
.prose ul li {
  position: relative; padding-left: 1.15rem; margin-bottom: .5rem;
  color: #94a3b8; line-height: 1.62; font-size: .935rem;
}
.prose ul li::before {
  content: ''; position: absolute; left: 0; top: .62em;
  width: 5px; height: 5px; border-radius: 999px; background: #4db3ff; opacity: .75;
}
.prose ol { list-style: decimal; }
.prose ol li { margin-bottom: .55rem; color: #94a3b8; line-height: 1.62; font-size: .935rem; padding-left: .25rem; }
.prose ol li::marker { color: #4db3ff; font-family: 'JetBrains Mono', monospace; font-size: .8em; }
.prose code {
  font-family: 'JetBrains Mono', monospace; font-size: .84em;
  background: rgba(77,179,255,0.08); border: 1px solid rgba(77,179,255,0.16);
  color: #9ed6ff; padding: .1em .4em; border-radius: .3rem; white-space: nowrap;
}
.prose hr { border: 0; border-top: 1px solid rgba(27,40,54,0.7); margin: 2rem 0; }

/* Code block */
.code-block { position: relative; margin: 0 0 1.25rem; }
.code-block pre {
  background: #0a0f18; border: 1px solid #1b2836; border-radius: .7rem;
  padding: .95rem 1rem; overflow-x: auto;
  font-family: 'JetBrains Mono', monospace; font-size: 12.2px; line-height: 1.75;
  color: #22c58f;
}
.code-block pre code { background: none; border: 0; padding: 0; color: inherit; white-space: pre; font-size: inherit; }
.code-copy {
  position: absolute; top: .5rem; right: .5rem;
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .08em;
  color: #64748b; background: rgba(5,7,12,0.85); border: 1px solid #1b2836;
  border-radius: .35rem; padding: .22rem .5rem; opacity: 0; transition: opacity .15s, color .15s;
}
.code-block:hover .code-copy, .code-copy:focus-visible { opacity: 1; }
.code-copy:hover { color: #4db3ff; border-color: rgba(77,179,255,0.45); }
.code-copy.is-done { color: #22c58f; opacity: 1; }

/* ---------------- Cards / callouts ---------------- */
.card {
  border: 1px solid rgba(27,40,54,0.85); background: rgba(13,20,32,0.55);
  border-radius: .8rem; padding: 1.1rem 1.2rem; margin-bottom: 1.1rem;
}
.card h3 { margin-top: 0; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }

.card-grid { display: grid; grid-template-columns: 1fr; gap: .85rem; margin-bottom: 1.25rem; }
@media (min-width: 640px) { .card-grid.cols-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 860px) { .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }

.callout {
  border-left: 3px solid #4db3ff; background: rgba(77,179,255,0.055);
  border-radius: 0 .6rem .6rem 0; padding: .9rem 1.1rem; margin: 0 0 1.25rem;
}
.callout p { margin-bottom: 0; color: #b3c4d6; font-size: .9rem; }
.callout p + p { margin-top: .6rem; }
.callout--warn { border-left-color: #f5b942; background: rgba(245,185,66,0.06); }
.callout--danger { border-left-color: #ff5459; background: rgba(255,84,89,0.06); }
.callout--pro { border-left-color: #d9b45c; background: rgba(217,180,92,0.06); }
.callout-label {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .15em;
  text-transform: uppercase; color: #4db3ff; display: block; margin-bottom: .4rem;
}
.callout--warn .callout-label { color: #f5b942; }
.callout--danger .callout-label { color: #ff5459; }
.callout--pro .callout-label { color: #d9b45c; }

/* Tag chips */
.tag {
  display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 9.5px;
  letter-spacing: .1em; text-transform: uppercase; padding: .14rem .42rem;
  border-radius: .3rem; vertical-align: middle; margin-left: .35rem; white-space: nowrap;
}
.tag-free { color: #22c58f; background: rgba(34,197,143,0.1); border: 1px solid rgba(34,197,143,0.28); }
.tag-pro  { color: #d9b45c; background: rgba(217,180,92,0.1); border: 1px solid rgba(217,180,92,0.3); }

/* ---------------- Tables ---------------- */
.table-wrap { overflow-x: auto; margin-bottom: 1.35rem; border: 1px solid #1b2836; border-radius: .7rem; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .855rem; min-width: 520px; }
table.tbl th {
  text-align: left; font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: .12em; text-transform: uppercase; color: #64748b;
  padding: .7rem .9rem; background: rgba(10,15,24,0.8); border-bottom: 1px solid #1b2836;
  white-space: nowrap;
}
table.tbl td { padding: .72rem .9rem; border-bottom: 1px solid rgba(27,40,54,0.55); color: #94a3b8; vertical-align: top; line-height: 1.55; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tr:hover td { background: rgba(255,255,255,0.015); }
table.tbl td code { white-space: nowrap; }
.tick { color: #22c58f; font-weight: 700; }
.cross { color: #475569; }

/* ---------------- Changelog ---------------- */
.rel { position: relative; padding-left: 1.6rem; padding-bottom: 2.25rem; scroll-margin-top: 90px; }
.rel::before {
  content: ''; position: absolute; left: 4px; top: .55rem; bottom: -.4rem;
  width: 1px; background: linear-gradient(#1b2836, rgba(27,40,54,0.1));
}
.rel:last-child::before { display: none; }
.rel::after {
  content: ''; position: absolute; left: 0; top: .45rem;
  width: 9px; height: 9px; border-radius: 999px;
  background: #05070c; border: 2px solid #1b2836;
}
.rel.is-current::after { border-color: #4db3ff; box-shadow: 0 0 10px 1px rgba(77,179,255,0.55); }
.rel-head { display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap; margin-bottom: .35rem; }
.rel-ver { font-family: 'Space Grotesk', sans-serif; font-weight: 600; color: #fff; font-size: 1.2rem; }
.rel-tag {
  font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: .12em;
  text-transform: uppercase; padding: .15rem .45rem; border-radius: .3rem;
  color: #4db3ff; background: rgba(77,179,255,0.1); border: 1px solid rgba(77,179,255,0.28);
}
.log-line { display: flex; gap: .7rem; margin-bottom: .55rem; align-items: flex-start; }
.log-kind {
  flex-shrink: 0; width: 62px; text-align: center;
  font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: .1em;
  text-transform: uppercase; padding: .22rem 0; border-radius: .3rem; margin-top: .12rem;
}
.k-new { color: #22c58f; background: rgba(34,197,143,0.1); border: 1px solid rgba(34,197,143,0.26); }
.k-sec { color: #ff5459; background: rgba(255,84,89,0.09); border: 1px solid rgba(255,84,89,0.26); }
.k-chg { color: #d9b45c; background: rgba(217,180,92,0.1); border: 1px solid rgba(217,180,92,0.26); }
.k-fix { color: #4db3ff; background: rgba(77,179,255,0.09); border: 1px solid rgba(77,179,255,0.26); }
.log-txt { color: #94a3b8; font-size: .89rem; line-height: 1.6; }
.log-txt b { color: #e2e8f0; font-weight: 600; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-size: .875rem; font-weight: 600; padding: .68rem 1.35rem; border-radius: .6rem;
  transition: filter .15s, border-color .15s, color .15s, background-color .15s;
}
.btn-primary { background: #4db3ff; color: #05070c; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-pro { background: #d9b45c; color: #05070c; }
.btn-pro:hover { filter: brightness(1.08); }
.btn-ghost { border: 1px solid #1b2836; color: #cbd5e1; }
.btn-ghost:hover { border-color: rgba(77,179,255,0.55); color: #4db3ff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0; }

/* Buttons inside .prose must beat `.prose a` (0,1,1), which otherwise paints
   them link-blue and underlines them on hover — unreadable on a filled button. */
.prose a.btn, .prose a.btn:hover { text-decoration: none; }
.prose a.btn-primary, .prose a.btn-pro { color: #05070c; }
.prose a.btn-ghost { color: #cbd5e1; }
.prose a.btn-ghost:hover { color: #4db3ff; }

/* ---------------- Footer ---------------- */
.site-footer { position: relative; z-index: 10; border-top: 1px solid rgba(27,40,54,0.6); background: rgba(5,7,12,0.7); margin-top: 2rem; }
.footer-inner {
  max-width: 1120px; margin: 0 auto; padding: 2.75rem 1.25rem 1.5rem;
  display: grid; grid-template-columns: 1fr; gap: 2rem;
}
@media (min-width: 760px) { .footer-inner { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-col p.h { font-family: 'Space Grotesk', sans-serif; font-size: .85rem; color: #fff; margin-bottom: .75rem; font-weight: 600; }
.footer-col ul { display: flex; flex-direction: column; gap: .5rem; }
.footer-col a { font-size: .855rem; color: #64748b; }
.footer-col a:hover { color: #4db3ff; }
.footer-note { font-size: .855rem; color: #64748b; max-width: 24rem; line-height: 1.6; }
.footer-base {
  border-top: 1px solid rgba(27,40,54,0.6); padding: 1.1rem 1.25rem; text-align: center;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #475569;
}

/* ---------------- Plans (pro page) ---------------- */
.plan {
  border: 1px solid #1b2836; background: rgba(13,20,32,0.6); border-radius: .9rem;
  padding: 1.5rem; position: relative; display: flex; flex-direction: column;
}
.plan--pro { border-color: rgba(217,180,92,0.42); background: linear-gradient(rgba(217,180,92,0.05), rgba(13,20,32,0.6)); }
.plan-name { font-family: 'Space Grotesk', sans-serif; font-size: 1.15rem; color: #fff; font-weight: 600; }
.plan-price { font-family: 'Space Grotesk', sans-serif; font-size: 1.9rem; color: #fff; font-weight: 600; line-height: 1.1; }
.plan--pro .plan-price { color: #d9b45c; }
/* For a word rather than a figure ("Upgrade", "Contact us"). At 1.9rem a word
   dwarfs the plan name beside it; this keeps the two visually balanced. */
.plan-price--label {
  font-size: .95rem; font-weight: 600; letter-spacing: .01em;
  padding: .3rem .7rem; border-radius: .4rem;
  background: rgba(217,180,92,0.12); border: 1px solid rgba(217,180,92,0.34);
}
.plan-meta { font-size: .78rem; color: #64748b; margin: .2rem 0 1.1rem; }
.plan ul { margin: 0 0 1.35rem; flex: 1; }
.plan ul li { position: relative; padding-left: 1.4rem; margin-bottom: .55rem; font-size: .855rem; color: #94a3b8; line-height: 1.5; }
/* Plan lists sit inside .prose, whose `ul li::before` paints a 5px blue dot.
   A pseudo-element can only exist once, so the two rules MERGE: without the
   resets below the tick inherits that dot's box and renders as a blue circle
   with the glyph spilling out underneath it. */
.plan ul li::before {
  content: '\2713'; position: absolute; left: 0; top: 0; color: #22c58f;
  font-size: .8rem; font-weight: 700; line-height: 1.5;
  width: auto; height: auto; border-radius: 0; background: none; opacity: 1;
}
.plan--pro ul li::before { color: #d9b45c; }
.plan-ribbon {
  position: absolute; top: -.62rem; right: 1.2rem;
  font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: .12em;
  background: #d9b45c; color: #05070c; padding: .2rem .55rem; border-radius: .3rem; font-weight: 700;
}

/* ---------------- FAQ accordion ---------------- */
.qa { border: 1px solid rgba(27,40,54,0.85); border-radius: .7rem; margin-bottom: .6rem; overflow: hidden; background: rgba(13,20,32,0.4); }
.qa summary {
  cursor: pointer; list-style: none; padding: .9rem 1.05rem; font-size: .93rem;
  color: #e2e8f0; font-weight: 500; display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: '+'; color: #4db3ff; font-size: 1.1rem; line-height: 1; flex-shrink: 0; }
.qa[open] summary::after { content: '\2212'; }
.qa summary:hover { background: rgba(255,255,255,0.02); }
.qa-body { padding: 0 1.05rem 1rem; }
.qa-body p { margin-bottom: .75rem; color: #94a3b8; font-size: .9rem; line-height: 1.68; }
.qa-body p:last-child { margin-bottom: 0; }

/* ---------------- 404 ---------------- */
.nf-wrap { min-height: 76vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 3rem 1.25rem; }
.nf-code {
  font-family: 'JetBrains Mono', monospace; font-size: clamp(4rem, 15vw, 8rem);
  font-weight: 600; color: transparent; line-height: 1;
  background: linear-gradient(180deg, #4db3ff, rgba(77,179,255,0.12));
  -webkit-background-clip: text; background-clip: text;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ============================================================
   Mobile refinements (appended last: source order matters —
   these must win over the base rules they narrow).
   ============================================================ */

/* Long unbroken strings (emails, URLs, file paths) are a common
   source of phone-width overflow. */
.prose p, .prose li, .prose h1, .prose h2, .prose h3 { overflow-wrap: break-word; }
.prose a { word-break: break-word; }

/* Standalone navigation links deserve a comfortable tap target.
   Inline links inside a paragraph are deliberately left alone —
   padding them would break the text baseline. */
@media (max-width: 899px) {
  .header-drawer a { padding: .7rem .25rem; }
  .footer-col ul { gap: .15rem; }
  .footer-col a { display: inline-block; padding: .3rem 0; }
  .breadcrumb { padding: .2rem 0; }
}

@media (max-width: 640px) {
  .page-hero { padding: 2.5rem 0 1.75rem; }
  .docs-layout { padding: 1.75rem 0 3rem; }
  .prose > section { padding-bottom: 2rem; }
  .prose h2 { font-size: 1.3rem; }
  .code-block pre { font-size: 11.5px; padding: .8rem .85rem; }
  /* Keep the copy button reachable without hover on touch devices. */
  .code-copy { opacity: 1; }
  .btn { width: 100%; }
  .btn-row { gap: .6rem; }
  .plan { padding: 1.2rem; }
}

/* Standalone (non-inline) links that were under the 24px target minimum. */
.brand { padding: .35rem 0; }
.nf-links a { display: inline-block; padding: .35rem 0; }
