@font-face {
  font-family: "Filson Pro";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("https://hiyahealth.com/cdn/shop/t/385/assets/FilsonProBook.woff2?v=91657816460375235871730485201") format("woff2");
}

@font-face {
  font-family: "Filson Pro";
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
  src: url("https://hiyahealth.com/cdn/shop/t/385/assets/FilsonProBold.woff2?v=41772818424514278981730485199") format("woff2");
}

:root {
  --navy: #054b7e;
  --navy-dark: #03395f;
  --blue: #075f8f;
  --blue-soft: #e4f5f9;
  --yellow: #fde200;
  --yellow-soft: #fffbdf;
  --coral: #f76658;
  --coral-soft: #fff0ed;
  --mint: #52b5a4;
  --mint-soft: #defcf1;
  --green: #2e8d65;
  --cream: #f7f1e7;
  --lavender: #deddfa;
  --surface: #f5f7f8;
  --white: #ffffff;
  --panel: #ffffff;
  --on-brand: #ffffff;
  --on-yellow: #073956;
  --heading: #054b7e;
  --sidebar-bg: #054b7e;
  --brand-hover: #075f8f;
  --warning-text: #766100;
  --issue-text: #b83e34;
  --purple-text: #5e5aa7;
  --ink: #15364e;
  --muted: #526b7d;
  --muted-light: #91a2ae;
  --line: #dce4e8;
  --line-strong: #cbd7dd;
  --topbar: rgba(255, 255, 255, .94);
  --mobile-nav: rgba(255, 255, 255, .98);
  --table-header: #fbfcfc;
  --row-hover: #fbfdfd;
  --conversation-bg: #f6f8f9;
  --preview-shell: #e9eef0;
  --preview-bg: #ffffff;
  --frame-border: #d2dce1;
  --browser-chrome: #dce4e8;
  --browser-dot: #aebcc4;
  --address-bar: rgba(255, 255, 255, .65);
  --progress-track: #e7edef;
  --neutral-pill: #edf1f3;
  --accent-coral: #ffe9e4;
  --accent-aqua: #e7faf7;
  --accent-blue: #e8f5fc;
  --accent-green: #edf9e8;
  --accent-lavender: #efeffc;
  --soft-blue-border: #cbe8ef;
  --soft-mint-border: #bfe8d8;
  --soft-yellow-border: #efe39b;
  --soft-coral-border: #f1c6c0;
  --shadow: 0 18px 50px rgba(5, 75, 126, .09);
  --sans: "Filson Pro", "Avenir Next", "Trebuchet MS", Arial, sans-serif;
  --display: "Filson Pro", "Avenir Next", "Trebuchet MS", Arial, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --navy: #07527f;
  --navy-dark: #043754;
  --blue: #6bc7ef;
  --blue-soft: #0d3448;
  --yellow: #ffe529;
  --yellow-soft: #38330d;
  --coral: #ff8176;
  --coral-soft: #3d2422;
  --mint: #67cdb9;
  --mint-soft: #123b32;
  --green: #79d8ad;
  --cream: #29271f;
  --lavender: #39375e;
  --surface: #07141e;
  --panel: #0e2230;
  --on-brand: #ffffff;
  --on-yellow: #073956;
  --heading: #eef8fc;
  --sidebar-bg: #041f32;
  --brand-hover: #086c9f;
  --warning-text: #ffe979;
  --issue-text: #ff9a91;
  --purple-text: #c9c5ff;
  --ink: #d9e9f0;
  --muted: #a8bdc8;
  --muted-light: #8299a7;
  --line: #294250;
  --line-strong: #3d5b69;
  --topbar: rgba(7, 20, 30, .95);
  --mobile-nav: rgba(9, 27, 39, .98);
  --table-header: #0a1b27;
  --row-hover: #122a39;
  --conversation-bg: #091a26;
  --preview-shell: #06111a;
  --preview-bg: #ffffff;
  --frame-border: #38515f;
  --browser-chrome: #1c3544;
  --browser-dot: #66808f;
  --address-bar: rgba(4, 15, 23, .5);
  --progress-track: #203744;
  --neutral-pill: #1d303c;
  --accent-coral: #352522;
  --accent-aqua: #14352f;
  --accent-blue: #123044;
  --accent-green: #193322;
  --accent-lavender: #272641;
  --soft-blue-border: #245063;
  --soft-mint-border: #2f6252;
  --soft-yellow-border: #6c621b;
  --soft-coral-border: #6d3732;
  --shadow: 0 20px 55px rgba(0, 0, 0, .38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { color: inherit; font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(253, 226, 0, .9); outline-offset: 2px; }
h1, h2, h3, h4, p { margin-top: 0; }
svg { display: block; height: 20px; width: 20px; }
::placeholder { color: var(--muted-light); opacity: 1; }

.hiya-logo { color: inherit; font-family: var(--display); font-size: 34px; font-weight: 800; letter-spacing: -.075em; line-height: 1; }
.hiya-logo sup { font-size: 7px; letter-spacing: 0; margin-left: 3px; vertical-align: top; }
.hiya-kicker, .section-kicker { color: var(--blue); display: block; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }

/* Login */
.login-page { background: var(--panel); color: var(--heading); min-height: 100vh; }
.sale-bar { align-items: center; background: var(--yellow); color: var(--on-yellow); display: flex; font-size: 12px; font-weight: 700; justify-content: center; min-height: 30px; text-align: center; }
.login-header { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; min-height: 76px; padding: 0 clamp(22px, 5vw, 74px); }
.login-header-actions { align-items: center; display: flex; gap: 14px; }
.login-header-actions > span { color: var(--muted); font-size: 13px; font-weight: 700; }
.login-layout { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(440px, .82fr); min-height: calc(100vh - 106px); }
.login-visual { align-items: center; background: var(--yellow-soft); display: flex; overflow: hidden; padding: clamp(58px, 8vw, 118px); position: relative; }
.login-copy { max-width: 690px; position: relative; z-index: 3; }
.login-copy h1 { color: var(--heading); font-family: var(--display); font-size: clamp(56px, 6.4vw, 96px); font-weight: 800; letter-spacing: -.06em; line-height: .92; margin: 24px 0 28px; }
.login-copy h1 em { color: var(--coral); font-style: normal; }
.login-copy p { color: var(--heading); font-size: 18px; line-height: 1.6; margin-bottom: 0; max-width: 610px; opacity: .78; }
.login-orbit { border: 2px dashed rgba(5, 75, 126, .18); border-radius: 50%; position: absolute; }
.orbit-a { height: 420px; right: -170px; top: 20px; width: 420px; }
.orbit-b { bottom: -240px; height: 520px; left: -180px; width: 520px; }
.mini-bottle { align-items: center; border: 3px solid var(--navy); border-radius: 18px 18px 26px 26px; box-shadow: 7px 8px 0 rgba(5,75,126,.12); display: flex; justify-content: center; position: absolute; z-index: 2; }
.mini-bottle::before { background: var(--navy); border-radius: 5px 5px 2px 2px; content: ""; height: 14px; position: absolute; top: -12px; width: 55%; }
.mini-bottle span { color: var(--on-yellow); font-size: 22px; font-weight: 800; }
.bottle-yellow { background: var(--yellow); height: 132px; right: 82px; top: 110px; transform: rotate(8deg); width: 80px; }
.bottle-aqua { background: #8ed8cf; bottom: 86px; height: 110px; right: 180px; transform: rotate(-9deg); width: 68px; }
.bottle-coral { background: #f59b8f; bottom: 210px; height: 92px; right: 42px; transform: rotate(12deg); width: 58px; }
.access-card { align-self: center; margin: 56px clamp(30px, 6vw, 92px); max-width: 510px; padding: 18px 0; }
.access-icon { align-items: center; background: var(--blue-soft); border-radius: 14px; color: var(--blue); display: flex; height: 50px; justify-content: center; margin-bottom: 28px; width: 50px; }
.access-card h2 { color: var(--heading); font-family: var(--display); font-size: clamp(38px, 4vw, 58px); font-weight: 800; letter-spacing: -.05em; line-height: .96; margin: 17px 0 18px; }
.access-card > p { color: var(--muted); font-size: 15px; line-height: 1.55; margin-bottom: 35px; }
.login-form { display: grid; }
.login-form label { color: var(--heading); font-size: 11px; font-weight: 800; margin-bottom: 8px; text-transform: uppercase; }
.login-form input { background: var(--panel); border: 1px solid var(--line-strong); border-radius: 10px; color: var(--heading); font-size: 23px; font-weight: 700; letter-spacing: .3em; min-height: 58px; padding: 0 17px; width: 100%; }
.login-form input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(35,118,180,.12); outline: 0; }
.field-help { color: var(--muted-light); font-size: 11px; margin-top: 8px; }
.login-error { color: var(--coral); font-size: 12px; font-weight: 800; margin: 12px 0 0; }
.login-form button { align-items: center; background: var(--navy); border: 0; border-radius: 10px; color: var(--on-brand); display: flex; font-weight: 800; justify-content: space-between; margin-top: 24px; min-height: 54px; padding: 0 22px; }
.login-form button:hover { background: var(--brand-hover); }
.access-proof { border-top: 1px solid var(--line); display: flex; gap: 10px 22px; margin-top: 34px; padding-top: 20px; }
.access-proof span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }

/* App shell */
.workspace-page { background: var(--surface); min-height: 100vh; overflow-x: hidden; }
.workspace-shell { display: grid; grid-template-columns: 242px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--sidebar-bg); color: var(--on-brand); display: flex; flex-direction: column; height: 100vh; left: 0; padding: 28px 18px 20px; position: sticky; top: 0; z-index: 40; }
.sidebar-brand { color: var(--on-brand); display: grid; gap: 8px; padding: 0 12px 27px; text-decoration: none; }
.sidebar-brand .hiya-logo { font-size: 40px; }
.brand-product { color: rgba(255,255,255,.63); font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.sidebar-nav { display: grid; gap: 5px; }
.sidebar-nav button { align-items: center; background: transparent; border: 0; border-radius: 10px; color: rgba(255,255,255,.7); display: grid; font-size: 13px; font-weight: 700; gap: 11px; grid-template-columns: 22px 1fr auto; min-height: 45px; padding: 0 12px; text-align: left; width: 100%; }
.sidebar-nav button:hover, .sidebar-nav button.active { background: rgba(255,255,255,.12); color: var(--on-brand); }
.sidebar-nav button b { align-items: center; background: rgba(255,255,255,.13); border-radius: 999px; display: flex; font-size: 9px; height: 23px; justify-content: center; min-width: 23px; padding: 0 6px; }
.sidebar-program { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.11); border-radius: 13px; display: grid; gap: 9px; margin: 30px 5px 0; padding: 16px; }
.sidebar-program > span { color: var(--yellow); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.sidebar-program strong { font-size: 13px; line-height: 1.35; }
.sidebar-program small { color: rgba(255,255,255,.57); font-size: 10px; line-height: 1.45; }
.mini-progress { background: rgba(255,255,255,.13); border-radius: 999px; height: 5px; overflow: hidden; }
.mini-progress i { background: var(--yellow); display: block; height: 100%; width: 32%; }
.sidebar-footer { border-top: 1px solid rgba(255,255,255,.13); display: grid; gap: 6px; margin-top: auto; padding: 17px 5px 0; }
.sidebar-footer button, .sidebar-footer a { align-items: center; background: transparent; border: 0; border-radius: 8px; color: rgba(255,255,255,.65); display: flex; font-size: 11px; font-weight: 700; gap: 9px; min-height: 38px; padding: 0 10px; text-decoration: none; }
.sidebar-footer button:hover, .sidebar-footer a:hover { background: rgba(255,255,255,.09); color: var(--on-brand); }
.sidebar-footer svg { height: 17px; width: 17px; }
.workspace-main { min-width: 0; }
.topbar { align-items: center; background: var(--topbar); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; min-height: 70px; padding: 10px clamp(22px, 3vw, 44px); position: sticky; top: 0; z-index: 30; }
.topbar > div:first-child { align-items: center; display: flex; gap: 9px; }
.breadcrumb { color: var(--muted-light); font-size: 11px; font-weight: 700; }
.topbar > div:first-child strong { color: var(--heading); font-size: 12px; }
.topbar > div:first-child strong::before { color: var(--line-strong); content: "/"; margin-right: 9px; }
.topbar-actions { align-items: center; display: flex; gap: 12px; }
.theme-toggle { align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; color: var(--heading); display: inline-flex; font-size: 11px; font-weight: 800; gap: 8px; justify-content: center; min-height: 40px; padding: 0 12px; white-space: nowrap; }
.theme-toggle:hover { background: var(--blue-soft); border-color: var(--blue); }
.theme-toggle-icons { display: grid; height: 22px; place-items: center; position: relative; width: 22px; }
.theme-toggle-icons i { font-size: 18px; font-style: normal; grid-area: 1 / 1; line-height: 1; transition: opacity 140ms ease, transform 180ms ease; }
.theme-icon-sun { opacity: 0; transform: rotate(-35deg) scale(.65); }
:root[data-theme="dark"] .theme-icon-moon { opacity: 0; transform: rotate(35deg) scale(.65); }
:root[data-theme="dark"] .theme-icon-sun { opacity: 1; transform: rotate(0) scale(1); }
.actor-control { align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; display: flex; height: 40px; overflow: hidden; }
.actor-control span { color: var(--muted-light); font-size: 9px; font-weight: 800; padding-left: 12px; text-transform: uppercase; }
.actor-control input { background: transparent; border: 0; color: var(--heading); font-size: 12px; font-weight: 700; height: 100%; outline: 0; padding: 0 12px 0 8px; width: 110px; }
.share-button, .primary-action, .secondary-action { background: var(--navy); border: 0; border-radius: 9px; color: var(--on-brand); font-size: 12px; font-weight: 800; min-height: 40px; padding: 0 16px; }
.share-button:hover, .primary-action:hover { background: var(--brand-hover); }
.mobile-menu { background: transparent; border: 0; color: var(--heading); display: none; font-size: 20px; padding: 5px; }
.workspace-content { margin: 0 auto; max-width: 1580px; padding: clamp(30px, 4vw, 58px) clamp(22px, 3vw, 46px) 70px; }

/* Headers and metrics */
.view-header { align-items: end; display: flex; gap: 40px; justify-content: space-between; margin-bottom: 32px; }
.view-header > div:first-child { max-width: 800px; }
.view-header h1 { color: var(--heading); font-family: var(--display); font-size: clamp(36px, 4vw, 56px); font-weight: 800; letter-spacing: -.055em; line-height: .97; margin: 12px 0 13px; }
.view-header p { color: var(--muted); font-size: 14px; line-height: 1.6; margin-bottom: 0; max-width: 720px; }
.primary-action { align-items: center; display: flex; gap: 26px; min-height: 46px; padding: 0 20px; white-space: nowrap; }
.compact-header { align-items: center; }
.compact-header h1 { font-size: clamp(34px, 3.4vw, 48px); }
.header-score { align-items: flex-end; background: var(--panel); border: 1px solid var(--line); border-radius: 13px; display: flex; gap: 10px; padding: 16px 20px; }
.header-score strong { color: var(--heading); font-family: var(--display); font-size: 34px; letter-spacing: -.05em; }
.header-score span { color: var(--muted); font-size: 10px; font-weight: 700; padding-bottom: 4px; text-transform: uppercase; }
.metric-grid { display: grid; gap: 14px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.metric-card { background: var(--panel); border: 1px solid var(--line); border-radius: 13px; display: grid; min-height: 138px; overflow: hidden; padding: 18px 20px; position: relative; }
.metric-card::before { background: var(--metric-color); content: ""; inset: 0 auto 0 0; position: absolute; width: 4px; }
.metric-pages { --metric-color: var(--blue); }
.metric-review { --metric-color: var(--coral); }
.metric-pixels { --metric-color: var(--mint); }
.metric-analytics { --metric-color: var(--blue); }
.metric-comments { --metric-color: var(--yellow); }
.metric-readability { --metric-color: var(--mint); }
.metric-accessibility { --metric-color: var(--coral); }
.metric-card > span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.metric-card strong { color: var(--heading); font-family: var(--display); font-size: 40px; letter-spacing: -.05em; line-height: 1; margin-top: 8px; }
.metric-card strong i { color: var(--muted-light); font-size: 18px; font-style: normal; }
.metric-card small { align-self: end; color: var(--muted); font-size: 10px; line-height: 1.4; }

/* Program overview */
.program-strip { display: grid; gap: 14px; grid-template-columns: minmax(260px, .65fr) minmax(0, 1.35fr); margin-top: 14px; }
.program-progress, .review-preview, .baseline-card { background: var(--panel); border: 1px solid var(--line); border-radius: 13px; padding: 19px 20px; }
.program-progress { align-content: center; display: grid; }
.program-progress > div:first-child { align-items: flex-end; display: flex; justify-content: space-between; }
.program-progress span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.program-progress strong { color: var(--heading); font-size: 22px; }
.progress-track { background: var(--progress-track); border-radius: 999px; height: 8px; margin: 12px 0 8px; overflow: hidden; }
.progress-track i { background: var(--mint); border-radius: inherit; display: block; height: 100%; }
.program-progress small { color: var(--muted-light); font-size: 9px; }
.baseline-card { align-content: center; display: grid; gap: 8px; }
.baseline-card > span { color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.baseline-card strong { color: var(--heading); font-size: 19px; }
.baseline-card p { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 0; }
.baseline-card button { background: none; border: 0; color: var(--blue); font-size: 12px; font-weight: 800; justify-self: start; padding: 2px 0; }
.block-heading { align-items: center; display: flex; justify-content: space-between; }
.block-heading > span, .block-heading h2 { color: var(--heading); font-size: 12px; font-weight: 800; margin: 0; }
.block-heading button { background: none; border: 0; color: var(--blue); font-size: 10px; font-weight: 800; }
.review-preview-list { display: grid; gap: 4px; grid-template-columns: repeat(2, 1fr); margin-top: 12px; }
.review-preview-list > button { align-items: center; background: var(--surface); border: 0; border-radius: 8px; display: flex; justify-content: space-between; min-height: 45px; padding: 6px 9px; text-align: left; }
.review-preview-list > button:hover { background: var(--blue-soft); }
.review-preview-list > button > span { align-items: center; display: flex; gap: 7px; }
.review-preview-list b { font-size: 10px; }
.review-preview-list > button > span:last-child { color: var(--muted); font-size: 9px; }

/* Shared page table */
.page-panel, .pixel-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; margin-top: 14px; overflow: hidden; }
.panel-toolbar { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; min-height: 67px; padding: 12px 18px; }
.panel-toolbar > div:first-child { align-items: baseline; display: flex; gap: 9px; }
.panel-toolbar h2 { color: var(--heading); font-size: 15px; margin: 0; }
.panel-toolbar > div:first-child > span { color: var(--muted-light); font-size: 10px; }
.page-filters { align-items: center; display: flex; gap: 8px; }
.search-field { align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; display: flex; height: 37px; overflow: hidden; }
.search-field > span { color: var(--muted-light); font-size: 16px; padding-left: 10px; }
.search-field input { background: transparent; border: 0; font-size: 11px; height: 100%; outline: 0; padding: 0 10px 0 6px; width: 190px; }
.page-filters > select { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; font-size: 10px; font-weight: 700; height: 37px; padding: 0 29px 0 10px; }
.table-wrap { max-width: 100%; overflow-x: auto; }
.page-table, .pixel-table { border-collapse: collapse; min-width: 1000px; width: 100%; }
.page-table th, .pixel-table th { background: var(--table-header); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 800; height: 46px; letter-spacing: .03em; padding: 0 14px; text-align: left; text-transform: uppercase; }
.page-table td, .pixel-table td { border-bottom: 1px solid var(--line); height: 78px; padding: 10px 14px; vertical-align: middle; }
.page-table tbody tr:last-child td, .pixel-table tbody tr:last-child td { border-bottom: 0; }
.page-table tbody tr:hover, .pixel-table tbody tr:hover { background: var(--row-hover); }
.page-name { align-items: center; background: none; border: 0; display: flex; gap: 11px; padding: 0; text-align: left; }
.page-name > span:last-child { display: grid; gap: 4px; min-width: 150px; }
.page-name strong { color: var(--heading); font-size: 14px; }
.page-name small { color: var(--muted); font-size: 12px; }
.project-icon { align-items: center; background: var(--icon-color); border: 1px solid rgba(5,75,126,.12); border-radius: 9px; color: var(--on-yellow); display: inline-flex; flex: 0 0 auto; height: 35px; justify-content: center; width: 35px; }
.project-icon b { font-size: 9px; }
.accent-yellow { --icon-color: var(--yellow); }
.accent-coral { --icon-color: #ffc1b8; }
.accent-aqua { --icon-color: #afe4dd; }
.accent-blue { --icon-color: #bfe2f6; }
.accent-green { --icon-color: #c9edbe; }
.accent-lavender { --icon-color: var(--lavender); }
.stage-pill { border-radius: 999px; display: inline-flex; font-size: 11px; font-weight: 800; padding: 7px 10px; white-space: nowrap; }
.stage-priority { background: var(--yellow); color: var(--on-yellow); }
.stage-live { background: var(--blue-soft); color: var(--blue); }
.stage-concept { background: var(--lavender); color: var(--purple-text); }
.status-chip { align-items: center; border-radius: 999px; display: inline-flex; font-size: 11px; font-weight: 800; gap: 6px; padding: 7px 10px; white-space: nowrap; }
.status-chip i { background: currentColor; border-radius: 50%; height: 5px; width: 5px; }
.status-approved, .status-verified { background: var(--mint-soft); color: var(--green); }
.status-in_review, .status-needs_qa { background: var(--yellow-soft); color: var(--warning-text); }
.status-blocked, .status-issue { background: var(--coral-soft); color: var(--issue-text); }
.status-not_started, .status-not_installed { background: var(--neutral-pill); color: var(--muted); }
.status-installed { background: var(--blue-soft); color: var(--blue); }
.status-with_corinne, .status-needs_check { background: var(--yellow-soft); color: var(--warning-text); }
.status-changes_requested, .status-issue { background: var(--coral-soft); color: var(--issue-text); }
.status-not_sent, .status-needs_setup { background: var(--neutral-pill); color: var(--muted); }
.status-active { background: var(--mint-soft); color: var(--green); }
.pixel-count { align-items: center; background: none; border: 0; display: flex; gap: 7px; padding: 0; }
.pixel-count span { color: var(--heading); font-size: 10px; font-weight: 800; }
.pixel-count i { --total: 5; background: conic-gradient(var(--mint) calc(var(--done) / var(--total) * 100%), #e6ecef 0); border-radius: 50%; height: 21px; position: relative; width: 21px; }
.pixel-count i::after { background: var(--panel); border-radius: 50%; content: ""; inset: 4px; position: absolute; }
.owner-cell { align-items: center; color: var(--muted); display: flex; font-size: 12px; gap: 8px; min-width: 135px; }
.owner-cell i { align-items: center; background: var(--navy); border-radius: 50%; color: var(--on-brand); display: flex; font-size: 7px; font-style: normal; height: 24px; justify-content: center; width: 24px; }
.due-date { color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.tracking-cell { align-items: center; background: none; border: 0; color: var(--heading); display: flex; font-size: 12px; font-weight: 800; gap: 8px; padding: 0; white-space: nowrap; }
.row-menu { background: none; border: 0; color: var(--muted-light); font-weight: 800; letter-spacing: .08em; padding: 7px; }
.empty-state { color: var(--muted); padding: 50px; text-align: center; }

/* Analytics */
.metric-card strong.metric-soon { font-size: 31px; letter-spacing: -.03em; }
.analytics-coming-soon { background: linear-gradient(140deg, var(--panel) 0%, var(--surface) 58%, var(--blue-soft) 100%); border: 1px solid var(--line); border-radius: 20px; min-height: 520px; overflow: hidden; padding: clamp(30px, 5vw, 64px); position: relative; }
.analytics-coming-soon::after { background: var(--yellow); border-radius: 50%; content: ""; height: 280px; opacity: .16; position: absolute; right: -110px; top: -100px; width: 280px; }
.analytics-coming-badge { align-items: center; background: var(--yellow); border-radius: 999px; color: var(--on-yellow); display: inline-flex; font-size: 11px; font-weight: 900; gap: 7px; letter-spacing: .04em; padding: 9px 13px; position: relative; text-transform: uppercase; z-index: 1; }
.analytics-coming-badge span { font-size: 15px; line-height: 1; }
.analytics-coming-copy { max-width: 760px; position: relative; z-index: 1; }
.analytics-coming-copy .section-kicker { display: block; margin-top: 28px; }
.analytics-coming-copy h2 { color: var(--heading); font-family: var(--display); font-size: clamp(38px, 5vw, 68px); letter-spacing: -.05em; line-height: .98; margin: 12px 0 18px; }
.analytics-coming-copy p { color: var(--muted); font-size: 15px; line-height: 1.65; margin: 0; max-width: 690px; }
.analytics-coming-grid { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 38px; position: relative; z-index: 1; }
.analytics-coming-grid article { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 8px; min-height: 145px; padding: 18px; }
.analytics-coming-grid article > span { color: var(--blue); font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.analytics-coming-grid strong { color: var(--heading); font-size: 16px; }
.analytics-coming-grid p { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 0; }
.analytics-coming-soon footer { border-top: 1px solid var(--line); display: grid; gap: 5px; margin-top: 36px; padding-top: 22px; position: relative; z-index: 1; }
.analytics-coming-soon footer strong { color: var(--heading); font-size: 13px; }
.analytics-coming-soon footer p { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 0; }
.analytics-coming-detail { align-content: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; justify-items: center; min-height: 300px; padding: 32px; text-align: center; }
.analytics-coming-detail h3 { color: var(--heading); font-size: 23px; margin: 12px 0 9px; }
.analytics-coming-detail p { color: var(--muted); line-height: 1.6; margin: 0 auto; max-width: 560px; }
.analytics-connection { align-items: center; background: var(--panel); border: 1px solid var(--line); border-left: 5px solid var(--yellow); border-radius: 14px; display: grid; gap: 18px; grid-template-columns: minmax(260px, 1.4fr) minmax(130px, .55fr) minmax(190px, .75fr) auto; margin-bottom: 14px; padding: 18px 20px; }
.analytics-connection.status-connected { border-left-color: var(--mint); }
.analytics-connection.status-error { border-left-color: var(--coral); }
.analytics-connection-main { align-items: center; display: grid; gap: 13px; grid-template-columns: 42px 1fr; min-width: 0; }
.analytics-connection-main > div, .analytics-live, .analytics-freshness { display: grid; gap: 5px; min-width: 0; }
.analytics-connection span { color: var(--blue); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.analytics-connection strong { color: var(--heading); font-size: 15px; }
.analytics-connection p, .analytics-connection small { color: var(--muted); font-size: 10px; line-height: 1.45; margin: 0; }
.analytics-live strong { font-family: var(--display); font-size: 30px; letter-spacing: -.04em; }
.analytics-refresh { background: var(--navy); border: 0; border-radius: 9px; color: var(--on-brand); font-size: 11px; font-weight: 800; min-height: 44px; padding: 0 16px; white-space: nowrap; }
.analytics-refresh:hover { background: var(--brand-hover); }
.analytics-refresh:disabled { cursor: wait; opacity: .65; }
.analytics-mode { display: grid; gap: 14px; grid-template-columns: 1.2fr .8fr; margin-bottom: 14px; }
.analytics-mode > div { align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 7px 13px; padding: 18px 20px; }
.analytics-mode > div:first-child { grid-template-columns: 42px 1fr; }
.analytics-mode > div:last-child { align-content: center; background: var(--blue-soft); }
.analytics-mode-icon { align-items: center; background: var(--yellow); border-radius: 50%; color: var(--on-yellow); display: flex; font-size: 22px; font-weight: 800; grid-row: 1 / 3; height: 42px; justify-content: center; width: 42px; }
.analytics-mode strong { color: var(--heading); font-size: 15px; }
.analytics-mode > div:last-child > span { color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.analytics-mode p { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 0; }
.analytics-metric-grid { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; }
.analytics-metric-grid article { background: var(--panel); border: 1px solid var(--line); border-radius: 13px; display: grid; min-height: 120px; padding: 17px 19px; }
.analytics-metric-grid article > span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.analytics-metric-grid article strong { color: var(--heading); font-family: var(--display); font-size: 32px; letter-spacing: -.04em; line-height: 1; margin-top: 8px; }
.analytics-metric-grid article small { align-self: end; color: var(--muted); font-size: 11px; }
.analytics-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.analytics-window-note { align-items: center; background: var(--yellow-soft); border-bottom: 1px solid var(--soft-yellow-border); color: var(--muted); display: flex; font-size: 12px; gap: 8px; padding: 12px 18px; }
.analytics-window-note strong { color: var(--heading); white-space: nowrap; }
.analytics-table { border-collapse: collapse; min-width: 1600px; width: 100%; }
.analytics-table th { background: var(--table-header); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 800; height: 46px; padding: 0 14px; text-align: left; text-transform: uppercase; white-space: nowrap; }
.analytics-table td { border-bottom: 1px solid var(--line); color: var(--heading); font-size: 12px; font-weight: 700; height: 82px; padding: 10px 14px; vertical-align: middle; white-space: nowrap; }
.analytics-table tbody tr:last-child td { border-bottom: 0; }
.analytics-table tbody tr:hover { background: var(--row-hover); }
.analytics-period { color: var(--muted); font-weight: 600; }
.source-pill, .no-data-pill { background: var(--blue-soft); border-radius: 999px; color: var(--blue); display: inline-flex; font-size: 10px; font-weight: 800; padding: 6px 9px; }
.no-data-pill { background: var(--neutral-pill); color: var(--muted); }
.cell-submetric, .analytics-updated small { color: var(--muted); display: block; font-size: 9px; font-weight: 600; margin-top: 3px; }
.analytics-updated { display: grid; gap: 1px; }
.analytics-updated strong { font-size: 11px; }
.analytics-updated small { margin: 0; }

.analytics-detail { display: grid; gap: 18px; }
.analytics-detail-summary { display: grid; gap: 9px; grid-template-columns: repeat(4, 1fr); }
.analytics-detail-summary > div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 5px; padding: 13px; }
.analytics-detail-summary span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.analytics-detail-summary strong { color: var(--heading); font-size: 19px; }
.analytics-empty-callout { background: var(--yellow-soft); border: 1px solid var(--soft-yellow-border); border-radius: 10px; display: grid; gap: 3px; padding: 14px 16px; }
.analytics-empty-callout strong { color: var(--heading); font-size: 14px; }
.analytics-empty-callout span { color: var(--muted); font-size: 12px; }
.analytics-form { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 14px; padding: 17px; }
.analytics-form-grid { display: grid; gap: 13px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.analytics-form label { color: var(--muted); display: grid; font-size: 10px; font-weight: 800; gap: 6px; letter-spacing: .02em; text-transform: uppercase; }
.analytics-form select, .analytics-form input, .analytics-form textarea { background: var(--panel); border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink); font-size: 13px; line-height: 1.5; min-width: 0; padding: 9px 10px; text-transform: none; width: 100%; }
.analytics-form input, .analytics-form select { min-height: 42px; }
.analytics-form textarea { resize: vertical; }
.analytics-note { grid-column: 1 / -1; }
.analytics-form > footer { align-items: center; border-top: 1px solid var(--line); display: flex; justify-content: space-between; padding-top: 14px; }
.analytics-form > footer span { color: var(--muted); font-size: 10px; }
.analytics-form > footer button { background: var(--navy); border: 0; border-radius: 8px; color: var(--on-brand); font-size: 12px; font-weight: 800; min-height: 40px; padding: 0 15px; }
.analytics-history { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.analytics-history > .block-heading { min-height: 58px; padding: 10px 15px; }
.analytics-history table { border-collapse: collapse; min-width: 700px; width: 100%; }
.analytics-history th { background: var(--table-header); border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; padding: 10px 12px; text-align: left; text-transform: uppercase; }
.analytics-history td { border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; padding: 11px 12px; }

/* Review queue */
.review-summary { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); margin-bottom: 16px; }
.review-summary article { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 4px; padding: 17px 19px; }
.review-summary span { color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.review-summary strong { color: var(--heading); font-size: 29px; line-height: 1; }
.review-summary small { color: var(--muted); font-size: 11px; }
.review-projects { display: grid; gap: 16px; }
.review-card { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--line-strong); border-radius: 15px; overflow: hidden; }
.review-card.status-border-with_corinne { border-left-color: var(--yellow); }
.review-card.status-border-changes_requested { border-left-color: var(--coral); }
.review-card.status-border-approved { border-left-color: var(--green); }
.review-card > header { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; min-height: 82px; padding: 14px 18px; }
.review-page-heading { align-items: center; display: flex; gap: 12px; min-width: 0; }
.review-page-heading > div { display: grid; gap: 3px; min-width: 0; }
.review-page-heading h2 { color: var(--heading); font-size: 18px; margin: 0; }
.review-page-heading > div > span { color: var(--muted); font-size: 11px; }
.review-card-status { align-items: flex-end; display: grid; gap: 7px; justify-items: end; }
.review-tracking { align-items: center; color: var(--muted); display: flex; font-size: 10px; font-weight: 800; gap: 6px; }
.review-tracking i { background: var(--coral); border-radius: 50%; height: 7px; width: 7px; }
.review-tracking.is-ready i { background: var(--green); box-shadow: 0 0 0 3px rgba(46,141,101,.12); }
.review-preview-step { align-items: center; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; gap: 18px; justify-content: space-between; padding: 16px 18px; }
.review-preview-step > div:first-child { align-items: center; display: flex; gap: 12px; }
.review-preview-step > div:first-child > div { display: grid; gap: 3px; }
.review-preview-step strong { color: var(--heading); font-size: 14px; }
.review-preview-step p { color: var(--muted); font-size: 11px; margin: 0; }
.review-step-number { align-items: center; background: var(--yellow); border-radius: 50%; color: var(--on-yellow); display: flex; flex: 0 0 auto; font-size: 12px; font-weight: 900; height: 30px; justify-content: center; width: 30px; }
.review-preview-actions { align-items: center; display: flex; gap: 8px; }
.review-open-preview { align-items: center; background: var(--navy); border: 0; border-radius: 9px; color: var(--on-brand); display: flex; font-size: 12px; font-weight: 800; gap: 8px; min-height: 44px; padding: 0 14px; }
.review-open-preview span { align-items: center; background: rgba(255,255,255,.18); border-radius: 99px; display: flex; font-size: 10px; height: 22px; justify-content: center; min-width: 22px; padding: 0 5px; }
.review-preview-actions .live-link { border: 1px solid var(--line-strong); border-radius: 9px; min-height: 44px; padding: 0 12px; }
.review-decision-step { align-items: flex-start; display: grid; gap: 12px; grid-template-columns: 30px 1fr; padding: 18px; }
.approval-editor { display: grid; gap: 15px; min-width: 0; }
.approval-person { align-items: center; display: grid; gap: 10px; grid-template-columns: 42px 1fr auto; }
.corinne-avatar { align-items: center; background: var(--yellow); border-radius: 50%; color: var(--on-yellow) !important; display: flex; font-size: 16px !important; font-weight: 800; height: 42px; justify-content: center; width: 42px; }
.approval-person > div { display: grid; gap: 2px; }
.approval-person small { color: var(--muted); font-size: 11px; }
.approval-person strong { color: var(--heading); font-size: 15px; }
.approval-editor label, .brand-tool-card label { color: var(--muted); display: grid; font-size: 11px; font-weight: 800; gap: 7px; letter-spacing: .02em; text-transform: uppercase; }
.approval-editor textarea, .brand-tool-card select, .brand-tool-card input, .brand-tool-card textarea { background: var(--panel); border: 1px solid var(--line-strong); border-radius: 9px; color: var(--ink); font-size: 14px; line-height: 1.5; padding: 10px 11px; text-transform: none; width: 100%; }
.approval-editor textarea, .brand-tool-card textarea { resize: vertical; }
.review-decision-actions { display: grid; gap: 8px; grid-template-columns: auto 1fr 1fr; }
.review-decision-actions button { border-radius: 9px; font-size: 12px; font-weight: 800; min-height: 44px; padding: 0 14px; }
.decision-save { background: var(--panel); border: 1px solid var(--line-strong); color: var(--blue); }
.decision-return { background: var(--coral-soft); border: 1px solid rgba(247,102,88,.3); color: var(--coral); }
.decision-approve { background: var(--green); border: 1px solid var(--green); color: #fff; }
.approval-help { color: var(--muted); font-size: 10px; line-height: 1.5; margin: -3px 0 0; }
.review-gates { display: grid; grid-template-columns: repeat(3, 1fr); }
.gate-editor { display: grid; gap: 13px; padding: 20px; }
.gate-editor + .gate-editor { border-left: 1px solid var(--line); }
.editor-heading { align-items: center; display: flex; gap: 10px; }
.gate-symbol { align-items: center; border-radius: 9px; display: flex; font-family: Georgia, serif; font-size: 17px; font-weight: 800; height: 35px; justify-content: center; width: 35px; }
.gate-legal { background: var(--coral-soft); color: var(--coral); }
.gate-analytics { background: var(--blue-soft); color: var(--blue); }
.gate-commerce { background: var(--mint-soft); color: var(--green); }
.editor-heading > div:last-child { display: grid; gap: 5px; }
.editor-heading > div:last-child > span { color: var(--heading); font-size: 11px; font-weight: 800; }
.editor-heading strong { font-weight: 400; }
.gate-editor label, .pixel-editor label { color: var(--muted); display: grid; font-size: 8px; font-weight: 800; gap: 6px; text-transform: uppercase; }
.gate-editor select, .gate-editor textarea, .pixel-editor select, .pixel-editor input { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; font-size: 10px; min-width: 0; padding: 9px 10px; text-transform: none; width: 100%; }
.gate-editor textarea { line-height: 1.45; resize: vertical; }
.editor-meta { align-items: center; display: flex; justify-content: space-between; }
.editor-meta > span { color: var(--muted-light); font-size: 8px; }
.editor-meta button, .pixel-editor > button { background: var(--navy); border: 0; border-radius: 7px; color: var(--on-brand); font-size: 9px; font-weight: 800; min-height: 32px; padding: 0 11px; }
.is-saving button[type="submit"], .is-saving [data-submit-idea], .is-saving select { opacity: .55; pointer-events: none; }

/* Pixel QA */
.qa-checklist { display: grid; gap: 10px; grid-template-columns: repeat(4, 1fr); }
.qa-checklist > div { align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: 11px; display: flex; gap: 10px; padding: 14px; }
.qa-checklist > div > span { align-items: center; background: var(--yellow); border-radius: 50%; color: var(--on-yellow); display: flex; flex: 0 0 auto; font-size: 8px; font-weight: 800; height: 25px; justify-content: center; width: 25px; }
.qa-checklist p { color: var(--muted); font-size: 9px; line-height: 1.45; margin: 0; }
.qa-checklist p strong { color: var(--heading); display: block; font-size: 10px; margin-bottom: 3px; }
.matrix-key { display: flex; gap: 12px; }
.matrix-key span { font-size: 8px; font-weight: 800; padding-left: 9px; position: relative; }
.matrix-key span::before { background: currentColor; border-radius: 50%; content: ""; height: 5px; left: 0; position: absolute; top: 2px; width: 5px; }
.pixel-table { min-width: 1050px; }
.pixel-table th:not(:first-child) { text-align: center; }
.pixel-table th span, .pixel-table th small { display: block; }
.pixel-table th small { font-size: 7px; font-weight: 600; margin-top: 2px; text-transform: none; }
.pixel-table td:not(:first-child) { text-align: center; }
.matrix-select { appearance: none; border: 0; border-radius: 999px; font-size: 8px; font-weight: 800; min-height: 29px; padding: 0 10px; text-align: center; width: 88px; }
.matrix-verified { background: var(--mint-soft); color: var(--green); }
.matrix-needs_qa { background: var(--yellow-soft); color: var(--warning-text); }
.matrix-issue { background: var(--coral-soft); color: var(--issue-text); }
.matrix-not_installed { background: var(--neutral-pill); color: var(--muted); }
.matrix-installed { background: var(--blue-soft); color: var(--blue); }
.readiness-score { color: var(--heading); font-size: 11px; }

/* Brand tracking */
.brand-explainer { display: grid; gap: 15px; grid-template-columns: minmax(280px, .75fr) minmax(0, 1.25fr); margin-bottom: 16px; }
.baseline-source, .notes-explainer { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.baseline-source { border-top: 5px solid var(--yellow); display: grid; gap: 7px; }
.baseline-source > span { color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.baseline-source strong { color: var(--heading); font-size: 21px; }
.baseline-source p, .notes-explainer p { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 0; }
.notes-explainer { align-items: flex-start; background: var(--yellow-soft); display: flex; gap: 14px; }
.notes-explainer strong { color: var(--heading); display: block; font-size: 16px; margin-bottom: 5px; }
.info-mark { align-items: center; background: var(--yellow); border-radius: 50%; color: var(--on-yellow); display: flex; flex: 0 0 auto; font-size: 14px; font-weight: 800; height: 34px; justify-content: center; width: 34px; }
.brand-tool-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.brand-tool-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 24px rgba(5,75,126,.035); display: grid; gap: 17px; padding: 20px; }
.brand-tool-card > header { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; padding-bottom: 15px; }
.brand-tool-title { align-items: center; display: flex; gap: 11px; }
.tool-mark { align-items: center; background: var(--blue-soft); border-radius: 10px; color: var(--blue); display: flex; font-size: 11px; font-weight: 800; height: 42px; justify-content: center; width: 42px; }
.brand-tool-title small { color: var(--muted); font-size: 11px; }
.brand-tool-title h2 { color: var(--heading); font-size: 17px; margin: 1px 0 0; }
.brand-fields { display: grid; gap: 13px; grid-template-columns: 1fr 1fr; }
.brand-note { grid-column: 1 / -1; }
.brand-tool-card > footer { align-items: center; display: flex; justify-content: space-between; }
.required-check { align-items: center; display: flex !important; flex-direction: row; font-size: 11px !important; gap: 8px !important; letter-spacing: 0 !important; text-transform: none !important; }
.required-check input { height: 17px; margin: 0; width: 17px; }
.brand-tool-card > footer button, .scan-button { background: var(--navy); border: 0; border-radius: 8px; color: var(--on-brand); font-size: 12px; font-weight: 800; min-height: 38px; padding: 0 14px; }
.brand-tool-card > footer button:hover, .scan-button:hover { background: var(--brand-hover); }
.storage-note { background: var(--surface); border-radius: 8px; color: var(--muted); font-size: 11px; line-height: 1.45; margin: 0; padding: 9px 11px; }
.scan-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; margin-top: 16px; overflow: hidden; }
.scan-explainer { align-items: center; background: var(--blue-soft); display: grid; gap: 5px 18px; grid-template-columns: minmax(190px, .45fr) minmax(0, 1fr) auto; padding: 16px 20px; }
.scan-explainer strong { color: var(--heading); font-size: 14px; }
.scan-explainer p { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 0; }
.scan-legend { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.scan-light { align-items: center; border-radius: 999px; display: inline-flex; font-size: 10px; font-weight: 800; gap: 6px; padding: 5px 8px; white-space: nowrap; }
.scan-light i { background: currentColor; border-radius: 50%; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent); display: block; height: 8px; width: 8px; }
.scan-detected { background: var(--mint-soft); color: var(--green); }
.scan-not_detected { background: var(--yellow-soft); color: var(--warning-text); }
.scan-server_check, .scan-unchecked { background: var(--neutral-pill); color: var(--muted); }
.scan-unreachable { background: var(--coral-soft); color: var(--issue-text); }
.scan-table { border-collapse: collapse; min-width: 1080px; width: 100%; }
.scan-table th { background: var(--table-header); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; height: 44px; padding: 0 14px; text-align: left; text-transform: uppercase; }
.scan-table td { border-bottom: 1px solid var(--line); height: 82px; padding: 10px 14px; }
.scan-table tr:last-child td { border-bottom: 0; }
.scan-table .page-name small { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signal-row { align-items: center; display: flex; gap: 9px; }
.signal-row > span { align-items: center; display: grid; gap: 4px; justify-items: center; }
.signal-row .scan-light { background: transparent; padding: 0; }
.signal-row small { color: var(--muted); font-size: 9px; }
.coverage-count { color: var(--heading); font-size: 13px; white-space: nowrap; }
.checked-time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.scan-button:disabled, .primary-action:disabled { cursor: wait; opacity: .55; }

/* Activity */
.secondary-action { background: var(--panel); border: 1px solid var(--line); color: var(--heading); }
.activity-layout { align-items: start; display: grid; gap: 14px; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .6fr); }
.activity-feed, .comment-summary { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.activity-feed .block-heading, .comment-summary .block-heading { border-bottom: 1px solid var(--line); margin: 0 -20px 4px; padding: 0 20px 17px; }
.block-heading > div h2 { color: var(--heading); font-size: 14px; margin-bottom: 3px; }
.block-heading > div span { color: var(--muted); font-size: 9px; }
.activity-feed > article { display: grid; gap: 12px; grid-template-columns: 35px 1fr; padding: 16px 0; position: relative; }
.activity-feed > article + article { border-top: 1px solid var(--line); }
.activity-avatar, .comment-avatar { align-items: center; background: var(--blue-soft); border-radius: 50%; color: var(--blue); display: flex; font-size: 8px; font-weight: 800; height: 34px; justify-content: center; width: 34px; }
.activity-gate { background: var(--yellow-soft); color: var(--warning-text); }
.activity-pixel { background: var(--mint-soft); color: var(--green); }
.activity-approval { background: var(--yellow-soft); color: var(--warning-text); }
.activity-brand, .activity-scan { background: var(--mint-soft); color: var(--green); }
.activity-analytics { background: var(--blue-soft); color: var(--blue); }
.activity-feed article p { color: var(--muted); font-size: 14px; line-height: 1.55; margin-bottom: 5px; }
.activity-feed article p strong { color: var(--heading); }
.activity-feed article p button { background: none; border: 0; color: var(--blue); font-size: inherit; font-weight: 800; padding: 0; }
.activity-feed article span { color: var(--muted-light); font-size: 11px; }
.activity-empty, .comments-empty { color: var(--muted); padding: 55px 20px; text-align: center; }
.activity-empty > span, .comments-empty > span { color: var(--yellow); font-size: 28px; }
.activity-empty h3, .comments-empty h4 { color: var(--heading); font-size: 14px; margin: 10px 0 7px; }
.activity-empty p, .comments-empty p { font-size: 10px; margin: 0; }
.comment-summary > button { align-items: center; background: none; border: 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; min-height: 59px; padding: 8px 0; width: 100%; }
.comment-summary > button:last-child { border-bottom: 0; }
.comment-summary > button > span { align-items: center; display: flex; gap: 9px; }
.comment-summary > button > span:last-child { color: var(--heading); font-size: 14px; font-weight: 800; }
.comment-summary > button > span:last-child small { color: var(--muted); display: block; font-size: 7px; font-weight: 600; }
.comment-summary b { color: var(--heading); font-size: 13px; }

/* Project dialog */
.project-dialog { background: transparent; border: 0; height: min(820px, calc(100vh - 46px)); max-height: none; max-width: 1160px; padding: 0; width: calc(100vw - 46px); }
.project-dialog::backdrop { background: rgba(3, 31, 51, .65); backdrop-filter: blur(3px); }
.dialog-layout { background: var(--panel); border-radius: 17px; display: grid; grid-template-columns: minmax(280px, .34fr) minmax(0, .66fr); height: 100%; overflow: hidden; }
.dialog-preview { color: var(--heading); display: flex; flex-direction: column; padding: 34px; position: relative; }
.accent-bg-yellow { background: var(--yellow-soft); }
.accent-bg-coral { background: var(--accent-coral); }
.accent-bg-aqua { background: var(--accent-aqua); }
.accent-bg-blue { background: var(--accent-blue); }
.accent-bg-green { background: var(--accent-green); }
.accent-bg-lavender { background: var(--accent-lavender); }
.dialog-number { color: rgba(5,75,126,.35); font-family: var(--display); font-size: 62px; font-weight: 800; letter-spacing: -.07em; }
.dialog-preview > div:nth-of-type(1) { margin-top: auto; }
.dialog-preview h2 { font-family: var(--display); font-size: clamp(35px, 4vw, 54px); font-weight: 800; letter-spacing: -.06em; line-height: .94; margin: 18px 0 12px; }
.dialog-preview > div > p { color: var(--muted); font-size: 12px; }
.preview-score { margin: 34px 0 22px; }
.preview-status { display: grid; gap: 9px; margin: 30px 0 22px; }
.preview-status > span:not(.status-chip) { color: var(--muted); font-size: 11px; font-weight: 800; margin-top: 5px; text-transform: uppercase; }
.preview-status .status-chip { justify-self: start; }
.preview-status > strong { color: var(--heading); font-size: 14px; }
.preview-score > div:first-child { align-items: baseline; display: flex; justify-content: space-between; }
.preview-score span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.preview-score strong { font-size: 20px; }
.dialog-preview > a { align-items: center; background: var(--navy); border-radius: 9px; color: var(--on-brand); display: flex; font-size: 11px; font-weight: 800; justify-content: space-between; min-height: 46px; padding: 0 15px; text-decoration: none; }
.dialog-inspector { display: flex; flex-direction: column; min-width: 0; }
.dialog-inspector > header { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; min-height: 67px; padding: 0 22px; }
.dialog-inspector nav { display: flex; gap: 3px; }
.dialog-inspector nav button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font-size: 12px; font-weight: 800; min-height: 67px; padding: 0 12px; }
.dialog-inspector nav button.active { border-color: var(--blue); color: var(--heading); }
.dialog-close, .dialog-close-mobile { align-items: center; background: var(--surface); border: 0; border-radius: 50%; color: var(--muted); display: flex; font-size: 20px; height: 33px; justify-content: center; width: 33px; }
.dialog-close-mobile { display: none; position: absolute; right: 18px; top: 18px; }
.dialog-panel { flex: 1; overflow-y: auto; padding: 29px 30px 42px; }
.detail-overview { display: grid; gap: 24px; }
.detail-label { color: var(--blue); display: block; font-size: 11px; font-weight: 800; letter-spacing: .08em; margin-bottom: 8px; text-transform: uppercase; }
.lead-detail { color: var(--heading); font-size: 18px; font-weight: 700; line-height: 1.55; margin-bottom: 0; }
.detail-columns { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.detail-columns > section { background: var(--surface); border-radius: 10px; padding: 17px; }
.detail-columns > section p { color: var(--muted); font-size: 14px; line-height: 1.55; margin-bottom: 0; }
.detail-columns .blocker-box { background: var(--coral-soft); }
.detail-columns .test-box { background: var(--mint-soft); }
.detail-people { border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; padding-top: 20px; }
.detail-people > div { display: grid; gap: 7px; }
.detail-people span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.detail-people strong { align-items: center; color: var(--heading); display: flex; font-size: 14px; gap: 7px; }
.detail-people strong i { align-items: center; background: var(--navy); border-radius: 50%; color: var(--on-brand); display: flex; font-size: 7px; font-style: normal; height: 27px; justify-content: center; width: 27px; }
.dialog-editors { display: grid; gap: 13px; }
.dialog-intro { margin-bottom: 6px; }
.dialog-intro h3 { color: var(--heading); font-size: 20px; letter-spacing: -.02em; margin-bottom: 7px; }
.dialog-intro p { color: var(--muted); font-size: 14px; line-height: 1.55; margin-bottom: 0; }
.dialog-editors .approval-editor { border: 1px solid var(--line); border-radius: 11px; }
.tracking-detail { display: grid; gap: 18px; }
.tracking-summary { align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; display: flex; justify-content: space-between; padding: 17px; }
.tracking-summary > div { align-items: center; display: grid; gap: 3px 10px; grid-template-columns: auto 1fr; }
.tracking-summary .scan-light { grid-row: 1 / 3; }
.tracking-summary strong { color: var(--heading); font-size: 14px; }
.tracking-summary span:last-child { color: var(--muted); font-size: 11px; }
.tracking-results { display: grid; gap: 9px; }
.tracking-results article { align-items: center; border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 14px; grid-template-columns: minmax(180px, .65fr) 1fr; padding: 14px; }
.tracking-results article > div { align-items: center; display: flex; gap: 10px; }
.tracking-results article > div > span:last-child { display: grid; }
.tracking-results article strong { color: var(--heading); font-size: 13px; }
.tracking-results article small { color: var(--muted); font-size: 11px; }
.tracking-results article p { color: var(--muted); font-size: 12px; line-height: 1.45; margin: 0; }
.text-action { background: none; border: 0; color: var(--blue); font-size: 13px; font-weight: 800; justify-self: start; padding: 4px 0; }
.dialog-editors .gate-editor { border: 1px solid var(--line); border-radius: 11px; }
.dialog-editors .gate-editor + .gate-editor { border-left: 1px solid var(--line); }
.pixel-editor { align-items: end; border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 12px; grid-template-columns: minmax(160px, .8fr) 130px minmax(200px, 1fr) auto; padding: 13px; }
.pixel-name { align-items: center; display: flex; gap: 10px; }
.pixel-name > span { align-items: center; background: var(--blue-soft); border-radius: 8px; color: var(--blue); display: flex; font-size: 8px; font-weight: 800; height: 34px; justify-content: center; width: 38px; }
.pixel-name > div { display: grid; gap: 4px; }
.pixel-name strong { color: var(--heading); font-size: 10px; }
.pixel-name small { color: var(--muted-light); font-size: 7px; }
.comments-panel { display: grid; gap: 20px; }
.comment-form { background: var(--yellow-soft); border: 1px solid var(--soft-yellow-border); border-radius: 11px; display: grid; padding: 16px; }
.comment-form > label { color: var(--heading); font-size: 9px; font-weight: 800; margin-bottom: 8px; text-transform: uppercase; }
.comment-form textarea { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; font-size: 14px; line-height: 1.5; padding: 11px; resize: vertical; }
.comment-form > div { align-items: center; display: flex; justify-content: space-between; margin-top: 10px; }
.comment-form > div span { color: var(--muted); font-size: 9px; }
.comment-form > div button { background: var(--navy); border: 0; border-radius: 8px; color: var(--on-brand); font-size: 9px; font-weight: 800; min-height: 35px; padding: 0 13px; }
.comment-list { display: grid; }
.comment-list > article { display: grid; gap: 11px; grid-template-columns: 34px 1fr; padding: 15px 0; }
.comment-list > article + article { border-top: 1px solid var(--line); }
.comment-list article header { align-items: center; display: flex; justify-content: space-between; }
.comment-list article header strong { color: var(--heading); font-size: 10px; }
.comment-list article header span { color: var(--muted-light); font-size: 8px; }
.comment-list article p { color: var(--ink); font-size: 14px; line-height: 1.6; margin: 7px 0 0; white-space: pre-wrap; }

/* Loading, error, toast */
.loading-state, .error-state { align-items: center; color: var(--muted); display: flex; flex-direction: column; justify-content: center; min-height: 60vh; text-align: center; }
.loading-logo { color: var(--heading); font-family: var(--display); font-size: 42px; font-weight: 800; letter-spacing: -.07em; }
.loading-state i { animation: load 1s linear infinite; border: 3px solid var(--line); border-radius: 50%; border-top-color: var(--yellow); height: 25px; margin: 18px 0 12px; width: 25px; }
.loading-state p, .error-state p { font-size: 11px; }
.error-state > span { align-items: center; background: var(--coral-soft); border-radius: 50%; color: var(--coral); display: flex; font-size: 22px; height: 50px; justify-content: center; width: 50px; }
.error-state h2 { color: var(--heading); margin: 18px 0 8px; }
.error-state button { background: var(--navy); border: 0; border-radius: 8px; color: var(--on-brand); font-size: 10px; font-weight: 800; min-height: 38px; padding: 0 14px; }
.toast { background: var(--navy); border-radius: 9px; bottom: 22px; box-shadow: var(--shadow); color: var(--on-brand); font-size: 11px; font-weight: 700; left: 50%; opacity: 0; padding: 13px 18px; pointer-events: none; position: fixed; transform: translate(-50%, 18px); transition: 180ms ease; z-index: 100; }
.toast[data-type="error"] { background: #a53b32; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@keyframes load { to { transform: rotate(360deg); } }

@media (max-width: 1220px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .review-gates { grid-template-columns: 1fr; }
  .gate-editor + .gate-editor { border-left: 0; border-top: 1px solid var(--line); }
  .qa-checklist { grid-template-columns: repeat(2, 1fr); }
  .pixel-editor { grid-template-columns: 1fr 120px; }
  .pixel-editor label:nth-of-type(2) { grid-column: 1 / -1; }
  .review-projects { grid-template-columns: 1fr; }
  .scan-explainer { grid-template-columns: 1fr; }
  .scan-legend { justify-content: flex-start; }
  .analytics-metric-grid { grid-template-columns: repeat(2, 1fr); }
  .analytics-connection { grid-template-columns: minmax(260px, 1.4fr) 1fr 1fr; }
  .analytics-refresh { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 940px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-visual { min-height: 650px; }
  .access-card { margin-inline: auto; padding: 65px 25px; width: min(100%, 560px); }
  .workspace-shell { grid-template-columns: 1fr; }
  .sidebar { box-shadow: 20px 0 50px rgba(3,57,95,.22); left: -260px; position: fixed; transition: left 180ms ease; width: 242px; }
  .nav-open .sidebar { left: 0; }
  .nav-open::after { background: rgba(3,31,51,.42); content: ""; inset: 0; position: fixed; z-index: 35; }
  .mobile-menu { display: block; }
  .program-strip { grid-template-columns: 1fr; }
  .activity-layout { grid-template-columns: 1fr; }
  .dialog-layout { grid-template-columns: 260px minmax(0,1fr); }
  .brand-tool-grid { grid-template-columns: 1fr; }
  .analytics-mode { grid-template-columns: 1fr; }
  .analytics-connection { grid-template-columns: 1fr 1fr; }
  .analytics-connection-main { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .analytics-coming-soon { min-height: 0; padding: 24px 18px; }
  .analytics-coming-copy .section-kicker { margin-top: 22px; }
  .analytics-coming-copy h2 { font-size: 34px; }
  .analytics-coming-copy p { font-size: 14px; }
  .analytics-coming-grid { grid-template-columns: 1fr; margin-top: 25px; }
  .analytics-coming-grid article { min-height: 0; }
  .analytics-coming-soon footer { margin-top: 25px; }
  .analytics-coming-detail { min-height: 250px; padding: 24px 18px; }
  .analytics-connection { gap: 15px; grid-template-columns: 1fr; padding: 16px; }
  .analytics-connection-main, .analytics-refresh { grid-column: auto; }
  .analytics-live, .analytics-freshness { background: var(--surface); border-radius: 9px; padding: 12px; }
  .analytics-refresh { min-height: 48px; }
}

@media (max-width: 720px) {
  .topbar { padding-inline: 15px; }
  .breadcrumb { display: none; }
  .topbar > div:first-child strong::before { display: none; }
  .actor-control span { display: none; }
  .actor-control input { width: 95px; }
  .workspace-content { padding-inline: 15px; }
  .view-header { align-items: flex-start; flex-direction: column; gap: 20px; }
  .view-header h1 { font-size: 38px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .review-preview-list { grid-template-columns: 1fr; }
  .panel-toolbar { align-items: flex-start; flex-direction: column; gap: 12px; }
  .page-filters { width: 100%; }
  .search-field { flex: 1; }
  .search-field input { width: 100%; }
  .review-legend { align-items: flex-start; flex-wrap: wrap; }
  .qa-checklist { grid-template-columns: 1fr; }
  .project-dialog { height: calc(100vh - 20px); width: calc(100vw - 20px); }
  .dialog-layout { display: flex; flex-direction: column; overflow-y: auto; }
  .dialog-preview { min-height: 315px; padding: 25px; }
  .dialog-preview > div:nth-of-type(1) { margin-top: 32px; }
  .dialog-preview h2 { font-size: 38px; }
  .dialog-number { font-size: 42px; }
  .dialog-preview > a, .preview-score { max-width: 360px; }
  .dialog-inspector { min-height: 620px; overflow: visible; }
  .dialog-inspector > header { overflow-x: auto; padding-inline: 8px; }
  .dialog-inspector nav { min-width: max-content; }
  .dialog-close { display: none; }
  .dialog-close-mobile { display: flex; }
  .dialog-panel { overflow: visible; padding: 24px 18px 40px; }
  .detail-columns { grid-template-columns: 1fr; }
  .pixel-editor { grid-template-columns: 1fr; }
  .pixel-editor label:nth-of-type(2) { grid-column: auto; }
  .brand-explainer { grid-template-columns: 1fr; }
  .brand-fields { grid-template-columns: 1fr; }
  .brand-note { grid-column: auto; }
  .brand-tool-card > footer { align-items: flex-start; flex-direction: column; gap: 13px; }
  .tracking-summary { align-items: flex-start; flex-direction: column; gap: 14px; }
  .tracking-results article { grid-template-columns: 1fr; }
  .analytics-detail-summary { grid-template-columns: repeat(2, 1fr); }
  .analytics-form-grid { grid-template-columns: 1fr 1fr; }
  .analytics-note { grid-column: 1 / -1; }
  .analytics-window-note { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 480px) {
  .login-header { min-height: 65px; }
  .login-header .hiya-logo { font-size: 30px; }
  .login-visual { min-height: 580px; padding: 58px 22px; }
  .login-copy h1 { font-size: 55px; }
  .login-copy p { font-size: 15px; }
  .mini-bottle { opacity: .45; }
  .bottle-yellow { right: 30px; top: 80px; }
  .bottle-aqua { bottom: 50px; right: 50px; }
  .bottle-coral { bottom: 175px; right: 10px; }
  .share-button { font-size: 0; padding: 0 12px; }
  .share-button::after { content: "Share"; font-size: 11px; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 120px; }
  .page-filters { align-items: stretch; flex-direction: column; }
  .access-proof { flex-wrap: wrap; }
  .detail-people { gap: 18px; grid-template-columns: 1fr; }
  .analytics-metric-grid { grid-template-columns: 1fr; }
  .analytics-form-grid { grid-template-columns: 1fr; }
  .analytics-note { grid-column: auto; }
  .analytics-form > footer { align-items: flex-start; flex-direction: column; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Product workspace upgrade */
[hidden] { display: none !important; }
.portfolio-metrics { margin-bottom: 14px; }
.journey-strip { align-items: center; background: var(--navy); border-radius: 14px; color: var(--on-brand); display: flex; justify-content: space-between; margin-bottom: 14px; overflow-x: auto; padding: 15px 20px; }
.journey-strip div { align-items: center; display: flex; flex: 0 0 auto; gap: 8px; }
.journey-strip div span { align-items: center; background: var(--yellow); border-radius: 50%; color: var(--on-yellow); display: flex; font-size: 10px; font-weight: 900; height: 24px; justify-content: center; width: 24px; }
.journey-strip div strong { font-size: 11px; white-space: nowrap; }
.journey-strip > i { color: rgba(255,255,255,.35); font-style: normal; margin: 0 11px; }
.control-sheet { margin-top: 0; }
.control-sheet-table { min-width: 1880px; }
.control-sheet-table td { height: 104px; vertical-align: top; }
.control-sheet-table th:first-child, .control-sheet-table td:first-child { left: 0; position: sticky; z-index: 3; }
.control-sheet-table th:first-child { background: var(--table-header); }
.control-sheet-table td:first-child { background: var(--panel); }
.control-sheet-table tr:hover td:first-child { background: var(--row-hover); }
.product-cell { color: var(--heading); display: block; font-size: 12px; font-weight: 700; max-width: 155px; }
.wide-cell { display: grid; gap: 6px; max-width: 290px; min-width: 240px; }
.wide-cell strong { color: var(--ink); font-size: 12px; line-height: 1.45; }
.wide-cell small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.long-cell { color: var(--muted); display: block; font-size: 11px; line-height: 1.45; max-width: 240px; min-width: 190px; }
.live-link { align-items: center; background: var(--blue-soft); border-radius: 8px; color: var(--blue); display: inline-flex; font-size: 11px; font-weight: 800; gap: 7px; min-height: 34px; padding: 0 9px; text-decoration: none; white-space: nowrap; }
.live-link:hover { background: var(--navy); color: var(--on-brand); }
.live-link svg { height: 15px; width: 15px; }
.row-actions { align-items: center; display: flex; gap: 6px; }
.preview-button { background: var(--panel); border: 1px solid var(--line-strong); border-radius: 8px; color: var(--heading); font-size: 10px; font-weight: 800; min-height: 34px; padding: 0 11px; white-space: nowrap; }
.preview-button:hover { background: var(--blue-soft); border-color: var(--blue); }
.tracking-mini { color: var(--muted-light); display: block; font-size: 9px; margin-top: 7px; white-space: nowrap; }
.tracking-table-status { align-items: center; display: flex; gap: 8px; min-width: 136px; }
.tracking-table-status > .scan-light { background: transparent; flex: 0 0 auto; padding: 0; }
.tracking-table-status > span:last-child { display: grid; gap: 2px; }
.tracking-table-status strong { color: var(--heading); font-size: 11px; white-space: nowrap; }
.tracking-table-status small { color: var(--muted); font-size: 9px; white-space: nowrap; }
.empty-row { color: var(--muted); padding: 50px !important; text-align: center; }

/* Ideas */
.idea-onboarding { display: grid; gap: 14px; grid-template-columns: minmax(0, 1.4fr) minmax(270px, .6fr); margin-bottom: 14px; }
.idea-chat-preview, .idea-output, .idea-inbox { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.idea-chat-preview { align-items: flex-start; background: var(--yellow-soft); display: flex; gap: 15px; padding: 26px; }
.bot-avatar, .chat-message.bot > span { align-items: center; background: var(--navy); border-radius: 50%; color: var(--yellow); display: flex; flex: 0 0 auto; font-size: 17px; font-weight: 900; height: 38px; justify-content: center; letter-spacing: -.08em; width: 38px; }
.idea-chat-preview strong { color: var(--heading); display: block; font-size: 19px; margin-bottom: 7px; }
.idea-chat-preview p { color: var(--muted); margin-bottom: 15px; }
.idea-chat-preview button, .empty-ideas button { background: var(--navy); border: 0; border-radius: 8px; color: var(--on-brand); font-size: 11px; font-weight: 800; min-height: 38px; padding: 0 14px; }
.idea-output { padding: 22px; }
.idea-output > span { color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.idea-output > strong { color: var(--heading); display: block; font-size: 18px; margin: 5px 0 10px; }
.idea-output ul { color: var(--muted); font-size: 11px; margin: 0; padding-left: 18px; }
.idea-inbox { padding: 21px; }
.idea-inbox > .block-heading { border-bottom: 1px solid var(--line); margin: -2px -21px 20px; padding: 0 21px 18px; }
.idea-grid { display: grid; gap: 13px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.idea-grid article { border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; min-width: 0; padding: 17px; }
.idea-grid article header { align-items: center; display: flex; justify-content: space-between; }
.idea-grid time { color: var(--muted-light); font-size: 9px; }
.idea-grid h3 { color: var(--heading); font-size: 18px; line-height: 1.2; margin: 16px 0 8px; }
.idea-grid article > p { color: var(--muted); font-size: 12px; line-height: 1.55; }
.idea-grid dl { display: grid; gap: 10px; margin: 5px 0 18px; }
.idea-grid dl div { background: var(--surface); border-radius: 8px; padding: 9px; }
.idea-grid dt { color: var(--blue); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.idea-grid dd { color: var(--ink); font-size: 11px; line-height: 1.45; margin: 3px 0 0; }
.idea-grid footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; margin-top: auto; padding-top: 11px; }
.empty-ideas { color: var(--muted); padding: 65px 20px; text-align: center; }
.empty-ideas > span { color: var(--yellow); font-size: 30px; }
.empty-ideas h3 { color: var(--heading); margin: 8px 0; }
.empty-ideas p { font-size: 11px; }

/* Brand setup */
.brand-readonly-note { align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 13px; display: flex; justify-content: space-between; margin-bottom: 16px; padding: 16px 18px; }
.brand-readonly-note > div { align-items: center; display: flex; gap: 10px; }
.brand-readonly-note > div > span:last-child { display: grid; gap: 3px; }
.brand-readonly-note strong { color: var(--heading); font-size: 12px; }
.brand-readonly-note small { color: var(--muted); font-size: 10px; }
.brand-readonly-note > strong { color: var(--blue); font-size: 10px; text-transform: uppercase; }
.brand-decision-summary { display: grid; gap: 13px; grid-template-columns: 1fr 1fr 1.25fr; margin-bottom: 30px; }
.brand-decision-summary > div { background: var(--panel); border: 1px solid var(--line); border-radius: 13px; padding: 18px; }
.brand-decision-summary > div:last-child { background: var(--blue-soft); }
.brand-decision-summary span { color: var(--blue); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.brand-decision-summary strong { color: var(--heading); display: block; font-size: 17px; margin: 5px 0; }
.brand-decision-summary p { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 0; }
.brand-section-heading { align-items: end; display: flex; justify-content: space-between; margin: 27px 0 11px; }
.brand-section-heading h2 { color: var(--heading); font-size: 22px; margin: 5px 0 0; }
.brand-section-heading > span { color: var(--muted); font-size: 10px; }
.brand-tool-grid { display: grid; gap: 13px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.brand-tool-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.brand-tool-card.core-tool { border-top: 4px solid var(--mint); }
.brand-tool-card.decision-tool { border-top: 4px solid var(--yellow); }
.brand-tool-card > header { align-items: flex-start; display: grid; gap: 12px; grid-template-columns: 42px 1fr auto; padding: 18px; }
.brand-tool-icon { align-items: center; background: var(--blue-soft); border-radius: 9px; color: var(--blue); display: flex; font-size: 9px; font-weight: 900; height: 40px; justify-content: center; width: 40px; }
.brand-tool-card header > div:nth-child(2) > span { color: var(--blue); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.brand-tool-card h3 { color: var(--heading); font-size: 16px; margin: 3px 0; }
.brand-tool-card header p { color: var(--muted); font-size: 10px; margin: 0; }
.brand-coverage-status { align-items: center; display: flex; gap: 7px; padding-top: 3px; white-space: nowrap; }
.brand-coverage-status .scan-light { background: transparent; padding: 0; }
.brand-coverage-status strong { color: var(--heading); font-size: 10px; }
.brand-page-coverage { border-top: 1px solid var(--line); display: grid; gap: 13px; padding: 15px 18px 17px; }
.brand-page-list { display: grid; gap: 8px; }
.brand-page-list > span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.brand-page-list > div { display: flex; flex-wrap: wrap; gap: 7px; }
.brand-page-list button { align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; color: var(--ink); display: inline-flex; font-size: 10px; font-weight: 700; gap: 6px; min-height: 31px; padding: 0 10px; }
.brand-page-list button:hover { border-color: var(--blue); }
.brand-page-list button i { border-radius: 50%; height: 7px; width: 7px; }
.brand-pages-live button i { background: var(--mint); }
.brand-pages-missing button i { background: var(--coral); }
.brand-pages-pending button i { background: var(--yellow); }
.brand-page-list small { color: var(--muted); font-size: 10px; padding: 4px 0; }
.brand-fields { border-top: 1px solid var(--line); display: grid; gap: 11px; grid-template-columns: repeat(3, 1fr); padding: 16px 18px; }
.brand-fields label, .analytics-form label { color: var(--muted); display: grid; font-size: 9px; font-weight: 800; gap: 6px; text-transform: uppercase; }
.brand-fields input, .brand-fields select, .brand-fields textarea, .analytics-form input, .analytics-form select, .analytics-form textarea { background: var(--panel); border: 1px solid var(--line-strong); border-radius: 8px; font-size: 12px; min-height: 40px; padding: 9px; text-transform: none; width: 100%; }
.brand-note { grid-column: 1 / -1; }
.brand-tool-card > footer { align-items: center; background: var(--surface); border-top: 1px solid var(--line); display: flex; justify-content: space-between; padding: 12px 18px; }
.brand-tool-card footer button, .approval-editor > button, .analytics-form footer button { background: var(--navy); border: 0; border-radius: 8px; color: var(--on-brand); font-size: 10px; font-weight: 800; min-height: 36px; padding: 0 13px; }
.core-badge { color: var(--green); font-size: 10px; font-weight: 800; }
.standard-toggle { align-items: center; color: var(--heading); display: flex; font-size: 10px; font-weight: 800; gap: 7px; }

/* Full page review dialog */
.project-dialog { background: transparent; border: 0; height: min(900px, calc(100vh - 28px)); max-height: none; max-width: 1480px; padding: 0; width: calc(100vw - 28px); }
.dialog-shell { background: var(--panel); border-radius: 16px; display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.dialog-project-header { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; min-height: 76px; padding: 10px 20px; }
.dialog-project-header > div { align-items: center; display: flex; gap: 11px; }
.dialog-project-header h2 { color: var(--heading); font-size: 18px; margin: 1px 0 0; }
.dialog-project-header > div:first-child > div > span { color: var(--muted); font-size: 10px; }
.dialog-tabs { border-bottom: 1px solid var(--line); display: flex; gap: 2px; min-height: 50px; overflow-x: auto; padding: 0 18px; }
.dialog-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font-size: 11px; font-weight: 800; padding: 0 13px; white-space: nowrap; }
.dialog-tabs button.active { border-color: var(--blue); color: var(--heading); }
.dialog-body { flex: 1; min-height: 0; overflow-y: auto; padding: 24px; }
.preview-mode .dialog-body { background: var(--preview-shell); overflow: hidden; padding: 14px; }
.preview-workspace { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.preview-toolbar { align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; display: flex; justify-content: space-between; margin-bottom: 10px; min-height: 48px; padding: 6px 8px; }
.preview-toolbar > div { align-items: center; display: flex; gap: 8px; }
.preview-toolbar button { background: transparent; border: 1px solid transparent; border-radius: 7px; color: var(--muted); font-size: 10px; font-weight: 800; min-height: 34px; padding: 0 10px; }
.preview-toolbar button.active { background: var(--navy); color: var(--on-brand); }
.preview-toolbar button:disabled { cursor: not-allowed; opacity: .45; }
.preview-toolbar > div:last-child > span { color: var(--muted); font-size: 9px; }
.preview-size-badge { background: var(--yellow-soft); border: 1px solid rgba(253,226,0,.8); border-radius: 999px; color: var(--heading) !important; font-size: 9px !important; font-weight: 800; padding: 6px 9px; white-space: nowrap; }
.preview-review-grid { display: grid; flex: 1; gap: 10px; grid-template-columns: minmax(0, 1fr) 290px; min-height: 0; }
.preview-review-grid.mobile-view { align-items: start; overflow-y: auto; }
.browser-canvas { align-items: center; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.browser-canvas.mobile { --mobile-preview-width: 402px; --mobile-preview-height: 874px; height: auto; margin: 0 auto; overflow: visible; width: min(var(--mobile-preview-width), 100%); }
.browser-chrome { align-items: center; background: var(--browser-chrome); border-radius: 10px 10px 0 0; display: flex; flex: 0 0 31px; gap: 5px; padding: 0 10px; width: 100%; }
.browser-chrome i { background: var(--browser-dot); border-radius: 50%; height: 6px; width: 6px; }
.browser-chrome span { background: var(--address-bar); border-radius: 5px; color: var(--muted); display: block; font-size: 8px; margin-left: 7px; overflow: hidden; padding: 3px 8px; text-overflow: ellipsis; white-space: nowrap; width: min(520px, 60%); }
.page-frame { background: var(--preview-bg); border: 1px solid var(--frame-border); flex: 1; min-height: 0; overflow: hidden; position: relative; width: 100%; }
.browser-canvas.mobile .page-frame { flex: 0 0 var(--mobile-preview-height); height: var(--mobile-preview-height); }
.page-frame iframe { border: 0; height: 100%; width: 100%; }
.pin-capture { background: rgba(253,226,0,.06); border: 2px dashed rgba(5,75,126,.32); cursor: crosshair; inset: 0; position: absolute; width: 100%; z-index: 10; }
.comment-pin { align-items: center; background: var(--yellow); border: 2px solid var(--navy); border-radius: 50% 50% 50% 5px; box-shadow: 0 4px 12px rgba(3,57,95,.25); color: var(--on-yellow); display: flex; font-size: 10px; font-weight: 900; height: 27px; justify-content: center; padding: 0; position: absolute; transform: translate(-50%, -50%) rotate(-45deg); width: 27px; z-index: 12; }
.comment-pin::first-letter { transform: rotate(45deg); }
.comment-pin.active { background: var(--coral); color: var(--on-brand); }
.pin-composer { background: var(--panel); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 16px 40px rgba(3,57,95,.25); padding: 10px; position: absolute; transform: translate(-12px, 13px); width: 250px; z-index: 20; }
.pin-composer header { align-items: center; display: flex; justify-content: space-between; margin-bottom: 7px; }
.pin-composer header strong { color: var(--heading); font-size: 10px; }
.pin-composer header button { background: none; border: 0; color: var(--muted); font-size: 17px; }
.pin-composer textarea { border: 1px solid var(--line); border-radius: 7px; font-size: 11px; padding: 8px; resize: none; width: 100%; }
.pin-composer > button { background: var(--navy); border: 0; border-radius: 7px; color: var(--on-brand); font-size: 9px; font-weight: 800; min-height: 32px; width: 100%; }
.preview-comments { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; min-height: 0; overflow-y: auto; }
.preview-comments > header { border-bottom: 1px solid var(--line); padding: 14px; }
.preview-comments > header strong { color: var(--heading); display: block; font-size: 12px; }
.preview-comments > header span { color: var(--muted); font-size: 9px; }
.preview-comment-list { padding: 0 14px; }
.preview-comment-list article { cursor: pointer; }
.preview-comment-list article.active { background: var(--yellow-soft); margin-inline: -14px; padding-inline: 14px; }
.preview-comment-list .comment-avatar { background: var(--yellow); color: var(--on-yellow); }
.preview-comment-list article small { color: var(--muted-light); display: block; font-size: 8px; margin-top: 5px; text-transform: capitalize; }
.preview-help { color: var(--muted); font-size: 9px; margin: 8px 2px 0; }
.protected-preview { align-items: center; background: var(--yellow-soft); display: flex; flex-direction: column; height: 100%; justify-content: center; padding: 30px; text-align: center; }
.protected-preview > span { align-items: center; background: var(--yellow); border-radius: 50%; color: var(--on-yellow); display: flex; font-size: 22px; height: 52px; justify-content: center; width: 52px; }
.protected-preview h3 { color: var(--heading); margin: 17px 0 6px; }
.protected-preview p { color: var(--muted); font-size: 11px; max-width: 400px; }
.dialog-body > .detail-overview, .dialog-body > .dialog-editors, .dialog-body > .tracking-detail, .dialog-body > .analytics-detail, .dialog-body > .comments-panel { margin: 0 auto; max-width: 920px; }
.gate-summary { display: grid; gap: 11px; grid-template-columns: repeat(2, 1fr); }
.gate-summary > div { border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.gate-summary > div > span:first-child { color: var(--heading); display: block; font-size: 10px; font-weight: 800; margin-bottom: 7px; text-transform: uppercase; }
.gate-summary p { color: var(--muted); font-size: 10px; margin: 9px 0 0; }

/* Idea conversation */
.idea-dialog { background: transparent; border: 0; max-height: calc(100vh - 32px); max-width: 760px; padding: 0; width: calc(100vw - 32px); }
.idea-dialog::backdrop { backdrop-filter: blur(3px); background: rgba(3,31,51,.65); }
.idea-dialog-shell { background: var(--panel); border-radius: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
.idea-dialog-shell > header { align-items: center; display: flex; justify-content: space-between; padding: 22px 24px 16px; }
.idea-dialog-shell h2 { color: var(--heading); font-size: 26px; margin: 6px 0 0; }
.idea-dialog-shell > header button { align-items: center; background: var(--surface); border: 0; border-radius: 50%; color: var(--muted); display: flex; font-size: 20px; height: 34px; justify-content: center; width: 34px; }
.idea-progress { background: var(--line); height: 5px; }
.idea-progress i { background: var(--yellow); display: block; height: 100%; transition: width 180ms ease; }
.idea-conversation { background: var(--conversation-bg); display: grid; gap: 13px; min-height: 560px; padding: 22px 24px 28px; }
.chat-pair { display: grid; gap: 11px; }
.chat-message { display: flex; gap: 10px; max-width: 86%; }
.chat-message p { margin: 0; }
.chat-message.bot > p, .chat-message.bot > div { background: var(--panel); border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; color: var(--ink); font-size: 13px; line-height: 1.5; padding: 12px 14px; }
.chat-message.bot > div strong { color: var(--heading); display: block; margin-bottom: 4px; }
.chat-message.bot > div p { color: var(--muted); font-size: 11px; }
.chat-message.person { justify-self: end; }
.chat-message.person p { background: var(--navy); border-radius: 14px 4px 14px 14px; color: var(--on-brand); font-size: 13px; line-height: 1.5; padding: 12px 14px; }
.chat-message.current { margin-top: 5px; }
.idea-answer-form { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-left: 48px; padding: 10px; }
.idea-answer-form textarea { border: 0; font-size: 14px; line-height: 1.5; outline: 0; resize: vertical; width: 100%; }
.idea-answer-form footer, .idea-final-actions { align-items: center; border-top: 1px solid var(--line); display: flex; justify-content: space-between; padding-top: 9px; }
.idea-answer-form footer > span { color: var(--muted-light); font-size: 9px; }
.idea-answer-form footer > div { display: flex; gap: 7px; }
.idea-answer-form footer button[type="submit"] { background: var(--navy); border: 0; border-radius: 8px; color: var(--on-brand); font-size: 10px; font-weight: 800; min-height: 36px; padding: 0 14px; }
.idea-answer-form .secondary-action, .idea-final-actions .secondary-action { min-height: 36px; }
.brief-recap { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 0; margin-left: 48px; overflow: hidden; }
.brief-recap > div { display: grid; gap: 10px; grid-template-columns: 100px 1fr; padding: 12px 14px; }
.brief-recap > div + div { border-top: 1px solid var(--line); }
.brief-recap span { color: var(--blue); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.brief-recap p { color: var(--ink); font-size: 12px; margin: 0; }
.idea-submit-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 6px; margin-left: 48px; padding: 13px 14px; }
.idea-submit-card label { color: var(--heading); font-size: 10px; font-weight: 800; }
.idea-submit-card input { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; color: var(--heading); font-size: 14px; font-weight: 700; min-height: 44px; outline: 0; padding: 0 11px; width: 100%; }
.idea-submit-card input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.idea-submit-card input[aria-invalid="true"] { border-color: var(--coral); box-shadow: 0 0 0 3px var(--coral-soft); }
.idea-submit-card small { color: var(--muted); font-size: 10px; }
.idea-submit-card [role="alert"] { color: var(--issue-text); font-size: 10px; font-weight: 800; }
.idea-submit-card [role="status"] { color: var(--blue); font-size: 10px; font-weight: 800; }
.idea-final-actions { border: 0; margin-left: 48px; justify-content: flex-end; gap: 8px; }

@media (max-width: 1120px) {
  .idea-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand-decision-summary { grid-template-columns: 1fr 1fr; }
  .brand-decision-summary > div:last-child { grid-column: 1 / -1; }
  .preview-review-grid { grid-template-columns: minmax(0, 1fr) 250px; }
}

@media (max-width: 820px) {
  .journey-strip { justify-content: flex-start; }
  .idea-onboarding, .brand-tool-grid { grid-template-columns: 1fr; }
  .brand-readonly-note { align-items: flex-start; flex-direction: column; gap: 10px; }
  .idea-grid { grid-template-columns: 1fr; }
  .brand-decision-summary { grid-template-columns: 1fr; }
  .brand-decision-summary > div:last-child { grid-column: auto; }
  .brand-fields { grid-template-columns: 1fr; }
  .brand-note { grid-column: auto; }
  .project-dialog { height: calc(100vh - 12px); width: calc(100vw - 12px); }
  .dialog-project-header { align-items: flex-start; gap: 9px; padding: 11px; }
  .dialog-project-header .stage-pill, .dialog-project-header .live-link span { display: none; }
  .dialog-tabs { padding: 0 6px; }
  .dialog-body { padding: 18px 13px; }
  .preview-mode .dialog-body { overflow-y: auto; }
  .preview-review-grid { display: flex; flex-direction: column; min-height: 720px; }
  .browser-canvas { flex: 0 0 600px; }
  .browser-canvas.mobile { flex-basis: 650px; }
  .preview-comments { flex: 0 0 auto; max-height: 380px; }
  .preview-toolbar { align-items: flex-start; flex-direction: column; }
  .preview-toolbar > div:last-child > span { display: none; }
  .gate-summary { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .idea-dialog { max-height: 100vh; width: 100vw; }
  .idea-dialog-shell { border-radius: 0; max-height: 100vh; }
  .idea-conversation { padding-inline: 14px; }
  .chat-message { max-width: 94%; }
  .idea-answer-form, .brief-recap, .idea-submit-card, .idea-final-actions { margin-left: 0; }
  .brief-recap > div { grid-template-columns: 1fr; }
  .brand-tool-card > header { grid-template-columns: 42px 1fr; }
  .brand-tool-card > header > .status-chip { grid-column: 1 / -1; justify-self: start; }
  .brand-coverage-status { grid-column: 1 / -1; justify-self: start; }
  .brand-tool-card > footer { align-items: flex-start; flex-direction: column; gap: 11px; }
}

@media (max-width: 820px) {
  .review-summary { grid-template-columns: 1fr; }
  .review-summary article { grid-template-columns: 1fr auto; }
  .review-summary article small { grid-column: 1 / -1; }
  .review-card > header { align-items: flex-start; gap: 12px; }
  .review-card-status { flex: 0 0 auto; }
  .review-preview-step { align-items: stretch; flex-direction: column; }
  .review-preview-actions { display: grid; grid-template-columns: 1fr auto; }
  .review-open-preview { justify-content: center; }
  .review-decision-actions { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .review-card > header { flex-direction: column; }
  .review-card-status { align-items: center; display: flex; justify-items: start; }
  .review-preview-actions { grid-template-columns: 1fr; }
  .review-preview-actions .live-link { justify-content: center; }
  .review-decision-step { grid-template-columns: 1fr; }
  .review-decision-step > .review-step-number { margin-bottom: -3px; }
  .approval-person { grid-template-columns: 42px 1fr; }
  .approval-person .status-chip { grid-column: 1 / -1; justify-self: start; }
}

/* Mobile workspace */
.mobile-tabbar, .mobile-page-list, .mobile-filter-bar, .mobile-analytics-list, .sidebar-close { display: none; }

@media (max-width: 940px) {
  .login-layout { display: flex; flex-direction: column; min-height: calc(100dvh - 95px); }
  .access-card { margin: 0 auto; max-width: 620px; order: -1; padding: 42px 28px 38px; width: 100%; }
  .access-card h2 { font-size: clamp(38px, 8vw, 52px); }
  .access-card > p { margin-bottom: 25px; }
  .login-visual { min-height: 310px; padding: 42px 28px; }
  .login-copy { max-width: 560px; }
  .login-copy h1 { font-size: clamp(43px, 9vw, 66px); margin: 15px 0 17px; }
  .login-copy p { font-size: 15px; max-width: 500px; }
  .sidebar-close { align-items: center; background: rgba(255,255,255,.12); border: 0; border-radius: 50%; color: var(--on-brand); display: flex; font-size: 23px; height: 42px; justify-content: center; position: absolute; right: 14px; top: 17px; width: 42px; }
}

@media (max-width: 820px) {
  .workspace-page { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
  .workspace-shell { min-height: calc(100vh - 74px); }
  .topbar { min-height: 62px; padding: 8px 13px; }
  .topbar-actions { gap: 7px; }
  .theme-toggle { min-height: 44px; padding: 0; width: 44px; }
  .theme-toggle > [data-theme-label] { display: none; }
  .topbar .share-button { display: none; }
  .mobile-menu { align-items: center; display: flex; height: 44px; justify-content: center; width: 44px; }
  .actor-control { min-height: 44px; }
  .actor-control input { font-size: 16px; height: 44px; width: 112px; }
  .workspace-content { padding: 24px 12px 24px; }
  .view-header { gap: 16px; margin-bottom: 20px; }
  .view-header h1 { font-size: clamp(34px, 10vw, 43px); line-height: .98; }
  .view-header p { font-size: 14px; line-height: 1.55; }
  .primary-action { min-height: 48px; width: 100%; }

  .mobile-tabbar { background: var(--mobile-nav); border-top: 1px solid var(--line); bottom: 0; display: grid; grid-template-columns: repeat(6, 1fr); left: 0; padding: 5px 4px calc(5px + env(safe-area-inset-bottom)); position: fixed; right: 0; z-index: 34; }
  .mobile-tabbar button { align-items: center; background: transparent; border: 0; border-radius: 10px; color: var(--muted); display: flex; flex-direction: column; font-size: 9px; font-weight: 800; gap: 3px; justify-content: center; min-height: 58px; padding: 5px 2px; }
  .mobile-tabbar button svg { height: 20px; width: 20px; }
  .mobile-tabbar button.active { background: var(--blue-soft); color: var(--heading); }
  .nav-open .mobile-tabbar { z-index: 33; }

  .portfolio-metrics, .analytics-metric-grid { display: flex; gap: 10px; margin-inline: -12px; overflow-x: auto; padding: 0 12px 5px; scroll-padding-inline: 12px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .portfolio-metrics::-webkit-scrollbar, .analytics-metric-grid::-webkit-scrollbar { display: none; }
  .portfolio-metrics .metric-card, .analytics-metric-grid article { flex: 0 0 165px; min-height: 118px; scroll-snap-align: start; }
  .metric-card strong { font-size: 34px; }
  .journey-strip { border-radius: 12px; margin: 10px 0 16px; padding: 13px 14px; scroll-snap-type: x proximity; }
  .journey-strip div { scroll-snap-align: start; }

  .mobile-filter-bar { display: grid; gap: 9px; grid-template-columns: minmax(0, 1fr) 118px; margin-bottom: 12px; }
  .mobile-filter-bar .search-field { height: 46px; }
  .mobile-filter-bar .search-field input { font-size: 16px; width: 100%; }
  .mobile-filter-bar > select { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; font-size: 14px; min-height: 46px; padding: 0 9px; width: 100%; }
  .control-sheet { display: none; }
  .mobile-page-list { display: grid; gap: 12px; }
  .mobile-page-card { background: var(--panel); border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 8px 24px rgba(5,75,126,.04); overflow: hidden; padding: 16px; }
  .mobile-page-card > header { align-items: flex-start; display: flex; gap: 10px; justify-content: space-between; }
  .mobile-page-title { align-items: center; background: none; border: 0; display: flex; gap: 11px; min-width: 0; padding: 0; text-align: left; }
  .mobile-page-title > span:last-child { display: grid; gap: 2px; min-width: 0; }
  .mobile-page-title strong { color: var(--heading); font-size: 17px; line-height: 1.2; }
  .mobile-page-title small { color: var(--muted); font-size: 11px; line-height: 1.35; }
  .mobile-page-card .stage-pill { flex: 0 0 auto; font-size: 9px; padding: 6px 8px; }
  .mobile-page-statuses { border-block: 1px solid var(--line); display: grid; gap: 13px 12px; grid-template-columns: repeat(2, 1fr); margin: 15px 0 13px; padding: 13px 0; }
  .mobile-page-statuses > div { align-items: flex-start; display: flex; flex-direction: column; gap: 6px; }
  .mobile-page-statuses > div > span:first-child { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
  .mobile-page-statuses .mobile-page-tracking, .mobile-page-statuses .mobile-page-readability, .mobile-page-statuses .mobile-page-accessibility { display: grid; gap: 5px 7px; grid-template-columns: auto 1fr; }
  .mobile-page-statuses .mobile-page-tracking > span, .mobile-page-statuses .mobile-page-readability > span, .mobile-page-statuses .mobile-page-accessibility > span { grid-column: 1 / -1; }
  .mobile-page-statuses .mobile-page-tracking > strong, .mobile-page-statuses .mobile-page-readability > strong, .mobile-page-statuses .mobile-page-accessibility > strong { align-self: center; color: var(--ink); font-size: 11px; }
  .mobile-page-statuses .scan-light { background: transparent; padding: 4px 0; }
  .reading-dot { align-self: center; background: var(--muted-light); border-radius: 50%; box-shadow: 0 0 0 3px rgba(145,162,174,.14); height: 8px; width: 8px; }
  .reading-dot.reading-on_target { background: var(--green); box-shadow: 0 0 0 3px rgba(46,141,101,.14); }
  .reading-dot.reading-close { background: var(--yellow); box-shadow: 0 0 0 3px rgba(178,149,0,.14); }
  .reading-dot.reading-too_hard { background: var(--coral); box-shadow: 0 0 0 3px rgba(247,102,88,.14); }
  .a11y-dot { align-self: center; background: var(--muted-light); border-radius: 50%; box-shadow: 0 0 0 3px rgba(145,162,174,.14); height: 8px; width: 8px; }
  .a11y-dot.a11y-pass { background: var(--green); box-shadow: 0 0 0 3px rgba(46,141,101,.14); }
  .a11y-dot.a11y-needs_review { background: var(--coral); box-shadow: 0 0 0 3px rgba(247,102,88,.14); }
  .mobile-page-facts { display: grid; gap: 11px 14px; grid-template-columns: 1fr 1fr; margin: 0; }
  .mobile-page-facts div { min-width: 0; }
  .mobile-page-facts dt { color: var(--blue); font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
  .mobile-page-facts dd { color: var(--ink); font-size: 12px; line-height: 1.45; margin: 3px 0 0; }
  .mobile-page-card > footer { display: grid; gap: 8px; grid-template-columns: 1fr auto; margin-top: 14px; }
  .mobile-preview-action { background: var(--navy); border: 0; border-radius: 9px; color: var(--on-brand); font-size: 12px; font-weight: 800; min-height: 46px; padding: 0 14px; }
  .mobile-page-card > footer .live-link { align-items: center; border: 1px solid var(--line-strong); border-radius: 9px; display: flex; font-size: 11px; gap: 6px; justify-content: center; min-height: 46px; padding: 0 12px; }

  .analytics-desktop-panel { display: none; }
  .mobile-analytics-list { display: grid; gap: 12px; }
  .mobile-analytics-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 15px; }
  .mobile-analytics-card > header { align-items: center; display: grid; gap: 10px; grid-template-columns: auto 1fr auto; }
  .mobile-analytics-card > header > div { display: grid; min-width: 0; }
  .mobile-analytics-card > header strong { color: var(--heading); font-size: 15px; }
  .mobile-analytics-card > header span { color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-analytics-card > header button { background: var(--navy); border: 0; border-radius: 8px; color: var(--on-brand); font-size: 10px; font-weight: 800; min-height: 42px; padding: 0 11px; }
  .mobile-analytics-card > p { color: var(--muted); font-size: 10px; margin: 12px 0; }
  .mobile-analytics-card dl { display: grid; gap: 8px; grid-template-columns: repeat(3, 1fr); margin: 0; }
  .mobile-analytics-card dl div { background: var(--surface); border-radius: 8px; padding: 9px; }
  .mobile-analytics-card dt { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
  .mobile-analytics-card dd { color: var(--heading); font-size: 14px; font-weight: 800; margin: 2px 0 0; }

  .project-dialog { height: 100dvh; margin: 0; max-width: none; width: 100vw; }
  .dialog-shell { border-radius: 0; }
  .dialog-project-header { background: var(--panel); min-height: 64px; position: sticky; top: 0; z-index: 22; }
  .dialog-project-header h2 { font-size: 15px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dialog-project-header .dialog-close { display: flex; flex: 0 0 auto; }
  .dialog-tabs { background: var(--panel); min-height: 52px; position: sticky; top: 64px; z-index: 21; }
  .dialog-tabs button { min-height: 52px; padding-inline: 12px; }
  .dialog-body { padding: 17px 12px calc(30px + env(safe-area-inset-bottom)); }
  .preview-mode .dialog-body { padding: 8px 8px calc(20px + env(safe-area-inset-bottom)); }
  .preview-toolbar { gap: 7px; padding: 8px; }
  .preview-toolbar > div { width: 100%; }
  .preview-toolbar > div:last-child { justify-content: space-between; }
  .preview-toolbar button { min-height: 42px; }
  .viewport-toggle button { flex: 1; }
  .preview-review-grid { min-height: 0; }
  .browser-canvas, .browser-canvas.mobile { flex-basis: 68dvh; width: 100%; }
  .page-frame { min-height: 520px; }
  .pin-capture { touch-action: none; }
  .pin-composer { max-width: calc(100% - 18px); transform: translate(-50%, 8px); width: 290px; }
  .pin-composer textarea { font-size: 16px; }
  .pin-composer > button { min-height: 44px; }
  .preview-comments { max-height: none; }
  .preview-comments > header { padding: 16px; }
  .preview-help { font-size: 10px; line-height: 1.45; }

  .brand-tool-card > header { padding: 15px; }
  .brand-fields { padding: 14px 15px; }
  .brand-fields input, .brand-fields select, .brand-fields textarea, .analytics-form input, .analytics-form select, .analytics-form textarea, .approval-editor textarea, .comment-form textarea, .idea-answer-form textarea { font-size: 16px; min-height: 46px; }
  .brand-tool-card footer button, .review-decision-actions button, .analytics-form footer button, .comment-form > div button { min-height: 46px; }
  .idea-dialog, .idea-dialog-shell { height: 100dvh; max-height: none; }
  .idea-dialog-shell > header { background: var(--panel); padding: 17px 15px 13px; position: sticky; top: 0; z-index: 2; }
  .idea-dialog-shell h2 { font-size: 22px; }
  .idea-conversation { min-height: calc(100dvh - 92px); padding: 16px 12px calc(28px + env(safe-area-inset-bottom)); }
  .idea-answer-form footer button { min-height: 44px !important; }
}

@media (max-width: 520px) {
  .sale-bar { font-size: 10px; min-height: 28px; padding-inline: 10px; }
  .login-header { min-height: 60px; padding-inline: 18px; }
  .login-header-actions { gap: 9px; }
  .login-header-actions > span { font-size: 11px; }
  .breadcrumb { display: none; }
  .topbar > div:first-child strong::before { display: none; }
  .actor-control span { display: none; }
  .actor-control input { font-size: 14px; padding-inline: 8px; width: 90px; }
  .login-layout { min-height: calc(100dvh - 88px); }
  .access-card { padding: 29px 20px 30px; }
  .access-icon { margin-bottom: 18px; }
  .access-card h2 { font-size: 39px; margin-block: 12px 14px; }
  .access-card > p { font-size: 14px; margin-bottom: 22px; }
  .login-form input { font-size: 22px; min-height: 56px; }
  .login-form button { min-height: 52px; }
  .access-proof { margin-top: 25px; }
  .login-visual { min-height: 245px; padding: 31px 20px; }
  .login-copy h1 { font-size: 42px; margin: 12px 0; }
  .login-copy p { font-size: 13px; line-height: 1.45; max-width: 290px; }
  .login-visual .mini-bottle { display: none; }
  .login-orbit { opacity: .5; }
  .mobile-page-statuses { grid-template-columns: repeat(2, 1fr); }
  .mobile-page-facts { grid-template-columns: 1fr; }
  .mobile-page-card > footer { grid-template-columns: 1fr; }
  .mobile-page-card > footer .live-link { width: 100%; }
  .mobile-analytics-card dl { grid-template-columns: repeat(2, 1fr); }
  .dialog-project-header .project-icon { display: none; }
  .dialog-project-header h2 { max-width: 145px; }
}

@media (max-width: 360px) {
  .login-header-actions > span { display: none; }
  .actor-control input { font-size: 13px; padding-inline: 6px; width: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle-icons i { transition: none; }
}

/* Readability review */
.dialog-body > .readability-detail { margin: 0 auto; max-width: 920px; }
.readability-detail { display: grid; gap: 16px; }
.readability-empty { align-items: center; background: var(--blue-soft); border: 1px solid var(--soft-blue-border); border-radius: 14px; display: flex; flex-direction: column; padding: 45px 25px; text-align: center; }
.readability-empty > span { align-items: center; background: var(--panel); border-radius: 12px; color: var(--blue); display: flex; font-size: 21px; font-weight: 800; height: 54px; justify-content: center; width: 54px; }
.readability-empty h4 { color: var(--heading); font-size: 18px; margin: 17px 0 6px; }
.readability-empty p { color: var(--muted); font-size: 12px; margin: 0 auto 20px; max-width: 500px; }
.readability-empty .primary-action { min-width: 170px; }
.readability-hero { align-items: center; background: var(--mint-soft); border: 1px solid var(--soft-mint-border); border-radius: 14px; display: grid; gap: 28px; grid-template-columns: minmax(190px, .45fr) minmax(250px, .55fr); padding: 22px; }
.readability-hero.reading-close { background: var(--yellow-soft); border-color: var(--soft-yellow-border); }
.readability-hero.reading-too_hard { background: var(--coral-soft); border-color: var(--soft-coral-border); }
.readability-hero span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.readability-hero strong { color: var(--heading); display: block; font-family: var(--display); font-size: 43px; letter-spacing: -.05em; line-height: 1; margin: 7px 0 5px; }
.readability-hero p { color: var(--ink); font-size: 12px; font-weight: 700; margin: 0; }
.reading-gauge { background: rgba(255,255,255,.72); border-radius: 999px; height: 14px; position: relative; }
.reading-gauge::after { background: var(--navy); content: ""; height: 24px; left: 41.66%; opacity: .55; position: absolute; top: -5px; width: 2px; }
.reading-gauge i { background: var(--green); border-radius: inherit; display: block; height: 100%; max-width: 100%; }
.reading-close .reading-gauge i { background: var(--yellow); }
.reading-too_hard .reading-gauge i { background: var(--coral); }
.reading-gauge b { color: var(--heading); font-size: 8px; left: 41.66%; position: absolute; top: 20px; transform: translateX(-50%); white-space: nowrap; }
.readability-metrics { display: grid; gap: 10px; grid-template-columns: repeat(4, 1fr); }
.readability-metrics article { background: var(--panel); border: 1px solid var(--line); border-radius: 11px; display: grid; min-height: 112px; padding: 13px; }
.readability-metrics article.metric-pass { border-top: 4px solid var(--mint); }
.readability-metrics article.metric-warn { border-top: 4px solid var(--coral); }
.readability-metrics span { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.readability-metrics strong { color: var(--heading); font-size: 25px; margin-top: 5px; }
.readability-metrics strong i { color: var(--muted-light); font-size: 10px; font-style: normal; }
.readability-metrics small { align-self: end; color: var(--muted); font-size: 9px; line-height: 1.3; }
.readability-checklist { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.readability-checklist article { align-items: flex-start; border: 1px solid var(--line); border-radius: 11px; display: flex; gap: 11px; padding: 14px; }
.readability-checklist article > i { align-items: center; border-radius: 50%; display: flex; flex: 0 0 auto; font-size: 10px; font-style: normal; font-weight: 900; height: 27px; justify-content: center; width: 27px; }
.readability-checklist .check-pass > i { background: var(--mint-soft); color: var(--green); }
.readability-checklist .check-warn > i { background: var(--coral-soft); color: var(--coral); }
.readability-checklist strong { color: var(--heading); display: block; font-size: 12px; }
.readability-checklist p { color: var(--muted); font-size: 10px; line-height: 1.45; margin: 3px 0 0; }
.hard-word-panel { border: 1px solid var(--line); border-radius: 12px; padding: 17px; }
.hard-word-panel > header { align-items: center; display: flex; justify-content: space-between; }
.hard-word-panel h4 { color: var(--heading); font-size: 17px; margin: 3px 0 0; }
.hard-word-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 15px 0 11px; }
.hard-word-list > span { align-items: center; background: var(--yellow-soft); border: 1px solid var(--soft-yellow-border); border-radius: 999px; color: var(--heading); display: inline-flex; font-size: 11px; font-weight: 700; gap: 6px; min-height: 32px; padding: 4px 10px; }
.hard-word-list b { align-items: center; background: var(--panel); border-radius: 999px; color: var(--muted); display: flex; font-size: 8px; height: 19px; justify-content: center; min-width: 19px; }
.hard-word-panel > p, .hard-word-empty, .readability-method { color: var(--muted); font-size: 10px; line-height: 1.5; }
.hard-word-panel > p { margin: 0; }
.hard-word-empty { background: var(--surface); border-radius: 8px; margin-top: 14px; padding: 13px; }
.readability-method { margin: 0; }

@media (max-width: 720px) {
  .readability-hero { gap: 23px; grid-template-columns: 1fr; }
  .reading-gauge { margin-bottom: 16px; }
  .readability-metrics { grid-template-columns: 1fr 1fr; }
  .readability-checklist { grid-template-columns: 1fr; }
  .hard-word-panel > header { align-items: flex-start; gap: 12px; }
  .hard-word-panel > header button { min-height: 42px; }
}

/* Accessibility preflight */
.dialog-body > .accessibility-detail { margin: 0 auto; max-width: 920px; }
.accessibility-detail { display: grid; gap: 16px; }
.accessibility-empty { align-items: center; background: var(--blue-soft); border: 1px solid var(--soft-blue-border); border-radius: 14px; display: flex; flex-direction: column; padding: 45px 25px; text-align: center; }
.accessibility-empty > span { align-items: center; background: var(--panel); border-radius: 12px; color: var(--blue); display: flex; font-size: 21px; font-weight: 900; height: 54px; justify-content: center; width: 54px; }
.accessibility-empty h4 { color: var(--heading); font-size: 18px; margin: 17px 0 6px; }
.accessibility-empty p { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 0 auto 20px; max-width: 540px; }
.accessibility-hero { align-items: center; background: var(--mint-soft); border: 1px solid var(--soft-mint-border); border-radius: 14px; display: flex; gap: 18px; justify-content: space-between; padding: 19px 21px; }
.accessibility-hero.a11y-needs_review { background: var(--coral-soft); border-color: var(--soft-coral-border); }
.accessibility-score { align-items: center; display: flex; gap: 14px; }
.accessibility-score > span { align-items: center; background: var(--panel); border-radius: 50%; color: var(--green); display: flex; flex: 0 0 auto; font-size: 17px; font-weight: 900; height: 43px; justify-content: center; width: 43px; }
.a11y-needs_review .accessibility-score > span { color: var(--coral); }
.accessibility-score div { display: grid; gap: 2px; }
.accessibility-score small { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.accessibility-score strong { color: var(--heading); font-size: 20px; }
.accessibility-score p { color: var(--ink); font-size: 11px; font-weight: 700; margin: 0; }
.accessibility-checks, .manual-a11y { border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.accessibility-checks > header, .manual-a11y > header { align-items: flex-end; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; padding: 15px 17px; }
.accessibility-checks h4, .manual-a11y h4 { color: var(--heading); font-size: 17px; margin: 3px 0 0; }
.accessibility-checks > header > span { color: var(--muted); font-size: 9px; }
.accessibility-checks > div { display: grid; grid-template-columns: 1fr 1fr; }
.accessibility-checks article { align-items: flex-start; border-bottom: 1px solid var(--line); display: flex; gap: 11px; min-height: 100px; padding: 14px 16px; }
.accessibility-checks article:nth-child(odd) { border-right: 1px solid var(--line); }
.accessibility-checks article > i { align-items: center; background: var(--mint-soft); border-radius: 50%; color: var(--green); display: flex; flex: 0 0 auto; font-size: 10px; font-style: normal; font-weight: 900; height: 27px; justify-content: center; width: 27px; }
.accessibility-checks .a11y-check-fail > i { background: var(--coral-soft); color: var(--coral); }
.accessibility-checks strong, .manual-a11y strong { color: var(--heading); display: block; font-size: 12px; }
.accessibility-checks p, .manual-a11y p { color: var(--muted); font-size: 10px; line-height: 1.45; margin: 3px 0 0; }
.accessibility-checks small { color: var(--blue); display: block; font-size: 8px; font-weight: 800; margin-top: 7px; }
.manual-a11y > header { align-items: flex-start; display: block; }
.manual-a11y > header p { margin-top: 4px; }
.manual-a11y > div { display: grid; gap: 0; grid-template-columns: repeat(5, 1fr); }
.manual-a11y article { display: flex; gap: 9px; padding: 15px 12px; }
.manual-a11y article + article { border-left: 1px solid var(--line); }
.manual-a11y article > span { align-items: center; background: var(--yellow-soft); border-radius: 50%; color: var(--heading); display: flex; flex: 0 0 auto; font-size: 9px; font-weight: 900; height: 23px; justify-content: center; width: 23px; }
.accessibility-method { color: var(--muted); font-size: 10px; line-height: 1.5; margin: 0; }

@media (max-width: 720px) {
  .accessibility-hero { align-items: stretch; flex-direction: column; }
  .accessibility-hero > button { min-height: 44px; width: 100%; }
  .accessibility-checks > header { align-items: flex-start; display: grid; gap: 5px; }
  .accessibility-checks > div { grid-template-columns: 1fr; }
  .accessibility-checks article { border-right: 0 !important; min-height: 0; }
  .manual-a11y > div { grid-template-columns: 1fr; }
  .manual-a11y article + article { border-left: 0; border-top: 1px solid var(--line); }
}

/* Responsive full-screen page review */
.project-dialog {
  height: 100vh;
  height: 100dvh;
  inset: 0;
  margin: 0;
  max-height: none;
  max-width: none;
  overflow: hidden;
  overscroll-behavior: contain;
  width: 100vw;
}
.dialog-shell { border-radius: 0; height: 100vh; height: 100dvh; }
.dialog-project-header { flex: 0 0 auto; min-height: 68px; padding: 8px 18px; }
.dialog-project-header .dialog-close { height: 44px; width: 44px; }
.dialog-project-header .live-link { min-height: 44px; }
.dialog-tabs { flex: 0 0 auto; min-height: 48px; }
.dialog-tabs button { min-height: 48px; }
.preview-mode .dialog-body { padding: 10px; }
.preview-toolbar { flex: 0 0 auto; margin-bottom: 8px; }
.preview-toolbar button { min-height: 40px; }
.preview-review-grid { grid-template-columns: minmax(0, 1fr) clamp(280px, 22vw, 360px); }
.browser-canvas { height: 100%; }
.page-frame iframe { display: block; }
.preview-comments { height: 100%; }
.preview-help { flex: 0 0 auto; }

@media (max-width: 900px) {
  .dialog-project-header { min-height: 64px; padding: 7px 10px; }
  .dialog-project-header > div:first-child { min-width: 0; }
  .dialog-project-header > div:first-child > div { min-width: 0; }
  .dialog-project-header > div:last-child { flex: 0 0 auto; gap: 6px; }
  .dialog-project-header h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .preview-mode .dialog-body { overflow-y: auto; }
  .preview-workspace { height: auto; min-height: 100%; }
  .preview-toolbar { position: sticky; top: 0; z-index: 20; }
  .preview-review-grid { display: flex; flex-direction: column; min-height: 0; }
  .browser-canvas { flex: 0 0 clamp(560px, 72dvh, 720px); height: auto; width: 100%; }
  .browser-canvas.mobile { flex: 0 0 calc(var(--mobile-preview-height) + 31px); height: auto; min-height: calc(var(--mobile-preview-height) + 31px); width: min(var(--mobile-preview-width), 100%); }
  .preview-comments { flex: 0 0 auto; height: auto; max-height: none; min-height: 220px; }
}

@media (max-width: 520px) {
  .dialog-project-header { padding-inline: 9px; }
  .dialog-project-header h2 { max-width: 132px; }
  .dialog-project-header .dialog-close { height: 44px; width: 44px; }
  .preview-mode .dialog-body { padding: 6px 6px calc(18px + env(safe-area-inset-bottom)); }
  .preview-toolbar { border-radius: 9px; gap: 6px; padding: 7px; }
  .preview-toolbar button { min-height: 44px; }
  .browser-canvas { flex-basis: max(540px, 68dvh); }
  .browser-canvas.mobile { flex-basis: calc(var(--mobile-preview-height) + 31px); min-height: calc(var(--mobile-preview-height) + 31px); }
  .preview-comments { min-height: 240px; }
}

/* Nik backend */
.backend-metrics { display: grid; gap: 12px; grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; }
.backend-metrics article { background: var(--panel); border: 1px solid var(--line); border-radius: 13px; display: grid; min-height: 118px; padding: 16px; }
.backend-metrics article:nth-child(1) { border-top: 4px solid var(--yellow); }
.backend-metrics article:nth-child(2) { border-top: 4px solid var(--blue); }
.backend-metrics article:nth-child(3) { border-top: 4px solid var(--coral); }
.backend-metrics article:nth-child(4) { border-top: 4px solid var(--mint); }
.backend-metrics span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.backend-metrics strong { color: var(--heading); font-family: var(--display); font-size: 34px; letter-spacing: -.04em; line-height: 1; margin: 7px 0; }
.backend-metrics small { align-self: end; color: var(--muted); font-size: 10px; }
.backend-layout { align-items: start; display: grid; gap: 18px; grid-template-columns: minmax(0, 1.42fr) minmax(330px, .58fr); }
.backend-requests, .backend-tasks, .backend-current-pages { background: var(--panel); border: 1px solid var(--line); border-radius: 15px; }
.backend-requests > .block-heading, .backend-tasks > .block-heading, .backend-current-pages > .block-heading { border-bottom: 1px solid var(--line); padding: 16px 18px; }
.backend-requests > .block-heading button, .backend-current-pages > .block-heading button { background: var(--blue-soft); border: 0; border-radius: 8px; color: var(--heading); font-size: 10px; font-weight: 800; min-height: 38px; padding: 0 13px; }
.backend-request-list { display: grid; gap: 12px; padding: 14px; }
.backend-request-card { border: 1px solid var(--line); border-left: 4px solid var(--yellow); border-radius: 12px; overflow: hidden; padding: 15px; }
.backend-request-card.status-border-scoping, .backend-request-card.status-border-next_up { border-left-color: var(--blue); }
.backend-request-card.status-border-building, .backend-request-card.status-border-review { border-left-color: var(--coral); }
.backend-request-card.status-border-shipped { border-left-color: var(--mint); }
.backend-request-card.status-border-parked { border-left-color: var(--muted-light); }
.backend-request-card > header { align-items: center; display: flex; gap: 10px; justify-content: space-between; }
.backend-request-card > header time { color: var(--muted); font-size: 9px; }
.backend-queue-status { align-items: center; border-radius: 999px; color: var(--heading); display: inline-flex; font-size: 8px; font-weight: 800; gap: 6px; min-height: 25px; padding: 3px 9px; text-transform: uppercase; }
.backend-queue-status i { background: currentColor; border-radius: 50%; height: 6px; width: 6px; }
.queue-requested { background: var(--yellow-soft); }
.queue-scoping, .queue-next_up { background: var(--blue-soft); color: var(--blue); }
.queue-building, .queue-review { background: var(--coral-soft); color: var(--issue-text); }
.queue-shipped { background: var(--mint-soft); color: var(--green); }
.queue-parked { background: var(--surface); color: var(--muted); }
.backend-request-card h3 { color: var(--heading); font-family: var(--display); font-size: 20px; letter-spacing: -.02em; margin: 13px 0 5px; }
.backend-request-card > p { color: var(--ink); font-size: 11px; line-height: 1.5; margin: 0; }
.backend-request-facts { display: grid; gap: 8px; grid-template-columns: repeat(4, 1fr); margin: 13px 0; }
.backend-request-facts div { background: var(--surface); border-radius: 8px; min-width: 0; padding: 9px; }
.backend-request-facts dt { color: var(--muted); font-size: 7px; font-weight: 800; text-transform: uppercase; }
.backend-request-facts dd { color: var(--heading); font-size: 10px; font-weight: 700; margin: 3px 0 0; overflow-wrap: anywhere; }
.backend-queue-form { align-items: end; background: var(--blue-soft); border-radius: 10px; display: grid; gap: 9px; grid-template-columns: minmax(130px, .8fr) minmax(130px, .7fr) minmax(210px, 1.6fr) auto; padding: 11px; }
.backend-queue-form label, .build-task-form label { color: var(--heading); display: grid; font-size: 8px; font-weight: 800; gap: 5px; text-transform: uppercase; }
.backend-queue-form input, .backend-queue-form select, .backend-queue-form textarea, .build-task-form input, .build-task-form select { background: var(--panel); border: 1px solid var(--line-strong); border-radius: 8px; color: var(--heading); font: inherit; font-size: 11px; min-height: 40px; outline: none; padding: 8px 9px; text-transform: none; width: 100%; }
.backend-queue-form textarea { min-height: 40px; resize: vertical; }
.backend-queue-form input:focus, .backend-queue-form select:focus, .backend-queue-form textarea:focus, .build-task-form input:focus, .build-task-form select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27,133,170,.14); }
.backend-queue-form > button, .build-task-form > button { background: var(--navy); border: 0; border-radius: 8px; color: var(--on-brand); font-size: 10px; font-weight: 800; min-height: 40px; padding: 0 13px; white-space: nowrap; }
.backend-request-card > footer { align-items: center; color: var(--muted); display: flex; font-size: 8px; justify-content: space-between; margin-top: 10px; }
.backend-request-card > footer small { font-size: inherit; }
.backend-tasks { position: sticky; top: 18px; }
.build-task-form { border-bottom: 1px solid var(--line); display: grid; gap: 10px; padding: 14px; }
.build-task-form > div { display: grid; gap: 9px; grid-template-columns: 1fr 1fr; }
.build-task-form > button { min-height: 44px; }
.build-task-list { display: grid; gap: 0; padding: 3px 14px 10px; }
.build-task { align-items: flex-start; border-bottom: 1px solid var(--line); display: grid; gap: 10px; grid-template-columns: 26px 1fr; padding: 12px 0; }
.task-check { align-items: center; background: var(--panel); border: 2px solid var(--line-strong); border-radius: 7px; color: var(--on-brand); display: flex; height: 25px; justify-content: center; padding: 0; width: 25px; }
.task-check:hover { border-color: var(--blue); }
.task-check span { font-size: 12px; font-weight: 900; }
.build-task > div { min-width: 0; }
.build-task strong { color: var(--heading); display: block; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.build-task p { color: var(--muted); font-size: 9px; margin: 3px 0 7px; }
.task-meta { align-items: center; display: flex; flex-wrap: wrap; gap: 7px; }
.task-meta time { color: var(--muted); font-size: 8px; font-weight: 700; }
.task-priority { border-radius: 999px; font-size: 7px; font-weight: 800; padding: 4px 7px; text-transform: uppercase; }
.priority-high { background: var(--coral-soft); color: var(--issue-text); }
.priority-normal { background: var(--blue-soft); color: var(--blue); }
.priority-low { background: var(--surface); color: var(--muted); }
.task-done .task-check { background: var(--mint); border-color: var(--mint); }
.task-done strong { color: var(--muted); text-decoration: line-through; }
.backend-task-empty { background: var(--surface); border-radius: 9px; display: grid; gap: 4px; margin: 12px 0 4px; padding: 14px; text-align: center; }
.backend-task-empty strong { color: var(--heading); font-size: 11px; }
.backend-task-empty span { color: var(--muted); font-size: 9px; }
.completed-tasks { border-top: 1px solid var(--line); }
.completed-tasks summary { color: var(--muted); cursor: pointer; font-size: 9px; font-weight: 800; padding: 13px 14px; }
.completed-tasks > div { padding: 0 14px 10px; }
.backend-current-pages { margin-top: 18px; }
.backend-page-grid { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); padding: 14px; }
.backend-page-grid > article { border: 1px solid var(--line); border-radius: 11px; display: grid; min-width: 0; padding: 13px; }
.backend-page-grid header { align-items: center; display: grid; gap: 9px; grid-template-columns: auto minmax(0, 1fr) auto; }
.backend-page-grid header > div { min-width: 0; }
.backend-page-grid header strong, .backend-page-grid header span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.backend-page-grid header strong { color: var(--heading); font-size: 11px; }
.backend-page-grid header div > span { color: var(--muted); font-size: 8px; margin-top: 2px; }
.backend-page-grid > article > p { color: var(--ink); font-size: 10px; line-height: 1.45; margin: 13px 0; }
.backend-page-grid dl { border-top: 1px solid var(--line); display: grid; gap: 10px; margin: 0; padding-top: 11px; }
.backend-page-grid dl div { display: grid; gap: 2px; grid-template-columns: 63px 1fr; }
.backend-page-grid dt { color: var(--muted); font-size: 7px; font-weight: 800; text-transform: uppercase; }
.backend-page-grid dd { color: var(--heading); font-size: 9px; line-height: 1.4; margin: 0; }
.backend-page-grid footer { display: grid; gap: 7px; grid-template-columns: 1fr 1fr; margin-top: 13px; }
.backend-page-grid footer button, .backend-page-grid footer .live-link { align-items: center; background: var(--blue-soft); border: 0; border-radius: 8px; color: var(--heading); display: flex; font-size: 9px; font-weight: 800; justify-content: center; min-height: 38px; }
.backend-page-grid footer .live-link { background: var(--navy); color: var(--on-brand); width: 100%; }
.backend-empty { align-items: center; background: var(--surface); border-radius: 11px; display: flex; flex-direction: column; padding: 42px 20px; text-align: center; }
.backend-empty > span { color: var(--yellow); font-size: 24px; }
.backend-empty h3 { color: var(--heading); margin: 10px 0 5px; }
.backend-empty p { color: var(--muted); font-size: 10px; line-height: 1.5; margin: 0 auto 15px; max-width: 390px; }
.backend-empty button { background: var(--navy); border: 0; border-radius: 8px; color: var(--on-brand); font-size: 10px; font-weight: 800; min-height: 42px; padding: 0 14px; }

@media (max-width: 1100px) {
  .backend-layout { grid-template-columns: minmax(0, 1.1fr) minmax(310px, .7fr); }
  .backend-queue-form { grid-template-columns: 1fr 1fr; }
  .backend-queue-note { grid-column: 1 / -1; }
  .backend-queue-form > button { min-height: 44px; }
  .backend-page-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .backend-metrics { display: flex; margin: 0 -12px 16px; overflow-x: auto; padding: 0 12px 5px; scroll-snap-type: x mandatory; }
  .backend-metrics article { flex: 0 0 155px; min-height: 105px; scroll-snap-align: start; }
  .backend-layout { grid-template-columns: 1fr; }
  .backend-tasks { grid-row: 1; position: static; }
  .backend-request-card { padding: 13px; }
  .backend-request-facts { grid-template-columns: 1fr 1fr; }
  .backend-queue-form { grid-template-columns: 1fr; }
  .backend-queue-note { grid-column: auto; }
  .backend-queue-form input, .backend-queue-form select, .backend-queue-form textarea, .build-task-form input, .build-task-form select { font-size: 16px; min-height: 46px; }
  .backend-queue-form textarea { min-height: 78px; }
  .backend-queue-form > button, .build-task-form > button { min-height: 46px; }
  .backend-page-grid { grid-template-columns: 1fr; }
  .task-check { height: 30px; width: 30px; }
  .build-task { grid-template-columns: 30px 1fr; padding-block: 14px; }
  .backend-page-grid footer button, .backend-page-grid footer .live-link { min-height: 44px; }
}

@media (max-width: 420px) {
  .backend-requests > .block-heading, .backend-tasks > .block-heading, .backend-current-pages > .block-heading { align-items: flex-start; gap: 10px; }
  .backend-request-card > header { align-items: flex-start; flex-direction: column; gap: 7px; }
  .backend-request-card > footer { align-items: flex-start; flex-direction: column; gap: 4px; }
  .backend-request-facts { grid-template-columns: 1fr; }
  .build-task-form > div { grid-template-columns: 1fr; }
  .backend-page-grid header { grid-template-columns: auto minmax(0, 1fr); }
  .backend-page-grid header .stage-pill { grid-column: 1 / -1; width: fit-content; }
}
