/* Position Edge AI Visibility — site styles.
   Layout: centered 1120px column; full-width colored bands for hero and CTA sections. */
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --ink: #14213a;
  --muted: #5a6680;
  --line: #dde3ee;
  --accent: #1f5eff;
  --accent-ink: #ffffff;
  --accent-soft: #e6edff;
  --signal: #e08a00;
  --good: #1a8a5a;
  --bad: #c23b3b;
  --hero: #0f1b38;
  --hero-ink: #eef2fb;
  --display: "Sora", ui-sans-serif, system-ui, sans-serif;
  --body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--body); }
img { max-width: 100%; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; text-wrap: balance; margin: 0 0 .5em; }
h1 { font-size: clamp(30px, 5vw, 48px); letter-spacing: -.01em; }
h2 { font-size: clamp(24px, 3.4vw, 32px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.fine { font-size: 13px; color: var(--muted); }
.eyebrow { font: 600 12px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--signal); margin-bottom: 12px; display: block; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 50; background: var(--surface); padding: 8px 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; flex-wrap: wrap; }
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); }
.brand b { display: block; font-family: var(--display); font-size: 17px; line-height: 1.1; }
.brand small { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.brand-logo { display: block; height: 34px; width: auto; }
.brand-tag { padding-left: 12px; border-left: 1px solid var(--line); }
@media (max-width: 520px) {
  .brand .brand-tag { display: none; }
  .brand-logo { height: 24px; }
  .bar { flex-wrap: nowrap; gap: 8px; }
  .nav { gap: 8px; }
  .nav .btn-sm { padding: 8px 10px; font-size: 14px; white-space: nowrap; }
  .nav-more > summary { padding: 7px 9px; font-size: 14px; white-space: nowrap; }
  .brand { min-width: 0; flex: 0 1 auto; }
  .nav { flex: none; }
}
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; white-space: nowrap; }
.nav a:hover { color: var(--accent); }
.nav-links { display: flex; gap: 22px; align-items: center; }
.site-header .nav-more { display: none; position: relative; padding: 0; border: 0; }   /* undo the FAQ details styling */
@media (max-width: 900px) {
  .nav { gap: 12px; }
  .nav-links { display: none; }
  .site-header .nav-more { display: block; }
  .nav-more > summary {
    display: block; list-style: none; cursor: pointer; font-weight: 600; font-size: 15px; padding: 7px 12px;
    border: 1px solid var(--line); border-radius: 8px; color: var(--ink);
  }
  .nav-more > summary::-webkit-details-marker { display: none; }
  .nav-more > summary::after { content: " ▾"; font-size: 12px; }
  .nav-drop {
    position: absolute; right: 0; top: calc(100% + 8px); display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(5, 12, 30, .15);
    min-width: 210px; padding: 6px; z-index: 30;
  }
  .nav-more:not([open]) .nav-drop { display: none; }
  .nav-drop a { padding: 10px 12px; border-radius: 6px; }
  .nav-drop a:hover { background: var(--accent-soft); }
}

/* Buttons */
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink) !important; border: 0; border-radius: 8px; padding: 13px 22px; font: 600 16px var(--body); text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { filter: brightness(1.08); }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-ghost { background: transparent; color: var(--accent) !important; box-shadow: inset 0 0 0 1.5px var(--accent); }
.btn-block { display: block; width: 100%; }
.btn[disabled] { opacity: .6; cursor: default; }

/* Sections */
.section { padding-block: 64px; }
.section-tight { padding-block: 40px; }
.band { background: var(--surface); border-block: 1px solid var(--line); }
.hero {
  color: var(--hero-ink); padding-block: 64px 72px;
  background:
    linear-gradient(100deg, rgba(10, 22, 52, .84) 0%, rgba(14, 40, 110, .62) 45%, rgba(31, 94, 255, .38) 100%),
    url("/img/hero.webp") center bottom / cover no-repeat,
    var(--hero);
}
.hero h1 { color: #fff; }
.hero .lede { color: #c5cfe6; font-size: 19px; max-width: 60ch; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: 28px; } }
.lede { font-size: 18px; color: var(--muted); max-width: 64ch; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.grid-2 > *, .grid-3 > * { min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { margin-bottom: 8px; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checklist li { padding-left: 26px; position: relative; }
.checklist li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 12px; height: 7px; border-left: 2px solid var(--good); border-bottom: 2px solid var(--good); transform: rotate(-45deg); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; counter-increment: s; }
.steps li::before { content: counter(s); width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font: 700 16px/40px var(--display); text-align: center; }
.prompt { font-family: ui-monospace, Consolas, monospace; font-size: 14px; background: var(--accent-soft); color: var(--ink); border-radius: 6px; padding: 8px 12px; display: block; }
.notice { border-left: 3px solid var(--signal); background: var(--surface); padding: 12px 16px; border-radius: 0 8px 8px 0; }

/* Forms */
.form { display: grid; gap: 14px; }
.form-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.field label, .label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 5px; }
.hero .field label { color: #dbe3f5; }
/* Blazor's InputText renders <input> with no type attribute, so match that too. */
input:not([type]), input[type=text], input[type=email], input[type=tel], input[type=url], input[type=number], input[type=password], select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid #c9d2e3; border-radius: 8px; background: var(--surface); color: var(--ink); font: 16px var(--body);
  transition: border-color .15s, box-shadow .15s;
}
input:not([type]):focus, input[type=text]:focus, input[type=email]:focus, input[type=tel]:focus, input[type=url]:focus, input[type=number]:focus, input[type=password]:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31, 94, 255, .18);
}
input.invalid, select.invalid, textarea.invalid { border-color: var(--bad); }
input::placeholder, textarea::placeholder { color: #9aa5ba; }
/* "Other" industry: ask for the niche only when Other is selected (no script needed). */
.field-other { display: none; }
.form:has(option[value="Other"]:checked) .field-other, .field-other.show { display: block; }
textarea { min-height: 110px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; }
.check input { margin-top: 3px; flex: none; }
.hero .check { color: #c5cfe6; }
.validation-message, .error { color: var(--bad); font-size: 14px; }
.form-card { background: var(--surface); color: var(--ink); border-radius: 14px; padding: 24px; box-shadow: 0 20px 50px rgba(5, 12, 30, .35); }
.form-card .check { color: var(--muted); }
.hero .form-card .field label { color: var(--ink); }

/* Pricing */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; align-items: stretch; }
.price { display: flex; flex-direction: column; gap: 14px; }
.price.featured { border: 2px solid var(--accent); }
.price .amount { font: 700 34px/1 var(--display); }
.price .amount small { font: 500 14px var(--body); color: var(--muted); }
.price .checklist { flex: 1; }
.tag { display: inline-block; font: 600 11px/1 var(--body); letter-spacing: .06em; text-transform: uppercase; padding: 5px 9px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }

/* Report */
.score-ring { --v: 0; width: 160px; height: 160px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--ring, var(--accent)) calc(var(--v) * 1%), var(--line) 0); }
.score-ring > div { width: 128px; height: 128px; border-radius: 50%; background: var(--surface); color: var(--ink); display: grid; place-items: center; text-align: center; }
.score-ring b { font: 700 40px/1 var(--display); display: block; }
.score-ring span { font-size: 12px; color: var(--muted); }
.meter { height: 9px; background: var(--line); border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.lvl-low { --ring: var(--bad); } .lvl-low i { background: var(--bad); }
.lvl-mid { --ring: var(--signal); } .lvl-mid i { background: var(--signal); }
.lvl-hi { --ring: var(--good); } .lvl-hi i { background: var(--good); }
.lvl-ok { --ring: var(--accent); } .lvl-ok i { background: var(--accent); }
.lvl-na .meter { background: repeating-linear-gradient(45deg, var(--line) 0 6px, #eef1f7 6px 12px); }
.lvl-na .metric-row b { color: var(--muted); font-weight: 500; }
.open-fixes { margin-left: 8px; font-size: 12px; color: var(--bad); font-weight: 600; white-space: nowrap; }
.gain { margin-left: 6px; font-size: 12px; font-weight: 700; color: var(--good); background: #e5f5ee; border-radius: 99px; padding: 2px 8px; white-space: nowrap; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 4px 0 10px; vertical-align: -1px; background: var(--ring); }
.key:first-child { margin-left: 0; }
.partial-note { margin: 14px 0 0; max-width: 70ch; font-size: 14px; color: #ffe3b0; border-left: 3px solid var(--signal); padding-left: 12px; }
.metric { display: grid; gap: 6px; }
.metric-row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.metric-row b { font-variant-numeric: tabular-nums; }
.fix { display: grid; grid-template-columns: 24px 1fr; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.fix:first-child { border-top: 0; }
.dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 6px; }
.dot.fail { background: var(--bad); } .dot.pass { background: var(--good); }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* Tables */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 16px 0; }
summary { cursor: pointer; font-weight: 600; font-size: 17px; }
details p { margin: 10px 0 0; color: var(--muted); }

/* CTA band */
.cta { background: var(--hero); color: var(--hero-ink); border-radius: 16px; padding: 40px 28px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.cta h2 { color: #fff; margin: 0; }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding-block: 48px; margin-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
.footer-grid a { display: block; color: var(--muted); text-decoration: none; font-size: 15px; padding: 2px 0; }
.footer-grid a:hover { color: var(--accent); }
.foot-h { font: 600 12px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: #fff3cd; padding: 12px 16px; z-index: 1000; }

/* Admin */
.admin { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.admin-nav { background: var(--hero); color: var(--hero-ink); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; }
.admin-nav a { color: #c5cfe6; text-decoration: none; padding: 8px 10px; border-radius: 6px; font-size: 15px; }
.admin-nav a.active, .admin-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.admin-main { padding: 28px max(16px, env(safe-area-inset-right, 0px)) 48px 28px; min-width: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 24px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.kpi b { display: block; font: 700 26px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.kpi span { font-size: 13px; color: var(--muted); }
.pill { display: inline-block; padding: 3px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--accent-soft); color: var(--accent); }
.pill.good { background: #e3f5ec; color: var(--good); } .pill.bad { background: #fbe7e7; color: var(--bad); } .pill.warn { background: #fdf1de; color: #9a5d00; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar input, .toolbar select { width: auto; min-width: 180px; }
@media (max-width: 760px) { .admin { grid-template-columns: 1fr; } .admin-nav { flex-direction: row; flex-wrap: wrap; } }
