/* ==========================================================================
   Truescope Pentest Planner (wizard + result)
   Loads AFTER styles.css and reuses its tokens. Fully theme-aware.
   ========================================================================== */

body.planner { background: var(--bg-alt); }

/* ---- App bar ---- */
.pl-bar { position: sticky; top: 0; z-index: 50; background: var(--nav-bg); backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--border); }
.pl-bar-inner { max-width: 1080px; margin: 0 auto; padding: 0 40px; height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pl-bar-brand { display: flex; align-items: center; gap: 10px; }
.pl-bar-brand b { font-weight: 700; font-size: 15px; color: var(--text); }
.pl-bar-brand .tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); border-left: 1px solid var(--border); padding-left: 11px; }
.pl-bar-right { display: flex; align-items: center; gap: 18px; }
.pl-step-meta { display: flex; flex-direction: column; gap: 7px; align-items: flex-end; }
.pl-step-meta .lbl { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.pl-progress { display: flex; gap: 6px; width: 180px; }
.pl-progress i { height: 4px; border-radius: 2px; background: var(--border); flex: 1; transition: background .25s ease; }
.pl-progress i.done { background: var(--accent); }
.pl-exit { font-size: 13px; color: var(--text-muted); cursor: pointer; background: none; border: none; font-family: inherit; }
.pl-exit:hover { color: var(--accent-text); }

/* ---- Stage ---- */
.pl-stage { max-width: 1080px; margin: 0 auto; padding: 48px 40px 120px; }
.pl-stage.narrow { max-width: 900px; }
.pl-cols { display: grid; grid-template-columns: 1fr 320px; gap: 36px; align-items: start; }
.pl-eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }
.pl-title { font-family: var(--font-display); font-weight: 440; letter-spacing: -.01em; line-height: 1.1; font-size: 33px; color: var(--text); }
.pl-help { font-size: 15.5px; color: var(--text-muted); max-width: 580px; }

/* ---- Selectable tiles ---- */
.pl-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pl-tile { background: var(--surface); border: 1px solid var(--border); border-radius: 13px; padding: 18px; display: flex; gap: 14px; align-items: flex-start; cursor: pointer; position: relative; transition: all .15s ease; }
.pl-tile:hover { border-color: var(--accent); }
.pl-tile.sel { border-color: var(--accent); background: var(--accent-tint); box-shadow: 0 0 0 1px var(--accent); }
.pl-tile.dashed { border-style: dashed; }
.pl-tile .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; color: var(--accent-text); }
.pl-tile.sel .ic { background: var(--accent-tint); border-color: var(--accent-line); }
.pl-tile .t { display: flex; flex-direction: column; gap: 4px; padding-right: 24px; }
.pl-tile .t b { font-size: 15.5px; font-weight: 600; color: var(--text); }
.pl-tile .t span { font-size: 13px; color: var(--text-muted); line-height: 1.45; }
.pl-tick { position: absolute; top: 15px; right: 15px; width: 21px; height: 21px; border-radius: 6px; border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; background: var(--surface); color: var(--on-accent); }
.pl-tile.sel .pl-tick { background: var(--accent); border-color: var(--accent); }
.pl-tick svg { opacity: 0; }
.pl-tile.sel .pl-tick svg { opacity: 1; }

/* ---- Question blocks ---- */
.pl-q { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px 24px; display: flex; flex-direction: column; gap: 15px; }
.pl-q.hl { border-color: var(--accent-line); }
.pl-q-head { display: flex; align-items: center; gap: 11px; }
.pl-qidx { font-family: var(--font-mono); font-size: 11px; color: var(--accent-text); background: var(--accent-tint); border: 1px solid var(--accent-line); width: 26px; height: 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.pl-q-title { font-size: 16px; font-weight: 600; color: var(--text); }
.pl-followup { font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); background: var(--accent-tint); padding: 3px 8px; border-radius: 5px; margin-left: auto; }

.pl-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 3px; background: var(--surface-2); gap: 3px; }
.pl-seg .opt { font-size: 14px; font-weight: 500; padding: 8px 20px; border-radius: 999px; color: var(--text-muted); cursor: pointer; user-select: none; }
.pl-seg .opt.sel { background: var(--accent); color: var(--on-accent); font-weight: 600; }

.pl-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.pl-pill { font-size: 13.5px; font-weight: 500; padding: 9px 15px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; user-select: none; }
.pl-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border); flex: 0 0 auto; }
.pl-pill.sel { border-color: var(--accent); background: var(--accent-tint); color: var(--text); }
.pl-pill.sel .dot { background: var(--accent); }

.pl-stepper { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.pl-stepper button { width: 46px; height: 48px; border: none; background: var(--surface); font-size: 22px; color: var(--text-muted); cursor: pointer; }
.pl-stepper button:hover { color: var(--accent-text); }
.pl-stepper .val { min-width: 60px; text-align: center; font-family: var(--font-display); font-size: 24px; color: var(--text); border-left: 1px solid var(--border); border-right: 1px solid var(--border); height: 48px; display: flex; align-items: center; justify-content: center; padding: 0 8px; }
.pl-field { display: flex; flex-direction: column; gap: 8px; }
.pl-field label { font-size: 13.5px; color: var(--text-muted); }
.pl-input { font-family: var(--font-mono); font-size: 14px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; width: 100%; }
.pl-input::placeholder { color: var(--text-muted); }

/* ---- Rail: scope so far ---- */
.pl-rail { position: sticky; top: 90px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-card); }
.pl-rail-head { padding: 15px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.pl-rail-head .lbl { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.pl-rail-head .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.pl-rail-body { padding: 4px 18px 14px; }
.pl-rail-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; color: var(--text); }
.pl-rail-row:last-child { border-bottom: none; }
.pl-rail-row svg { color: var(--accent-text); flex: 0 0 auto; }
.pl-rail-row.empty { color: var(--text-muted); }
.pl-rail-note { padding: 12px 18px; background: var(--accent-tint); border-top: 1px solid var(--border); font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); line-height: 1.5; }

/* ---- Callout ---- */
.pl-callout { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; padding: 16px 18px; }
.pl-callout .lbl { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 7px; }
.pl-callout p { font-size: 14.5px; color: var(--text); }

/* ---- Footer nav ---- */
.pl-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--border); }
.pl-foot-inner { max-width: 1080px; margin: 0 auto; padding: 16px 40px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pl-foot .right { display: flex; align-items: center; gap: 16px; }
.pl-count { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.btn[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* ---- Recommendation + Plan ---- */
.pl-reco { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-float); }
.pl-reco-head { background: var(--ink-900); color: var(--ink-fg); padding: 26px 30px; display: flex; align-items: center; gap: 14px; }
.pl-reco-head .badge { width: 40px; height: 40px; border-radius: 50%; background: rgba(20,187,219,.14); border: 1px solid var(--accent); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; box-shadow: 0 0 24px -6px rgba(20,187,219,.7); color: var(--accent-bright); }
.pl-reco-head .lbl { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-bright); }
.pl-reco-head .name { font-family: var(--font-display); font-size: 26px; color: var(--ink-fg); }
.pl-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.pl-chip { font-family: var(--font-mono); font-size: 12px; color: var(--accent-text); background: var(--accent-tint); border: 1px solid var(--accent-line); padding: 6px 12px; border-radius: 8px; }

.pl-plan { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-float); }
.pl-plan-cover { background: radial-gradient(700px 260px at 82% -10%, rgba(20,187,219,.14), transparent 62%), var(--ink-900); color: var(--ink-fg); padding: 30px 36px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.pl-plan-cover h1 { font-family: var(--font-display); font-weight: 440; font-size: 34px; color: var(--ink-fg); }
.pl-plan-cover .meta { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--ink-muted); }
.pl-plan-body { padding: 30px 36px; }
.pl-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 40px; }
.pl-sec-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.pl-mono { font-family: var(--font-mono); font-size: 14px; color: var(--text); }
.pl-role { font-family: var(--font-mono); font-size: 12.5px; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); padding: 6px 12px; border-radius: 7px; }
.pl-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 40px; }
.pl-checks span { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--text); }
.pl-checks svg { flex: 0 0 auto; }
.pl-notinc { background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; padding: 16px 20px; }
.pl-need span { display: flex; align-items: center; gap: 11px; font-size: 14.5px; color: var(--text); }
.pl-needbox { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--text-muted); flex: 0 0 auto; }
.pl-figure { border-radius: 14px; padding: 22px 24px; display: flex; flex-direction: column; gap: 5px; }
.pl-figure.dark { background: var(--ink-900); color: var(--ink-fg); }
.pl-figure.light { background: var(--surface); border: 1px solid var(--border); }
.pl-figure .k { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.pl-figure.dark .k { color: var(--ink-muted); }
.pl-figure.light .k { color: var(--text-muted); }
.pl-figure .v { font-family: var(--font-display); font-weight: 440; font-size: 34px; }
.pl-figure.dark .v { color: var(--ink-fg); }
.pl-figure.light .v { color: var(--text); }
.pl-figure .sub { font-family: var(--font-mono); font-size: 11px; color: var(--accent-text); }

/* ---- Smart CTA ---- */
.pl-cta { border-top: 1px solid var(--border); background: var(--surface-2); padding: 30px 36px 34px; }
.pl-cta-head { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; margin-bottom: 22px; }
.pl-cta-head h2 { font-family: var(--font-display); font-weight: 440; font-size: 26px; color: var(--text); }
.pl-cta-head p { font-size: 15px; color: var(--text-muted); max-width: 520px; }
.pl-paths { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pl-path { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.pl-path .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.pl-path h3 { font-family: var(--font-display); font-weight: 440; font-size: 19px; color: var(--text); }
.pl-path p { font-size: 14px; color: var(--text-muted); flex: 1; }
.pl-path.primary { background: linear-gradient(160deg, #0f2a33, var(--ink-900)); border-color: var(--accent-line); box-shadow: 0 0 0 1px rgba(20,187,219,.08), 0 24px 60px -44px rgba(20,187,219,.6); }
.pl-path.primary .k { color: var(--accent-bright); }
.pl-path.primary h3 { color: var(--ink-fg); }
.pl-path.primary p { color: var(--ink-soft); }
.pl-review { margin-top: 18px; background: var(--surface); border: 1px dashed var(--accent-line); border-radius: 14px; padding: 18px 22px; display: flex; align-items: center; gap: 18px; }
.pl-review .ic { width: 40px; height: 40px; border-radius: 11px; background: var(--accent-tint); border: 1px solid var(--accent-line); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; color: var(--accent-text); }
.pl-review .t { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pl-review .t b { font-size: 15.5px; color: var(--text); }
.pl-review .t span { font-size: 13.5px; color: var(--text-muted); }
.pl-fineprint { text-align: center; font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); margin-top: 20px; }

/* ---- Loading spinner ---- */
.pl-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent); animation: pl-spin .8s linear infinite; }
@keyframes pl-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pl-spinner { animation: none; } }

/* ---- Lead form (quote / review) ---- */
.pl-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pl-form .full { grid-column: 1 / -1; }
.pl-form label { font-size: 13px; color: var(--text-muted); display: block; margin-bottom: 6px; }
.pl-form input, .pl-form textarea { width: 100%; font-family: var(--font-sans); font-size: 14px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; }
.pl-form textarea { min-height: 90px; resize: vertical; }
.pl-note { font-size: 13px; padding: 12px 14px; border-radius: 10px; }
.pl-note.ok { background: rgba(48,164,108,.1); color: var(--pass); border: 1px solid rgba(48,164,108,.3); }
.pl-note.err { background: rgba(229,72,77,.1); color: var(--sev-critical); border: 1px solid rgba(229,72,77,.3); }

@media (max-width: 860px) {
  .pl-bar-inner, .pl-stage, .pl-foot-inner { padding-left: 22px; padding-right: 22px; }
  .pl-cols { grid-template-columns: 1fr; }
  .pl-rail { position: static; }
  .pl-tiles { grid-template-columns: 1fr; }
  .pl-meta-grid, .pl-checks, .pl-paths, .pl-form { grid-template-columns: 1fr; }
  .pl-bar-brand .tag { display: none; }
}
