/* Clonevoice-inspired presentation layer. Existing analytics layouts remain in
   styles.css; this file owns the shared blue theme and account surfaces. */
@font-face {
  font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/fonts/plex-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/fonts/plex-cyrillic.woff2') format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/fonts/plex-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
:root {
  /* Muted blue accents on nearly neutral surfaces; shared by all three frontends. */
  --ink: #303741; --muted: #657080; --blue: #5b7399; --blue-soft: #edf0f5;
  --mist: #fafbfc; --paper: #fff; --line: #e3e6eb; --sidebar: #f4f5f7;
  --blue-hover: #4c6284; --blue-text: #4e6586; --blue-line: #cbd3df;
  --surface: #f4f6f8; --surface-hover: #eef1f4; --icon-muted: #8290a3;
  --focus: #7086a5; --selection: #dfe5ee; --focus-ring: #5b73991f;
  --good: #377860; --good-soft: #e9f4ee; --risk: #b4534f; --risk-soft: #fcefeb;
  --amber: #b98b3e; --rail-width: 244px;
}
html { scrollbar-gutter: stable; }
body { font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
button,input,select,textarea { font-family: inherit; }
h1,h2,h3 { font-family: inherit; }
h1 { font-size: 28px; line-height: 1.3; letter-spacing: -.7px; font-weight: 600; overflow-wrap: anywhere; }
h2 { font-size: 18px; font-weight: 600; }
::selection { background: var(--selection); color: var(--ink); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.keyword-gap .scan-budget-panel { margin-top: 24px; }
.keyword-gap .research-run-form { display: flex; align-items: end; flex-wrap: wrap; gap: 14px; margin: 20px 0; }
.keyword-gap .research-run-form label { display: grid; gap: 6px; min-width: 0; max-width: 100%; }
.keyword-gap .research-run-form select,.keyword-gap .research-run-form input { max-width: 100%; }
.keyword-gap .keyword-caveat { color: var(--muted); font-size: 13px; max-width: 80ch; }
.keyword-gap .keyword-gap-table { min-width: 1100px; }
.keyword-gap-table td { max-width: 240px; overflow-wrap: anywhere; }
.keyword-gap-table th a { color: inherit; text-underline-offset: 4px; }
.seo-suite .suite-explanation { max-width: 78ch; color: var(--muted); }
.seo-suite .suite-keywords { flex: 1 1 320px; }
.seo-suite .research-run-form button.secondary { color: var(--blue); background: var(--blue-soft); }
.seo-suite textarea { width: 100%; min-height: 120px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; resize: vertical; }
.seo-suite .suite-competitors { display: flex; flex-wrap: wrap; gap: 12px 20px; border: 1px solid var(--line); padding: 16px; width: 100%; }
.seo-suite .suite-competitors label { display: flex; align-items: center; gap: 8px; }
.seo-suite .suite-competitors input { width: auto; }
.seo-suite .suite-table { min-width: 760px; }
.seo-suite .suite-table td { max-width: 380px; overflow-wrap: anywhere; vertical-align: top; }
.seo-suite .suite-table th a { color: inherit; }
.seo-suite .suite-detail { border-top: 1px solid var(--line); padding: 14px 0; }
.seo-suite details li { margin: 8px 0; overflow-wrap: anywhere; }
.seo-suite small { display: block; color: var(--muted); margin-top: 6px; }
.seo-suite .watchlist { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.seo-suite .watchlist form { display: flex; align-items: center; gap: 8px; }
.seo-suite .watchlist button { padding: 4px 8px; background: var(--mist); color: var(--muted); }
.ui-icon { display: inline-block; width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
.app-shell { display: block; min-height: calc(100vh - 60px); padding-left: var(--rail-width); }
.project-rail { position: fixed; inset: 0 auto 0 0; z-index: 10; width: var(--rail-width); height: 100vh; padding: 22px 14px 14px; color: var(--ink); background: var(--sidebar); border-right: 1px solid var(--line); overflow-y: auto; scrollbar-width: thin; }
.brand { gap: 10px; margin: 0; padding: 0 7px 25px; color: var(--ink); flex-shrink: 0; }
.brand-mark { width: 35px; height: 35px; border: 0; border-radius: 12px; color: var(--blue); background: var(--blue-soft); }
.brand-mark .ui-icon { width: 24px; height: 24px; }
.brand strong { font-size: 16px; font-weight: 600; letter-spacing: -.4px; }
.brand small { color: var(--muted); font-size: 10px; margin-top: 1px; }
.section-nav { display: grid; flex-shrink: 0; gap: 3px; padding: 5px; background: white; border-radius: 17px; }
.section-link { display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 10px 11px; color: #4b5c70; font-size: 13px; font-weight: 500; border-radius: 12px; text-decoration: none; transition: background 120ms,color 120ms; }
.section-link .ui-icon { color: var(--icon-muted); }
.section-link:hover { background: var(--surface); }
.section-link.is-active { color: var(--blue-text); background: var(--blue-soft); }
.section-link.is-active .ui-icon { color: var(--blue); }
.rail-divider { background: transparent; height: 22px; margin: 0; border: 0; flex-shrink: 0; }
.rail-label { margin: 0 12px 9px; font-size: 12px; color: var(--muted); font-weight: 500; }
.competitor-label { margin-top: 22px; }
.rail-empty { margin: 0 12px 10px; color: var(--muted); font-size: 12px; }
.project-link { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; margin: 0 0 3px; border: 0; border-radius: 13px; color: #495c72; }
.project-link:hover { background: var(--surface-hover); }
.project-link.is-active { color: var(--blue-text); background: var(--blue-soft); }
.site-icon { flex-shrink: 0; margin-top: 1px; color: var(--icon-muted); }
.site-icon .ui-icon { width: 18px; height: 18px; }
.site-info { min-width: 0; }
.project-domain { font-size: 13px; font-weight: 500; }
.project-count,.project-link.is-active .project-count { color: var(--muted); font-size: 11px; margin-top: 2px; }
.project-dates,.project-link.is-active .project-dates { color: var(--muted); font-size: 10px; }
.rail-note { display: flex; align-items: flex-start; gap: 9px; margin-top: auto; padding: 24px 12px 6px; border: 0; color: var(--muted); font-size: 12px; }
.rail-note small { display: block; font-size: 10px; margin-top: 4px; }
.account-bar { margin-left: var(--rail-width); min-height: 60px; padding: 12px 30px; gap: 20px; font-size: 12px; border-bottom: 1px solid var(--line); }
.account-breadcrumb,.account-user { display: flex; align-items: center; gap: 12px; min-width: 0; }
.account-breadcrumb a { text-decoration: none; color: var(--muted); white-space: nowrap; }
.account-breadcrumb strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumb-separator { color: #b2bfd0; }
.account-user { margin-left: auto; }
.account-user > span:not(.user-avatar) { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.user-avatar { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; color: var(--blue-text); background: var(--blue-soft); font-size: 12px; font-weight: 600; }
.account-bar button { display: inline-flex; gap: 6px; align-items: center; min-height: 34px; padding: 7px 10px; border-color: var(--line); border-radius: 10px; color: var(--muted); background: var(--mist); }
.account-bar button .ui-icon { width: 15px; height: 15px; }
.workspace,.research-page,.account-page { width: 100%; max-width: 1440px; margin: 0 auto; padding: 34px 30px 52px; }
.project-header { margin-bottom: 26px; align-items: center; }
.context-line { color: var(--muted); font-weight: 400; font-size: 12px; margin-bottom: 6px; }
.freshness { margin-top: 8px; }
.export-link,.new-project-link { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--blue-text); font-size: 12px; font-weight: 500; text-decoration: none; }
.new-project-link { background: var(--blue); border-color: var(--blue); color: white; }
.page-title { display: flex; align-items: center; gap: 12px; }
.page-title > span { display: grid; place-items: center; width: 42px; height: 42px; color: var(--blue); background: var(--blue-soft); border-radius: 13px; }
.page-title .ui-icon { width: 23px; height: 23px; }
.account-page h1 { font-size: 28px; margin: 0; line-height: 1.3; letter-spacing: -.7px; }
.account-heading { margin-bottom: 28px; align-items: center; }
.account-heading p { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.account-workspace { grid-template-columns: minmax(0,1fr) 340px; gap: 26px; }
.account-list-label { color: var(--muted); margin: 0 0 14px; font-size: 12px; }
.account-project { gap: 14px; padding: 20px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 20px; background: white; }
.account-project:hover { border-color: var(--blue-line); }
.account-project-icon { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; color: var(--icon-muted); background: var(--surface); border-radius: 12px; }
.account-project-info { flex: 1; min-width: 0; }
.account-project-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 5px; }
.account-project h2 { font-size: 15px; margin: 0; }
.account-project p { font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.account-project small { font-size: 11px; }
.account-project .account-muted { font-size: 11px; margin: 7px 0 0; }
.status-chip { color: var(--blue-text); background: var(--blue-soft); border-radius: 6px; padding: 3px 7px; font-size: 10px; }
.account-page button,.auth-panel button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 1px solid var(--blue); border-radius: 12px; padding: 10px 16px; background: var(--blue); color: white; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.account-page button:hover,.auth-panel button:hover { background: var(--blue-hover); }
.account-project button { color: var(--blue-text); background: var(--surface); border: 0; min-height: 38px; font-size: 12px; padding: 9px 12px; }
.account-project button:hover { color: var(--blue-text); background: var(--blue-soft); }
.account-project button .ui-icon { width: 16px; height: 16px; }
.account-create { padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: white; scroll-margin-top: 20px; }
.create-heading { display: flex; align-items: center; gap: 9px; color: var(--blue); }
.create-heading h2 { color: var(--ink); font-size: 17px; margin: 0; }
.account-create > .account-muted { font-size: 12px; margin: 12px 0 20px; }
.account-create > .account-form + .account-muted { margin: 14px 0 0; }
.account-form { gap: 16px; }
.account-form label { gap: 7px; font-size: 12px; font-weight: 500; }
.account-form :is(input,select) { min-height: 46px; border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 400; }
.account-form :is(input,select):focus { border-color: var(--focus); background: white; box-shadow: 0 0 0 3px var(--focus-ring); }
.account-form input::placeholder { color: var(--icon-muted); }
.account-form small { color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.6; }
.account-form button { width: 100%; }
.account-empty { padding: 42px 26px; border: 1px dashed var(--blue-line); border-radius: 20px; background: var(--surface); }
.account-empty > .ui-icon { width: 32px; height: 32px; color: var(--icon-muted); margin-bottom: 18px; }
.account-empty h2 { font-size: 20px; }
.account-empty p { color: var(--muted); font-size: 13px; line-height: 1.7; }
.account-project-shortcut { display: flex; align-items: center; gap: 10px; padding: 12px; width: 100%; border: 0; border-radius: 12px; color: #576e8b; background: transparent; text-align: left; font: inherit; font-size: 12px; cursor: pointer; }
.account-project-shortcut:hover { background: var(--surface-hover); }
.account-project-shortcut span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-project-shortcut .ui-icon { width: 17px; height: 17px; }
.pilot-details { margin-top: 18px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.pilot-details summary { cursor: pointer; width: fit-content; }
.pilot-details p { margin: 10px 0 0; }
.account-notice { padding: 12px 14px; font-size: 13px; border: 1px solid var(--blue-line); border-radius: 12px; }
/* The reference's auth composition: pale form over layered native scenery. */
.auth-topbar { display: flex; justify-content: space-between; align-items: center; min-height: 65px; padding: 12px 32px; background: white; }
.auth-topbar .brand { padding: 0; }
.auth-topbar > span { color: var(--muted); font-size: 12px; }
.auth-stage { position: relative; isolation: isolate; min-height: calc(100svh - 65px); background: #254460; overflow: hidden; }
.auth-landscape { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; }
.auth-layout { position: relative; width: 100%; max-width: 1480px; min-height: inherit; display: grid; grid-template-columns: minmax(320px,450px) minmax(0,1fr); gap: clamp(50px,8vw,130px); align-items: center; padding: 46px clamp(24px,5vw,76px); margin: 0 auto; }
.auth-panel { padding: 32px; border: 1px solid var(--line); border-radius: 28px; background: var(--mist); box-shadow: 0 16px 48px #10293b1a; }
.auth-intro h1 { margin: 0; font-size: 36px; line-height: 1.08; font-weight: 600; letter-spacing: -1.4px; }
.auth-intro > p { margin: 14px 0 26px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.auth-panel .account-form button { min-height: 48px; border-radius: 13px; }
.auth-footer { margin: 22px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.auth-footer:empty { display: none; }
.auth-footer a { color: var(--blue); font-weight: 600; text-underline-offset: 3px; }
.auth-scene-copy { align-self: start; padding-top: 44px; color: #eff5fc; }
.auth-scene-copy p { font-size: clamp(26px,3vw,43px); font-weight: 500; line-height: 1.22; letter-spacing: -1.1px; margin-bottom: 20px; }
.auth-scene-copy > span { color: #d5e2ee; font-size: 14px; line-height: 1.75; }
/* Analytics keep their data/behavior; unify controls, surfaces and density. */
.summary-ledger,.organic-ledger,.directory-overview,.opportunity-ledger { border-radius: 20px; overflow: hidden; }
.summary-ledger { grid-template-columns: minmax(190px,.9fr) minmax(0,2fr); }
.primary-fact { color: var(--blue-text); background: var(--blue-soft); min-height: 155px; padding: 24px; }
.primary-fact span { font-size: 56px; font-weight: 500; letter-spacing: -2px; line-height: 1; }
.primary-fact p { color: var(--blue-text); font-size: 12px; margin-top: 12px; }
.summary-ledger dl div { padding: 20px; }
.summary-ledger dd { font-size: 26px; font-weight: 500; }
.summary-ledger dt { font-size: 12px; }
.quality-profile,.backlink-digest,.ai-journal,.timeline-chart,.timeline-section,.research-detail,.technical-audit,.directory-accounts-panel,.strategy-split .strategy-section,.roster-panel,.role-setup { border-radius: 20px; }
.backlink-digest { margin-bottom: 28px; }
.digest-breakdown dd { font-weight: 500; }
.digest-breakdown dt { font-size: 12px; }
.filters { border-radius: 16px; gap: 12px; padding: 16px; grid-template-columns: minmax(160px,1.8fr) repeat(4,minmax(0,1fr)) auto; }
.filters label { min-width: 0; }
.filters label span { font-size: 11px; }
.filters :is(input,select,button),.research-page :is(input,select,button),.ai-filters :is(input,select,button),.roster-form :is(input,select,button),.directory-account-add :is(input,select,button),.directory-account-form :is(input,select,button) { border-radius: 10px; min-height: 40px; }
.filters :is(input,select),.research-page :is(input,select),.ai-filters :is(input,select),.roster-form :is(input,select),.directory-account-add :is(input,select),.directory-account-form :is(input,select) { background: var(--mist); }
.table-wrap { min-width: 0; border-radius: 16px; }
th { background: var(--surface); color: var(--muted); font-size: 11px; font-weight: 500; padding: 14px; }
td { padding: 15px 14px; font-size: 12px; border-color: var(--line); }
tbody tr:hover { background: var(--mist); }
.tag,.project-pill,.own-site-chip { border-radius: 7px; font-weight: 500; }
.directory-account-card { border-radius: 14px; background: var(--mist); padding: 16px; }
.directory-account-list { grid-template-columns: repeat(auto-fill,minmax(min(280px,100%),1fr)); }
.directory-account-add { grid-template-columns: minmax(0,1.5fr) minmax(0,1fr) minmax(0,1fr) auto; }
.directory-overview div:first-child { background: var(--blue-soft); color: var(--blue-text); }
.directory-overview div:first-child span { color: var(--blue-text); }
.directory-overview strong { font-size: 28px; font-weight: 500; }
.directory-filters { grid-template-columns: repeat(4,minmax(0,1fr)); }
.strategy-workspace { background: transparent; }
.strategy-split { grid-template-columns: minmax(0,1.35fr) minmax(0,.8fr); }
.opportunity-ledger > div { min-height: 130px; padding: 24px; }
.opportunity-ledger strong { font-size: 42px; font-weight: 500; }
.opportunity-ledger .opportunity-lead { color: var(--blue-text); background: var(--blue-soft); }
.opportunity-ledger .opportunity-lead span { color: var(--blue-text); }
.roster-panel { grid-template-columns: minmax(180px,.65fr) minmax(0,1.4fr); }
.organic-ledger { grid-template-columns: minmax(180px,.8fr) minmax(0,2fr); }
.organic-grid { grid-template-columns: minmax(0,.7fr) minmax(0,1.3fr); }
.organic-filters { grid-template-columns: minmax(0,2fr) repeat(2,minmax(0,1fr)) auto; }
.technical-audit { grid-template-columns: 100px minmax(0,.8fr) minmax(0,1.5fr); }
.ai-note-body h2 { font-size: 21px; }
.research-notice,.timeline-notice,.digest-filter-note { border-radius: 12px; }
@media (max-width: 1200px) {
  .account-workspace { grid-template-columns: minmax(0,1fr) 310px; gap: 20px; }
  .account-project { flex-wrap: wrap; }
  .account-project form { margin-left: 54px; }
  .filters,.directory-filters { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .strategy-split,.organic-grid { grid-template-columns: minmax(0,1fr); }
  .roster-panel { grid-template-columns: minmax(0,1fr); }
  .technical-audit { grid-template-columns: 100px minmax(0,1fr); }
  .technical-audit dl { grid-column: 1/-1; }
}
@media (max-width: 1000px) {
  .account-workspace { grid-template-columns: minmax(0,1fr); }
  .account-project { flex-wrap: nowrap; }
  .account-project form { margin-left: 0; }
  .account-user > span:not(.user-avatar) { display: none; }
  .account-create { max-width: 560px; }
  .auth-layout { grid-template-columns: minmax(0,450px); justify-content: center; padding: 72px 24px; }
  .auth-scene-copy { display: none; }
  .directory-account-add { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .app-shell { padding-left: 0; }
  .project-rail { position: static; width: 100%; height: auto; padding: 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .project-rail .brand { padding-bottom: 16px; }
  .project-rail .section-nav { display: flex; overflow-x: auto; gap: 4px; padding: 5px; }
  .section-link { white-space: nowrap; flex-shrink: 0; min-height: 44px; }
  .project-rail nav:not(.section-nav) { display: flex; gap: 4px; overflow-x: auto; }
  .project-link { min-width: 175px; }
  .project-dates { display: none; }
  .rail-label { margin-top: 16px; margin-bottom: 6px; }
  .project-rail .rail-note { display: none; }
  .account-bar { margin-left: 0; padding: 10px 16px; flex-wrap: nowrap; gap: 10px; }
  .account-breadcrumb { flex: 1; overflow: hidden; gap: 8px; }
  .account-breadcrumb a { font-size: 11px; }
  .account-user { gap: 8px; }
  .account-user .user-avatar { display: none; }
  .account-bar button { min-height: 40px; }
  .workspace,.research-page,.account-page { padding: 24px 16px 40px; }
  h1,.account-page h1 { font-size: 24px; }
  .project-header { align-items: start; flex-wrap: wrap; gap: 14px; }
  .account-heading { align-items: start; gap: 18px; }
  .account-project { flex-direction: row; flex-wrap: wrap; padding: 18px; }
  .account-project form { width: 100%; margin-top: 3px; }
  .account-project button { width: 100%; min-height: 44px; }
  .account-create { max-width: none; padding: 22px; }
  .account-form :is(input,select) { font-size: 16px; }
  .summary-ledger,.organic-ledger { grid-template-columns: minmax(0,1fr); }
  .primary-fact { min-height: 125px; }
  .filters,.directory-filters,.organic-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filters .search-field { grid-column: 1/-1; }
  .filters button { grid-column: 1/-1; }
  .directory-account-add { grid-template-columns: minmax(0,1fr); }
  .technical-audit { grid-template-columns: minmax(0,1fr); }
  .technical-audit dl { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .opportunity-ledger { grid-template-columns: minmax(0,1fr); }
  .opportunity-ledger > div { min-height: 100px; }
  .auth-topbar { padding: 12px 20px; }
  .auth-topbar > span { display: none; }
  .auth-layout { padding: 56px 16px 32px; }
  .auth-panel { padding: 28px 22px; border-radius: 24px; }
  .auth-intro h1 { font-size: 32px; }
  .auth-landscape { object-position: right; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Budget controls follow the same compact blue workspace language. */
.scan-budget-panel { margin: 22px 0; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); }
.scan-budget-panel p { max-width: 78ch; color: var(--muted); font-size: 13px; line-height: 1.65; }
.budget-facts { display: flex; flex-wrap: wrap; gap: 18px 28px; margin: 20px 0; }
.budget-facts dt { color: var(--muted); font-size: 12px; }
.budget-facts dd { margin: 5px 0 0; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.scan-preview { background: var(--blue-soft); padding: 18px; border-radius: 12px; margin: 18px 0; }
.budget-settings { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; margin: 22px 0; }
.budget-settings label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; flex: 1 1 150px; }
.budget-settings input,.budget-settings select { min-width: 0; width: 100%; }
.scan-budget-panel input,.scan-budget-panel select { min-height: 42px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--mist); font: inherit; }
.scan-budget-panel button { min-height: 42px; background: var(--blue); color: white; border: 0; border-radius: 12px; padding: 10px 15px; font: inherit; cursor: pointer; }
.budget-page td small { display: block; max-width: 40ch; }
.budget-page code { overflow-wrap: anywhere; }
.budget-page table { min-width: 720px; table-layout: fixed; }
.budget-page th,.budget-page td { width: auto; text-align: left; overflow-wrap: anywhere; }
.budget-page th:first-child,.budget-page td:first-child { width: 25%; }
.budget-page th:last-child,.budget-page td:last-child { width: 24%; }
.budget-page td code { font-size: 11px; }
@media(max-width:760px) { .scan-budget-panel { padding: 16px; } .budget-facts { gap: 16px; } .budget-facts > div { flex: 1 1 125px; } .budget-settings button { width: 100%; } }
.site-scans .scan-steps { list-style: none; padding: 0; margin: 16px 0; }
.site-scans .scan-steps li { display: flex; justify-content: space-between; gap: 24px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.site-scans table { min-width: 720px; table-layout: auto; }
.site-scans table th, .site-scans table td { width: auto; text-align: left; white-space: normal; }
.site-scans table small { display: block; margin-top: 6px; color: var(--muted); overflow-wrap: anywhere; }
.site-scans .research-run-form { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; margin: 20px 0; }
.site-scans .research-run-form label { display: grid; gap: 8px; font-size: 13px; }
.site-scans .research-run-form select { min-height: 42px; max-width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); font: inherit; }
.site-scans .research-run-form button { min-height: 42px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font: inherit; cursor: pointer; }
.site-scans .scan-budget-panel .research-run-form button { background: var(--blue); color: white; border-color: var(--blue); }
@media(max-width:760px) { .site-scans .research-run-form label { flex: 1 1 180px; min-width: 0; } .site-scans .scan-steps li { gap: 12px; } }

/* Operator console: grouped settings rows and a dense, inspectable scan ledger. */
.admin-section { margin: 24px 0; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); }
.admin-section header { margin-bottom: 20px; }
.admin-section h2 { margin: 0 0 8px; font-size: 20px; }
.admin-section h3 { font-size: 16px; margin: 24px 0 12px; }
.admin-section p { max-width: 78ch; color: var(--muted); font-size: 13px; line-height: 1.65; }
.admin-setting { display: grid; grid-template-columns: minmax(0,1fr) minmax(220px,1fr); align-items: center; gap: 28px; padding: 22px 0; border-top: 1px solid var(--line); }
.admin-setting label { font-weight: 500; font-size: 14px; }
.admin-setting p { margin: 7px 0 0; max-width: 54ch; }
.admin-page input,.admin-page select { min-width: 0; width: 100%; min-height: 44px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--mist); color: var(--ink); font: inherit; font-size: 13px; }
.admin-page button { min-height: 44px; padding: 11px 17px; background: var(--blue); color: white; border: 1px solid var(--blue); border-radius: 12px; cursor: pointer; font: inherit; font-size: 13px; }
.admin-page button.secondary { background: var(--paper); color: var(--blue); border-color: var(--line); }
.admin-page :is(input,select,button,a,summary):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.admin-settings-form footer { display: flex; align-items: center; justify-content: space-between; gap: 28px; border-top: 1px solid var(--line); padding-top: 18px; }
.admin-settings-form footer p { max-width: 62ch; margin: 0; }
.admin-settings-form button { flex-shrink: 0; }
.admin-provider-check { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin: 20px 0 12px; }
.admin-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; }
.admin-filters label { display: grid; gap: 8px; font-size: 12px; flex: 1 1 130px; min-width: 0; }
.admin-filters label:first-child { flex-grow: 2; flex-basis: 210px; }
.admin-page table { min-width: 760px; table-layout: auto; }
.admin-page th,.admin-page td { width: auto; text-align: left; vertical-align: top; white-space: normal; overflow-wrap: anywhere; }
.admin-page .admin-scans { min-width: 940px; table-layout: fixed; }
.admin-page .admin-scans th:nth-child(3) { width: 30%; }
.admin-page .admin-scans th:last-child { width: 9%; }
.admin-page td small { display: block; margin-top: 7px; color: var(--muted); }
.admin-page pre { overflow: auto; max-height: 420px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--mist); font-size: 12px; line-height: 1.6; }
.admin-pagination { display: flex; justify-content: space-between; gap: 16px; margin-top: 20px; font-size: 13px; }
.admin-page code { overflow-wrap: anywhere; }
@media(max-width:760px) { .admin-section { padding: 16px; } .admin-setting { grid-template-columns: 1fr; gap: 14px; } .admin-settings-form footer { align-items: stretch; flex-direction: column; gap: 14px; } }

/* Project home: one recommended step, an evidence queue and data coverage. */
.work-page { min-width: 0; }
.work-page p { max-width: 78ch; color: var(--muted); line-height: 1.65; font-size: 13px; }
.work-status { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0; }
.work-status a { display: inline-flex; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; font-size: 13px; }
.work-status a.is-active { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }
.work-status span { font-variant-numeric: tabular-nums; }
.work-filters,.work-edit { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; margin: 20px 0; }
.work-page label { display: grid; gap: 8px; font-size: 12px; min-width: 0; }
.work-page input,.work-page select,.work-page textarea { min-height: 44px; max-width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; font-size: 13px; }
.work-page textarea { width: 100%; resize: vertical; }
.work-page button,.overview-action-links button { min-height: 40px; padding: 10px 14px; background: var(--blue); color: white; border: 1px solid var(--blue); border-radius: 10px; font: inherit; font-size: 13px; cursor: pointer; }
.overview-action-links { align-items: center; }
.overview-action-links form { margin: 0; }
.work-page :is(a,button,textarea,input,select,summary):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.work-task { border-top: 1px solid var(--line); padding: 24px 0; scroll-margin-top: 85px; }
.work-task header { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; font-size: 12px; color: var(--muted); }
.work-task h2 { font-size: 21px; line-height: 1.4; margin: 14px 0; overflow-wrap: anywhere; }
.work-task .work-note { flex: 1 1 400px; }
.work-task summary { cursor: pointer; font-size: 13px; color: var(--blue); }
.work-evidence { background: var(--paper); padding: 16px; border-left: 3px solid var(--line); }
.work-evidence a,.work-evidence span { font-size: 12px; overflow-wrap: anywhere; }
.work-page pre { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 78ch; font: inherit; font-size: 13px; line-height: 1.6; }
.work-draft { border: 1px solid var(--line); padding: 16px; }
.work-originals { display: flex; flex-wrap: wrap; gap: 20px; margin: 20px 0; font-size: 12px; }
.changes-table { table-layout: fixed; min-width: 780px; }
.changes-table th,.changes-table td { width: auto; text-align: left; vertical-align: top; white-space: normal; overflow-wrap: anywhere; }
.changes-table th:first-child { width: 30%; }
.changes-table small { display: block; color: var(--muted); margin-top: 8px; }
@media(max-width:760px) { .work-filters label,.work-edit label { flex: 1 1 200px; } .work-filters select { width: 100%; } .work-edit button { width: 100%; } .work-task .work-note { flex-basis: 100%; } }
.overview-page p { color: var(--muted); line-height: 1.65; max-width: 78ch; font-size: 13px; }
.overview-next { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 26px; border-left: 4px solid var(--blue); border-radius: 0 18px 18px 0; background: var(--blue-soft); margin-bottom: 30px; }
.overview-next h2 { font-size: 25px; margin: 6px 0 12px; letter-spacing: -.4px; }
.overview-next p { margin: 0; }
.overview-primary,.overview-add button { display: inline-flex; align-items: center; justify-content: center; background: var(--blue); color: white; border: 1px solid var(--blue); border-radius: 12px; padding: 12px 17px; font: inherit; font-size: 13px; font-weight: 500; text-decoration: none; min-height: 44px; }
.overview-primary { flex-shrink: 0; max-width: 260px; }
.overview-start { margin: 28px 0 34px; }
.overview-start .section-heading { align-items: center; margin-bottom: 18px; }
.overview-start .section-heading span { font-size: 12px; color: var(--muted); }
.overview-steps { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; padding: 0; list-style: none; counter-reset: onboarding; }
.overview-steps li { counter-increment: onboarding; border-top: 3px solid var(--line); padding-top: 12px; }
.overview-steps li.step-done { border-color: var(--good); }
.overview-steps li a { display: block; text-decoration: none; font-weight: 500; margin-top: 8px; }
.overview-steps li a::before { content: counter(onboarding) '. '; color: var(--muted); }
.overview-steps p { font-size: 12px; margin: 8px 0 0; }
.step-state { font-size: 11px; color: var(--muted); }
.step-done .step-state { color: var(--good); }
.overview-page .overview-note { font-size: 12px; }
.overview-columns { display: grid; grid-template-columns: minmax(0,1fr) 270px; gap: 30px; align-items: start; }
.overview-actions { min-width: 0; }
.overview-action { padding: 24px 0; border-top: 1px solid var(--line); }
.overview-action h3 { margin: 12px 0 8px; font-size: 18px; line-height: 1.4; overflow-wrap: anywhere; }
.overview-action p { overflow-wrap: anywhere; }
.overview-action summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.overview-action-links { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; margin-top: 16px; }
.overview-context { border: 1px solid var(--line); background: var(--paper); border-radius: 18px; padding: 22px; }
.overview-context section + section { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; }
.overview-context h2 { font-size: 16px; }
.overview-context a { font-size: 12px; overflow-wrap: anywhere; }
.overview-context p { font-size: 12px; }
.overview-context dl { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin: 18px 0; font-size: 12px; }
.overview-context dt { color: var(--muted); }
.overview-context dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.overview-coverage,.overview-add { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.overview-coverage table { min-width: 820px; table-layout: auto; }
.overview-coverage th,.overview-coverage td { width: auto; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.overview-coverage td span,.overview-coverage td small { display: block; font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.overview-add-form { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; }
.overview-add-form label { display: grid; gap: 8px; min-width: 0; flex: 1 1 220px; font-size: 12px; }
.overview-add-form input { width: 100%; min-height: 44px; border: 1px solid var(--line); background: var(--paper); border-radius: 12px; padding: 12px; font: inherit; }
.overview-no-actions { padding: 24px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; }
@media(max-width:1000px) { .overview-columns { grid-template-columns: 1fr; } .overview-context { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; } .overview-context section + section { border: 0; margin: 0; padding: 0; } .overview-next { align-items: start; flex-direction: column; gap: 18px; } }
@media(max-width:760px) { .overview-steps { grid-template-columns: repeat(2,minmax(0,1fr)); } .overview-context { display: block; } .overview-context section + section { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 20px; } .overview-next { padding: 20px; } .overview-next h2 { font-size: 22px; } }
