/* Kuntur landing — "Cordillera" theme (light).
   Loaded after each page's own <style>, so these rules win on order.
   Palette: snow ground, stone rules, ink text, laguna teal accent,
   flare only for unauthorized/critical. Type: Bricolage Grotesque
   (display) + IBM Plex Sans (body) + IBM Plex Mono (code). */

:root {
  color-scheme: light;
  --bg: #F3F4F1;
  --surface: #FBFBF9;
  --surface-2: #ECEEE9;
  --border: #D7DAD3;
  --contour: #A3AAA0;
  --ink: #151B1D;
  --ink-2: #4A5457;
  --ink-strong: #2E3639;
  --accent: #15706C;
  --accent-h: #0E4F4C;
  --accent-wash: #E3EEEC;
  --good: #15706C;
  --warning: #9A6A00;
  --critical: #B4501A;
  --flare: #D8641F;
  --font: 'IBM Plex Sans', system-ui, sans-serif;
  --display: 'Bricolage Grotesque', 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --radius: 4px;
}

html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
}
::selection { background: #CDE3DF; color: var(--ink); }

/* ── Headings ─────────────────────────────── */
h1, h2, h3, .section-title, .cta-box h2 { font-family: var(--display); color: var(--ink); }
h1 { font-weight: 700; letter-spacing: -0.03em; line-height: 1.02; }
h2, .section-title { font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
h3 { font-weight: 600; letter-spacing: -0.005em; }

/* ── Links & focus ────────────────────────── */
a { color: var(--accent); }
a:hover { color: var(--accent-h); }
a:focus-visible, button:focus-visible, .btn:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ── Nav ──────────────────────────────────── */
nav:not(.crumbs):not([aria-label="Breadcrumb"]) {
  background: var(--bg);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  border-bottom: 1px solid var(--border);
}
.nav-logo { color: var(--ink); }
.nav-logo span { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--ink); letter-spacing: -0.01em; }
.nav-logo svg, .footer-logo svg { color: var(--ink); }
.nav-links a { color: var(--ink-strong); }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--ink); }

/* ── Buttons ──────────────────────────────── */
.btn { border-radius: var(--radius); font-family: var(--font); font-weight: 600; box-shadow: none; }
.btn-primary, .nav-links a.btn-primary { background: var(--accent); color: #F3F4F1 !important; border: 1px solid var(--accent); }
.btn-primary:hover, .nav-links a.btn-primary:hover { background: var(--accent-h); border-color: var(--accent-h); color: #F3F4F1 !important; }
.btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-lg { border-radius: var(--radius); }

/* ── Code ─────────────────────────────────── */
code, kbd, samp, pre { font-family: var(--mono); }
code, kbd {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 3px; color: var(--ink);
}
pre {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--ink);
}
pre code { background: none; border: 0; padding: 0; }
.codewrap, .how-code, .cmd { background: var(--surface); border-color: var(--border); border-radius: var(--radius); color: var(--ink); }

/* ── Tables: ruled, no cards ──────────────── */
table { border-collapse: collapse; }
.table-wrap, .tbl { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
table thead tr, table > tr:first-child { border-top: 1px solid var(--ink); }
th { color: var(--ink-2); font-weight: 500; background: transparent; }
th, td { border-color: var(--border); }
tbody tr:nth-child(even), tbody tr:nth-child(odd) { background: transparent; }
tbody tr:last-child td { border-bottom-color: var(--ink); }

/* ── Flat surfaces instead of dark cards ──── */
.box, .card, .plan, .plans, .hp-plans, .find, .feat-card, .compliance-visual,
.scan, .note, .preview, .tool, .summary, .finding, .signup, .server, .disclaimer {
  background: transparent;
  box-shadow: none;
  border-radius: var(--radius);
}
.plans, .hp-plans { border: 1px solid var(--ink); background: transparent; }
.box, .card, .note, .tool, .preview, .summary, .finding, .disclaimer { border: 1px solid var(--border); }
.note { background: var(--surface); }
.muted, .lead, .meta, .range, .per, .terms-line, .section-sub { color: var(--ink-2); }
.lead { color: var(--ink-strong); }

/* Pills/badges: quiet outlines */
.pill, .feat-tag, .cv-badge, .sev, .status {
  border-radius: 3px; background: transparent; border: 1px solid var(--border); color: var(--ink-strong);
}
.sev-high, .sev-critical, p.err, p.error { color: var(--critical); border-color: currentColor; }
.sev-medium { color: var(--warning); border-color: currentColor; }
.sev-info, .sev-low, p.ok { color: var(--good); border-color: currentColor; }
.note.warn { border-color: #C9A34A; background: #FAF5E8; }

/* ── Forms ────────────────────────────────── */
input, select, textarea {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--border); border-radius: var(--radius);
  font-family: var(--font);
}
input::placeholder, textarea::placeholder { color: #6B7472; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }

/* ── Breadcrumbs / TOC ────────────────────── */
.crumbs, .crumbs a { color: var(--ink-2); }
.toc { background: transparent; border: 0; border-top: 1px solid var(--ink); border-radius: 0; }

/* ── Footer ───────────────────────────────── */
footer { border-top: 1px solid var(--border); }
.footer-logo { color: var(--ink); font-family: var(--display); font-weight: 700; }
.footer-links a, .footer-copy { color: var(--ink-2); }
.footer-links a:hover { color: var(--ink); }

/* ── Contour draw-in (hero) ───────────────── */
@keyframes k-draw { from { stroke-dashoffset: 2400; } to { stroke-dashoffset: 0; } }
.k-contour { stroke-dasharray: 2400; stroke-dashoffset: 0; animation: k-draw 2.4s cubic-bezier(.4,0,.2,1) both; }
.k-contour:nth-child(2) { animation-delay: .1s; } .k-contour:nth-child(3) { animation-delay: .2s; }
.k-contour:nth-child(4) { animation-delay: .3s; } .k-contour:nth-child(5) { animation-delay: .4s; }
.k-contour:nth-child(6) { animation-delay: .5s; } .k-contour:nth-child(7) { animation-delay: .6s; }
.k-contour:nth-child(8) { animation-delay: .7s; } .k-contour:nth-child(9) { animation-delay: .8s; }
.k-contour:nth-child(10) { animation-delay: .9s; }
@media (prefers-reduced-motion: reduce) {
  .k-contour { animation: none; stroke-dashoffset: 0; }
  * { scroll-behavior: auto !important; }
}

/* ── Free scanner: safe path first, one-liner as shortcut ── */
.safe-scan { margin: 12px 0 16px 22px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.safe-scan li { padding-left: 4px; margin: 0; }
.safe-scan li::marker { font-family: var(--mono); color: var(--ink-2); }
.safe-scan code { overflow-wrap: anywhere; }
.scan-shortcut code { font-size: 13px; }
.scan-shortcut .btn { font-size: 13px; padding: 6px 12px; background: transparent; color: var(--ink) !important; border: 1px solid var(--ink); }
.scan-shortcut .btn:hover { background: var(--ink); color: var(--bg) !important; }

/* ── Tables on small screens: scroll sideways, never crush a column ── */
table { overflow-wrap: normal; word-break: normal; }
th, td { overflow-wrap: normal; word-break: normal; hyphens: manual; }

@media (max-width: 760px) {
  table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  th, td { min-width: 6rem; }
}

/* ── Lists: numbers and bullets sit inside the text column ── */
main ol, main ul, article ol, article ul { padding-left: 1.6em; }
main ol li, article ol li { padding-left: .2em; }
.scan-steps { list-style: none !important; counter-reset: kstep; padding-left: 0 !important; margin: 6px 0 12px 0 !important; }
.scan-steps > li { counter-increment: kstep; position: relative; padding-left: 2em !important; margin: 0 0 10px; list-style: none !important; }
.scan-steps > li::marker { content: none; }
.scan-steps > li::before { content: counter(kstep) "."; position: absolute; left: 0; top: 0; width: 1.6em; color: var(--ink-2); font-family: var(--mono); font-size: .92em; line-height: inherit; }
.scan-facts, .nav-links, .footer-links, ul.scan-facts, main ul.guide-list { padding-left: 0; }

/* ── Commands and hashes wrap instead of running off the edge ── */
.scan-hash { display: block; width: fit-content; max-width: 100%; margin-top: 6px; font-size: 12px; overflow-wrap: anywhere; word-break: break-all; }
.scan-shortcut code, .scan-shortcut pre, .scan-cmd code, #scan-cmd { white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; overflow-x: visible; }
@media (max-width: 600px) {
  main code, article code { overflow-wrap: anywhere; }
}

/* ── Every numbered list: numbers inside the text column, never in the margin ── */
main ol:not(.toc-list):not(.scan-steps):not([class*="crumb"]), article ol:not(.toc-list):not(.scan-steps):not([class*="crumb"]) { list-style: none !important; counter-reset: kol; padding-left: 0 !important; margin-left: 0 !important; }
main ol:not(.toc-list):not(.scan-steps):not([class*="crumb"]) > li, article ol:not(.toc-list):not(.scan-steps):not([class*="crumb"]) > li { counter-increment: kol; position: relative; padding-left: 2em !important; list-style: none !important; }
main ol:not(.toc-list):not(.scan-steps):not([class*="crumb"]) > li::marker, article ol:not(.toc-list):not(.scan-steps):not([class*="crumb"]) > li::marker { content: none; }
main ol:not(.toc-list):not(.scan-steps):not([class*="crumb"]) > li::before, article ol:not(.toc-list):not(.scan-steps):not([class*="crumb"]) > li::before { content: counter(kol) "."; position: absolute; left: 0; top: 0; width: 1.7em; color: var(--ink-2); font-family: var(--mono); font-size: .9em; }
main ul:not([class]) , article ul:not([class]) { padding-left: 1.3em; }
.os-label { border: 0 !important; padding: 0 !important; background: none !important; font-size: 13px; color: var(--muted, #4A5457); margin: 16px 0 6px; }

/* ── Copy buttons on code blocks get their own row; they never cover code ── */
.codewrap { position: relative; }
.codewrap > pre { padding-top: 42px !important; }
.codewrap .copy-btn { top: 6px !important; right: 6px !important; min-height: 30px; background: var(--bg) !important; border: 1px solid var(--border) !important; border-radius: 4px !important; color: var(--ink) !important; }
/* short one-line values (hashes, single commands) wrap instead of hiding under the edge */
.codewrap > pre > code { white-space: pre; }
/* code keeps its lines and scrolls sideways inside its box */
.codewrap > pre { overflow-x: auto; }

/* inline code inside tables stays whole (the table scrolls instead) */
table td code, table th code { white-space: normal !important; overflow-wrap: anywhere !important; word-break: normal !important; }
@media (max-width: 760px) {
  table td code, table th code { white-space: nowrap !important; overflow-wrap: normal !important; }
}

/* ── Small screens: wide tables (3+ columns) become stacked cards ── */
@media (max-width: 760px) {
  table.k-stack { display: block; overflow: visible; border: 0; }
  table.k-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  table.k-stack tbody, table.k-stack tr { display: block; }
  table.k-stack tr { border-top: 1px solid var(--ink); padding: 12px 0 4px; }
  table.k-stack tr:last-child { border-bottom: 1px solid var(--ink); }
  table.k-stack td, table.k-stack th { display: block; min-width: 0 !important; border: 0 !important; padding: 4px 0 8px !important; text-align: left; }
  table.k-stack td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 2px; font-family: var(--font); }
  table.k-stack td:first-child { font-weight: 600; }
  table.k-stack td:first-child[data-label]::before { display: none; }
  table.k-stack td code, table.k-stack th code { white-space: normal !important; overflow-wrap: anywhere !important; }
  table.k-stack td:empty { display: none; }
}

/* ── Language switch (EN/ES twins) ───────── */
.nav-links a.lang-switch { font-family: var(--mono); font-size: 13px; letter-spacing: .04em; }
@media (max-width: 768px) { .nav-links a.lang-switch { display: inline-flex !important; margin-right: 14px; } }

/* ── Guide trial CTA: one in-body aside; on wide screens also a sticky one in the empty right column ── */
.k-cta {
  margin: 32px 0; padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--radius); overflow-wrap: normal;
}
.k-cta p { margin: 0; }
.k-cta-text { color: var(--ink); font-size: 16px; line-height: 1.5; }
.k-cta-text strong { font-weight: 600; }
.k-cta-meta { margin-top: 4px !important; color: var(--ink-2); font-size: 14px; }
.k-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px !important; }
.k-cta-actions .btn { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; font-size: 14px; text-decoration: none; }
.k-rail { display: none; }
@media (min-width: 1200px) {
  main.k-guide { display: grid; grid-template-columns: minmax(0, 780px) minmax(0, 1fr); column-gap: 48px; align-items: start; }
  main.k-guide > * { grid-column: 1; }
  main.k-guide > .crumbs { grid-column: 1 / -1; }
  main.k-guide > .k-rail {
    display: block; grid-column: 2; grid-row: 2; align-self: start;
    position: sticky; top: 84px; margin: 0; max-width: 260px;
  }
  .k-rail .k-cta-actions { flex-direction: column; align-items: stretch; }
  .k-rail .k-cta-actions .btn { justify-content: center; }
}

/* product screenshots inside guides (k-shot) */
.k-shot { margin: 24px 0; }
.k-shot img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.k-shot figcaption { font-size: 13px; color: var(--ink-2); margin-top: 8px; line-height: 1.5; }
.k-shot-narrow img { max-width: 600px; }
.k-cta-demo { margin: 10px 0 0 !important; font-size: 13px; }
.k-cta-demo a { color: var(--accent, #1f6f6b); }
