/* Shaka Cyber - "Riptide" portal theme.
   Official brand palette: Custom Blue 1 #164C72, Custom Blue 2 #8AC2DD.
   Type: Aptos (headings) / Calibri (body), system fallbacks. Offline only:
   no external fonts or CDNs. Color tokens live on :root; dark mode redefines
   them via prefers-color-scheme. Existing template class names (card, btn,
   secondary, muted, pill, table, label, input, flash, sev-*, sandbox, code,
   nav, brand, upgrade-cta) are restyled, never renamed. */

:root {
  /* Brand palette (light / default) */
  --navy-deep:    #0e3350;   /* deep navy, header gradient base */
  --brand:        #164C72;   /* Custom Blue 1 - primary */
  --brand-strong: #0f3a5a;   /* darker blue for hover/active */
  --accent:       #8AC2DD;   /* Custom Blue 2 - light accent */
  --accent-soft:  #e4f1f7;   /* pale blue tint */
  --link:         #164C72;   /* link text (flips light in dark mode) */

  --bg:     #f4f8fb;         /* cool near-white background */
  --surface:#ffffff;         /* cards */
  --fg:     #10222e;         /* blue-ink text */
  --muted:  #4d6575;         /* secondary text */
  --line:   #d4e1ea;         /* cool hairline borders */
  --field:  #ffffff;         /* input background */

  --ok-bg:   #e5f3eb; --ok-line:   #bcdcc8; --ok-edge:  #1f7a4d;
  --err:     #b3261e; --err-bg:  #fbeae8; --err-line:  #f1c7c2;
  --warn:    #8a6d00; --warn-bg: #f8f3df; --warn-line: #ead9a0;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 34, 46, .06), 0 6px 20px rgba(16, 34, 46, .06);

  --font-head: "Aptos", "Segoe UI Variable", "Segoe UI", system-ui, Arial, sans-serif;
  --font-body: "Calibri", "Segoe UI", system-ui, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --navy-deep:    #07202f;
    --brand:        #164C72;
    --brand-strong: #2a73a8;
    --accent:       #8AC2DD;
    --accent-soft:  #10303f;
    --link:         #8AC2DD;

    --bg:     #0d1b26;
    --surface:#122534;
    --fg:     #e7f0f6;
    --muted:  #9fb6c4;
    --line:   #26485c;
    --field:  #0e2230;

    --ok-bg:  #123026; --ok-line:  #1f5e43; --ok-edge: #4fc48a;
    --err:    #ff7a70; --err-bg: #3a1d1a; --err-line: #7a2f2a;
    --warn:   #e0b84a; --warn-bg: #342c10; --warn-line: #6b5420;

    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

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

/* ---- Header / nav (white bar: the navy logo sits in its natural home) ---- */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 24px;
  background: #ffffff;
  border-bottom: 3px solid #8AC2DD;
  color: #164C72;
}

.brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: #164C72;
}
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; flex: 0 0 auto;
}
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand-mark svg { display: block; width: 100%; height: 100%; }
.brand-text { display: inline-flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-head);
  font-weight: 800; font-size: 1.12rem; letter-spacing: .4px; color: #164C72;
}
.brand-tag {
  font-size: .72rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: #5e7d92;
}

nav a {
  color: #1f4a6b; text-decoration: none; margin: 0 8px; font-weight: 600;
  font-size: .95rem; padding-bottom: 2px; border-bottom: 2px solid transparent;
}
nav a:hover { color: #164C72; border-bottom-color: #8AC2DD; }
.nav form { display: inline; }
.nav button.secondary, .nav .btn.secondary {
  color: #164C72; border-color: #cfe0ea; background: transparent;
}
.nav button.secondary:hover, .nav .btn.secondary:hover {
  background: #eef5fa; color: #0f3a5a; border-color: #8AC2DD;
}

main { max-width: 880px; margin: 28px auto; padding: 0 16px; }

/* ---- Footer ---- */
.site-footer {
  max-width: 880px; margin: 32px auto 24px; padding: 16px;
  color: var(--muted); font-size: .85rem;
  display: flex; align-items: center; gap: 8px;
  border-top: 1px solid var(--line);
}
.site-footer .shaka { font-size: 1rem; }

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

h1, h2, h3 { color: var(--fg); font-family: var(--font-head); }
h1 { font-size: 1.5rem; margin-top: 0; font-weight: 800; }
h1::after {
  content: ""; display: block; width: 44px; height: 3px; margin-top: 8px;
  background: var(--accent); border-radius: 3px;
}
h2 { font-size: 1.15rem; font-weight: 700; }
a { color: var(--link); }
a:hover { color: var(--brand-strong); }

/* ---- Forms ---- */
label { display: block; margin: 14px 0 4px; font-weight: 600; font-size: .92rem; color: var(--fg); }
input[type=text], input[type=email], input[type=password], input[type=url] {
  width: 100%; padding: 10px 11px;
  border: 1px solid var(--line); border-radius: 8px;
  font-size: 1rem; background: var(--field); color: var(--fg);
  font-family: var(--font-body);
}
input[type=text]:focus, input[type=email]:focus,
input[type=password]:focus, input[type=url]:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(22, 76, 114, .2);
}

/* ---- Buttons ---- */
button, .btn {
  background: var(--brand); color: #ffffff; border: 0; border-radius: 8px;
  padding: 10px 16px; font-size: .95rem; font-weight: 600; cursor: pointer;
  text-decoration: none; display: inline-block; transition: background .15s ease;
  font-family: var(--font-body);
}
button:hover, .btn:hover { background: var(--brand-strong); }
button.secondary, .btn.secondary {
  background: transparent; color: var(--link);
  border: 1px solid var(--line);
}
button.secondary:hover, .btn.secondary:hover {
  background: var(--accent-soft); color: var(--brand-strong); border-color: var(--brand);
}

/* ---- Tables ---- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); border-bottom: 2px solid var(--line);
}
tbody tr:hover { background: var(--accent-soft); }

/* ---- Misc text ---- */
.muted { color: var(--muted); font-size: .9rem; }

/* ---- Flash / alerts ---- */
.flash {
  padding: 11px 14px; border-radius: 8px; margin-bottom: 12px;
  border-left: 4px solid var(--line);
}
.flash.ok    { background: var(--ok-bg);  border: 1px solid var(--ok-line);  border-left: 4px solid var(--ok-edge); }
.flash.error { background: var(--err-bg); border: 1px solid var(--err-line); border-left: 4px solid var(--err); }

/* ---- Pills / severity ---- */
.pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 600; border: 1px solid var(--line); color: var(--fg);
}
.sev-High, .sev-Critical { color: #a3261b; border-color: #f3c0c0; background: #fdeaea; }
.sev-Medium { color: #8a5a00; border-color: #f0d9a8; background: #fff5e0; }
.sev-Low, .sev-Info { color: #164C72; border-color: #bcd9ea; background: #eaf4fa; }

@media (prefers-color-scheme: dark) {
  .sev-High, .sev-Critical { color: #ff9c90; border-color: #7a2b2e; background: #3a1618; }
  .sev-Medium { color: #f0c870; border-color: #6b5420; background: #2e2510; }
  .sev-Low, .sev-Info { color: #a9d3e8; border-color: #2c4a6b; background: #0f2436; }
}

/* ---- Sandbox notice (semantic warning) ---- */
.sandbox {
  background: var(--warn-bg); border: 1px solid var(--warn-line); border-left: 4px solid var(--warn);
  color: var(--warn); padding: 10px 14px; border-radius: 8px; font-size: .9rem; margin-bottom: 14px;
}

/* ---- Upgrade call-to-action (free scan results) ---- */
.upgrade-cta {
  background: var(--accent-soft); border: 1px solid var(--line); border-left: 4px solid var(--brand);
  padding: 14px 16px; border-radius: 10px; margin: 6px 0 18px;
}

/* ---- Code ---- */
code {
  background: rgba(22, 76, 114, .09); color: var(--brand-strong);
  padding: 1px 6px; border-radius: 5px; font-size: .9em;
}
@media (prefers-color-scheme: dark) {
  code { background: rgba(138, 194, 221, .14); color: var(--accent); }
}

/* ---- Responsive ---- */
@media (max-width: 560px) {
  .nav { flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px 16px; }
  nav a { margin: 0 10px 0 0; }
}

/* ---- Domain-verification snippets ---- */
.copywrap { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; margin: 4px 0; }
pre.token {
  margin: 0; flex: 1 1 320px; min-width: 0;
  background: var(--accent-soft); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; font-size: .86rem; color: var(--fg);
  white-space: pre-wrap; word-break: break-all;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}
.copybtn { flex: 0 0 auto; }
details > summary { cursor: pointer; }

/* ---- Textareas, file inputs, verification layout (responsive, full-width) ---- */
textarea {
  width: 100%; box-sizing: border-box; display: block;
  padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px;
  font-size: .95rem; background: var(--field); color: var(--fg);
  font-family: var(--font-body); resize: vertical; min-height: 64px;
}
textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(22, 76, 114, .2);
}
input[type=file] { max-width: 100%; font-size: .92rem; color: var(--fg); }
.verify-alt { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line); }
.cred-mask { font-family: ui-monospace, Consolas, monospace; letter-spacing: 2px; color: var(--muted); }

/* ---- Engagement: status banner, get-started steps, upgrade ---- */
.banner {
  border-radius: 10px; padding: 12px 16px; margin-bottom: 16px;
  font-weight: 600; border: 1px solid var(--line);
}
.banner-err { background: var(--err-bg); border-color: var(--err-line); color: var(--err); }
.banner-ok  { background: var(--ok-bg);  border-color: var(--ok-line);  color: var(--ok-edge); }
.banner .sub { display: block; font-weight: 400; font-size: .9rem; margin-top: 2px; }

ol.steps {
  list-style: none; counter-reset: step; padding: 0; margin: 12px 0 4px;
  display: flex; flex-direction: column; gap: 8px;
}
ol.steps li {
  counter-increment: step; position: relative; padding: 9px 12px 9px 42px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
}
ol.steps li::before {
  content: counter(step); position: absolute; left: 11px; top: 10px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--muted); color: #fff; font-size: .76rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
ol.steps li.done { border-color: var(--ok-line); }
ol.steps li.done::before { content: "\2713"; background: var(--ok-edge); }
ol.steps li .st-sub { display: block; color: var(--muted); font-size: .86rem; font-weight: 400; margin-top: 2px; }
ol.steps li .st-title { font-weight: 600; }

.upgrade-card { border-left: 4px solid var(--brand); }
.plan-row { display: flex; gap: 14px; flex-wrap: wrap; margin: 10px 0; }
.plan { flex: 1 1 220px; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: var(--surface); }
.plan h3 { font-size: 1rem; margin: 0 0 6px; }
.plan.full { border-color: var(--brand); }
.plan .price { font-family: var(--font-head); font-weight: 800; font-size: 1.4rem; color: var(--brand); }

/* ---- Auth hero (login/register): real logo + slogan ---- */
.auth-hero { text-align: center; margin: 6px auto 20px; }
.auth-logo {
  width: 160px; max-width: 62%; height: auto;
  background: #ffffff; border-radius: 16px; padding: 14px; box-sizing: border-box;
  box-shadow: var(--shadow);
}
.slogan {
  font-family: var(--font-head); font-weight: 800; font-size: 1.18rem;
  color: var(--link); margin: 14px 0 2px;
}

/* ---- Select inputs ---- */
select {
  width: 100%; box-sizing: border-box; padding: 10px 11px;
  border: 1px solid var(--line); border-radius: 8px; font-size: .95rem;
  background: var(--field); color: var(--fg); font-family: var(--font-body);
}
select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(22,76,114,.2); }

/* ---- Clickable get-started steps ---- */
ol.steps li { cursor: pointer; transition: border-color .12s ease, background .12s ease; }
ol.steps li:hover, ol.steps li:focus-within { border-color: var(--brand); background: var(--accent-soft); }
ol.steps li a.step-link { display: block; color: inherit; text-decoration: none; }
ol.steps li a.step-link::after { content: ""; position: absolute; inset: 0; border-radius: 8px; }
ol.steps li a.step-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
