:root{--bg:#f5f7fb;--card:#fff;--text:#172033;--muted:#68748a;--line:#e4e8f0;--accent:#315efb;--good:#1b8a5a;--warn:#bf6b00;--bad:#bd3535}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;background:var(--bg);color:var(--text)}button,input,textarea{font:inherit}.shell{display:grid;grid-template-columns:230px 1fr;min-height:100vh}aside{background:#111827;color:white;padding:24px 18px;display:flex;flex-direction:column}.brand{display:flex;gap:12px;align-items:center;margin-bottom:36px}.brand small{display:block;color:#9ca3af;margin-top:2px}.mark{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:#fff;color:#111827;font-weight:800}nav{display:grid;gap:8px}nav button{border:0;background:transparent;color:#9ca3af;text-align:left;padding:11px 12px;border-radius:9px}nav .active{background:#1f2937;color:white}.notice{margin-top:auto;padding:14px;background:#1f2937;border-radius:12px;font-size:13px}.notice span{color:#9ca3af}main{padding:36px;max-width:1280px;width:100%;margin:auto}header{display:flex;align-items:end;justify-content:space-between;margin-bottom:26px}.eyebrow{letter-spacing:.12em;font-size:11px;color:var(--accent);font-weight:800;margin:0 0 8px}h1{margin:0;font-size:34px}button{border:0;border-radius:10px;padding:10px 14px;background:var(--accent);color:white;font-weight:700;cursor:pointer}.secondary{background:white;color:var(--text);border:1px solid var(--line)}.tabs{display:flex;gap:8px;margin-bottom:20px;overflow:auto}.tab{background:white;border:1px solid var(--line);color:var(--muted);white-space:nowrap}.tab.active{background:#172033;color:white;border-color:#172033}.grid{display:grid;grid-template-columns:1.2fr .8fr;gap:18px}.card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:20px;box-shadow:0 3px 15px rgba(20,30,55,.04)}.hero{display:flex;gap:24px;align-items:center}.score{width:118px;height:118px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--accent) calc(var(--score)*1%),#e9edf5 0);position:relative}.score:after{content:"";position:absolute;inset:9px;background:white;border-radius:50%}.score strong{z-index:1;font-size:30px}.muted{color:var(--muted)}.pill{display:inline-flex;padding:5px 9px;border-radius:999px;background:#eef2ff;color:#3b50a7;font-size:12px;font-weight:700}.check,.rec{border-top:1px solid var(--line);padding:14px 0;display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:start}.check:first-of-type,.rec:first-of-type{border-top:0}.dot{width:10px;height:10px;border-radius:50%;margin-top:5px}.good{background:var(--good)}.needs_attention{background:var(--warn)}.unknown{background:#9ca3af}.impact{font-size:11px;text-transform:uppercase;font-weight:800;color:var(--muted)}h2{margin:0 0 6px;font-size:20px}h3{margin:0 0 5px;font-size:15px}.big-action{border-left:4px solid var(--accent)}.source{font-size:12px;color:var(--muted);margin-top:12px}.empty{padding:30px;text-align:center}.social-box{display:flex;gap:12px;align-items:center;padding:14px;border:1px dashed #cdd5e3;border-radius:12px;background:#fafbfe}.social-icon{width:38px;height:38px;border-radius:10px;background:#1877f2;color:white;display:grid;place-items:center;font-weight:900}dialog{border:0;border-radius:16px;padding:0;box-shadow:0 20px 60px rgba(0,0,0,.2);width:min(520px,90vw)}form{padding:24px;display:grid;gap:14px}label{display:grid;gap:6px;font-size:13px;font-weight:700}input,textarea{border:1px solid var(--line);padding:10px;border-radius:9px}textarea{min-height:80px}.dialog-actions{display:flex;justify-content:flex-end;gap:8px}@media(max-width:800px){.shell{grid-template-columns:1fr}aside{display:none}main{padding:20px}.grid{grid-template-columns:1fr}header{align-items:flex-start;gap:12px}.hero{align-items:flex-start}.score{flex:0 0 auto}}

.metric{display:flex;justify-content:space-between;padding:12px 0;border-bottom:1px solid #333}.metric:last-child{border:0}
.history{display:flex;gap:8px;flex-wrap:wrap}.history-chip{padding:7px 10px;border:1px solid #394150;border-radius:999px;font-size:12px}
.feedback{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin-top:12px}.feedback button{padding:5px 9px;font-size:11px}
.inline-form{display:grid;grid-template-columns:1fr 1.5fr auto;gap:8px;margin-top:12px}.inline-form input{min-width:0;background:#101217;color:#fff;border:1px solid #394150;border-radius:7px;padding:9px}
.rec-rich p{margin:8px 0}.rec-rich small{color:#9ca8bb}
@media(max-width:760px){.inline-form{grid-template-columns:1fr}.feedback{align-items:flex-start}}

details{margin-top:8px}summary{cursor:pointer;color:#8eabff;font-size:12px}.issue{padding:9px 0;border-top:1px solid #2e3440;font-size:12px}.issue a{color:#9bb3ff;word-break:break-all}.issue small{display:block;color:#9ca8bb;margin-top:3px}
.localform{display:grid;grid-template-columns:1fr 1fr;gap:8px}.localform input,.localform textarea{background:#101217;color:#fff;border:1px solid #394150;border-radius:7px;padding:9px}.localform textarea{grid-column:1/-1;min-height:70px}.localform button{grid-column:1/-1}
.notice,.compare-box{padding:10px;border:1px solid #394150;border-radius:8px;background:#171a20;color:#b8c3d6}.comp{padding:12px 0;border-bottom:1px solid #333}.comp button{margin-top:8px}.compare-result{margin-top:8px}
@media(max-width:760px){.localform{grid-template-columns:1fr}.localform textarea,.localform button{grid-column:auto}}

.sectionhead{display:flex;justify-content:space-between;align-items:end;margin-bottom:18px}.sectionhead h2{font-size:28px;margin:4px 0}
.action-list{display:grid;gap:14px}.action-card{display:grid;grid-template-columns:60px 1fr;gap:18px}.rank{font-size:24px;font-weight:800;color:#7594ff}
.compare-grid,.connection-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:14px 0}.big-number{font-size:48px;font-weight:800;margin:12px 0}
@media(max-width:900px){.compare-grid,.connection-grid{grid-template-columns:1fr}.action-card{grid-template-columns:1fr}}

.scan-help{font-size:12px;line-height:1.55;color:#9ca8bb;margin-top:10px;max-width:720px}
.local-scan-btn{margin-top:12px}.local-result{margin-top:14px;padding:14px;border:1px solid #394150;border-radius:10px;background:#151820}

.save-success{padding:10px;border:1px solid #3f7c59;border-radius:8px;background:#173021;margin-bottom:10px}

.profile-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:14px 0}.stack-form{display:grid;gap:8px;margin-top:14px}.stack-form input,.stack-form select,.stack-form textarea{background:#101217;color:#fff;border:1px solid #394150;border-radius:7px;padding:9px}.stack-form textarea{min-height:64px}.offering,.goal{padding:10px 0;border-bottom:1px solid #333}.priority{display:inline-block;text-transform:uppercase;font-size:10px;font-weight:800;padding:4px 7px;border-radius:999px;margin-right:7px;border:1px solid #46516a}.plan-note{color:#9ca8bb;margin:12px 0}.plan-goal{padding:14px 0;border-top:1px solid #333}.plan-goal li{margin:8px 0;line-height:1.45}
@media(max-width:1000px){.profile-grid{grid-template-columns:1fr}}

.offering,.goal{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.row-actions{display:flex;gap:6px;flex-shrink:0}.row-actions button{padding:6px 9px;font-size:11px}.danger{border-color:#744!important}.edit-dialog{display:grid;gap:12px;min-width:min(520px,80vw)}.edit-dialog label{display:grid;gap:5px}.edit-dialog input,.edit-dialog select,.edit-dialog textarea{background:#101217;color:#fff;border:1px solid #394150;border-radius:7px;padding:9px}.dialog-actions{display:flex;justify-content:flex-end;gap:8px}

/* 0.5.2 interaction hierarchy */
.edit-action{
  background:#f7f9fc;
  color:#526078;
  border:1px solid #dbe1ea;
}
.edit-action:hover{background:#eef2f7;color:#2d3a50}

.destructive-action{
  background:#fbf1f1;
  color:#975555;
  border:1px solid #e8caca;
}
.destructive-action:hover{
  background:#f5e5e5;
  color:#824545;
  border-color:#dcb7b7;
}
.destructive-action.stronger{
  background:#f8ecec;
  color:#8d4949;
  border-color:#dfbdbd;
}
.destructive-solid{
  background:#a85c5c;
  color:white;
  border:1px solid #985151;
}
.destructive-solid:hover{background:#965050}

.confirm-dialog{background:transparent;overflow:visible}
.confirm-dialog::backdrop{background:rgba(15,23,42,.42);backdrop-filter:blur(2px)}
.confirm-card{
  background:white;
  border-radius:18px;
  padding:24px;
  display:grid;
  grid-template-columns:42px 1fr;
  gap:14px;
  min-width:min(520px,88vw);
  border:1px solid #e8dede;
}
.confirm-card .dialog-actions{grid-column:1/-1;margin-top:6px}
.confirm-icon{
  width:38px;height:38px;border-radius:12px;
  display:grid;place-items:center;
  background:#f8ecec;color:#925151;font-weight:900;
  border:1px solid #e7caca;
}
.confirm-card h2{font-size:21px}
.confirm-card p.muted{line-height:1.55;margin:8px 0 0}

.toast-region{
  position:fixed;right:22px;bottom:22px;z-index:1000;
  display:grid;gap:8px;pointer-events:none;
}
.toast{
  display:flex;align-items:center;gap:10px;
  min-width:240px;max-width:380px;
  padding:12px 14px;border-radius:12px;
  background:#172033;color:white;
  box-shadow:0 12px 34px rgba(20,30,55,.22);
  opacity:0;transform:translateY(8px);
  transition:opacity .2s ease,transform .2s ease;
  font-size:13px;font-weight:650;
}
.toast.show{opacity:1;transform:translateY(0)}
.toast-dot{width:8px;height:8px;border-radius:50%;background:#6fc69a;flex:0 0 auto}

@media(max-width:640px){
  .row-actions{flex-direction:column;align-items:stretch}
  .row-actions button{width:100%}
  .confirm-card{grid-template-columns:36px 1fr;padding:20px}
  .confirm-card .dialog-actions{flex-direction:column-reverse}
  .confirm-card .dialog-actions button{width:100%}
  .toast-region{left:14px;right:14px;bottom:14px}
  .toast{min-width:0;max-width:none;width:100%}
}

/* 0.6 Visibility Intelligence Engine */
.intelligence-hero{grid-column:1/-1;border-left:4px solid #315efb}.intelligence-heading{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}.intel-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:18px}.intel-stats>div{padding:13px 14px;border:1px solid var(--line);border-radius:12px;background:#fafbfe;display:grid;gap:3px}.intel-stats strong{font-size:22px}.intel-stats span{font-size:11px;color:var(--muted);font-weight:700;text-transform:uppercase;letter-spacing:.05em}.action-stats{margin:0 0 14px}.action-stats>div:last-child strong{font-size:15px}.source-strip{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0 20px}.source-chip{border:1px solid var(--line);border-radius:10px;padding:9px 11px;display:grid;gap:2px;background:white}.source-chip span{font-size:12px;font-weight:800}.source-chip small{font-size:10px;color:var(--muted)}.source-chip.ready{border-color:#cfe5d9;background:#f4faf7}.source-chip.partial{border-color:#e6dcc3;background:#fcfaf4}.source-chip.needed{border-style:dashed}.source-chip.not_applicable{opacity:.72}.action-meta{display:flex;gap:7px;flex-wrap:wrap;align-items:center;margin-bottom:9px}.priority-band,.source-badge,.status-badge,.goal-chip{display:inline-flex;align-items:center;border-radius:999px;padding:5px 8px;font-size:10px;font-weight:800}.priority-band{background:#eef2ff;color:#3b50a7}.priority-band.highest{background:#e9efff;color:#2749aa}.priority-band.high{background:#f0f3ff;color:#435aa3}.priority-band.medium,.priority-band.lower{background:#f3f5f8;color:#647086}.source-badge{background:#f5f6f8;color:#647086;border:1px solid #e4e8f0}.status-badge{background:#f4f5f7;color:#6b7485}.status-badge.in_progress{background:#edf3ff;color:#4265a8}.status-badge.completed{background:#edf8f2;color:#387554}.status-badge.deferred{background:#fbf6e9;color:#8a6b25}.status-badge.dismissed{background:#f4f4f4;color:#7a7a7a}.goal-row{display:flex;gap:6px;flex-wrap:wrap;margin:7px 0 10px}.goal-chip{background:#f5f0ff;color:#6d4aa4}.recommend-box{border-left:3px solid #a9baff;background:#f8faff;border-radius:0 10px 10px 0;padding:12px 14px;margin:13px 0}.recommend-box p{margin:5px 0 0}.evidence-row{display:flex;gap:20px;flex-wrap:wrap;font-size:12px;color:#647086}.fine-print{font-size:11px;line-height:1.45}.workflow-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:14px}.workflow-actions button{padding:7px 10px;font-size:11px}.quiet-action{background:transparent;color:#758094;border:1px solid #dfe4ec}.intel-action.is-deferred{opacity:.78}.archive{margin-top:18px}.archive>summary{font-size:13px;color:#68748a;padding:8px 0}.archive-list{margin-top:10px}.metric-note{font-size:11px;margin-top:10px}@media(max-width:760px){.intelligence-heading{display:grid}.intelligence-heading button{width:100%}.intel-stats{grid-template-columns:1fr 1fr}.intel-stats>div:last-child{grid-column:1/-1}.evidence-row{display:grid;gap:5px}}

/* 0.6.1 Quick Data Pull */
.import-card{grid-column:1/-1;margin-bottom:14px}.import-heading{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}.viz-lite-badge{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;padding:5px 8px;border-radius:999px;background:#f4f6fb;color:#66728a;border:1px solid #e0e5ee}.import-controls{display:grid;grid-template-columns:190px 1fr auto;gap:10px;align-items:end;margin-top:14px}.import-controls label{display:grid;gap:5px;font-size:11px;font-weight:800;color:#627087}.import-controls select,.import-controls input{width:100%;background:#101217;color:#fff;border:1px solid #394150;border-radius:7px;padding:9px}.import-summary{display:flex;justify-content:space-between;gap:12px;margin:16px 0 9px;font-size:12px}.import-summary span{color:#768196}.import-fields{display:grid;gap:7px;margin:10px 0}.import-field{display:grid;grid-template-columns:auto 1fr;gap:10px;align-items:start;padding:10px 11px;border:1px solid #e2e6ed;border-radius:10px;background:#fafbfc}.import-field input{margin-top:3px}.import-field span{display:grid;gap:3px}.import-field b{font-size:12px}.import-field small{font-size:12px;color:#68748a;overflow-wrap:anywhere}.import-suggestions{margin:10px 0;padding:11px;border:1px dashed #d8deea;border-radius:10px}.import-suggestions small{color:#7a8495}.import-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}.import-empty,.import-error{margin-top:14px;padding:12px;border-radius:10px;background:#f7f8fa;color:#68748a}.import-error{background:#fbf1f1;color:#8e5050}@media(max-width:760px){.import-heading{display:grid}.import-controls{grid-template-columns:1fr}.import-actions{display:grid}.import-actions button{width:100%}}

/* 0.6.2 Data Transparency + Guided Actions */
.import-result{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:14px;border-left:4px solid #5ca57c}.profile-summary{grid-column:1/-1;margin-bottom:14px}.profile-summary-head{display:flex;justify-content:space-between;gap:15px;align-items:flex-start}.completion-badge{padding:7px 10px;border-radius:999px;background:#eef3ff;color:#5267a3;font-size:11px;font-weight:800;white-space:nowrap}.summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-top:16px}.summary-grid section{border:1px solid var(--line);border-radius:12px;padding:13px;background:#fafbfe}.summary-field{padding:9px 0;border-top:1px solid #e7eaf0}.summary-field:first-of-type{border-top:0}.summary-field>b{font-size:11px;margin-right:6px}.summary-field p{font-size:12px;margin:5px 0;overflow-wrap:anywhere}.profile-empty{color:#9199a8;font-style:italic}.data-badge{display:inline-flex;padding:3px 6px;border-radius:999px;font-size:9px;font-weight:800;vertical-align:middle}.data-badge.imported{background:#edf3ff;color:#4b68a6}.data-badge.confirmed{background:#edf8f2;color:#3f7657}.data-badge.recorded{background:#f2f3f6;color:#71798a}.summary-services{margin-top:14px}.service-chip{display:inline-flex;padding:6px 9px;border-radius:999px;background:#f1f4fa;border:1px solid #e1e5ed;font-size:11px;font-weight:700;margin:3px}.import-history-note{font-size:11px;margin-top:12px}.suggestion-card{margin-bottom:14px;border-left:4px solid #c59b49}.service-suggestion{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:10px 0;border-top:1px solid var(--line)}.service-suggestion small{display:block;color:var(--muted);margin-top:3px}
.continue-card{border-left-color:#6c7fcb}.mini-progress,.guided-progress>div,.action-progress-line>div{height:7px;background:#e7ebf3;border-radius:999px;overflow:hidden}.mini-progress span,.guided-progress span,.action-progress-line>div span{display:block;height:100%;background:#5272d8;border-radius:999px}.action-progress-line{margin-top:12px}.action-progress-line small{display:block;margin-top:5px;color:var(--muted)}.guided-shell{display:grid;gap:14px}.back-link{justify-self:start;background:transparent;color:#526078;padding:5px 0}.guided-hero{border-left:4px solid var(--accent)}.guided-hero h1{font-size:28px;margin:5px 0 10px}.guided-progress{margin-top:18px;display:grid;gap:7px}.guided-progress strong{font-size:11px;color:var(--muted)}.guided-layout{display:grid;grid-template-columns:1.25fr .75fr;gap:14px}.guided-current{min-height:270px}.guided-current>button{margin:8px 8px 0 0}.guided-checklist{align-self:start}.guide-step{display:grid;grid-template-columns:28px 1fr;gap:9px;padding:10px 0;border-top:1px solid var(--line);opacity:.65}.guide-step:first-of-type{border-top:0}.guide-step.current{opacity:1}.guide-step.done{opacity:1}.step-dot{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:#eef1f6;color:#657187;font-size:11px;font-weight:800}.guide-step.done .step-dot{background:#e7f5ed;color:#3e7757}.guide-step.current .step-dot{background:#e8eeff;color:#3455b3}.guide-step b{font-size:12px}.guide-step small{display:block;color:var(--muted);margin-top:3px}.guide-secondary{margin-top:12px}.guide-secondary button{width:100%}
@media(max-width:1050px){.summary-grid{grid-template-columns:1fr 1fr}}@media(max-width:760px){.profile-summary-head,.import-result,.service-suggestion{display:grid}.summary-grid,.guided-layout{grid-template-columns:1fr}.completion-badge{justify-self:start}.guided-hero h1{font-size:24px}}

/* 0.6.3 automatic plan synchronization */
.auto-plan-badge{
  display:inline-flex;
  align-items:center;
  margin-left:7px;
  padding:3px 7px;
  border-radius:999px;
  background:#edf8f2;
  color:#47765a;
  border:1px solid #d2eadc;
  font-size:9px;
  font-weight:850;
  letter-spacing:.05em;
  vertical-align:middle;
}

/* 0.6.4 multi-source reputation */
.reputation-overview{grid-column:1/-1;margin:14px 0}.rep-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}.rep-source{border:1px solid #e1e6ee;border-radius:14px;padding:14px;background:#fff}.rep-source-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.rep-source-head h3{margin:7px 0 0}.provider-badge{display:inline-flex;padding:4px 8px;border-radius:999px;background:#f2f4f8;color:#56647d;font-size:10px;font-weight:850;text-transform:uppercase}.provider-badge.google{background:#f3f7ff;color:#4767a7}.provider-badge.facebook{background:#eef4ff;color:#3e62a6}.provider-badge.yelp{background:#fbf1f1;color:#945454}.rep-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:14px 0}.rep-metrics>div{display:grid;gap:2px;padding:10px;background:#f8fafc;border-radius:10px}.rep-metrics strong{font-size:20px}.rep-metrics span{font-size:10px;text-transform:uppercase;color:#79859a;font-weight:800}.rep-insight{border-left:3px solid #9eb5ef;background:#f7f9ff;padding:12px 14px;border-radius:0 10px 10px 0;margin:12px 0}.rep-insight p{margin:6px 0}.rep-add{margin-top:15px}.rep-add-form{display:grid;grid-template-columns:160px 1fr 1.5fr 110px 130px auto;gap:8px;align-items:end;margin-top:10px}.rep-add-form input,.rep-add-form select{background:#101217;color:#fff;border:1px solid #394150;border-radius:7px;padding:9px}.form-note{font-size:11px;line-height:1.45;padding:9px 10px;border-radius:8px;background:#f6f8fb;color:#68748a;border:1px solid #e2e7ef}
@media(max-width:900px){.rep-grid{grid-template-columns:1fr}.rep-add-form{grid-template-columns:1fr 1fr}.rep-add-form button{grid-column:1/-1}.rep-metrics{grid-template-columns:repeat(2,1fr)}}

.rep-awaiting{margin:10px 0;padding:10px 12px;border:1px dashed #495264;border-radius:10px;background:#171b22;display:grid;gap:3px}
.rep-awaiting b{font-size:12px;color:#d8dfef}
.rep-awaiting span{font-size:11px;color:#98a5bd;line-height:1.45}

/* 0.7 consolidated connected test build */
.shell{grid-template-columns:260px 1fr}
aside{position:sticky;top:0;height:100vh;overflow:auto}
.brand small{max-width:170px;line-height:1.35}
nav .nav-item{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center;width:100%}
nav .nav-item span{font-weight:750}
nav .nav-item small{font-size:9px;color:#7f8aa0;text-align:right}
nav .nav-item.active small{color:#c6d0e0}
.connection-note{margin-top:24px}
main{max-width:1420px}
.tabs{margin-bottom:12px}
.status-bar{display:grid;grid-template-columns:1.2fr .7fr 1.1fr;gap:1px;background:var(--line);border:1px solid var(--line);border-radius:13px;overflow:hidden;margin:0 0 20px}
.status-bar>div{background:#fff;padding:11px 13px;display:grid;grid-template-columns:auto 1fr;column-gap:8px;align-items:center}
.status-bar b{font-size:12px}
.status-bar small{grid-column:2;color:var(--muted);font-size:10px;margin-top:2px}
.status-dot{width:8px;height:8px;border-radius:50%;background:#d0a04f;grid-row:1/3}
.status-dot.live{background:#3f9b68}
.intel-stats{grid-template-columns:repeat(4,1fr)}
.setup-route{display:grid;gap:8px}
.setup-step{display:grid;grid-template-columns:30px 1fr;gap:10px;text-align:left;align-items:center;background:#fafbfe;color:var(--text);border:1px solid var(--line);padding:11px}
.setup-step>span{width:25px;height:25px;border-radius:50%;display:grid;place-items:center;background:#eef1f6;color:#768196}
.setup-step.done>span{background:#e7f5ed;color:#3e7757}
.setup-step b,.setup-step small{display:block}
.setup-step small{color:var(--muted);font-size:10px;margin-top:3px}
.metric{border-bottom:1px solid var(--line)}
.source-row,.plan-preview{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:11px 0;border-bottom:1px solid var(--line)}
.source-row:last-child,.plan-preview:last-child{border-bottom:0}
.source-row b,.source-row small,.plan-preview b,.plan-preview small{display:block}
.source-row small,.plan-preview small{color:var(--muted);font-size:10px;margin-top:3px}
.source-state{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:9px;font-weight:850;white-space:nowrap;background:#f2f4f7;color:#667188}
.source-state.ready{background:#edf8f2;color:#397553}
.source-state.partial{background:#fbf6e9;color:#8a6b25}
.source-state.not_applicable{background:#f3f4f6;color:#737b89}
.plan-grid{display:grid;grid-template-columns:.8fr 1.2fr;gap:14px;margin:14px 0}
.signal-row{padding:11px 0;border-bottom:1px solid var(--line)}
.signal-row:last-child{border-bottom:0}
.signal-row p{font-size:12px;margin:4px 0;line-height:1.45}
.signal-row small{color:var(--muted)}
.signal-row.measured b,.signal-row.positive b{color:#327253}
.connection-list{display:grid;gap:9px;margin:14px 0}
.connection-card{display:flex;justify-content:space-between;gap:16px;padding:13px;border:1px solid var(--line);border-radius:12px;background:#fafbfe}
.connection-card h3{margin:7px 0}
.connection-card a{display:block;max-width:620px;color:#4a68ad;word-break:break-all;font-size:11px}
.connection-card>div:last-child{display:grid;justify-items:end;gap:5px;text-align:right}
.connection-card small{color:var(--muted);font-size:10px}
.connection-status{display:inline-flex;padding:4px 7px;border-radius:999px;font-size:9px;font-weight:850;background:#f3f4f7;color:#667188}
.connection-status.connected{background:#e8f6ee;color:#397553}
.connection-explainer{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:14px 0}
.connection-explainer>div{border:1px solid var(--line);border-radius:12px;padding:13px;background:#fafbfe}
.connection-explainer p{color:var(--muted);font-size:12px;line-height:1.45}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.form-grid .wide{grid-column:1/-1}
.form-grid input,.form-grid textarea,.form-grid select,.localform input,.localform textarea,.stack-form input,.stack-form select,.stack-form textarea,.inline-form input,.import-controls select,.import-controls input,.rep-add-form input,.rep-add-form select{
  background:#fff;color:var(--text);border:1px solid var(--line);border-radius:9px;padding:10px
}
.profile-edit{margin-bottom:12px}
.localform{margin-top:14px}
.card hr{border:0;border-top:1px solid var(--line);margin:18px 0}
.import-loading{margin-top:14px;padding:14px;border:1px solid #dce3f2;border-radius:11px;background:#f7f9ff}
.import-loading p{color:var(--muted);margin:5px 0 0;font-size:12px}
.import-services{margin-top:16px}
.import-service{display:grid;grid-template-columns:auto 1fr;gap:10px;padding:10px;border:1px solid var(--line);border-radius:10px;margin:7px 0;background:#fafbfe}
.import-service input{margin-top:3px}
.import-service b,.import-service small{display:block}
.import-service small{color:var(--muted);font-size:10px;margin-top:3px;line-height:1.4}
.provider-badge.instagram{background:#f7eff9;color:#875498}
.provider-badge.linkedin{background:#eef5fb;color:#396f98}
.provider-badge.youtube{background:#fbefef;color:#9a4e4e}
.provider-badge.tiktok{background:#eef1f4;color:#3f4e5d}
.add-on-card{max-width:760px;border-left:4px solid #8b6bc0}
.add-on-card button{margin:8px 8px 0 0}
.add-on-card button:disabled{opacity:.5;cursor:not-allowed}
.business-dialog{width:min(760px,94vw)}
.business-dialog form{padding:26px}
.dialog-heading h2{font-size:24px}
.dialog-heading p{line-height:1.5}
.form-error{min-height:18px;color:#a64e4e;font-size:12px;font-weight:700}
.toast{opacity:1;transform:none}
.toast.bad{background:#8e4a4a}
.rep-awaiting{background:#f7f8fb;border-color:#d7dee9}
.rep-awaiting b{color:var(--text)}
.rep-awaiting span{color:var(--muted)}
.issue{border-top:1px solid var(--line)}
.issue a{color:#4a68ad}
.issue small{color:var(--muted)}
summary{color:#4a68ad}
.offering,.goal{border-bottom:1px solid var(--line)}

@media(max-width:1050px){
  .status-bar{grid-template-columns:1fr}
  .status-bar>div{grid-template-columns:auto 1fr}
  .plan-grid{grid-template-columns:1fr}
  .connection-explainer{grid-template-columns:1fr}
  .intel-stats{grid-template-columns:1fr 1fr}
}
@media(max-width:800px){
  .shell{grid-template-columns:1fr}
  aside{display:flex;position:static;height:auto;padding:14px;overflow:visible}
  .brand{margin-bottom:12px}
  .brand small{max-width:none}
  aside nav{display:flex;overflow:auto;padding-bottom:4px}
  nav .nav-item{display:grid;min-width:142px;border:1px solid #293446}
  .connection-note{display:none}
  main{padding:18px}
  header{align-items:center}
}
@media(max-width:700px){
  .form-grid{grid-template-columns:1fr}
  .form-grid .wide{grid-column:auto}
  .connection-card{display:grid}
  .connection-card>div:last-child{justify-items:start;text-align:left}
  .status-bar{display:none}
  h1{font-size:26px}
  .intel-stats{grid-template-columns:1fr 1fr}
  .rep-add-form{grid-template-columns:1fr}
  .rep-add-form button{grid-column:auto}
}

.auth-screen{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 20% 0%,#1b2c55 0,#111722 38%,#0b0e14 100%)}
.auth-screen[hidden],#appShell[hidden]{display:none!important}
.auth-card{width:min(480px,100%);padding:32px;border:1px solid #35415a;border-radius:18px;background:#11151d;box-shadow:0 30px 80px #0008}
.auth-brand{margin-bottom:28px}
.auth-form{display:grid;gap:14px}
.auth-form h2{margin:0}
.auth-form label{display:grid;gap:7px;font-weight:700}
.auth-form input{width:100%}
.auth-about{display:grid;gap:8px;margin:0 0 24px;padding:16px;border:1px solid #35415a;border-radius:13px;background:#151c29}
.auth-about h1,.auth-about p{margin:0}
.auth-about h1{font-size:24px;line-height:1.15;color:#f8fafc}
.auth-about p:not(.eyebrow){color:#c5d0e2;line-height:1.55}
.auth-about .auth-data-note{padding-top:9px;border-top:1px solid #35415a;font-size:13px}
.account-card{margin-top:auto;padding:13px;border:1px solid #293446;border-radius:12px;background:#111722;display:grid;gap:5px}
.account-card b,.account-card small{overflow:hidden;text-overflow:ellipsis}
.account-card button{margin-top:7px;width:100%}
.oauth-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:14px;margin-top:16px}
.oauth-card{padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--panel-soft);display:grid;gap:10px;min-width:0}
.oauth-card h3,.oauth-card p{margin:0}
.oauth-card .row-actions{justify-content:flex-start}
.oauth-card>details{width:100%;min-width:0;max-width:100%}
.oauth-status{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.07em}
.oauth-status.connected{color:var(--good)}
.oauth-status.attention{color:#e09b62}
.oauth-status.not_connected{color:var(--muted)}
.resource-list{display:grid;gap:6px;padding:10px;border-radius:10px;background:#0b0e1499;width:100%;min-width:0;max-width:100%}
.resource-list>select,.resource-list>button{display:block;width:100%;min-width:0;max-width:100%;white-space:normal}
.resource-list small{word-break:break-word}
.resolution-grid{display:grid;gap:16px}
.resolution-card{border-left:4px solid #5f7cff}
.resolution-card textarea{width:100%;min-height:105px;margin:10px 0}
.resolution-meta{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}
.risk-chip,.mode-chip{font-size:11px;text-transform:uppercase;font-weight:800;padding:5px 8px;border-radius:999px;background:#25314a}
.verification-result{padding:10px;border-radius:10px;background:#162238}
.issue-actions{margin-top:9px}
.feedback-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}
.feedback-row button{padding:7px 10px}
.admin-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);gap:16px;align-items:start}
.admin-grid>*,.stack-form{min-width:0}
.stack-form>input,.stack-form>select,.stack-form>textarea,.stack-form>button{width:100%;min-width:0}
.admin-user{display:flex;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}
.plan-banner{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:12px 16px;border:1px solid #30436a;border-radius:12px;background:#16213a}
@media(max-width:800px){.account-card{margin-top:0;min-width:230px}.admin-grid{grid-template-columns:1fr}.oauth-grid{grid-template-columns:1fr}}
/* Link-styled action used when an assisted correction opens the affected page. */
.workflow-actions a.button{display:inline-flex;align-items:center;padding:7px 10px;font-size:11px;border-radius:8px;text-decoration:none;font-weight:800;border:1px solid #dfe4ec;background:#fff;color:#4d5e7c}
.connector-note{margin:10px 0;padding:9px 10px;border-left:3px solid #d9b45b;background:#fffaf0;border-radius:0 8px 8px 0;font-size:11px;line-height:1.45;color:#6d5b32}

/* 0.9.2 private-beta operations and problem reporting */
.header-actions{display:flex;gap:9px;flex-wrap:wrap;justify-content:flex-end}
.legal-links{display:flex;gap:14px;justify-content:center;margin-top:18px;font-size:12px}
.legal-links a{color:#9fb7ef;text-decoration:none}.legal-links a:hover{text-decoration:underline}
.sidebar-links{margin:10px 0 14px;flex-wrap:wrap;justify-content:flex-start;font-size:11px}
.issue-dialog textarea{min-height:105px}.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.issue-attachment-field{display:grid;grid-template-columns:1fr auto;align-items:center;gap:12px;padding:14px;border:1px dashed #b9c5d8;border-radius:12px;background:var(--panel-soft)}
.issue-attachment-copy{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.issue-attachment-copy small{flex-basis:100%;font-weight:500;line-height:1.45}.optional-label{padding:3px 7px;border-radius:999px;background:#e9eefb;color:#4b5f8d;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.issue-file-button{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;white-space:nowrap}.issue-attachment-preview{grid-column:1/-1;display:grid;grid-template-columns:120px minmax(0,1fr);gap:12px;align-items:center;padding-top:12px;border-top:1px solid var(--line)}.issue-attachment-preview[hidden]{display:none}.issue-attachment-preview img{width:120px;height:82px;object-fit:cover;border-radius:9px;border:1px solid var(--line);background:#fff}.issue-attachment-preview>div{display:grid;justify-items:start;gap:5px;min-width:0}.issue-attachment-preview strong{max-width:100%;overflow-wrap:anywhere}.issue-attachment-preview button{padding:7px 10px;font-size:11px}
.checkbox-row{display:flex!important;grid-template-columns:auto 1fr!important;align-items:center;justify-content:flex-start;gap:9px!important}
.checkbox-row input{width:auto}.checkbox-row span{font-weight:600}
.ops-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:16px}
.ops-stats .card{display:grid;gap:3px;padding:16px}.ops-stats strong{font-size:23px}.ops-stats span{font-weight:800}.ops-stats small{color:var(--muted)}
.block{display:block;margin-top:10px}.admin-client-grid,.issue-admin-grid{display:grid;gap:14px;margin-bottom:22px}
.admin-client-grid{grid-template-columns:repeat(auto-fit,minmax(330px,1fr))}
.admin-client h3,.issue-admin-card h3{margin:0}.admin-client .profile-summary-head,.issue-admin-card .profile-summary-head{align-items:flex-start}
.admin-control-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:10px}
.admin-control-row input,.admin-control-row select{flex:1;min-width:160px}
.admin-control-row button{white-space:nowrap}.issue-admin-card{border-left:4px solid #7188d8}
.issue-admin-attachment{display:grid;grid-template-columns:minmax(180px,280px) 1fr;gap:14px;align-items:center;margin:16px 0;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--panel-soft)}.issue-admin-attachment>a:first-child{display:block;border-radius:9px;overflow:hidden;background:#111722}.issue-admin-attachment img{display:block;width:100%;height:170px;object-fit:contain}.issue-admin-attachment figcaption{display:grid;justify-items:start;gap:6px}.issue-admin-attachment figcaption span{color:var(--muted);font-size:12px;line-height:1.45}.issue-admin-attachment a.button{display:inline-flex;align-items:center;padding:8px 11px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--text);font-size:11px;font-weight:800;text-decoration:none;margin-top:3px}.issue-admin-attachment a.button:hover{border-color:#b6c2d6;background:#f8faff}.issue-no-attachment{padding:10px 12px;border-radius:9px;background:var(--panel-soft);color:var(--muted);font-size:12px}
.issue-admin-card details{margin-top:10px}.issue-admin-card pre{max-height:220px;overflow:auto;white-space:pre-wrap;word-break:break-word;padding:10px;border-radius:8px;background:#111722;color:#dce5f7;font-size:11px}
.ops-lower{margin:18px 0}.ops-row{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid var(--line)}
.ops-row>div{display:grid;gap:3px}.ops-row small{color:var(--muted)}
.workforce-heading{margin-bottom:14px}.workforce-boundary{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;border-color:#2d9b72;background:linear-gradient(145deg,var(--card),rgba(45,155,114,.08));margin-bottom:16px}.workforce-boundary h2,.workforce-boundary p{margin-bottom:6px}.workforce-boundary>div{max-width:850px}.tenant-directory{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px;margin-bottom:22px}.tenant-metadata-card h3{margin:0}.tenant-metadata-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:14px}.tenant-metadata-grid span{display:grid;gap:3px;padding:10px;border:1px solid var(--line);border-radius:9px;background:var(--panel-soft);font-size:11px;color:var(--muted)}.tenant-metadata-grid b{font-size:17px;color:var(--text)}.workforce-account-list{display:grid;gap:12px;min-width:0}.staff-account-card{border-left:4px solid #6f86dc}.role-badge{display:inline-flex;padding:5px 9px;border-radius:999px;background:var(--panel-soft);border:1px solid var(--line);font-size:10px;font-weight:850;letter-spacing:.04em;text-transform:uppercase}.permission-chips{display:flex;flex-wrap:wrap;gap:7px;margin-top:14px}.permission-chips span{padding:6px 9px;border-radius:999px;background:var(--panel-soft);border:1px solid var(--line);font-size:10px;font-weight:750}
.status-badge.suspended,.status-badge.failed,.status-badge.blocked{background:#ffe8e5;color:#99433a}
.status-badge.reviewing,.status-badge.running{background:#fff3ce;color:#7e6420}
.status-badge.invited{background:#e9efff;color:#3659a8}
.status-badge.resolved,.status-badge.complete{background:#def4e7;color:#216d44}
.beta-launch-card{border-color:#3659b8;background:linear-gradient(145deg,#111722,#172447);color:#f8fafc}
.beta-launch-card .eyebrow{color:#8fb1ff}.beta-launch-card h2{margin-bottom:6px;color:#fff}.beta-launch-card .muted{color:#c6d2e4}.beta-launch-card .metric{border-color:#53617d}.beta-launch-card .metric span{color:#c6d2e4}.beta-launch-card .metric strong{color:#fff}
.launch-address{display:grid;gap:6px;margin:12px 0;font-size:12px;font-weight:800}.beta-launch-card .launch-address{color:#e5ecf8}
.launch-address input{width:100%;font-size:12px;color:var(--muted)}.beta-launch-card .launch-address input{background:#fff;color:#334155;border-color:#dbe4f2}
@media(max-width:1050px){.ops-stats{grid-template-columns:1fr 1fr}}
@media(max-width:1100px){.admin-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:700px){.header-actions{width:100%;justify-content:stretch}.header-actions button{flex:1}.ops-stats{grid-template-columns:1fr}.admin-client-grid{grid-template-columns:1fr}.admin-control-row{align-items:stretch}.admin-control-row input,.admin-control-row select,.admin-control-row button{width:100%}}
@media(max-width:700px){.workforce-boundary{display:grid}.tenant-directory{grid-template-columns:1fr}.tenant-metadata-grid{grid-template-columns:1fr}}
.legal-page{max-width:820px;margin:0 auto;padding:42px 22px 70px;line-height:1.65}.legal-page header{display:block;margin-bottom:28px}.legal-page h1{margin:4px 0 8px}.legal-page h2{margin-top:28px}.legal-page .card{padding:28px}.legal-page a{color:var(--accent)}.legal-page .legal-nav{display:flex;gap:14px;flex-wrap:wrap;margin-bottom:24px}.legal-page .legal-note{padding:12px 14px;border-left:4px solid var(--accent);background:#eef2ff;border-radius:8px}.legal-contact{display:grid;grid-template-columns:.8fr 1.2fr 1.2fr;gap:10px;margin:20px 0 28px}.legal-contact>div{display:grid;align-content:start;gap:3px;padding:12px;border:1px solid var(--line);border-radius:10px;background:#fafbfe;min-width:0}.legal-contact b{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}.legal-contact span,.legal-contact a{font-size:13px;font-weight:700;overflow-wrap:anywhere}
@media(max-width:700px){.legal-contact{grid-template-columns:1fr}}

/* 0.9.5-beta.6: complete phone and tablet layout */
html,body{max-width:100%;overflow-x:hidden}
button,input,textarea,select{font:inherit;max-width:100%}
main,#content,.grid,.card,.oauth-card,.admin-client,.issue-admin-card{min-width:0}
img,svg,video,canvas{max-width:100%;height:auto}
pre{max-width:100%;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}
.mobile-nav-toggle{display:none;margin-left:auto;background:#1f2937;color:#fff;border:1px solid #39465b;padding:9px 12px;align-items:center;gap:7px}
.plan-banner{color:#fff}
.plan-banner small,.plan-banner span{color:#c6d2e4}

@media(max-width:800px){
  .shell{display:block;min-width:0}
  aside{display:block;position:sticky;top:0;z-index:100;height:auto;padding:11px 14px;box-shadow:0 8px 24px rgba(15,23,42,.18)}
  aside .brand{display:flex;margin:0;min-width:0}
  aside .brand>div{min-width:0;flex:1}
  aside .brand strong,aside .brand small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .mark{width:36px;height:36px;flex:0 0 auto}
  .mobile-nav-toggle{display:inline-flex;min-height:40px}
  aside nav,aside .sidebar-links,aside .account-card{display:none!important}
  aside.mobile-open nav{display:grid!important;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px;padding:12px 0;border-top:1px solid #2b3649;overflow:visible}
  aside.mobile-open .sidebar-links{display:flex!important;margin:12px 0 8px}
  aside.mobile-open .account-card{display:grid!important;min-width:0;margin-top:10px}
  nav .nav-item{display:grid;min-width:0;min-height:48px;width:100%;padding:10px;border:1px solid #293446}
  nav .nav-item span,nav .nav-item small{white-space:normal;overflow-wrap:anywhere;text-align:left}
  .connection-note{display:none}
  main{width:100%;max-width:none;padding:18px 16px 38px;margin:0}
  header{display:grid;align-items:start;gap:14px;margin-bottom:18px}
  header>div:first-child{min-width:0}
  header h1{overflow-wrap:anywhere}
  .sectionhead{display:grid;align-items:start;gap:12px}
  .sectionhead>button{width:100%;min-height:44px}
  .header-actions{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:9px}
  .header-actions button{width:100%;min-width:0;min-height:44px;white-space:normal}
  .tabs{width:100%;padding:2px 0 6px;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}
  .tab{min-height:44px;scroll-snap-align:start}
  .grid,.profile-grid,.summary-grid,.guided-layout,.plan-grid,.admin-grid,.oauth-grid,.connection-explainer{grid-template-columns:minmax(0,1fr)!important}
  .status-bar{display:grid!important;grid-template-columns:minmax(0,1fr)!important;margin-bottom:16px}
  .status-bar>div{min-width:0}
  .hero{display:grid;gap:18px;align-items:start}
  .score{width:104px;height:104px}
  .connection-card{display:grid;gap:12px}
  .connection-card>div:last-child{justify-items:start;text-align:left;max-width:100%}
  .connection-card .row-actions,.oauth-card .row-actions{width:100%;flex-wrap:wrap}
  .check,.rec{grid-template-columns:auto minmax(0,1fr)}
  .check>:last-child,.rec>:last-child{grid-column:2}
  .source-row,.plan-preview,.offering,.goal,.ops-row,.admin-user,.rep-source-head{display:grid;align-items:start}
  .source-state,.completion-badge{justify-self:start}
  .admin-client-grid,.issue-admin-grid{grid-template-columns:minmax(0,1fr)}
  .admin-control-row{align-items:stretch}
  .admin-control-row input,.admin-control-row select,.admin-control-row button{width:100%;min-width:0}
  dialog{width:calc(100vw - 24px);max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);margin:auto;overflow:auto}
  .business-dialog,.confirm-dialog{width:calc(100vw - 24px);max-width:calc(100vw - 24px)}
  .business-dialog form,.issue-dialog form,#passwordDialog form{padding:20px 18px}
  .issue-attachment-field{grid-template-columns:1fr}.issue-file-button{width:100%}.issue-attachment-preview{grid-template-columns:88px minmax(0,1fr)}.issue-attachment-preview img{width:88px;height:72px}.issue-admin-attachment{grid-template-columns:1fr}.issue-admin-attachment img{height:auto;max-height:260px}
  .confirm-card{min-width:0;width:100%;padding:20px}
  .dialog-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}
  .dialog-actions button{width:100%;min-height:44px}
  input,textarea,select{width:100%;min-width:0;font-size:16px}
  .row-actions,.workflow-actions{flex-wrap:wrap}
  .guided-current{min-height:0}
  .legal-page{padding:24px 14px 48px}
  .legal-page .card{padding:20px}
}

@media(max-width:480px){
  main{padding:14px 12px 34px}
  h1{font-size:24px;line-height:1.15}
  h2{font-size:18px}
  .card{padding:16px;border-radius:14px}
  .header-actions,.dialog-actions{grid-template-columns:1fr}
  aside.mobile-open nav{grid-template-columns:1fr}
  .auth-screen{place-items:start center;padding:14px;min-height:100dvh}
  .auth-card{padding:22px 18px;border-radius:15px}
  .auth-brand{margin-bottom:22px}
  .legal-links{gap:10px;flex-wrap:wrap}
  .intel-stats,.rep-metrics,.ops-stats{grid-template-columns:1fr!important}
  .intel-stats>div:last-child{grid-column:auto}
  .row-actions,.workflow-actions,.import-actions{display:grid;width:100%}
  .row-actions button,.workflow-actions button,.import-actions button{width:100%;min-height:44px}
  .toast-region{left:10px;right:10px;bottom:10px}
}

/* Approved CompanyStead Cornerstone identity */
.mark{display:block;overflow:hidden;background:#111827;color:transparent;box-shadow:0 0 0 1px #ffffff1f;flex:0 0 auto}
.mark img{display:block;width:100%;height:100%;object-fit:cover}
.auth-card{color:#f8fafc}
.auth-brand strong,.auth-form h2{color:#f8fafc}
.auth-form label{color:#dce5f7}
.auth-form .muted{color:#aebbd0}

/* 0.9.5-beta.22: accessible light and dark appearance */
:root{
  --panel-soft:#fafbfe;
  --input-bg:#fff;
  --focus:#315efb;
  color-scheme:light;
}
[hidden]{display:none!important}
:root[data-theme="dark"]{
  --bg:#0b1220;
  --card:#121a2a;
  --text:#f3f6fb;
  --muted:#a8b3c7;
  --line:#2a3549;
  --accent:#8aa4ff;
  --good:#72d3a4;
  --warn:#f0b75b;
  --bad:#f38b8b;
  --panel-soft:#172133;
  --input-bg:#0f1726;
  --focus:#9ab0ff;
  color-scheme:dark;
}
body,.card,.secondary,.tab,.score:after,.source-chip,.rep-source,.status-bar>div,
.workflow-actions a.button,.issue-admin-attachment a.button,dialog,.confirm-card{
  transition:background-color .18s ease,color .18s ease,border-color .18s ease;
}
input,textarea,select{background:var(--input-bg);color:var(--text);border-color:var(--line)}
input::placeholder,textarea::placeholder{color:var(--muted);opacity:.82}
dialog{background:var(--card);color:var(--text);border:1px solid var(--line)}
dialog::backdrop{background:rgba(4,9,18,.62);backdrop-filter:blur(2px)}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible{
  outline:3px solid color-mix(in srgb,var(--focus) 68%,transparent);
  outline-offset:2px;
}
.theme-toggle{
  width:40px;height:40px;min-width:40px;padding:0;border-radius:12px;
  display:inline-grid;place-items:center;flex:0 0 auto;
  background:#1f2937;color:#f8fafc;border:1px solid #3b4659;
  box-shadow:none;font-size:20px;line-height:1;
}
.theme-toggle:hover{background:#2a3548;border-color:#536179}
.auth-brand>div,aside .brand>div{min-width:0;flex:1}
.auth-brand .theme-toggle{margin-left:auto}
.legal-theme-toggle{width:auto;min-width:0;height:auto;min-height:40px;padding:8px 12px;margin-left:auto;display:inline-flex;gap:7px;font-size:13px}

/* Theme neutral surfaces */
.secondary,.tab,.source-chip,.rep-source,.status-bar>div,.workflow-actions a.button,.issue-admin-attachment a.button{background:var(--card);color:var(--text);border-color:var(--line)}
.score:after{background:var(--card)}
.intel-stats>div,.import-field,.summary-grid section,.setup-step,.connection-card,.connection-explainer>div,
.import-service,.rep-metrics>div,.form-note,.social-box,.legal-contact>div{background:var(--panel-soft);border-color:var(--line)}
.legal-page .legal-note{background:color-mix(in srgb,var(--accent) 10%,var(--card))}
.issue-attachment-preview img{background:var(--card)}

/* The light sign-in page uses the same palette as the application. */
:root[data-theme="light"] .auth-screen{background:radial-gradient(circle at 20% 0%,#e3eaff 0,#f5f7fb 42%,#edf1f8 100%)}
:root[data-theme="light"] .auth-card{background:rgba(255,255,255,.96);color:var(--text);border-color:#d8dfeb;box-shadow:0 30px 80px rgba(34,48,78,.15)}
:root[data-theme="light"] .auth-brand strong,:root[data-theme="light"] .auth-form h2{color:var(--text)}
:root[data-theme="light"] .auth-form label{color:var(--text)}
:root[data-theme="light"] .auth-form .muted{color:var(--muted)}
:root[data-theme="light"] .auth-about{background:#f7f9fd;border-color:#d8dfeb}
:root[data-theme="light"] .auth-about h1{color:var(--text)}
:root[data-theme="light"] .auth-about p:not(.eyebrow){color:var(--muted)}
:root[data-theme="light"] .auth-about .auth-data-note{border-color:#d8dfeb}
:root[data-theme="light"] .auth-card .legal-links a{color:#405a9d}
:root[data-theme="light"] .auth-card .theme-toggle{background:#eef2fa;color:#26354f;border-color:#d2daea}
:root[data-theme="light"] .auth-card .theme-toggle:hover{background:#e3e9f5}

/* Authenticator-app MFA enrollment and recovery */
.mfa-setup-dialog{width:min(700px,calc(100vw - 28px));max-width:700px;max-height:calc(100vh - 28px);overflow:auto}
.mfa-dialog-card{display:grid;gap:18px}
.mfa-dialog-card h2,.mfa-dialog-card p{margin-top:0}
.mfa-enrollment-grid{display:grid;grid-template-columns:210px minmax(0,1fr);gap:22px;align-items:center;margin:18px 0}
.mfa-enrollment-grid>div{display:grid;gap:10px;min-width:0}
.mfa-qr{display:block;width:210px;height:210px;padding:10px;border:1px solid var(--line);border-radius:14px;background:#fff}
.mfa-setup-key{display:block;padding:12px;border:1px solid var(--line);border-radius:9px;background:var(--panel-soft);color:var(--text);font-size:15px;line-height:1.55;overflow-wrap:anywhere;user-select:all}
.mfa-recovery-codes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:18px 0}
.mfa-recovery-codes code{padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:var(--panel-soft);color:var(--text);font-size:14px;text-align:center;user-select:all}
.trusted-device-choice{margin-top:2px}.trusted-device-note{margin:-8px 0 0 29px;font-size:12px;line-height:1.45}
.account-security-dialog{width:min(570px,calc(100vw - 28px));max-width:570px}.account-security-card{display:grid;gap:14px}.account-security-card h2,.account-security-card p{margin:0}.security-status-row{padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--panel-soft)}.security-status-row>div{display:grid;gap:5px}.security-status-row small{line-height:1.5}
@media(max-width:600px){.mfa-enrollment-grid{grid-template-columns:1fr;justify-items:center}.mfa-enrollment-grid>div{width:100%}.mfa-qr{width:190px;height:190px}.mfa-recovery-codes{grid-template-columns:1fr}}

/* Dark application surfaces and readable status colors. */
:root[data-theme="dark"] .card{box-shadow:0 8px 24px rgba(0,0,0,.18)}
:root[data-theme="dark"] .tab.active{background:#dce5ff;color:#111a2a;border-color:#dce5ff}
:root[data-theme="dark"] .score{background:conic-gradient(var(--accent) calc(var(--score)*1%),#293449 0)}
:root[data-theme="dark"] .pill,
:root[data-theme="dark"] .priority-band,
:root[data-theme="dark"] .completion-badge,
:root[data-theme="dark"] .data-badge.imported{background:#25345c;color:#dce5ff}
:root[data-theme="dark"] .priority-band.highest,:root[data-theme="dark"] .priority-band.high{background:#293b72;color:#e1e8ff}
:root[data-theme="dark"] .priority-band.medium,:root[data-theme="dark"] .priority-band.lower,
:root[data-theme="dark"] .source-badge,:root[data-theme="dark"] .status-badge,
:root[data-theme="dark"] .data-badge.recorded,:root[data-theme="dark"] .service-chip,
:root[data-theme="dark"] .provider-badge,:root[data-theme="dark"] .source-state,
:root[data-theme="dark"] .viz-lite-badge{background:#222d40;color:#c1ccdd;border-color:#344056}
:root[data-theme="dark"] .source-chip.ready{background:#152d27;border-color:#2f6251}
:root[data-theme="dark"] .source-chip.partial{background:#30291b;border-color:#675633}
:root[data-theme="dark"] .goal-chip{background:#34284a;color:#ddc9ff}
:root[data-theme="dark"] .recommend-box,:root[data-theme="dark"] .rep-insight,
:root[data-theme="dark"] .import-loading{background:#172440;border-color:#334b79}
:root[data-theme="dark"] .quiet-action,:root[data-theme="dark"] .back-link{color:#bdc8db;border-color:#3a465b}
:root[data-theme="dark"] .edit-action{background:#1c2739;color:#c6d2e5;border-color:#354158}
:root[data-theme="dark"] .edit-action:hover{background:#263349;color:#eef3fb}
:root[data-theme="dark"] .destructive-action,:root[data-theme="dark"] .destructive-action.stronger{background:#3b2529;color:#ffb9b9;border-color:#684047}
:root[data-theme="dark"] .confirm-card{background:var(--card);border-color:#52373b}
:root[data-theme="dark"] .confirm-icon{background:#3b2529;color:#ffb9b9;border-color:#684047}
:root[data-theme="dark"] .import-empty{background:#1a2435;color:var(--muted)}
:root[data-theme="dark"] .import-error{background:#3a252b;color:#ffc1c1}
:root[data-theme="dark"] .data-badge.confirmed,:root[data-theme="dark"] .auto-plan-badge,
:root[data-theme="dark"] .status-badge.completed,:root[data-theme="dark"] .status-badge.resolved,
:root[data-theme="dark"] .status-badge.complete,:root[data-theme="dark"] .source-state.ready,
:root[data-theme="dark"] .connection-status.connected{background:#173629;color:#9ee0bc;border-color:#28543f}
:root[data-theme="dark"] .status-badge.in_progress,:root[data-theme="dark"] .data-badge.imported{background:#22365f;color:#b9cbff}
:root[data-theme="dark"] .status-badge.invited{background:#22365f;color:#b9cbff}
:root[data-theme="dark"] .status-badge.deferred,:root[data-theme="dark"] .status-badge.reviewing,
:root[data-theme="dark"] .status-badge.running,:root[data-theme="dark"] .source-state.partial{background:#3b301c;color:#f4d38c}
:root[data-theme="dark"] .status-badge.dismissed,:root[data-theme="dark"] .source-state.not_applicable{background:#252c38;color:#b4bece}
:root[data-theme="dark"] .status-badge.suspended,:root[data-theme="dark"] .status-badge.failed,
:root[data-theme="dark"] .status-badge.blocked{background:#42262a;color:#ffb3ae}
:root[data-theme="dark"] .provider-badge.google,:root[data-theme="dark"] .provider-badge.facebook,
:root[data-theme="dark"] .provider-badge.linkedin{background:#203356;color:#b8ccff}
:root[data-theme="dark"] .provider-badge.instagram{background:#3b2944;color:#e5bdf1}
:root[data-theme="dark"] .provider-badge.youtube,:root[data-theme="dark"] .provider-badge.yelp{background:#40272b;color:#f3b8b8}
:root[data-theme="dark"] .provider-badge.tiktok{background:#252d38;color:#d2d9e4}
:root[data-theme="dark"] .connector-note{background:#332b1d;color:#ead3a0;border-left-color:#d9b45b}
:root[data-theme="dark"] .optional-label{background:#263553;color:#c6d6ff}
:root[data-theme="dark"] .mini-progress,:root[data-theme="dark"] .guided-progress>div,
:root[data-theme="dark"] .action-progress-line>div{background:#2a3549}
:root[data-theme="dark"] .step-dot,:root[data-theme="dark"] .setup-step>span{background:#273247;color:#c3cede}
:root[data-theme="dark"] .guide-step.done .step-dot,:root[data-theme="dark"] .setup-step.done>span{background:#19382b;color:#a7e1c1}
:root[data-theme="dark"] .guide-step.current .step-dot{background:#253765;color:#c9d6ff}
:root[data-theme="dark"] .resource-list{background:#0b1220}
:root[data-theme="dark"] .rep-awaiting{background:#172133;border-color:#3b475c}
:root[data-theme="dark"] .beta-launch-card .launch-address input{background:var(--input-bg);color:var(--text);border-color:var(--line)}
:root[data-theme="dark"] .issue-admin-attachment a.button:hover{background:#202c40;border-color:#4a5971}
:root[data-theme="dark"] .evidence-row,:root[data-theme="dark"] .import-field small,
:root[data-theme="dark"] .form-note{color:var(--muted)}

:root[data-theme="dark"] .form-grid input,:root[data-theme="dark"] .form-grid textarea,:root[data-theme="dark"] .form-grid select,
:root[data-theme="dark"] .localform input,:root[data-theme="dark"] .localform textarea,
:root[data-theme="dark"] .stack-form input,:root[data-theme="dark"] .stack-form select,:root[data-theme="dark"] .stack-form textarea,
:root[data-theme="dark"] .inline-form input,:root[data-theme="dark"] .import-controls select,:root[data-theme="dark"] .import-controls input,
:root[data-theme="dark"] .rep-add-form input,:root[data-theme="dark"] .rep-add-form select,
:root[data-theme="dark"] .edit-dialog input,:root[data-theme="dark"] .edit-dialog select,:root[data-theme="dark"] .edit-dialog textarea{
  background:var(--input-bg);color:var(--text);border-color:var(--line)
}

@media(max-width:800px){
  aside .brand{gap:9px}
  aside .theme-toggle{width:40px;min-width:40px}
}
@media(max-width:420px){
  aside .brand small{display:none}
  .mobile-nav-toggle{font-size:0;width:42px;padding:9px;justify-content:center}
  .mobile-nav-toggle span{font-size:18px}
  .legal-theme-toggle{margin-left:0}
}
.report-note{white-space:pre-wrap;overflow-wrap:anywhere}
.oauth-card button.connection-unavailable:disabled{background:#e2e5eb;color:#647084;border:1px solid #cbd1dc;cursor:not-allowed;box-shadow:none;opacity:1}
[data-theme="dark"] .oauth-card button.connection-unavailable:disabled{background:#293140;color:#a0aabb;border-color:#394355}
#workforceNav{display:grid;gap:5px}
.workforce-console main{margin:0 auto;align-self:start}
.workforce-nav-label{margin:0 12px 6px;color:var(--muted)}
.issue-admin-card .notice{overflow-wrap:anywhere}
@media(prefers-reduced-motion:reduce){
  body,.card,.secondary,.tab,.score:after,.source-chip,.rep-source,.status-bar>div,
  .workflow-actions a.button,.issue-admin-attachment a.button,dialog,.confirm-card{transition:none}
}
