:root {
  --bg: #0E1016;
  --bg-raised: #161A24;
  --panel: #1B202C;
  --border: #2A3040;
  --accent: #3B7BFF;
  --accent-dim: #2C5CC4;
  --text: #F4F6FB;
  --text-muted: #A9B1C4;
  --text-dim: #6E768A;
  --pass: #35C97C;
  --amber: #E8B94B;
  --red: #E5566B;
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* MOBILE CENTERING FIX: without this, any single piece of content
   anywhere on the page that's wider than the phone's screen (a long
   unbroken word, URL, or reference number — most likely candidate is
   AI-generated template text in the "Ready-to-use" copy boxes, see
   .domain-name + pre in views.js) can silently force the whole page
   wider than the viewport. Because body is a flex column below, its
   flex children default to min-width:auto, which lets exactly that
   happen — the page then scrolls horizontally, and since it loads
   scrolled to the left edge, the .wrap content (which IS centered via
   margin:0 auto) visually reads as "shifted left / not centred" even
   though the centering rule itself was never the problem. Two-part
   fix: overflow-x:hidden below stops the page from ever growing wider
   than the viewport in the first place (a safety net that clips rather
   than reflows), and overflow-wrap+min-width fixes on body/its
   children (further down) let long content wrap instead of pushing
   outward, which is the actual root cause rather than the symptom. */
html { overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-wrap: break-word;
  word-break: break-word;
}
/* The three direct flex children of body (header/main/footer below) —
   min-width:0 overrides the flexbox default of min-width:auto, which
   is what actually allows them to shrink to fit the viewport instead
   of being stretched wide by a long unbroken string somewhere inside
   them. This is the real fix; overflow-x:hidden above is the backstop. */
.app-header, .app-main, .app-footer { min-width: 0; }
h1, h2, h3, .wordmark { font-family: "Space Grotesk", sans-serif; }
.step-indicator, .q-domain-tag, .price-tag, .score-bar-fill + p { font-family: "Space Mono", monospace; }

.wrap { max-width: 720px; margin: 0 auto; padding: 40px 20px 80px; }
.bar { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; max-width: 720px; }

.app-header { border-bottom: 1px solid var(--border); position: sticky; top: 0; background: rgba(14,16,22,0.92); backdrop-filter: blur(6px); z-index: 10; }
.wordmark { font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.wordmark .logo-icon { width: 48px; height: 48px; border-radius: 50%; display: inline-block; object-fit: cover; }
.step-indicator { font-size: 18px; color: var(--text-muted); font-weight: 600; }
.progress-track { height: 3px; background: var(--border); }
.progress-fill { height: 100%; background: var(--accent); transition: width .3s ease; }

.app-main { flex: 1; }
.app-footer { text-align: center; font-size: 12px; color: var(--text-dim); padding: 24px 20px; border-top: 1px solid var(--border); }

/* Notice bar (see index.html) — deliberately NOT a blocking cookie
   consent gate: this site sets no cookies and nothing here requires
   opt-in/opt-out under PECR, so there's nothing to "consent" to. This
   is purely a visible, dismissible transparency notice, styled to sit
   quietly at the bottom of the screen rather than interrupt anything. */
.notice-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  background: #010514; /* sampled directly from the logo's own dark navy background */
  border-top: 2px solid var(--accent); /* thin brand-blue edge so the bar still reads as a distinct element against the page, since the fill itself is now almost the same tone as the site background */
  padding: 14px 20px;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.25);
}
.notice-bar-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.notice-bar-text { flex: 1; min-width: 220px; color: #fff; font-size: 13px; line-height: 1.5; }
.notice-bar-text a { color: #fff; text-decoration: underline; }
.notice-bar-dismiss {
  flex-shrink: 0;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
}
.notice-bar-dismiss:hover { color: #010514; background: #fff; border-color: #fff; }
@media (max-width: 520px) {
  .notice-bar-inner { justify-content: center; text-align: center; }
}

.eyebrow { color: var(--accent); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.page-title { font-size: 32px; font-weight: 700; line-height: 1.2; margin: 0 0 14px; }
.lede { color: var(--text-muted); font-size: 16px; line-height: 1.6; margin: 0 0 28px; }

.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.price-tag { font-size: 40px; font-weight: 700; color: var(--accent); }

.btn-row { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.btn { border-radius: 999px; padding: 14px 26px; font-size: 15px; font-weight: 600; border: none; cursor: pointer; font-family: inherit; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dim); }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--text-dim); }

.q-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.q-domain-tag { display: inline-block; background: rgba(59,123,255,0.14); color: var(--accent); font-size: 16px; font-weight: 700; padding: 6px 14px; border-radius: 999px; margin-bottom: 14px; }
.q-text { font-size: 19px; font-weight: 600; margin-bottom: 18px; line-height: 1.4; }
.q-options { display: flex; flex-direction: column; gap: 10px; }
.q-option { display: flex; align-items: center; gap: 10px; padding: 15px 16px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-size: 14px; min-height: 48px; }
.q-option:hover { border-color: var(--accent); }
.q-option input { accent-color: var(--accent); }
.q-option.selected { background: rgba(59,123,255,0.14); border-color: var(--accent); }

.score-bar { height: 10px; background: var(--bg-raised); border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.score-bar-fill { height: 100%; border-radius: 999px; }

.domain-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.domain-row:last-child { border-bottom: none; }
.domain-name { font-size: 14px; font-weight: 600; }
.domain-blurb { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.domain-score { font-family: "Space Mono", monospace; font-size: 14px; }

.badge { display: inline-block; font-size: 11px; padding: 3px 9px; border-radius: 999px; font-weight: 600; }
.badge-demo { background: rgba(232,185,75,0.15); color: var(--amber); border: 1px solid rgba(232,185,75,0.35); margin-bottom: 20px; }

.callout { background: rgba(59,123,255,0.08); border: 1px solid rgba(59,123,255,0.28); border-radius: 12px; padding: 18px 20px; font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-top: 22px; }
.callout strong { color: var(--text); }

.field-group { margin-bottom: 18px; }
.field-label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.wrap { counter-reset: qnum; }
.field-label.qn, .toggle-label.qn { color: #FFFFFF; counter-increment: qnum; }
.field-label.qn::before, .toggle-label.qn::before { content: counter(qnum) ". "; }
.field-select, .field-input { width: 100%; background: var(--bg-raised); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 11px 12px; font-size: 14px; font-family: inherit; }
.field-select:disabled { opacity: .5; cursor: not-allowed; }

/* Looks the same as a disabled button (dimmed) but stays clickable —
   used instead of the native `disabled` attribute on Continue buttons,
   so clicking while incomplete can jump the user to what's missing
   rather than doing nothing. See confirm-profile in app.js. */
.btn-looks-disabled { opacity: .5; }

/* Used to jump the user's eye to whichever required field they haven't
   filled in yet, when they try to continue with the profile form
   incomplete — see confirm-profile in app.js. Applied to the field's
   wrapping .field-group div (data-field="<name>"), not the input
   itself, so it works for button-grid fields too, not just text inputs. */
.field-group.field-highlight {
  outline: 2px solid var(--red);
  outline-offset: 6px;
  border-radius: 10px;
  animation: field-highlight-pulse 1.4s ease-in-out 2;
}
@keyframes field-highlight-pulse {
  0%, 100% { outline-color: var(--red); }
  50% { outline-color: rgba(229,86,107,0.35); }
}

.journey-row { display: flex; align-items: stretch; gap: 0; }
.journey-stage { flex: 1; min-width: 0; padding: 16px; }
.journey-stage.roadmap { flex: 1.6; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
.journey-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-dim); margin-bottom: 10px; }
.journey-arrow { display: flex; align-items: center; justify-content: center; width: 28px; flex-shrink: 0; color: var(--text-dim); font-size: 18px; }
.journey-score { font-size: 30px; font-weight: 700; font-family: "Space Grotesk", sans-serif; }
.journey-step { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 10px; }
.journey-step:last-child { margin-bottom: 0; }
.journey-step-when { font-size: 11px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; display: block; margin-bottom: 2px; }

@media (max-width: 640px) {
  .journey-row { flex-direction: column; }
  .journey-stage.roadmap { border-left: none; border-right: none; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .journey-arrow { width: auto; padding: 4px 0; transform: rotate(90deg); }
}

.steps-number { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; margin: 0 auto 10px; font-family: "Space Mono", monospace; }
.steps-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; text-align: center; overflow-wrap: normal; word-break: normal; }
.steps-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; text-align: center; overflow-wrap: normal; word-break: normal; }

/* Dedicated to the "How it works" 5-step hero visual — separate from
   .journey-row (used by the 3-stage report roadmap above) because 5
   equal columns need more horizontal room before stacking makes sense
   than 3 columns do, so this uses its own, wider breakpoint. Also
   explicitly overrides the site-wide word-break:break-word safety net
   (see that rule's own comment on body, near the top of this file):
   that rule exists to stop one long unbroken token from forcing
   horizontal scroll, but applied to ordinary short English words in
   these narrow columns it was splitting words mid-letter instead of
   wrapping at the space between them. Every word here wraps whole. */
.howitworks-row { display: flex; align-items: stretch; gap: 0; }
.howitworks-stage { flex: 1; min-width: 0; padding: 16px 10px; overflow-wrap: normal; word-break: normal; }
.howitworks-arrow { display: flex; align-items: center; justify-content: center; width: 28px; flex-shrink: 0; color: var(--text-dim); font-size: 18px; }
@media (max-width: 900px) {
  .howitworks-row { flex-direction: column; }
  .howitworks-arrow { width: auto; padding: 4px 0; transform: rotate(90deg); }
}

.faq-item { border-bottom: 1px solid var(--border); padding: 14px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-item summary { cursor: pointer; font-weight: 600; color: var(--text); font-size: 14px; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; float: right; color: var(--text-dim); font-weight: 400; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-answer { color: var(--text-muted); font-size: 13px; line-height: 1.6; margin: 10px 0 0; }

.choice-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.choice-btn { background: var(--bg-raised); border: 1px solid var(--border); color: var(--text-muted); border-radius: 10px; padding: 13px 18px; font-size: 14px; font-family: inherit; cursor: pointer; min-height: 46px; }
.choice-btn:hover { border-color: var(--accent); color: var(--text); }
.choice-btn.selected { background: rgba(59,123,255,0.14); border-color: var(--accent); color: var(--accent); font-weight: 600; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 8px; border-bottom: 1px solid var(--border); cursor: pointer; border-radius: 8px; margin: 0 -8px; }
.toggle-row:last-child { border-bottom: none; }
.toggle-row:hover { background: rgba(255,255,255,0.03); }
.toggle-label { font-size: 14px; }
.toggle { width: 44px; height: 24px; border-radius: 999px; background: var(--border); position: relative; flex-shrink: 0; }
.toggle.on { background: var(--accent); }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s ease; }
.toggle.on::after { left: 22px; }

/* Operations Map — the "before/roadmap/after" companion visual, styled as
   a hub-and-spoke diagram: your business in the centre, the 8 audit
   areas as surrounding nodes, colour-coded by that client's actual score
   band, connected by wire-style lines, plus an ad-hoc-vs-connected-system
   comparison beneath it with icon-badged rows. */
.opsys-panel {
  background: radial-gradient(ellipse at 50% 0%, rgba(59,123,255,0.10), transparent 60%), var(--panel);
  border: 1px solid var(--border); border-top: 2px solid var(--accent);
  border-radius: var(--radius); padding: 28px; margin-bottom: 24px;
}
.opsys-meta-row {
  display: flex; justify-content: space-between; font-family: "Space Mono", monospace;
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim);
  border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 16px;
}
.opsys-title { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 20px; margin: 0 0 2px; }
.opsys-subtitle { color: var(--text-dim); font-size: 13px; margin: 0 0 20px; }

.opsys-grid-wrap { position: relative; margin-bottom: 24px; }
.opsys-wires { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.opsys-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.opsys-hub {
  grid-column: 2; grid-row: 2;
  background: rgba(59,123,255,0.16); border: 1px solid var(--accent);
  border-radius: 12px; padding: 14px 10px; display: flex; flex-direction: column;
  align-items: stretch; justify-content: center; gap: 6px;
  box-shadow: 0 0 24px rgba(59,123,255,0.30), inset 0 0 16px rgba(59,123,255,0.08);
}
.opsys-hub-name { font-weight: 700; color: var(--accent); font-size: 13px; text-align: center; margin-bottom: 2px; }
.opsys-hub-row { font-size: 10px; color: var(--text-muted); display: flex; align-items: baseline; gap: 5px; line-height: 1.4; }
.opsys-hub-row strong { color: var(--text); font-size: 10px; text-transform: uppercase; letter-spacing: .03em; flex-shrink: 0; }

.opsys-node {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 13px; position: relative;
}
.opsys-node.band-low { border-color: rgba(229,86,107,0.5); box-shadow: 0 0 14px -4px rgba(229,86,107,0.45); }
.opsys-node.band-mid { border-color: rgba(232,185,75,0.5); box-shadow: 0 0 14px -4px rgba(232,185,75,0.40); }
.opsys-node.band-high { border-color: rgba(53,201,124,0.5); box-shadow: 0 0 14px -4px rgba(53,201,124,0.40); }
.opsys-node-name { font-size: 12px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: .02em; }
.opsys-node-name::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--border); }
.opsys-node.band-low .opsys-node-name::before { background: var(--red); box-shadow: 0 0 6px var(--red); }
.opsys-node.band-mid .opsys-node-name::before { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
.opsys-node.band-high .opsys-node-name::before { background: var(--pass); box-shadow: 0 0 6px var(--pass); }
.opsys-node-item { font-size: 11px; color: var(--text-muted); line-height: 1.4; padding: 5px 0 5px 8px; border-left: 2px solid var(--border); margin-bottom: 3px; }
.opsys-node-item:last-child { margin-bottom: 0; }

.opsys-compare { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.opsys-col { flex: 1; min-width: 240px; border-radius: 10px; padding: 18px; }
.opsys-col.adhoc { background: rgba(229,86,107,0.06); border: 1px solid rgba(229,86,107,0.28); }
.opsys-col.system { background: rgba(53,201,124,0.06); border: 1px solid rgba(53,201,124,0.28); }
.opsys-col-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 14px; display: flex; align-items: center; gap: 7px; }
.opsys-col.adhoc .opsys-col-title { color: var(--red); }
.opsys-col.system .opsys-col-title { color: var(--pass); }
.opsys-col-title .opsys-icon-badge { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.opsys-col.adhoc .opsys-icon-badge { background: rgba(229,86,107,0.18); color: var(--red); }
.opsys-col.system .opsys-icon-badge { background: rgba(53,201,124,0.18); color: var(--pass); }
.opsys-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.opsys-row:last-child { margin-bottom: 0; }
.opsys-row-icon { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; margin-top: 1px; }
.opsys-col.adhoc .opsys-row-icon { background: rgba(229,86,107,0.14); color: var(--red); }
.opsys-col.system .opsys-row-icon { background: rgba(53,201,124,0.14); color: var(--pass); }
.opsys-row-title { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.opsys-row-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }

.opsys-banner {
  text-align: center; font-size: 14px; font-weight: 600; padding: 14px; border-radius: 10px;
  background: rgba(59,123,255,0.08); border: 1px solid rgba(59,123,255,0.28); color: var(--text);
}

@media (max-width: 640px) {
  .opsys-wires { display: none; }
  .opsys-grid { grid-template-columns: 1fr; }
  .opsys-hub { grid-column: 1; grid-row: auto; order: -1; }
  .opsys-node { grid-column: 1; }
}

/* Report-generation loading screen — see view_loading_q() and
   startLoadingFactsTicker()/stopLoadingFactsTicker() in app.js. */
.loading-spinner {
  width: 44px; height: 44px; margin: 0 auto 28px;
  border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: loading-spin 1s linear infinite;
}
@keyframes loading-spin { to { transform: rotate(360deg); } }
#loadingFactText { transition: opacity .3s ease; }
