/* Trace app components, built on tokens.css only. See docs/STYLE-GUIDE.md §4. */

/* ---------- Base ---------- */
html.app-route,html.app-route body{background:var(--bg-base)}
.shell{
  display:grid;grid-template-columns:var(--sidebar-width) minmax(0,1fr);min-height:100vh;
  background:var(--bg-base);color:var(--text-primary);
  font-family:var(--font-sans);font-feature-settings:var(--font-features);
  font-size:13px;line-height:18px;-webkit-font-smoothing:antialiased;
}
.shell :is(button,input,select,textarea){font-family:inherit;font-feature-settings:inherit}
.shell :is(a,button,summary,select,input):focus-visible{outline:none;box-shadow:var(--shadow-low),var(--shadow-focus)}

/* ---------- Sidebar ---------- */
.shell .sidebar{
  position:sticky;top:0;z-index:var(--z-sidebar);height:100vh;box-sizing:border-box;
  display:flex;flex-direction:column;gap:0;min-width:0;
  padding:12px;background:var(--bg-secondary);border:0;
  font-size:13px;line-height:18px;color:var(--text-primary);
}
.shell .sidebar>.logo{
  display:flex;align-items:center;gap:8px;height:32px;padding:0 8px;margin:0 0 8px;
  font-size:17px;font-weight:600;letter-spacing:-.4px;line-height:1;color:var(--text-primary);text-decoration:none;
}
.shell .sidebar>.logo .mark{width:15px;height:15px;grid-template-columns:repeat(3,5px);grid-template-rows:repeat(3,5px);gap:0}

/* Brand switcher */
.shell .sidebar .brand-switcher{position:relative;padding:0;min-height:0;margin:0 0 8px}
.shell .sidebar .brand-switcher>summary{
  display:flex;align-items:center;gap:8px;height:44px;padding:6px 8px;box-sizing:border-box;
  border-radius:var(--radius-8);cursor:pointer;list-style:none;
  transition:background-color var(--duration) var(--ease);
}
.shell .sidebar .brand-switcher>summary::-webkit-details-marker{display:none}
.shell .sidebar .brand-switcher>summary:hover,.shell .sidebar .brand-switcher[open]>summary{background:var(--control-selected)}
.shell .sidebar .brand-switcher .company-icon{flex:0 0 24px;width:24px;height:24px;border-radius:var(--radius-6);font-size:11px}
.shell .sidebar .brand-switcher>summary>span:not(.company-icon):not(.brand-chevron){display:flex;flex-direction:column;min-width:0;flex:1}
.shell .sidebar .brand-switcher strong{font-size:13px;line-height:18px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.shell .sidebar .brand-switcher small{font-size:12px;line-height:16px;color:var(--text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.shell .sidebar .brand-chevron{font-size:12px;line-height:1;color:var(--text-tertiary)}

.shell .brand-options{
  position:absolute;top:calc(100% + 4px);left:0;z-index:var(--z-popover);
  width:248px;max-height:min(480px,70vh);overflow:auto;box-sizing:border-box;
  padding:4px;border:0;border-radius:var(--radius-8);background:var(--bg-base);box-shadow:var(--shadow-high);
  font-size:13px;line-height:18px;color:var(--text-primary);
}
.shell .brand-options>p{margin:0;padding:8px;color:var(--text-secondary)}
.shell .brand-search{display:block;padding:4px 4px 8px;margin:0 0 4px;border-bottom:1px solid var(--border-row);font-size:12px;line-height:16px;color:var(--text-secondary)}
.shell .brand-search input{display:block;width:100%;box-sizing:border-box;height:28px;margin-top:4px;padding:0 8px;border:0;border-radius:var(--radius-8);background:var(--bg-base);box-shadow:var(--shadow-low);font-size:13px;color:var(--text-primary)}
.shell .brand-choice-list{display:flex;flex-direction:column}
.shell .brand-choice{display:flex;align-items:center;gap:8px;min-height:34px;padding:6px 8px;box-sizing:border-box;border-radius:var(--radius-4);color:var(--text-primary);text-decoration:none}
.shell .brand-choice:hover,.shell .brand-choice[aria-current="true"]{background:var(--bg-tertiary)}
.shell .brand-choice .company-icon{flex:0 0 20px;width:20px;height:20px;border-radius:var(--radius-4);font-size:10px}
.shell .brand-choice>span:not(.company-icon){display:flex;flex-direction:column;min-width:0;flex:1}
.shell .brand-choice strong{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.shell .brand-choice small{font-size:12px;line-height:16px;color:var(--text-secondary)}
.shell .brand-no-results{margin:0;padding:8px;color:var(--text-secondary)}
.shell .brand-switch-footer,.shell .brand-menu-account{display:flex;flex-direction:column;margin-top:4px;padding-top:4px;border-top:1px solid var(--border-row)}
.shell .brand-switch-footer a,.shell .brand-menu-account :is(a,button){display:flex;align-items:center;min-height:32px;padding:0 8px;border:0;border-radius:var(--radius-4);background:none;color:var(--text-primary);font:inherit;font-weight:500;text-align:left;text-decoration:none;cursor:pointer}
.shell .brand-switch-footer a:hover,.shell .brand-menu-account :is(a,button):hover{background:var(--bg-tertiary)}
.shell .brand-menu-account small{padding:6px 8px 2px;font-size:12px;line-height:16px;color:var(--text-secondary)}

/* Nav items (shared by inbox link and section nav) */
.shell .sidebar :is(.nav a,.inbox-nav-link){
  display:flex;align-items:center;gap:8px;height:32px;min-height:0;padding:6px 8px;box-sizing:border-box;
  border-radius:var(--radius-8);background:transparent;color:var(--text-primary);
  font-size:13px;line-height:18px;font-weight:400;text-decoration:none;white-space:nowrap;
  transition:background-color var(--duration) var(--ease);
}
.shell .sidebar :is(.nav a,.inbox-nav-link):hover,
.shell .sidebar :is(.nav a.active,.nav a[aria-current="page"],.inbox-nav-link[aria-current="page"]){background:var(--control-selected);color:var(--text-primary);font-weight:400}
.shell .sidebar .navigation-icon{
  flex:0 0 16px;width:16px;height:16px;background:currentColor;color:var(--text-secondary);
  -webkit-mask:var(--navigation-icon) center/contain no-repeat;mask:var(--navigation-icon) center/contain no-repeat;
}
.shell .sidebar :is(.nav a.active,.nav a[aria-current="page"],.inbox-nav-link[aria-current="page"]) .navigation-icon{color:var(--text-primary)}
.shell .sidebar .inbox-nav-link{margin:0 0 8px}
.shell .sidebar .inbox-nav-link>span:last-child:not(.navigation-icon){margin-left:auto;font-size:12px;line-height:16px;color:var(--text-secondary)}
.shell .sidebar .nav{display:flex;flex-direction:column;gap:2px;flex:1 1 auto;min-height:0;overflow:auto;padding:0;margin:0}
.shell .sidebar .navlabel{margin:12px 8px 4px;font-size:12px;line-height:16px;font-weight:400;letter-spacing:0;text-transform:none;color:var(--text-tertiary)}

/* Workspace / Analytics segmented control */
.shell .workspace-modes{
  position:relative;display:flex;align-items:stretch;gap:0;height:32px;padding:2px;margin:0 0 12px;box-sizing:border-box;
  border:0;border-radius:var(--radius-8);background:var(--bg-tertiary);box-shadow:var(--shadow-low);
}
.shell .workspace-modes a{
  flex:1;display:flex;align-items:center;justify-content:center;padding:0 6px;
  border-radius:var(--radius-6);color:var(--text-secondary);
  font-size:13px;line-height:18px;font-weight:500;text-decoration:none;
  transition:color 250ms var(--ease),background-color 250ms var(--ease),box-shadow 250ms var(--ease);
}
.shell .workspace-modes a:hover{color:var(--text-primary)}
.shell .workspace-modes a[aria-current="true"]{background:var(--control-bg);color:var(--text-primary);box-shadow:var(--shadow-low)}

/* Sidebar footer items */
.shell .sidebar .sidebar-palette{display:none}
.shell .sidebar>a.small.muted{display:flex;align-items:center;height:32px;padding:0 8px;font-size:12px;color:var(--text-secondary);text-decoration:none}
.shell .sidebar .theme-toggle{
  display:grid;place-items:center;flex:0 0 auto;width:28px;height:28px;padding:0;margin:8px 0 0;
  border:0;border-radius:var(--radius-8);background:transparent;color:var(--text-secondary);font-size:14px;line-height:1;cursor:pointer;
}
.shell .sidebar .theme-toggle:hover{background:var(--control-hover);color:var(--text-primary)}

/* ---------- Page header ---------- */
.shell .main>.topbar{
  position:sticky;top:0;z-index:var(--z-header);
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  height:var(--header-height);min-height:0;padding:0 var(--page-gutter);box-sizing:border-box;
  border-bottom:1px solid var(--border-row);background:var(--bg-header);
  -webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);
  font-size:13px;line-height:18px;color:var(--text-secondary);
}
.shell .main>.topbar>span:first-child{color:var(--text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.shell .main>.topbar a{display:inline-flex;align-items:center;gap:4px;color:var(--text-primary);font-weight:500;text-decoration:none;white-space:nowrap}
.shell .main>.topbar a:hover{color:var(--text-secondary)}
.shell .main>.topbar .ui-arrow{width:14px;height:14px}

/* Plan strip under the header */
.shell .main>.workspace-access{
  display:flex;align-items:center;gap:8px;min-height:36px;padding:0 var(--page-gutter);box-sizing:border-box;
  border-bottom:1px solid var(--border-row);background:var(--bg-secondary);
  font-size:13px;line-height:18px;color:var(--text-secondary);
}
.shell .main>.workspace-access strong{font-weight:500;color:var(--text-primary)}
.shell .main>.workspace-access .access-dot{flex:0 0 6px;width:6px;height:6px;border-radius:var(--radius-2);background:var(--brand)}
.shell .main>.workspace-access a{margin-left:auto;display:inline-flex;align-items:center;gap:4px;color:var(--text-primary);font-weight:500;text-decoration:none;white-space:nowrap}
.shell .main>.workspace-access .ui-arrow{width:14px;height:14px}

/* Page title row */
.shell :is(.pagehead,.overview-heading,.inbox-heading){
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px;margin:0 0 16px;padding:0;
}
.shell :is(.pagehead,.overview-heading,.inbox-heading) h1{
  margin:0;font-size:18px;line-height:24px;font-weight:600;letter-spacing:-.25px;color:var(--text-primary);
}
.shell :is(.pagehead,.overview-heading,.inbox-heading) p{margin:4px 0 0;max-width:720px;font-size:13px;line-height:18px;color:var(--text-secondary)}
.shell .overview-health{
  display:inline-flex;align-items:center;height:22px;padding:0 8px;box-sizing:border-box;
  border:1px solid var(--border-strong);border-radius:var(--radius-full);background:var(--bg-tertiary);
  font-size:12px;line-height:16px;color:var(--text-primary);white-space:nowrap;
}

/* ---------- Tabs ---------- */
.shell .tabs{
  display:flex;align-items:stretch;gap:0;height:39px;padding:0;margin:0;box-sizing:border-box;
  border:0;border-bottom:1px solid var(--border-row);background:transparent;
}
.shell .tabs>button{
  position:relative;display:flex;align-items:center;height:100%;padding:0 8px;margin:0;
  border:0;border-radius:var(--radius-8) var(--radius-8) 0 0;background:transparent;box-shadow:none;
  color:var(--text-secondary);font-size:13px;line-height:18px;font-weight:500;cursor:pointer;
  transition:color 200ms var(--ease);
}
.shell .tabs>button:hover{color:var(--text-primary);background:transparent}
.shell .tabs>button:is(.active,[aria-selected="true"]){color:var(--text-primary);background:transparent}
.shell .tabs>button:is(.active,[aria-selected="true"])::after{content:"";position:absolute;left:8px;right:8px;bottom:-1px;height:2px;background:var(--fill-primary)}

/* View toggle (pressed buttons, no track) */
.shell .project-tabs{display:flex;align-items:center;gap:4px;padding:0;margin:0 0 16px;border:0;background:transparent}
.shell .project-tabs>button{
  display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 8px;margin:0;
  border:0;border-radius:var(--radius-8);background:transparent;box-shadow:none;
  color:var(--text-tertiary);font-size:13px;line-height:18px;font-weight:500;cursor:pointer;
  transition:color var(--duration) var(--ease),background-color var(--duration) var(--ease);
}
.shell .project-tabs>button:hover{color:var(--text-secondary)}
.shell .project-tabs>button[aria-pressed="true"]{background:var(--control-selected);color:var(--text-primary)}
.shell .project-tabs>button>span{font-size:12px;line-height:16px;color:var(--text-secondary)}

/* ---------- Filter bar ---------- */
.shell .dashboard-controls{
  display:flex;flex-wrap:wrap;align-items:center;gap:8px;
  margin:0;padding:12px var(--page-gutter);box-sizing:border-box;border:0;background:transparent;
}
.shell .dashboard-controls>:is(.shared-run-bar,.prompt-filterbar){display:contents}
.shell :is(.shared-run-bar,.prompt-filterbar)>:is(div,label){display:inline-flex;align-items:center;gap:6px;margin:0;font-size:12px;line-height:16px;font-weight:400;color:var(--text-secondary)}
.shell :is(.shared-run-bar,.prompt-filterbar) .eyebrow{font-size:12px;line-height:16px;font-weight:400;letter-spacing:0;text-transform:none;color:var(--text-secondary)}
.shell .prompt-filterbar>.prompt-search{margin-left:auto}

.shell :is(.dashboard-controls,.filters) :is(select,input:not([type="checkbox"]):not([type="radio"])),
.shell :is(.dashboard-controls,.filters) .run-context-details>summary{
  height:24px;min-height:0;width:auto;max-width:100%;margin:0;padding:0 8px;box-sizing:border-box;
  border:0;border-radius:var(--radius-8);background-color:var(--control-bg);box-shadow:var(--shadow-low);
  color:var(--text-primary);font-size:12px;line-height:16px;font-weight:500;
  transition:background-color var(--duration) var(--ease);
}
.shell :is(.dashboard-controls,.filters) select:not([multiple]):not([size]){-webkit-appearance:none;appearance:none;padding-right:24px;background-image:var(--chevron);background-repeat:no-repeat;background-position:right 6px center;background-size:12px;cursor:pointer}
.shell :is(.dashboard-controls,.filters) select:hover,
.shell :is(.dashboard-controls,.filters) .run-context-details>summary:hover{background-color:var(--control-hover)}
.shell :is(.dashboard-controls,.filters) input:not([type="checkbox"]):not([type="radio"]){width:220px;font-weight:400}
.shell :is(.dashboard-controls,.filters) input::placeholder{color:var(--text-tertiary)}
.shell .dashboard-controls .run-context-details{position:relative}
.shell .dashboard-controls .run-context-details>summary{display:inline-flex;align-items:center;gap:4px;list-style:none;cursor:pointer}
.shell .dashboard-controls .run-context-details>summary::-webkit-details-marker{display:none}
.shell .dashboard-controls .run-context-popover{
  position:absolute;top:calc(100% + 4px);left:0;z-index:var(--z-popover);width:280px;max-width:calc(100vw - 2 * var(--page-gutter));box-sizing:border-box;
  padding:12px;border:0;border-radius:var(--radius-8);background:var(--bg-base);box-shadow:var(--shadow-high);
  font-size:13px;line-height:18px;color:var(--text-primary);
}
.shell .filters{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 16px}

/* ---------- Page containers share the header gutter ---------- */
.shell .main :is(.saved-content,.overview-content,.prompt-content,.explorer-content,.competitor-content,.projects-content,.library-v2,.actions-workspace,.facts-workspace,.tracking-content,.brand-profile,.billing-content,.workflow-library,.refresh-explorer){padding:16px var(--page-gutter) 48px;max-width:none;margin-left:0;margin-right:0}
.shell .main :is(.settings-body,.improve-content){padding:16px var(--page-gutter) 48px;max-width:960px;margin-left:0;margin-right:0}
.shell .main #inbox-content{padding-left:var(--page-gutter);padding-right:var(--page-gutter)}
.shell .main>.dashboard-controls+*{padding-top:8px}
.shell .main>.workspace-checklist{margin:16px var(--page-gutter) 0}

/* ---------- Sidebar variants ---------- */
.shell .brand-choice[hidden]{display:none}
.shell .main>.workspace-access .access-dot.paid{background:var(--green-base)}
.shell .sidebar .account-nav{display:block;margin:8px 0 0;padding:8px;border-top:1px solid var(--border-row);font-size:12px;line-height:16px;color:var(--text-secondary);text-decoration:none}
.shell .sidebar .account-nav strong{display:block;font-size:13px;line-height:18px;font-weight:500;color:var(--text-primary)}
.shell .settings-sidebar>.settings-back{display:flex;align-items:center;height:32px;padding:0 8px;margin:0 0 8px;border-radius:var(--radius-8);color:var(--text-secondary);text-decoration:none}
.shell .settings-sidebar>.settings-back:hover{background:var(--control-hover);color:var(--text-primary)}
.shell .settings-sidebar>h2{margin:0 0 4px;padding:0 8px;font-size:13px;line-height:18px;font-weight:600;color:var(--text-primary)}
.shell .settings-sidebar .settings-nav-hint{margin:0 8px 4px;font-size:12px;line-height:16px;color:var(--text-tertiary)}
.shell .dashboard-controls .run-context-details>summary::after{content:"";width:12px;height:12px;background:var(--chevron) center/12px no-repeat}
.shell .dashboard-controls .run-context-details[open]>summary::after{transform:rotate(180deg)}
.shell .dashboard-controls .run-context-details:not([open]) .run-context-popover{display:none}

/* ---------- Narrow screens (legacy ≤850px rules still own the mobile menu) ---------- */
@media(max-width:1000px){
  .shell{grid-template-columns:216px minmax(0,1fr)}
}
@media(max-width:750px){
  .shell{--page-gutter:16px}
  .shell :is(.shared-run-bar,.prompt-filterbar)>:is(div,label){flex:1 1 140px;min-width:0}
  .shell :is(.shared-run-bar,.prompt-filterbar)>:is(div,label)>:is(select,input){flex:1;min-width:0;width:auto}
  .shell .prompt-filterbar>.prompt-search{flex-basis:100%;margin-left:0}
  .shell .dashboard-controls .run-context-popover{left:auto;right:0}
}
@media(max-width:700px){
  .shell{display:block}
  .shell .sidebar{display:none}
  .shell .main>.topbar{height:auto;min-height:var(--header-height);flex-wrap:wrap;padding:8px 16px}
  .shell .main>.workspace-access{flex-wrap:wrap;padding:8px 16px}
  .shell .main>.workspace-access a{margin-left:0}
}

/* =====================================================================
   Content layer. Base element styles use :where() so any component rule
   still wins; legacy screens inherit the palette through the remap below.
   ===================================================================== */

/* Legacy variables → tokens (both themes) */
.shell{
  --bg:var(--bg-base);--panel:var(--bg-base);--raised:var(--bg-secondary);--line:var(--border-row);
  --muted:var(--text-secondary);--text:var(--text-primary);--accent:var(--brand);--purple:var(--brand);--blue:var(--brand-pink);
  --ui-hover:var(--control-hover);--ui-rule:var(--border-row);--ui-radius:var(--radius-8);
  --text-body:13px;--text-ui:13px;
}

/* Type */
.shell :where(h1){font-size:18px;line-height:24px;font-weight:600;letter-spacing:-.25px}
.shell :where(h2){font-size:14px;line-height:20px;font-weight:600;letter-spacing:0;margin:0}
.shell :where(h3){font-size:13px;line-height:18px;font-weight:600;margin:0}
.shell :where(p){line-height:20px}
.shell :where(.small){font-size:13px;line-height:18px}
.shell :where(.muted){color:var(--text-secondary)}
.shell :where(strong,b){font-weight:600}
.shell .eyebrow{font-family:var(--font-sans);font-size:11px;line-height:16px;font-weight:500;letter-spacing:.04em;color:var(--text-tertiary)}
.shell :is(.mono,.rank,.percent,.actionrow .num,.overview-opnumber,.improve-number){font-family:var(--font-sans);font-variant-numeric:tabular-nums;letter-spacing:0}
.shell :is(.source,.source-url){font-family:var(--font-sans)}

/* Links inside content */
.shell .main :where(a){color:var(--text-primary);font-weight:500}
.shell .main :where(a):hover{color:var(--text-secondary);filter:none}
.shell .main :where(p,li,.answer-text) :where(a){color:var(--brand-emphasis);font-weight:400;text-decoration:underline;text-decoration-color:var(--brand-border);text-underline-offset:2px}
.shell .ui-arrow{width:14px;height:14px}

/* Form controls */
.shell :where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),select){
  height:28px;padding:0 8px;box-sizing:border-box;border:0;border-radius:var(--radius-8);
  background-color:var(--control-bg);box-shadow:var(--shadow-low);color:var(--text-primary);font-size:13px;line-height:18px;
}
.shell :where(select:not([multiple]):not([size])){-webkit-appearance:none;appearance:none;padding-right:26px;background-image:var(--chevron);background-repeat:no-repeat;background-position:right 8px center;background-size:12px}
.shell :where(textarea){padding:8px 10px;border:0;border-radius:var(--radius-8);background:var(--control-bg);box-shadow:var(--shadow-low);color:var(--text-primary);font-size:13px;line-height:20px}
.shell :where(input,select,textarea)::placeholder{color:var(--text-tertiary)}
.shell :where(input,select,textarea):focus{outline:none;box-shadow:var(--shadow-low),var(--shadow-focus)}
.shell :where(input[type="checkbox"],input[type="radio"]){accent-color:var(--fill-primary);width:14px;height:14px}
.shell :where(label){font-size:13px;line-height:18px}
.shell .field-label{font-size:12px;line-height:16px;font-weight:500;color:var(--text-secondary);letter-spacing:0;text-transform:none}

/* Buttons: secondary by default, .primary is ink */
.shell :where(button:not([class]),.button){
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  height:28px;min-height:0;padding:0 10px;box-sizing:border-box;
  border:0;border-radius:var(--radius-8);background:var(--control-bg);box-shadow:var(--shadow-low);
  color:var(--text-primary);font-size:13px;line-height:18px;font-weight:500;white-space:nowrap;cursor:pointer;
  transition:background-color var(--duration) var(--ease);
}
.shell :where(button:not([class]),.button):hover:not(:disabled){background:var(--control-hover);filter:none}
.shell :where(button):disabled{opacity:.5;cursor:not-allowed}
.shell .main :is(.primary,button.primary,a.primary){
  display:inline-flex;align-items:center;justify-content:center;gap:6px;height:28px;min-height:0;padding:0 10px;box-sizing:border-box;
  border:0;border-radius:var(--radius-8);background:var(--control-primary);box-shadow:var(--shadow-low);
  color:var(--text-inverse);font-size:13px;line-height:18px;font-weight:500;text-decoration:none;
}
.shell .main :is(.primary,button.primary,a.primary):hover:not(:disabled){background:var(--control-primary-hover);color:var(--text-inverse)}
.shell .main :is(.primary,a.primary) .ui-arrow{background:currentColor}
.shell .main :is(.ghost,button.ghost,a.ghost){
  display:inline-flex;align-items:center;gap:6px;height:28px;min-height:0;padding:0 10px;box-sizing:border-box;
  border:0;border-radius:var(--radius-8);background:var(--control-bg);box-shadow:var(--shadow-low);
  color:var(--text-primary);font-size:13px;line-height:18px;font-weight:500;text-decoration:none;
}
.shell .main :is(.ghost,button.ghost,a.ghost):hover:not(:disabled){background:var(--control-hover)}

/* Cards */
.shell .main .panel{border:0;border-radius:var(--radius-12);background:var(--bg-base);box-shadow:var(--shadow-medium);overflow:hidden}
.shell .main .panel .panel{border:1px solid var(--border-row);border-radius:var(--radius-8);box-shadow:none}
.shell :is(.panelhead,.overview-panelhead,.explorer-detailhead){display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:16px}
.shell :is(.panelhead,.overview-panelhead,.explorer-detailhead) :is(h2,h3){font-size:14px;line-height:20px;font-weight:600;margin:0}
.shell :is(.panelhead,.overview-panelhead,.explorer-detailhead) p{margin:2px 0 0;font-size:13px;line-height:18px;color:var(--text-secondary)}

/* Chips */
.shell :is(.pill,.badge,.priority,.prompt-tag,.library-status,.report-pill,.tf-chip,.overview-health){
  display:inline-flex;align-items:center;gap:4px;height:22px;padding:0 8px;box-sizing:border-box;
  border:1px solid var(--border-strong);border-radius:var(--radius-full);background:var(--bg-tertiary);
  color:var(--text-primary);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0;text-transform:none;white-space:nowrap;
}
.shell :is(.priority-high,.priority.priority-high){border-color:var(--red-border);background:var(--red-muted);color:var(--red-emphasis)}
.shell :is(.priority-medium,.priority.priority-medium){border-color:var(--amber-border);background:var(--amber-muted);color:var(--amber-emphasis)}
.shell :is(.priority-low,.priority.priority-low){border-color:var(--border-strong);background:var(--bg-tertiary);color:var(--text-secondary)}
.shell .pill.prompt-active{border-color:var(--green-border);background:var(--green-muted);color:var(--green-emphasis)}

/* Tables (real and grid-based) */
.shell .main :where(table){width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}
.shell .main :is(table th){height:40px;padding:0 16px;border:0;border-bottom:1px solid var(--border-row);background:var(--bg-secondary);color:var(--text-secondary);font-size:13px;line-height:18px;font-weight:400;letter-spacing:0;text-transform:none;text-align:left;white-space:nowrap}
.shell .main :is(table td){height:48px;padding:8px 16px;box-sizing:border-box;border:0;border-bottom:1px solid var(--border-row);font-size:13px;line-height:18px;vertical-align:middle}
.shell .main :is(table tbody tr:last-child td){border-bottom:0}
.shell .main :is(table tbody tr):hover{background:var(--bg-secondary)}
.shell :is(.live-data-head,.competitive-head,.prompt-library-head,.explorer-columns,.refresh-table-head,.preview-table-head,.tf-table-head,.tracking-row-head){
  min-height:40px;padding:0 16px;box-sizing:border-box;align-items:center;border-bottom:1px solid var(--border-row);background:var(--bg-secondary);
  color:var(--text-secondary);font-size:13px;line-height:18px;font-weight:400;letter-spacing:0;text-transform:none;
}
.shell :is(.live-data-row,.competitive-row,.prompt-library-row,.explorer-row>summary,.tracking-row:not(.tracking-row-head)){
  min-height:48px;padding:12px 16px;box-sizing:border-box;align-items:center;column-gap:16px;border-color:var(--border-row);font-size:13px;line-height:18px;
}

/* KPI tiles */
.shell .overview-kpis{gap:12px}
.shell .overview-kpi{padding:16px;border-top:0}
.shell .overview-kpi::before,.shell .overview-kpi::after{display:none}
.shell .overview-kpi>span{display:block;font-size:13px;line-height:18px;color:var(--text-secondary)}
.shell .overview-kpi>strong{display:block;margin:4px 0 2px;font-size:24px;line-height:32px;font-weight:600;letter-spacing:-.25px;font-variant-numeric:tabular-nums}
.shell .overview-kpi>strong small{font-size:13px;font-weight:500;color:var(--text-secondary)}
.shell .overview-kpi>div,.shell .overview-kpi>p{margin:0;font-size:12px;line-height:16px;color:var(--text-secondary)}
.shell .overview-kpi>p{margin-top:8px}

/* Overview cards */
.shell .overview-analysis{gap:12px}
.shell :is(.overview-trend,.overview-ranking,.overview-opportunities){padding:16px}
.shell :is(.overview-trend,.overview-ranking,.overview-opportunities)>.overview-panelhead{padding:0 0 12px}
.shell .overview-panelhead>a{white-space:nowrap}
.shell .overview-brand{padding:12px 0;border-top:1px solid var(--border-row)}
.shell .overview-brand>summary{font-size:13px}
.shell :is(.overview-rank,.overview-brandname){font-size:13px}
.shell .overview-brand>summary>b{font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}
.shell .overview-rankbar{height:4px;border-radius:var(--radius-2);background:var(--fill-quinary)}
.shell .overview-opportunity{border-color:var(--border-row)}
.shell .overview-opportunity>summary{padding:12px 0;gap:12px;align-items:center}
.shell .overview-opnumber{font-size:13px;color:var(--text-tertiary)}
.shell .overview-opportunity>summary strong{font-size:13px;line-height:18px;font-weight:500}
.shell .overview-opportunity>summary small{font-size:12px;line-height:16px;color:var(--text-secondary)}
.shell .overview-legend{gap:16px;font-size:13px}
.shell .live-evidence{padding:16px;border-radius:var(--radius-8);background:var(--bg-secondary)}

/* Getting-started checklist */
.shell .main>.workspace-checklist{border:0;border-radius:var(--radius-12);background:var(--bg-base);box-shadow:var(--shadow-medium)}
.shell .workspace-checklist>summary{padding:12px 16px;font-size:13px;line-height:18px;font-weight:500}
.shell .workspace-checklist .checklist-body{padding:0 16px 16px}
.shell .workspace-checklist .checklist-steps{gap:12px;padding-top:12px;border-top:1px solid var(--border-row)}
.shell .workspace-checklist .checklist-step{font-size:13px}
.shell .workspace-checklist .checklist-step h3{margin:4px 0;font-size:13px;line-height:18px;font-weight:600}
.shell .workspace-checklist .checklist-step p{margin:0 0 8px;font-size:13px;line-height:18px;color:var(--text-secondary)}
.shell .workspace-checklist .checklist-step>span:first-child{font-family:var(--font-sans);font-size:12px;color:var(--text-tertiary)}
.shell .workspace-checklist .checklist-footer{font-size:13px;color:var(--text-secondary)}
.shell .overview-analysis-unified{gap:0;border:0;border-radius:var(--radius-12);background:var(--bg-base);box-shadow:var(--shadow-medium);overflow:hidden}
.shell .overview-analysis-unified>.panel{border-radius:0;box-shadow:none}
.shell .overview-analysis-unified>.panel+.panel{border-left:1px solid var(--border-row)}
@media(max-width:1000px){.shell .overview-analysis-unified>.panel+.panel{border-left:0;border-top:1px solid var(--border-row)}}

/* Selectable stat cards */
.shell .competitor-card{border:0;border-radius:var(--radius-12);background:var(--bg-base);box-shadow:var(--shadow-medium);padding:16px;text-align:left;color:var(--text-primary);transition:box-shadow var(--duration) var(--ease)}
.shell .competitor-card:hover{box-shadow:var(--shadow-high);filter:none}
.shell .competitor-card.selected{background:var(--bg-base);box-shadow:0 0 0 1.5px var(--fill-primary),var(--shadow-low)}
.shell .competitor-card small{font-size:11px;line-height:16px;font-weight:500;letter-spacing:.04em;color:var(--text-tertiary)}
.shell .competitor-card strong{font-size:24px;line-height:32px;font-weight:600;letter-spacing:-.25px;font-variant-numeric:tabular-nums}
.shell .brand-meter{height:4px;border-radius:var(--radius-2);background:var(--fill-quinary)}
.shell .competitor-focus{border:0;border-radius:var(--radius-12);background:var(--bg-base);box-shadow:var(--shadow-medium);padding:16px}
.shell .competitor-focus strong{font-size:24px;line-height:32px;font-weight:600;font-variant-numeric:tabular-nums}
.shell .library-counts b{font-size:18px;line-height:24px;font-weight:600;color:var(--text-primary);font-variant-numeric:tabular-nums}

/* Actions: one joined list instead of stacked cards */
.shell .actions-workspace>.opportunity{margin:0;border-radius:0;box-shadow:var(--ring)}
.shell .actions-workspace>.opportunity+.opportunity{margin-top:1px}
.shell .actions-workspace>.opportunity:not(.opportunity+.opportunity){border-top-left-radius:var(--radius-12);border-top-right-radius:var(--radius-12)}
.shell .actions-workspace>.opportunity:not(:has(+.opportunity)){border-bottom-left-radius:var(--radius-12);border-bottom-right-radius:var(--radius-12);margin-bottom:16px}
.shell .actions-workspace .opportunity>summary{min-height:56px;padding:10px 16px;gap:12px;align-items:center}
.shell .main :is(.primary,.ghost,button):disabled{opacity:.45;box-shadow:none;cursor:not-allowed}
@media(max-width:750px){
  .shell .main{min-width:0;overflow-x:clip}
  .shell :is(.live-data-head,.competitive-head,.prompt-library-head,.explorer-columns,.refresh-table-head,.live-data-row,.competitive-row,.prompt-library-row,.explorer-row>summary){padding-left:12px;padding-right:12px;column-gap:8px}
}
/* Phones: give text links and disclosures a 32px+ tap area without moving the layout */
@media(max-width:750px){
  .shell .main a:not(.primary):not(.ghost):not(.button):not(:where(p,li,.answer-text) a){padding-block:7px;margin-block:-7px}
  .shell .main summary{min-height:32px}
}

/* =====================================================================
   Free audit flow (Peec-style): a live app replica on a stage, one question
   at a time underneath, and a full-screen sheet for the two long steps.
   ===================================================================== */
.audit-header{display:flex;align-items:center;justify-content:space-between;gap:16px;height:56px;padding:0 24px;border:0;background:var(--bg-base);font-family:var(--font-sans);font-feature-settings:var(--font-features);font-size:13px;line-height:18px;color:var(--text-secondary);-webkit-font-smoothing:antialiased}
.audit-header .logo{display:flex;align-items:center;gap:8px;font-size:17px;font-weight:600;letter-spacing:-.4px;color:var(--text-primary);text-decoration:none}
.audit-header .logo .mark{width:15px;height:15px;grid-template-columns:repeat(3,5px);grid-template-rows:repeat(3,5px);gap:0}
.audit-header>span{color:var(--text-tertiary)}
.audit-header>a.small{display:inline-flex;align-items:center;gap:4px;color:var(--text-primary);font-size:13px;font-weight:500;text-decoration:none}
.audit-header .ui-arrow{width:14px;height:14px}

.guided-audit{position:relative;min-height:calc(100vh - 56px);max-width:none;margin:0;padding:0 0 40px;background:var(--bg-base);color:var(--text-primary);font-family:var(--font-sans);font-feature-settings:var(--font-features);font-size:14px;line-height:20px;-webkit-font-smoothing:antialiased}
.audit-back{position:absolute;top:4px;left:24px;z-index:6;display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border:0;border-radius:8px;background:var(--control-bg);box-shadow:var(--shadow-low);color:var(--text-primary);font:500 13px/18px var(--font-sans);cursor:pointer}
.audit-back:hover{background:var(--control-hover)}

/* Stage + replica */
.audit-stage{position:relative;height:clamp(280px,48vh,460px);padding:16px 32px 0;overflow:hidden;pointer-events:none;user-select:none;
  -webkit-mask-image:linear-gradient(#000 calc(100% - 150px),transparent calc(100% - 16px));mask-image:linear-gradient(#000 calc(100% - 150px),transparent calc(100% - 16px));
  transition:filter .3s var(--ease),opacity .3s var(--ease)}
.ap-window{display:grid;grid-template-columns:196px minmax(0,1fr);width:100%;max-width:1160px;height:520px;margin:0 auto;border-radius:12px;background:var(--bg-base);box-shadow:var(--shadow-medium);overflow:hidden;font-size:12px;line-height:16px;color:var(--text-primary);
  transition:max-width .32s cubic-bezier(.25,1,.5,1),transform .32s cubic-bezier(.25,1,.5,1)}
.step-1 .ap-window{max-width:1376px;transform:translateY(10px) scale(1.015)}
.ap-side{display:flex;flex-direction:column;gap:2px;padding:10px;background:var(--bg-secondary)}
.ap-switch{display:flex;align-items:center;gap:8px;height:38px;padding:4px 6px;border-radius:8px}
.ap-avatar{display:grid;place-items:center;flex:0 0 20px;width:20px;height:20px;border-radius:5px;background:var(--brand);color:#fff;font-size:11px;font-weight:600}
.ap-switch>span{display:flex;flex-direction:column;gap:2px;min-width:0;font-weight:500}
.ap-switch small{font-size:11px;font-weight:400;color:var(--text-secondary)}
.ap-modes{display:flex;height:26px;padding:2px;margin:6px 0 8px;border-radius:7px;background:var(--bg-tertiary);box-shadow:var(--shadow-low)}
.ap-modes span{flex:1;display:grid;place-items:center;border-radius:5px;font-size:11px;font-weight:500;color:var(--text-secondary)}
.ap-modes .on{background:var(--control-bg);box-shadow:var(--shadow-low);color:var(--text-primary)}
.ap-side nav{display:flex;flex-direction:column;gap:2px}
.ap-side nav span{display:flex;align-items:center;gap:8px;height:26px;padding:0 8px;border-radius:7px;transition:background-color .3s var(--ease)}
.ap-side nav span.on{background:var(--control-selected)}
.ap-side nav i{flex:0 0 13px;width:13px;height:13px;background:var(--text-secondary);-webkit-mask:var(--ico) center/contain no-repeat;mask:var(--ico) center/contain no-repeat}
.ap-main{display:flex;flex-direction:column;min-width:0}
.ap-top{display:flex;align-items:center;gap:4px;height:38px;padding:0 18px;border-bottom:1px solid var(--border-row);color:var(--text-secondary)}
.ap-top>[data-fill]{font-weight:500;color:var(--text-primary)}
.ap-filters{display:flex;align-items:center;gap:6px;padding:10px 18px}
.ap-filters>[data-hl]{display:inline-flex;border-radius:8px}
.ap-pill{display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:7px;background:var(--control-bg);box-shadow:var(--shadow-low);font-size:11px;font-weight:500;white-space:nowrap}
.ap-scene{display:flex;flex-direction:column;gap:10px;padding:2px 18px 18px;animation:ap-scene-in .4s var(--ease-out-expo)}
.scene-overview .ap-prompts,.scene-prompts .ap-overview{display:none}
.ap-tiles{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.ap-tile{display:flex;flex-direction:column;gap:6px;padding:10px;border-radius:10px;box-shadow:var(--shadow-medium)}
.ap-tile small,.ap-panel>small{font-size:11px;color:var(--text-secondary)}
.ap-tile i{display:block;height:14px;border-radius:4px;background:var(--bg-tertiary)}
.ap-tile i.ap-sub{width:60%!important;height:6px;background:var(--fill-quinary)}
.ap-panels{display:grid;grid-template-columns:1.4fr 1fr;gap:10px}
.ap-panels>[data-hl]{border-radius:10px}
.ap-panel{display:flex;flex-direction:column;gap:6px;height:100%;padding:12px;border-radius:10px;background:var(--bg-base);box-shadow:var(--shadow-medium)}
.ap-chart svg{width:100%;height:120px;background:repeating-linear-gradient(transparent 0 29px,var(--border-row) 29px 30px)}
.ap-chart path{fill:none;stroke:var(--fill-tertiary);stroke-width:2;vector-effect:non-scaling-stroke}
.ap-rank-row{display:flex;align-items:center;gap:8px;height:30px;border-bottom:1px solid var(--border-row)}
.ap-rank-row:last-child{border-bottom:0}
.ap-rank-row i{flex:0 0 6px;width:6px;height:6px;border-radius:2px}
.ap-rank-row i.dot-0,.audit-brand-dot.dot-0{background:var(--series-1)}
.ap-rank-row i.dot-1,.audit-brand-dot.dot-1{background:var(--series-3)}
.ap-rank-row i.dot-2,.audit-brand-dot.dot-2{background:var(--series-5)}
.ap-rank-row em{margin-left:auto;width:36px;height:6px;border-radius:3px;background:var(--bg-tertiary)}
.ap-prompts{display:grid;grid-template-columns:200px minmax(0,1fr);gap:10px}
.ap-prompts>[data-hl]{border-radius:10px;min-width:0}
.ap-topic{display:flex;align-items:center;height:30px;border-bottom:1px solid var(--border-row);font-weight:500}
.ap-topic:last-child{border-bottom:0}
.ap-qhead{display:flex;justify-content:space-between;height:26px;align-items:center;margin:-12px -12px 0;padding:0 12px;border-bottom:1px solid var(--border-row);background:var(--bg-secondary);border-radius:10px 10px 0 0;font-size:11px;color:var(--text-secondary)}
.ap-q{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:32px;border-bottom:1px solid var(--border-row)}
.ap-q:last-child{border-bottom:0}
.ap-q>[data-fill]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ap-chip{flex:0 0 auto;max-width:40%;height:18px;padding:0 6px;border-radius:999px;background:var(--brand-muted);color:var(--brand-emphasis);font-size:10px;line-height:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
[data-fill]{border-radius:4px;transition:background-color .35s var(--ease),color .35s var(--ease)}
[data-fill].is-empty{color:transparent;background:var(--bg-tertiary)}
.is-suggesting [data-fill].is-empty{background:linear-gradient(90deg,var(--bg-tertiary),var(--bg-quaternary),var(--bg-tertiary)) 0 0/200% 100%;animation:ap-shimmer 1.4s linear infinite}
[data-hl]{display:block;transition:box-shadow .35s var(--ease)}
[data-hl].is-active{box-shadow:0 0 0 1.5px var(--brand),0 0 0 5px var(--brand-muted);animation:ap-pulse 2.6s ease-in-out infinite}
.ap-side>[data-hl]{border-radius:9px}
@keyframes ap-pulse{0%,100%{box-shadow:0 0 0 1.5px var(--brand),0 0 0 5px var(--brand-muted)}50%{box-shadow:0 0 0 1.5px var(--brand),0 0 0 8px transparent}}
@keyframes ap-scene-in{from{translate:0 6px}to{translate:0 0}}
@keyframes ap-shimmer{to{background-position:-200% 0}}

/* Question */
.guided-question{position:relative;z-index:2;max-width:640px;margin:-20px auto 0;padding:0 24px;text-align:center;animation:audit-slide .4s var(--ease-out-expo)}
.guided-progress{display:flex;justify-content:center;gap:6px;margin-bottom:16px}
.guided-progress span{width:20px;height:3px;border-radius:2px;background:var(--fill-quaternary);transition:background-color .3s var(--ease)}
.guided-progress span.filled{background:var(--fill-primary)}
.guided-question .eyebrow{display:block;margin:0 0 6px;font-family:var(--font-sans);font-size:12px;line-height:16px;font-weight:500;letter-spacing:0;text-transform:none;color:var(--text-tertiary)}
.guided-question h1{margin:0;font-size:28px;line-height:36px;font-weight:500;letter-spacing:-.9px;color:var(--text-primary)}
.guided-question h1:focus{outline:none}
.guided-question p.muted{margin:6px 0 24px;font-size:16px;line-height:22px;color:var(--text-secondary)}
.guided-question form{margin:0;text-align:left}
.audit-pill{position:relative;display:flex;align-items:center;gap:8px;min-height:48px;padding:8px 8px 8px 14px;border-radius:16px;background:var(--bg-base);box-shadow:0 1px 2px -1px rgba(23,23,23,.08),0 1px 3px rgba(23,23,23,.08),0 0 0 1px rgba(23,23,23,.06)}
.audit-pill::before{content:"";position:absolute;inset:-4px;z-index:-1;border-radius:20px;background:linear-gradient(90deg,#b69af5,#ed86c1,#f2a184,#f4d867);filter:blur(16px);opacity:.22;transition:opacity .25s var(--ease)}
.audit-pill:focus-within::before{opacity:.45}
/* Focus shows as a ring on the whole pill instead of an outline around the bare input. */
.audit-pill :is(input,select):focus-visible,.audit-topic-row input:focus-visible{outline:none!important}
.audit-pill:focus-within,.audit-topic-row:focus-within{box-shadow:0 0 0 1.5px var(--brand),0 0 0 5px var(--brand-muted)}
.audit-pill input,.audit-pill select{flex:1;min-width:0;height:32px;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;outline:none;font:500 14px/20px var(--font-sans);color:var(--text-primary)}
.audit-pill input::placeholder{color:var(--text-tertiary);font-weight:400}
.audit-pill-prefix{color:var(--text-tertiary);font-size:14px}
.audit-pill-selects select{-webkit-appearance:none;appearance:none;padding-right:22px;background:var(--chevron) right 4px center/12px no-repeat;cursor:pointer}
.audit-pill-sep{flex:0 0 1px;height:20px;background:var(--border-strong)}
.audit-go{display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;padding:0;border:0;border-radius:8px;background:var(--control-primary);box-shadow:inset 0 -1px 0 rgba(255,255,255,.12),0 1px 3px rgba(0,0,0,.1);color:var(--text-inverse);font-size:14px;cursor:pointer;transition:transform .15s var(--ease)}
.audit-go:hover{transform:translateX(1px)}
.audit-pill-under{display:flex;justify-content:center;margin-top:12px}
.audit-link{padding:4px 6px;border:0;background:none;color:var(--text-secondary);font:500 13px/18px var(--font-sans);text-decoration:underline;text-decoration-color:var(--border-strong);text-underline-offset:3px;cursor:pointer}
.audit-link:hover{color:var(--text-primary)}
.audit-free-allowance{margin-top:20px;padding:14px 16px;border-radius:12px;background:var(--bg-secondary);font-size:13px;line-height:18px;color:var(--text-secondary)}
.audit-free-allowance>div{display:flex;justify-content:space-between;gap:12px}
.audit-free-allowance strong{font-weight:500;color:var(--text-primary)}
.audit-free-allowance p{margin:6px 0 4px;color:var(--text-primary)}
.audit-free-allowance small{font-size:12px;line-height:18px;color:var(--text-tertiary)}
.audit-note{margin:12px 0 0;text-align:center;font-size:13px;line-height:18px;color:var(--text-tertiary)}
.audit-chips{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin-top:16px}
.audit-chips span{height:24px;padding:0 10px;border-radius:999px;background:var(--bg-base);box-shadow:var(--shadow-low);font-size:12px;line-height:24px;color:var(--text-secondary)}
.audit-stack{display:flex;flex-direction:column;gap:12px;margin-top:16px}
.audit-stack .audit-pill::before{opacity:0}
.audit-stack .audit-pill:focus-within::before{opacity:.4}
.audit-brand-dot{flex:0 0 8px;width:8px;height:8px;border-radius:2px}
.guided-audit .setup-buttons{display:flex;justify-content:center;gap:8px;margin-top:20px}
.guided-audit :is(.primary,.ghost){display:inline-flex;align-items:center;justify-content:center;gap:6px;height:36px;padding:0 14px;border:0;border-radius:10px;font:500 14px/20px var(--font-sans);cursor:pointer;transition:background-color .15s var(--ease)}
.guided-audit .primary{background:var(--control-primary);box-shadow:inset 0 -1px 0 rgba(255,255,255,.12),0 1px 3px rgba(0,0,0,.08);color:var(--text-inverse)}
.guided-audit .primary:hover{background:var(--control-primary-hover)}
.guided-audit .ghost{background:var(--control-bg);box-shadow:var(--shadow-low);color:var(--text-primary)}
.guided-audit .ghost:hover:not(:disabled){background:var(--control-hover)}
.guided-audit .ghost:disabled{opacity:.45;cursor:not-allowed}
.guided-audit #setup-error{margin:10px 0 0;text-align:center;font-size:13px;line-height:18px;color:var(--red-base)}
.guided-audit #setup-error:empty{display:none}
.guided-footnote{margin:28px 0 0;text-align:center;font-size:12px;line-height:16px;color:var(--text-tertiary)}

/* Topics */
.audit-topic-list{display:flex;flex-direction:column;gap:10px}
.audit-topic-row{position:relative;display:flex;align-items:center;gap:12px;padding:8px 8px 8px 14px;border-radius:16px;background:var(--bg-base);box-shadow:0 1px 3px rgba(23,23,23,.08),0 0 0 1px rgba(23,23,23,.06)}
.audit-topic-number{font-size:12px;color:var(--text-tertiary);font-variant-numeric:tabular-nums}
.audit-topic-row>div{flex:1;min-width:0}
.audit-topic-row .field-label{display:block;font-size:11px;line-height:14px;color:var(--text-tertiary)}
.audit-topic-row input{width:100%;height:22px;padding:0;border:0;background:transparent;box-shadow:none;outline:none;font:500 14px/20px var(--font-sans);color:var(--text-primary)}
.audit-topic-row .ghost{height:28px;padding:0 10px;font-size:13px}
.audit-topic-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px;font-size:12px;color:var(--text-tertiary)}
.audit-topic-footer .ghost{height:28px;padding:0 10px;font-size:13px}

/* Sheet (profile + questions) */
.guided-audit.is-sheet .audit-stage{filter:blur(2px);opacity:.45}
.guided-audit.is-sheet .audit-back{display:none}
.guided-audit.is-sheet .guided-question{position:fixed;inset:12px;z-index:50;display:flex;flex-direction:column;max-width:none;margin:0;padding:0;border-radius:20px;background:var(--bg-base);text-align:left;
  box-shadow:0 10px 15px -3px rgba(23,23,23,.08),0 4px 6px -4px rgba(23,23,23,.1),0 0 0 1px rgba(23,23,23,.08);animation:audit-sheet-in .34s cubic-bezier(.25,1,.5,1)}
.guided-audit.is-sheet .guided-footnote{display:none}
.audit-sheet{display:flex;flex-direction:column;flex:1;min-height:0}
.audit-sheet-body{flex:1;min-height:0;overflow:auto;padding:48px 24px 32px}
.audit-sheet-col{max-width:688px;margin:0 auto}
.audit-sheet-foot{padding:12px 24px;border-top:1px solid var(--border-row)}
.audit-sheet-foot .audit-sheet-col{display:flex;justify-content:space-between;gap:8px}
.is-sheet .guided-progress{justify-content:flex-start}
.is-sheet .guided-question h1{font-size:24px;line-height:32px;letter-spacing:-.6px}
.is-sheet .guided-question p.muted{margin-bottom:20px}
.guided-audit .field-label{display:block;margin:18px 0 6px;font-size:13px;line-height:18px;font-weight:500;color:var(--text-secondary)}
.guided-audit :is(input.full,textarea.full,.audit-question-entry textarea,.audit-question-entry select){display:block;width:100%;box-sizing:border-box;min-height:36px;padding:8px 12px;border:0;border-radius:10px;background:var(--control-bg);box-shadow:0 1px 2px rgba(23,23,23,.06),0 0 0 1px rgba(23,23,23,.08);color:var(--text-primary);font:500 14px/20px var(--font-sans);outline:none;transition:box-shadow .15s var(--ease)}
.guided-audit :is(input.full,textarea.full,.audit-question-entry textarea,.audit-question-entry select):focus{box-shadow:0 0 0 1px var(--brand),0 0 0 4px var(--brand-muted)}
.guided-audit textarea{resize:vertical}
.audit-question-entry select{-webkit-appearance:none;appearance:none;padding-right:28px;background:var(--control-bg) var(--chevron) right 10px center/12px no-repeat;cursor:pointer}
.audit-profile-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}
.audit-source-chip{display:inline-flex;align-items:center;gap:8px;height:28px;padding:0 12px;border-radius:999px;background:var(--brand-muted);color:var(--brand-emphasis);font-size:12px}
.audit-source-chip a{color:inherit;font-weight:500}
.audit-source-chip span{color:var(--text-tertiary)}
.audit-question-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px;color:var(--text-secondary)}
.audit-question-tools .ghost{height:28px;padding:0 10px;font-size:13px}
.is-sheet .audit-note{text-align:left;margin:8px 0 4px}

.audit-question-entry>label:first-child span:first-child{display:block;padding-top:9px;font-size:13px;color:var(--text-tertiary);font-variant-numeric:tabular-nums}

.audit-research{display:flex;flex-direction:column;align-items:center;gap:6px;padding:20px;font-size:14px;color:var(--text-primary)}
.audit-research small{font-size:12px;color:var(--text-tertiary)}
@keyframes audit-sheet-in{from{translate:0 24px}to{translate:0 0}}
@keyframes audit-slide{from{translate:0 8px}to{translate:0 0}}
@media(prefers-reduced-motion:reduce){.guided-audit *,.guided-audit *::before{animation:none!important;transition:none!important}}

@media(max-width:760px){
  .audit-header{padding:0 16px}
  .audit-header>span{display:none}
  .audit-back{left:12px}
  .audit-stage{height:210px;padding:40px 12px 0}
  .ap-window{grid-template-columns:minmax(0,1fr);height:360px}
  .step-1 .ap-window{transform:none}
  .ap-side{display:none}
  .ap-tiles{grid-template-columns:1fr 1fr}
  .ap-panels,.ap-prompts{grid-template-columns:minmax(0,1fr)}
  .guided-question{margin-top:-8px;padding:0 16px}
  .guided-question h1{font-size:24px;line-height:32px}
  .guided-question p.muted{font-size:15px;margin-bottom:20px}
  .audit-pill-prefix{display:none}
  .audit-profile-grid{grid-template-columns:minmax(0,1fr)}
  .audit-question-tools{flex-direction:column;align-items:flex-start}
  .audit-question-tools .ghost{white-space:nowrap}
  .audit-question-entry{grid-template-columns:22px minmax(0,1fr)}
  .audit-question-entry>select,.audit-question-entry>label.sr-only+select{grid-column:2}
  .guided-audit.is-sheet .guided-question{inset:0;border-radius:0}
  .audit-sheet-body{padding:32px 16px 24px}
  .audit-sheet-foot{padding:12px 16px}
}
.guided-audit .audit-topic-row input.full{min-height:0;height:22px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
.guided-audit .audit-topic-row input.full:focus{box-shadow:none}
.guided-audit .audit-suggestion-note{margin:0 0 14px;text-align:center;font-size:13px;line-height:18px;color:var(--text-tertiary)}

/* Breathing room: taller fields, roomier rows, single-line topic pills */
.guided-audit .field-label{margin:22px 0 8px}
.guided-audit :is(input.full,textarea.full){min-height:40px;padding:10px 12px}
.guided-audit textarea.full{min-height:76px;line-height:22px}
.audit-profile-grid{gap:0 16px}
.audit-topic-row{align-items:center;min-height:52px;padding:8px 8px 8px 16px}
.audit-topic-row .field-label{position:absolute;width:1px;height:1px;margin:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.audit-topic-row input.full{height:32px!important}
.audit-topic-number{flex:0 0 auto;width:18px}
.audit-question-tools{margin-top:4px}
.audit-question-entry{display:grid;grid-template-columns:28px minmax(0,1fr);gap:8px 12px;align-items:start;padding:18px 0;border-bottom:1px solid var(--border-row)}
.audit-question-entry:last-of-type{border-bottom:0}
.audit-question-entry>label:first-child span:first-child{padding-top:11px}
.audit-question-entry textarea{min-height:64px;padding:10px 12px;line-height:22px;resize:none}
.guided-audit .audit-question-entry select{grid-column:2;justify-self:start;width:auto;max-width:100%;min-height:0;height:30px;padding:0 30px 0 12px;border-radius:8px;font-size:13px;color:var(--text-secondary);background:var(--bg-secondary) var(--chevron) right 10px center/12px no-repeat;box-shadow:0 0 0 1px rgba(23,23,23,.06);cursor:pointer}
.audit-scope{display:flex;flex-direction:column;gap:12px;margin-top:24px;padding:18px 20px;border-radius:14px;background:var(--bg-secondary);font-size:13px;line-height:20px;color:var(--text-secondary)}
.audit-scope-head{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 16px}
.audit-scope-head strong{font-weight:500;color:var(--text-primary)}
.audit-scope-engines{display:flex;flex-wrap:wrap;gap:8px}
.audit-scope-engines>span{display:inline-flex;align-items:center;height:30px;padding:0 12px 0 10px;border-radius:999px;background:var(--bg-base);box-shadow:var(--shadow-low);color:var(--text-primary);font-weight:500}
.audit-scope .model-label{display:inline-flex;align-items:center;gap:8px}
.audit-scope .model-logo{width:16px;height:16px}
.guided-audit .model-logo-mono{filter:none}
.audit-scope p{margin:0;font-size:12px;line-height:18px;color:var(--text-tertiary)}
.guided-audit #fixture-choice{margin-right:6px;vertical-align:-2px}

/* =====================================================================
   Custom select menu (ui-select.js). The native <select> stays as the
   trigger; this listbox replaces the OS dropdown everywhere.
   ===================================================================== */
.ui-select-menu{
  position:fixed;z-index:var(--z-popover);box-sizing:border-box;max-width:min(360px,calc(100vw - 16px));overflow:auto;overscroll-behavior:contain;
  padding:4px;border-radius:var(--radius-8);background:var(--bg-base);box-shadow:var(--shadow-high);
  font-family:var(--font-sans);font-feature-settings:var(--font-features);font-size:13px;line-height:18px;color:var(--text-primary);-webkit-font-smoothing:antialiased;
  animation:ui-select-in .12s var(--ease);
}
.ui-select-menu[data-side="top"]{animation-name:ui-select-in-up}
.ui-select-option{position:relative;display:flex;align-items:center;min-height:32px;padding:6px 32px 6px 10px;box-sizing:border-box;border-radius:var(--radius-4);font-weight:500;cursor:pointer;user-select:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ui-select-option.is-active{background:var(--bg-tertiary)}
.ui-select-option[aria-selected="true"]::after{content:"";position:absolute;right:10px;top:50%;width:12px;height:12px;translate:0 -50%;background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2.5 6.2 2.3 2.3 4.7-5'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2.5 6.2 2.3 2.3 4.7-5'/%3E%3C/svg%3E") center/contain no-repeat}
.ui-select-option[aria-disabled="true"]{color:var(--text-quaternary);cursor:not-allowed}
.ui-select-group{padding:8px 10px 4px;font-size:11px;line-height:14px;font-weight:500;letter-spacing:.02em;color:var(--text-tertiary)}
.ui-select-menu.is-dark{background:#0b0b0c;color:#edf0f3;box-shadow:0 0 0 1px #2e2e30,0 16px 48px rgba(0,0,0,.6)}
.ui-select-menu.is-dark .ui-select-option.is-active{background:#1c1c1e}
.ui-select-menu.is-dark .ui-select-group{color:#828282}
select[aria-expanded="true"]{background-color:var(--control-hover)}
@keyframes ui-select-in{from{translate:0 -4px}to{translate:0 0}}
@keyframes ui-select-in-up{from{translate:0 4px}to{translate:0 0}}
@media(max-width:760px){.ui-select-option{min-height:40px}}
@media(prefers-reduced-motion:reduce){.ui-select-menu{animation:none}}

/* Shopping (pilot) */
.shopping-content{display:flex;flex-direction:column;gap:12px}
.shopping-content>.overview-kpis{margin:0}
.shopping-pilot{display:inline-flex;align-items:center;height:22px;margin-left:8px;padding:0 8px;border:1px solid var(--brand-border);border-radius:var(--radius-full);background:var(--brand-muted);color:var(--brand-emphasis);font-size:12px;line-height:16px;font-weight:500;vertical-align:middle}
.shopping-note{display:flex;flex-wrap:wrap;gap:4px 8px;padding:12px;border:1px solid var(--border-strong);border-radius:var(--radius-6);background:var(--bg-secondary);font-size:13px;line-height:18px}
.shopping-note span{color:var(--text-secondary)}
.shopping-panel{padding:16px}
.shopping-content .shopping-panel .overview-panelhead{padding:0 0 12px}
.shopping-sharebar{display:flex;gap:2px;height:24px;margin:4px 0 12px}
.shopping-sharebar i{min-width:4px}
.shopping-sharebar i:first-child{border-radius:var(--radius-4) 0 0 var(--radius-4)}
.shopping-sharebar i:last-child{border-radius:0 var(--radius-4) var(--radius-4) 0}
.shopping-sharebar i:only-child{border-radius:var(--radius-4)}
.shopping-brandrow{display:grid;grid-template-columns:6px minmax(0,1fr) 100px 100px 64px;align-items:center;gap:8px;height:40px;border-bottom:1px solid var(--border-row);font-size:13px;color:var(--text-secondary)}
.shopping-brandrow:last-child{border-bottom:0}
.shopping-brandrow strong{text-align:right;font-weight:500;color:var(--text-primary);font-variant-numeric:tabular-nums}
.shopping-dot{width:6px;height:6px;border-radius:var(--radius-2)}
.shopping-brandname{color:var(--text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.shopping-you{display:inline-flex;align-items:center;height:18px;margin-left:6px;padding:0 6px;border:1px solid var(--brand-border);border-radius:var(--radius-full);background:var(--brand-muted);color:var(--brand-emphasis);font-size:11px;font-style:normal;font-weight:500}
.shopping-callout{margin:12px 0 0;font-size:13px;line-height:18px;color:var(--text-secondary)}
.shopping-table{padding:0}
.shopping-tablehead{padding:16px 16px 12px!important}
.shopping-scroll{overflow-x:auto}
.shopping-row{display:grid;grid-template-columns:minmax(240px,1fr) 140px 64px 200px 110px 90px;align-items:center;gap:24px;min-height:48px;padding:6px 16px;border-bottom:1px solid var(--border-row);font-size:13px;line-height:18px}
.shopping-row:not(.shopping-rowhead):hover{background:var(--bg-secondary)}
.shopping-rowhead{min-height:40px;background:var(--bg-secondary);color:var(--text-secondary)}
.shopping-rowhead span:nth-child(3),.shopping-rowhead span:nth-child(5),.shopping-rowhead span:nth-child(6){text-align:right}
.shopping-product{display:flex;flex-direction:column;min-width:0}
.shopping-product a{color:var(--text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.shopping-product a:hover{text-decoration:underline}
.shopping-product small,.shopping-listname small{font-size:12px;line-height:16px;color:var(--text-secondary)}
.shopping-engines{display:flex;flex-wrap:wrap;gap:4px 12px}
.shopping-num{text-align:right;font-variant-numeric:tabular-nums}
.shopping-num small{color:var(--text-secondary)}
.shopping-chip{display:inline-flex;align-items:center;gap:6px;max-width:100%;height:22px;padding:0 8px;border:1px solid var(--border-strong);border-radius:var(--radius-full);font-size:12px;font-style:normal;color:var(--text-primary);overflow:hidden;white-space:nowrap}
.shopping-chip::before{content:"";flex:0 0 6px;height:6px;border-radius:var(--radius-2);background:var(--chip)}
.shopping-foot{display:flex;align-items:center;justify-content:space-between;min-height:48px;padding:0 12px 0 16px;background:var(--bg-secondary);font-size:12px;color:var(--text-secondary)}
.shopping-split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);gap:12px}
.shopping-listrow{display:flex;align-items:center;gap:8px;min-height:48px;padding:6px 0;border-bottom:1px solid var(--border-row);font-size:13px;line-height:18px}
.shopping-listrow:last-child{border-bottom:0}
.shopping-rank{width:16px;color:var(--text-tertiary)}
.shopping-listname{display:flex;flex:1;flex-direction:column;min-width:0;color:var(--text-primary)}
.shopping-empty{display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:24px}
.shopping-empty h2{margin:0;font-size:14px;line-height:20px;font-weight:600}
.shopping-empty p{margin:0;max-width:640px;font-size:13px;line-height:20px;color:var(--text-secondary)}
.shopping-empty a{margin-top:8px}
@media(max-width:900px){.shopping-split{grid-template-columns:1fr}.shopping-brandrow{grid-template-columns:6px minmax(0,1fr) 64px}.shopping-brandrow>span:nth-child(3),.shopping-brandrow>span:nth-child(4){display:none}}
/* The OpenAI mark is black; style.css inverts it for the old dark-only app. Keep it legible in both themes. */
.shell .model-logo-mono{filter:none}
[data-theme=dark] .shell .model-logo-mono{filter:invert(1)}
/* Brand context: editable competitors */
.shell .profile-domains .profile-competitor{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:4px 12px;max-width:640px;margin-top:12px}
.shell .profile-domains .profile-competitor label{width:auto;max-width:none;margin:0}
.shell .profile-domains .profile-competitor input{width:100%}
.shell .profile-domains .profile-competitor p{grid-column:1/-1;margin:0}
.profile-competitor-notice{max-width:640px;margin:16px 0 0;padding:12px;border:1px solid var(--border-strong);border-radius:var(--radius-6);background:var(--bg-secondary);font-size:13px;line-height:18px;color:var(--text-secondary)}
.profile-competitor-notice strong{color:var(--text-primary);font-weight:500}
.profile-competitor-notice ul{margin:8px 0 0;padding-left:18px}
@media(max-width:600px){.shell .profile-domains .profile-competitor{grid-template-columns:1fr}}

/* Free audit report: cards on a quiet page, app type and tokens (STYLE-GUIDE §4). Overrides the legacy style.css report. */
html.app-route body:has(.audit-report){background:var(--bg-secondary)}
.audit-report{max-width:1200px;padding:32px var(--page-gutter,32px) 64px;color:var(--text-primary)}
.audit-report :is(.report-intro,.report-section,.report-next,.report-best) .eyebrow{font-family:var(--font-sans);font-size:12px;line-height:16px;font-weight:500;letter-spacing:.04em;color:var(--text-tertiary)}
.audit-report .report-intro{margin:0 0 24px;align-items:flex-end}
.audit-report .report-intro h1{margin:8px 0 4px;font-size:28px;line-height:36px;font-weight:600;letter-spacing:-.5px}
.audit-report .report-intro p{margin:0;font-size:14px;line-height:20px;color:var(--text-secondary)}
.audit-report .report-domain{display:flex;flex-direction:column;gap:2px;padding:10px 14px;border:0;border-radius:var(--radius-12);background:var(--bg-base);box-shadow:var(--shadow-low);font-size:13px;line-height:18px;color:var(--text-primary)}
.audit-report .report-locale{color:var(--text-secondary)}
/* The window is now just a column; each part below is its own card. */
.audit-report .report-window{border:0;border-radius:0;background:none;overflow:visible;display:flex;flex-direction:column;gap:12px}
.audit-report .report-toolbar{position:sticky;top:0;z-index:5;padding:8px 8px 8px 12px;border:0;border-radius:var(--radius-12);background:var(--bg-base);box-shadow:var(--shadow-medium)}
.audit-report .report-tabs{gap:2px}
.audit-report .report-tabs button{height:32px;padding:0 12px;border-radius:var(--radius-8);font-size:13px;font-weight:500;color:var(--text-secondary)}
.audit-report .report-tabs button:first-child{color:var(--text-secondary)}
.audit-report .report-tabs button:hover{background:var(--bg-tertiary);color:var(--text-primary)}
.audit-report .report-engine{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--text-secondary)}
.audit-report .report-status{padding:0 4px;font-size:13px;line-height:18px;color:var(--text-secondary)}
.audit-report .report-status>span:first-child{color:var(--text-primary);font-weight:500}
.audit-report .report-status i{background:var(--green-base,#2f9e44)}
.audit-report .report-status i.collecting{background:var(--brand)}
.audit-report .audit-waiting{margin:0;padding:16px;border:0;border-radius:var(--radius-12);background:var(--bg-base);box-shadow:var(--shadow-medium)}
.audit-report .audit-waiting p{color:var(--text-secondary);font-size:13px;line-height:18px;margin:4px 0 0}
.audit-report .audit-engine-status{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:16px}
.audit-report .audit-engine-status>div{padding:12px;border-radius:var(--radius-8);background:var(--bg-secondary)}
.audit-report .audit-engine-status strong{display:block;font-size:13px;font-weight:500}
.audit-report .audit-engine-status span:not(.model-label){font-size:12px;color:var(--text-secondary)}
.audit-report .audit-waiting .audit-return-note{margin-top:12px;font-size:12px;color:var(--text-tertiary)}
.audit-report .report-content{padding:0;display:flex;flex-direction:column;gap:12px}
.audit-report .report-kpis{gap:0;padding:0;border-radius:var(--radius-12);background:var(--bg-base);box-shadow:var(--shadow-medium);overflow:hidden}
.audit-report .report-kpis>div{padding:16px;border-right:1px solid var(--border-row)}
.audit-report .report-kpis>div:first-child{padding-left:16px}
.audit-report .report-kpis>div:last-child{border-right:0}
.audit-report .report-kpis span{display:flex;align-items:center;gap:8px;font-size:13px;line-height:18px;color:var(--text-secondary)}
.audit-report .report-kpis span::before{content:"";width:6px;height:6px;border-radius:var(--radius-2);background:var(--series-1)}
.audit-report .report-kpis>div:nth-child(2) span::before{background:var(--series-2)}
.audit-report .report-kpis>div:nth-child(3) span::before{background:var(--series-3)}
.audit-report .report-kpis strong{margin:6px 0 2px;font-size:28px;line-height:36px;font-weight:600;letter-spacing:-.4px;color:var(--text-primary)!important;font-variant-numeric:tabular-nums}
.audit-report .report-kpis small{font-size:12px;line-height:16px;color:var(--text-secondary)}
.audit-report .report-disclosure{margin:0;padding:0 4px;font-size:12px;line-height:18px;color:var(--text-tertiary)}
.audit-report .report-comparison,.audit-report .report-evidence-grid{gap:12px}
.audit-report .report-card{padding:16px;border:0;border-radius:var(--radius-12);background:var(--bg-base);box-shadow:var(--shadow-medium)}
.audit-report :is(.report-card-heading h2,.report-card h3){font-size:14px;line-height:20px;font-weight:600;color:var(--text-primary)}
.audit-report .report-card-heading>span{display:block;margin-bottom:12px;font-size:13px;line-height:18px;color:var(--text-secondary)}
.audit-report .report-card .report-disclosure{padding:0;margin:0 0 8px}
.audit-report .report-best{margin:0;padding:24px;gap:24px;border:0;border-radius:var(--radius-12);background:radial-gradient(80% 120% at 100% 0%,var(--brand-muted),transparent 60%),var(--bg-base);box-shadow:var(--shadow-medium)}
.audit-report .report-best h2{margin:8px 0;font-size:22px;line-height:30px;font-weight:600;letter-spacing:-.3px}
.audit-report .report-best p{font-size:13px;line-height:20px;color:var(--text-secondary)}
.audit-report .report-best-evidence{gap:8px;margin-top:12px}
.audit-report .report-best-evidence span{display:inline-flex;align-items:center;height:22px;padding:0 8px;border:1px solid var(--border-strong);border-radius:var(--radius-full);font-size:12px;color:var(--text-primary);background:var(--bg-base)}
.audit-report :is(.report-best-cta,.report-next) .primary{height:40px;padding:0 16px;border:0;border-radius:var(--radius-8);background:var(--control-primary);color:var(--text-inverse);font-size:14px;font-weight:500}
.audit-report :is(.report-best-cta,.report-next) .primary:hover{background:var(--control-primary-hover);opacity:1}
.audit-report .report-best-cta p{margin-top:8px;font-size:12px;line-height:16px}
.audit-report .report-section{margin-top:20px}
.audit-report .report-section-heading{margin-bottom:12px}
.audit-report .report-section-heading h2{margin:4px 0 0;font-size:18px;line-height:26px;font-weight:600}
.audit-report .report-section-heading>.small{font-size:13px;color:var(--text-secondary)}
.audit-report .report-opportunity{margin:0 0 8px;border:0;border-radius:var(--radius-12);background:var(--bg-base);box-shadow:var(--shadow-medium);overflow:hidden}
.audit-report .report-opportunity>summary{padding:16px;gap:12px}
.audit-report .report-opportunity>summary:hover{background:var(--bg-secondary)}
.audit-report .report-number{font-size:13px;font-weight:500;color:var(--text-tertiary);font-variant-numeric:tabular-nums}
.audit-report .report-opportunity summary strong{font-size:14px;line-height:20px;color:var(--text-primary)}
.audit-report .report-opportunity summary small{margin-top:2px;font-size:12px;line-height:16px;color:var(--text-secondary)}
.audit-report .report-pill{height:22px;display:inline-flex;align-items:center;padding:0 8px;border:1px solid var(--amber-border);border-radius:var(--radius-full);background:var(--amber-muted);color:var(--amber-emphasis);font-size:12px}
.audit-report .report-opportunity-body{padding:0 16px 16px}
.audit-report .report-opportunity-body>p{font-size:13px;line-height:20px;color:var(--text-secondary)}
.audit-report .report-next{margin-top:40px}
.audit-report .report-next h2{font-size:22px;line-height:30px;font-weight:600}
.audit-report .report-next>p{font-size:14px;line-height:22px;color:var(--text-secondary)}
.audit-report .report-next-buttons a{color:var(--text-primary);font-weight:500}
@media(max-width:700px){.audit-report{padding:20px 16px 48px}.audit-report .audit-engine-status{grid-template-columns:1fr}.audit-report .report-kpis{grid-template-columns:1fr}.audit-report .report-kpis>div{border-right:0;border-bottom:1px solid var(--border-row)}.audit-report .report-kpis>div:last-child{border-bottom:0}.audit-report .report-toolbar{position:static}}
.audit-report :is(.report-questions,.report-citations)>details{padding:12px 0;border-top:1px solid var(--border-row)}
.audit-report :is(.report-questions,.report-citations)>details:first-of-type{margin-top:12px}
.audit-report :is(.report-questions,.report-citations)>details>summary{font-size:13px;line-height:18px}
.audit-report :is(.report-questions,.report-citations) summary strong{color:var(--text-primary)}
.audit-report .report-questions>details>summary small{margin-top:2px;font-size:12px;line-height:16px;color:var(--text-secondary)}
.audit-report .report-citations summary span{font-size:12px;color:var(--text-secondary);font-variant-numeric:tabular-nums}
/* The OpenAI mark is black. style.css inverts it for the old dark-only app; only invert where the theme is dark. */
:root:not([data-theme=dark]) .model-logo-mono{filter:none}
/* Email code: a paste shortcut beside the input */
.email-code-row{display:flex;gap:8px;align-items:stretch}
.email-code-row .email-code{flex:1;min-width:0}
.email-code-row .email-paste{flex:0 0 auto;white-space:nowrap}
/* Projects: suggested next moves */
.next-moves{margin:0 0 20px;padding:16px;border-radius:var(--radius-12);background:var(--bg-base);box-shadow:var(--shadow-medium)}
.next-moves-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}
.next-moves-head h2{margin:0;font-size:14px;line-height:20px;font-weight:600}
.next-moves-head p{margin:2px 0 0;font-size:13px;line-height:18px;color:var(--text-secondary)}
.next-moves-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.next-move-card{display:flex;flex-direction:column;gap:8px;padding:14px;border-radius:var(--radius-8);background:var(--bg-secondary);color:var(--text-primary);transition:background-color var(--duration) var(--ease)}
.next-move-card:hover{background:var(--bg-tertiary)}
.next-move-card h3{margin:0;font-size:14px;line-height:20px;font-weight:600}
.next-move-card p{margin:0;font-size:12px;line-height:18px;color:var(--text-secondary);display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.next-move-cta{margin-top:auto;font-size:13px;font-weight:500}
.project-task-kinds{display:flex;flex-wrap:wrap;gap:4px}
.project-task-kind{display:inline-flex;align-items:center;height:20px;padding:0 7px;border:1px solid var(--border-strong);border-radius:var(--radius-full);font-size:11px;font-style:normal;font-weight:500;color:var(--text-primary);background:var(--bg-base)}
.project-task-kind.kind-offsite{border-color:var(--purple-border);background:var(--purple-muted);color:var(--purple-emphasis)}
.project-task-kind.kind-technical{border-color:var(--blue-border);background:var(--blue-muted);color:var(--blue-emphasis)}
.project-task-kind.kind-content{border-color:var(--green-border);background:var(--green-muted);color:var(--green-emphasis)}
.project-diagnosis p{font-size:14px;line-height:22px}
.project-success{padding:10px 12px;border-radius:var(--radius-8);background:var(--bg-secondary);font-size:13px!important;line-height:20px!important}
.project-success strong{display:block;font-weight:600}
.project-task-links{margin:6px 0 0;padding-left:18px;font-size:13px;line-height:20px}
@media(max-width:900px){.next-moves-grid{grid-template-columns:1fr}}

/* Loading skeletons: --bg-tertiary blocks, radius 4, shimmer 1.5s linear (STYLE-GUIDE §4) */
.skel{--skel-base:color-mix(in srgb,var(--text-primary) 9%,var(--bg-base));--skel-shine:color-mix(in srgb,var(--text-primary) 3%,var(--bg-base));display:block;max-width:100%;border-radius:var(--radius-4);background:linear-gradient(90deg,var(--skel-base) 0%,var(--skel-shine) 40%,var(--skel-base) 80%) 0 0/300% 100%;animation:skel-shimmer 1.5s linear infinite}
@keyframes skel-shimmer{from{background-position:100% 0}to{background-position:-200% 0}}
@media(prefers-reduced-motion:reduce){.skel{animation:none;background:var(--skel-base)}}
.skeleton-view{display:flex;flex-direction:column;gap:12px;padding:16px var(--page-gutter,24px) 48px}
.skel-head{display:flex;flex-direction:column;gap:8px;margin:4px 0 8px}
.skel-bar{display:flex;flex-wrap:wrap;gap:8px}
.skel-bar-flat{margin:0}
.skel-card{display:flex;flex-direction:column;gap:10px;padding:16px;border-radius:var(--radius-12);background:var(--bg-base);box-shadow:var(--shadow-medium);overflow:hidden}
.skel-card.skel-flush{gap:0;padding:0}
.skel-grid{display:grid;gap:12px}
.skel-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}
.skel-kpis-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.skel-split{grid-template-columns:minmax(0,1.6fr) minmax(0,1fr)}
.skel-cards{grid-template-columns:repeat(3,minmax(0,1fr))}
.skel-chart{height:180px;border-radius:var(--radius-8);background:repeating-linear-gradient(to bottom,transparent 0 35px,var(--border-row) 35px 36px)}
.skel-row{display:flex;align-items:center;gap:24px;min-height:44px;padding:0 16px;border-bottom:1px solid var(--border-row)}
.skel-row:last-child{border-bottom:0}
.skel-row>.skel:first-child{margin-right:auto}
.skel-row>.skel{flex:0 0 auto}
.skel-card .skel-row{padding:0}
.skel-card.skel-flush .skel-row{padding:0 16px}
.skel-row-head{min-height:40px;background:var(--bg-secondary)}
.skel-report{display:flex;flex-direction:column;gap:12px;max-width:1200px;margin:0 auto;width:100%}
.skel-sidebar .skel-brand{display:flex;align-items:center;gap:10px;margin:16px 0 4px}
.skel-sidebar .skel-brand>div{display:flex;flex-direction:column;gap:6px}
.skel-sidebar .skel-nav{display:flex;align-items:center;gap:10px;height:32px;padding:0 8px}
/* A thin indeterminate bar while a page swaps in */
.page-loading-bar{position:fixed;top:0;left:0;right:0;z-index:var(--z-toast,90);height:2px;overflow:hidden;pointer-events:none}
.page-loading-bar::before{content:"";position:absolute;inset:0 auto 0 0;width:40%;background:var(--brand);animation:page-loading 1.1s var(--ease,ease) infinite}
@keyframes page-loading{from{transform:translateX(-100%)}to{transform:translateX(250%)}}
@media(prefers-reduced-motion:reduce){.page-loading-bar::before{animation:none;width:100%;opacity:.5}}
@media(max-width:900px){.skel-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.skel-split,.skel-cards,.skel-kpis-3{grid-template-columns:1fr}}
/* Plan strip in layouts where it isn't a direct child of .main (draft editor) */
.shell .workspace-access{display:flex;align-items:center;flex-wrap:wrap;gap:4px 8px;min-height:36px;padding:8px var(--page-gutter,16px);box-sizing:border-box;border-bottom:1px solid var(--border-row);background:var(--bg-secondary);font-size:13px;line-height:18px;color:var(--text-secondary)}
.shell .workspace-access strong{font-weight:500;color:var(--text-primary)}
.shell .workspace-access .access-dot{flex:0 0 6px;width:6px;height:6px;border-radius:var(--radius-2);background:var(--brand)}
.shell .workspace-access .access-dot.paid{background:var(--green-base)}
.shell .workspace-access a{margin-left:auto;display:inline-flex;align-items:center;gap:4px;color:var(--text-primary);font-weight:500;text-decoration:none;white-space:nowrap}
/* Draft inspector tabs: underline tabs, never boxed or clipped */
.shell .inspector-tabs{align-items:stretch;padding:0 16px;gap:4px;min-height:48px;background:var(--bg-base);border-bottom:1px solid var(--border-row)}
.shell .inspector-tabs button{display:flex;align-items:center;justify-content:center;min-height:48px;padding:0 8px;margin:0;border:0;border-bottom:2px solid transparent;border-radius:0;background:none;box-shadow:none;font-size:13px;font-weight:500;color:var(--text-secondary)}
.shell .inspector-tabs button:hover{color:var(--text-primary);background:none}
.shell .inspector-tabs button[aria-selected=true]{color:var(--text-primary);border-bottom-color:var(--brand)}
/* Project task status select: fit the 32px control */
.shell .project-task-title select{height:32px;padding:0 28px 0 10px;font-size:13px;line-height:30px;border:0}
/* Project tasks: ordered steps, where to start, hand-off to an AI assistant */
.project-step{display:block;margin-bottom:2px;font-size:12px;line-height:16px;color:var(--text-tertiary)}
.project-step b{font-weight:600;color:var(--brand-emphasis)}
.project-task.is-start{box-shadow:0 0 0 1px var(--brand-border),var(--shadow-low)}
.project-task-actions{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin-top:10px}
.project-task-actions .project-ai-prompt{height:30px;padding:0 12px;font-size:13px;font-weight:500}
.project-ai-fallback{display:block;width:100%;min-height:160px;margin-top:8px;font:12px/18px var(--font-mono,monospace)}
/* Settings → AI assistants */
.assistant-body .panel{padding:16px;margin-top:12px}
.assistant-body .panel h2{margin:0 0 8px;font-size:14px;line-height:20px;font-weight:600}
.assistant-form{display:flex;flex-direction:column;gap:12px;max-width:520px}
.assistant-form label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:500}
.assistant-form fieldset{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;border:0}
.assistant-form legend{margin-bottom:6px;font-size:13px;font-weight:500}
.assistant-form .assistant-scope{flex-direction:row;align-items:flex-start;gap:10px;padding:10px 12px;border-radius:var(--radius-8);background:var(--bg-secondary);cursor:pointer}
.assistant-scope input{margin-top:3px;accent-color:var(--brand)}
.assistant-scope span{display:flex;flex-direction:column;gap:2px}
.assistant-scope strong{font-weight:500}
.assistant-scope small{font-weight:400;color:var(--text-secondary)}
.assistant-form .primary{align-self:flex-start}
.assistant-error{color:var(--red-emphasis);font-size:13px}
.assistant-created{box-shadow:0 0 0 1px var(--brand-border),var(--shadow-medium)!important}
.assistant-created-head{display:flex;justify-content:space-between;gap:12px}
.assistant-created-head p{margin:0;font-size:13px;color:var(--text-secondary)}
.assistant-secret{display:flex;align-items:center;gap:8px;margin:12px 0;padding:8px 8px 8px 12px;border-radius:var(--radius-8);background:var(--bg-secondary)}
.assistant-secret code{flex:1;min-width:0;overflow-wrap:anywhere;font:12px/18px var(--font-mono,monospace)}
.assistant-clients{display:flex;flex-wrap:wrap;gap:2px;margin-bottom:8px}
.assistant-clients button{height:28px;padding:0 10px;border:0;border-radius:var(--radius-8);background:none;box-shadow:none;font-size:13px;color:var(--text-secondary)}
.assistant-clients button[aria-selected=true]{background:var(--bg-tertiary);color:var(--text-primary);font-weight:500}
.assistant-snippet{margin:0;padding:12px;border-radius:var(--radius-8);background:var(--bg-secondary);overflow-x:auto;font:12px/18px var(--font-mono,monospace)}
.assistant-snippet-foot{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:8px}
.assistant-list{display:flex;flex-direction:column}
.assistant-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;border-bottom:1px solid var(--border-row)}
.assistant-row:last-child{border-bottom:0}
.assistant-row strong{display:block;font-size:13px;font-weight:500}
.assistant-row small{font-size:12px;color:var(--text-secondary)}
.assistant-tools .settings-row p{margin:0;font-size:13px;line-height:20px;color:var(--text-secondary)}
.project-task-notes{display:flex;flex-direction:column;gap:6px;margin-top:8px}
.project-task-note{padding:8px 10px;border-radius:var(--radius-8);background:var(--bg-secondary)}
.project-task-note span{font-size:12px;color:var(--text-tertiary)}
.project-task-note p{margin:2px 0 0;font-size:13px;line-height:20px;white-space:pre-wrap}
.assistant-playbooks .settings-row span{display:flex;flex-direction:column;gap:2px}
.assistant-playbooks .settings-row code{font:11px/16px var(--font-mono,monospace);color:var(--text-tertiary)}
.assistant-playbooks .settings-row p{margin:0;font-size:13px;line-height:20px;color:var(--text-secondary)}
.assistant-body .settings-row{display:grid;grid-template-columns:minmax(140px,200px) minmax(0,1fr);align-items:start;gap:4px 16px;padding:10px 0;text-align:left}
.assistant-body .settings-row>p{text-align:left}
@media(max-width:700px){.assistant-body .settings-row{grid-template-columns:1fr}}
/* OAuth consent */
.oauth-consent{display:flex;justify-content:center;padding:48px 16px 80px}
.oauth-card{width:100%;max-width:520px;padding:24px;border-radius:var(--radius-12);background:var(--bg-base);box-shadow:var(--shadow-medium)}
.oauth-card h1{margin:0 0 6px;font-size:20px;line-height:28px;font-weight:600;letter-spacing:-.2px}
.oauth-card .skeleton-view{padding:0}
.oauth-app{display:flex;gap:14px;align-items:flex-start;margin-bottom:20px}
.oauth-app-mark{flex:0 0 40px;height:40px;display:grid;place-items:center;border-radius:10px;background:var(--brand-muted);color:var(--brand-emphasis);font-weight:700}
.oauth-app p{margin:0;font-size:13px;line-height:20px}
.oauth-form{display:flex;flex-direction:column;gap:14px}
.oauth-form>label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:500}
.oauth-form select{height:36px}
.oauth-form fieldset{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;border:0}
.oauth-form legend{margin-bottom:6px;font-size:13px;font-weight:500}
.oauth-form .assistant-scope{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border-radius:var(--radius-8);background:var(--bg-secondary);cursor:pointer;font-size:13px}
.oauth-actions{display:flex;gap:8px;margin-top:4px}
.oauth-actions .primary,.oauth-actions .ghost{height:36px;padding:0 16px;display:inline-flex;align-items:center}
.assistant-dev{display:inline-flex;align-items:center;height:20px;margin-left:6px;padding:0 7px;border:1px solid var(--border-strong);border-radius:var(--radius-full);font-size:11px;font-weight:500;color:var(--text-secondary);vertical-align:middle}
.assistant-connector{box-shadow:0 0 0 1px var(--brand-border),var(--shadow-medium)!important}
.oauth-card .primary{border:0;border-radius:var(--radius-8);background:var(--control-primary);color:var(--text-inverse);font-size:14px;font-weight:500}
.oauth-card .primary:hover{background:var(--control-primary-hover)}
.oauth-card .ghost{border-radius:var(--radius-8);font-size:14px}
/* Consent page lives outside .shell: set the select explicitly so text isn't clipped */
.oauth-form select{-webkit-appearance:none;appearance:none;width:100%;height:40px;margin:0;padding:0 34px 0 12px;box-sizing:border-box;border:0;border-radius:var(--radius-8);background:var(--control-bg) var(--chevron) right 12px center/12px no-repeat;box-shadow:var(--shadow-low);color:var(--text-primary);font:500 14px/40px var(--font-sans);cursor:pointer}
.oauth-form select:focus{outline:none;box-shadow:var(--shadow-low),var(--shadow-focus)}
.oauth-app-mark .company-icon{width:40px;height:40px;border-radius:10px}
.oauth-app-mark:has(.company-icon){background:var(--bg-secondary)}
