@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('./assets/manrope-cyrillic-wght-normal.woff2') format('woff2');
  unicode-range: U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('./assets/manrope-latin-wght-normal.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;
}
:root {
  color-scheme: light;
  --background: #eef0ef;
  --action: #b74832;
  --action-hover: #993a27;
  --header: #202b26;
  --on-header: #fff;
  --specimen: #d7edaf;
  --surface: #fff;
  --surface-elevated: #fff;
  --surface-soft: #f0f3f1;
  --surface-softer: #e8ede9;
  --border: #dce2de;
  --border-strong: #a7b5ad;
  --text: #202b26;
  --primary: #202b26;
  --muted: #5a6961;
  --dim: #65736b;
  --accent: #245b43;
  --accent-strong: #16422f;
  --accent-soft: #e9f2eb;
  --accent-border: #86aa92;
  --coral: #a44030;
  --warn: #805c15;
  --danger: #b03935;
  --ok: #246144;
}
* { box-sizing: border-box; letter-spacing: 0; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--text); background: var(--background); font: 14px/1.6 Manrope, sans-serif; }
button, input, textarea, select { font: inherit; }
button, summary, select { cursor: pointer; }
button { transition: background .16s, border-color .16s, color .16s; }
button:disabled { cursor: not-allowed; opacity: .5; }
button, input, textarea, select { border-radius: 6px; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--accent-border); outline-offset: 3px; }
button img, .icon { width: 18px; height: 18px; flex-shrink: 0; }
h1, h2, h3, p { margin-top: 0; }
a { color: var(--accent); }
.app-topbar { height: 72px; padding: 0 40px; background: var(--header); color: var(--on-header); border-bottom: 1px solid var(--header); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar-left, .topbar-right, .brand-mark { display: flex; align-items: center; gap: 24px; }
.brand-mark { gap: 10px; font-size: 22px; font-weight: 800; }
.brand-mark img { width: 32px; height: 32px; }
.brand-caption { font-size: 11px; color: #c4cdc7; text-transform: uppercase; }
.topbar-right { gap: 12px; }
.ghost-button, .icon-button { background: transparent; border: 1px solid var(--border); color: var(--text); min-height: 40px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 8px 14px; font-weight: 600; }
.icon-button { width: 40px; padding: 10px; }
.ghost-button:hover, .icon-button:hover { background: var(--surface-soft); border-color: var(--border-strong); }
.preview-notice { padding: 8px 24px; text-align: center; font-size: 11px; color: #60522d; background: #f5efd9; border-bottom: 1px solid #e6dfc9; }
.main-workspace { max-width: 1536px; margin: 0 auto; padding: 28px 40px 40px; }
.workspace-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.eyebrow { color: var(--coral); font-size: 11px; font-weight: 800; text-transform: uppercase; margin-bottom: 8px; }
.workspace-heading h1 { margin: 0; font-size: 34px; line-height: 1.25; font-weight: 700; }
.workspace-heading h1 > span { color: var(--action); }
.workspace-heading p { margin: 8px 0 0; color: var(--muted); }
.workspace-meta { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12px; white-space: nowrap; padding-bottom: 5px; }
.workspace-meta img { width: 16px; height: 16px; }
.workspace-inner { display: grid; grid-template-columns: minmax(360px, 44%) minmax(0, 1fr); gap: 0; align-items: stretch; background: var(--surface); border-top: 1px solid var(--border-strong); border-bottom: 1px solid var(--border); }
.studio-grid { min-width: 0; border-right: 1px solid var(--border); }
.studio { padding: 28px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-heading h2, .results-title { font-size: 19px; line-height: 1.4; font-weight: 700; margin: 0; }
.section-number { display: inline-grid; place-items: center; width: 27px; height: 27px; background: #f9e8e1; border-radius: 5px; font-size: 11px; color: var(--coral); font-weight: 700; margin-right: 10px; vertical-align: middle; }
.section-heading > span { color: var(--muted); font-size: 12px; }
.mode-tabs { display: grid; grid-template-columns: 1fr 1fr 1fr; padding: 4px; gap: 2px; background: var(--surface-soft); border-radius: 6px; margin-bottom: 20px; }
.mode-button { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 4px; min-height: 44px; background: transparent; border: 1px solid transparent; color: var(--muted); font-size: 12px; font-weight: 700; }
.mode-button.active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 5px #203b2920; }
.mode-button img { width: 16px; height: 16px; opacity: .7; }
.mode-button.active img { filter: brightness(0) invert(1); opacity: 1; }
.mode-button:hover:not(.active) { background: var(--surface-softer); }
.mode-panel { display: grid; gap: 9px; }
.field-label, .select-field label, .section-title { font-size: 12px; line-height: 1.5; font-weight: 700; color: var(--text); }
.field-label { display: flex; justify-content: space-between; gap: 8px; }
.optional { font-weight: 400; color: var(--muted); }
input[type='text'], input[type='search'], input[type='password'], input:not([type]), textarea, select { width: 100%; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); padding: 11px 12px; min-height: 44px; }
textarea { min-height: 162px; resize: vertical; line-height: 1.8; font-size: 13px; }
textarea::placeholder, input::placeholder { color: var(--dim); opacity: 1; }
textarea:focus, input:focus, select:focus { border-color: var(--accent); }
#ownNamePrompt { min-height: 110px; }
.input-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; }
.text-button { color: var(--accent); background: transparent; border: 0; padding: 4px 0; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.settings-grid { display: grid; grid-template-columns: 132px minmax(0,1fr); gap: 16px; margin-top: 20px; position: relative; }
.controls-grid { display: grid; gap: 14px; }
.settings-grid:has(.unique-only:not([hidden])) { grid-template-columns: minmax(0,1fr); }
.settings-grid:has(.unique-only:not([hidden])) .controls-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.controls-grid:not(:has(> :not([hidden]))) { display: none; }
.settings-grid:has(.controls-grid:not(:has(> :not([hidden])))) { grid-template-columns: minmax(0,1fr); }
.select-field { display: grid; gap: 8px; }
.select-wrap select { font-size: 13px; appearance: none; padding-right: 32px; background: url('./assets/chevron-down.svg') right 10px center / 16px no-repeat; }
.section-title { margin: 0 0 8px; }
.actions { margin-top: 18px; }
.file-row { display: flex; align-items: center; gap: 10px; }
.file-button { display: inline-flex; gap: 7px; align-items: center; padding: 8px 0; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--accent); position: relative; flex-shrink: 0; }
.file-button img { width: 16px; height: 16px; }
.file-button input { position: absolute; width: 100%; height: 100%; inset: 0; opacity: 0; cursor: pointer; }
.file-button:focus-within { outline: 3px solid var(--accent-border); outline-offset: 3px; border-radius: 4px; }
.file-name { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; min-width: 0; }
.hint { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.7; }
.submit { background: var(--action); border: 1px solid var(--action); color: #fff; padding: 12px 16px; min-height: 48px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 12px; }
.submit:hover:not(:disabled) { background: var(--action-hover); border-color: var(--action-hover); }
.submit img { filter: brightness(0) invert(1); }
.launch-card { margin-top: 20px; width: 100%; }
.form-note { margin: 14px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; text-align: center; }
.results-workspace { min-width: 0; padding: 28px 30px; background: #fbfcfb; }
.results-head { min-height: 48px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); padding: 0 0 18px; }
.results-count { display: inline-grid; place-items: center; min-width: 25px; height: 25px; margin-left: 6px; padding: 0 6px; font-size: 12px; color: var(--muted); background: #e8ece9; border-radius: 4px; vertical-align: middle; }
.results-session { font-size: 11px; color: var(--muted); padding-top: 6px; }
.empty-state { padding-top: 20px; }
.result-footer { display: flex; gap: 10px; border-top: 1px solid var(--border); padding-top: 18px; margin-top: 16px; color: var(--muted); font-size: 11px; align-items: flex-start; }
.result-footer img { margin-top: 2px; opacity: .7; }
.chat { display: flex; flex-direction: column; gap: 20px; padding-top: 20px; }
.chat:empty { display: none; }
.message { min-width: 0; overflow-wrap: anywhere; }
.message.user { padding: 0 0 20px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.message-label { font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 10px; }
.meta-line, .check-meta, .mode-tags { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px; color: var(--muted); }
.meta-line { margin-bottom: 14px; }
.pill, .mode-tag { background: var(--surface-soft); border: 1px solid var(--border); padding: 3px 7px; border-radius: 4px; }
.brand-card { padding: 24px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 6px; margin-bottom: 18px; }
.brand-head, .check-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.brand-title { margin: 0; font-size: 28px; line-height: 1.3; font-weight: 700; min-width: 0; }
.brand-description { margin: 12px 0 20px; color: var(--muted); font-size: 13px; }
.brand-detail summary { font-size: 12px; font-weight: 600; color: var(--accent); padding: 0 0 12px; }
.brand-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 22px; margin: 8px 0 22px; }
.field.wide { grid-column: 1 / -1; }
.field b { display: block; font-size: 11px; margin-bottom: 5px; color: var(--muted); font-weight: 500; }
.field span { font-size: 13px; }
.checks-title { border-top: 1px solid var(--border); padding-top: 18px; font-size: 12px; font-weight: 700; margin-top: 6px; }
.check-action { display: flex; gap: 14px; justify-content: space-between; align-items: center; padding-top: 12px; flex-wrap: wrap; }
.check-action-text { color: var(--muted); font-size: 11px; flex: 1 1 150px; }
.check-button { color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-border); padding: 9px 12px; font-size: 12px; font-weight: 700; min-height: 40px; }
.check-button:hover { background: var(--surface-softer); }
.check-card { padding-top: 16px; margin-top: 12px; border-top: 1px solid var(--border); }
.source { font-size: 12px; font-weight: 700; }
.check-meta { margin: 10px 0; gap: 10px; }
.risk, .status, .risk-badge { font-size: 10px; font-weight: 700; padding: 4px 8px; background: var(--surface-soft); border-radius: 4px; max-width: 200px; }
.risk.passed, .risk.low, .risk-low, .risk_low, .available, .risk-badge.low { color: var(--ok); background: var(--accent-soft); }
.risk.medium, .risk-medium, .risk_medium, .manual_review, .risk-badge.medium { color: var(--warn); background: #fbf0d5; }
.risk.rejected, .risk.high, .risk-high, .risk_high, .exact_match_found, .risk-badge.high, .error { color: var(--danger); background: #fbece8; }
.review-summary { margin-top: 16px; border-left: 3px solid var(--accent-border); padding: 2px 0 2px 14px; font-size: 12px; }
.risk-score { display: grid; gap: 10px; }
.risk-badge { justify-self: start; }
.metric-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin-top: 18px; }
.metric-value { display: block; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.metric-label { color: var(--muted); font-size: 10px; line-height: 1.5; display: block; }
.official-alert { font-size: 12px; padding: 12px; margin: 14px 0; color: var(--warn); background: #fbf3df; border-left: 3px solid #b58d39; }
.result-section { margin-top: 16px; border-top: 1px solid var(--border); }
.result-section summary, .result-section-title { padding: 12px 0; font-size: 12px; font-weight: 700; }
.match { border-bottom: 1px solid var(--border); padding: 14px 0; }
.match-row { display: flex; align-items: flex-start; gap: 14px; }
.match-content { min-width: 0; flex: 1; }
.match-title { font-size: 13px; font-weight: 700; }
.match-detail, .empty-matches { color: var(--muted); font-size: 11px; line-height: 1.8; margin-top: 7px; overflow-wrap: anywhere; }
.match-visual-link { border: 0; padding: 0; background: var(--surface); }
.match-visual { width: 76px; min-height: 64px; display: grid; place-items: center; background: var(--surface-soft); font-size: 12px; }
.match-visual img { width: 76px; height: 64px; object-fit: contain; }
.critical-risk .match-title, .official-risk .match-title { color: var(--danger); }
.loading, .review-loading { display: flex; align-items: flex-start; gap: 12px; font-size: 12px; padding: 18px 0; color: var(--muted); }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; flex-shrink: 0; animation: spin 1s linear infinite; }
.elapsed { display: block; font-variant-numeric: tabular-nums; color: var(--accent); margin-top: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.usage-dialog { padding: 28px; width: min(650px,calc(100% - 32px)); max-height: 85vh; overflow: auto; border: 1px solid var(--border); border-radius: 8px; color: var(--text); background: var(--surface); }
.usage-dialog::backdrop { background: #182a2370; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.dialog-heading h2 { margin: 0; font-size: 20px; }
.usage-head { font-size: 11px; color: var(--muted); margin-bottom: 24px; }
.usage-group-title { font-size: 12px; font-weight: 700; margin: 20px 0 8px; }
.usage-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0 20px; }
.usage-card { padding: 12px 0; border-bottom: 1px solid var(--border); }
.usage-value { display: block; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 18px; }
.usage-label { color: var(--muted); font-size: 10px; }
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(100%,400px); }
.auth-card .brand-mark { margin-bottom: 40px; }
.auth-card h1 { font-size: 28px; margin-bottom: 10px; }
.auth-card p { color: var(--muted); margin-bottom: 30px; }
.auth-grid { display: grid; gap: 12px; }
.auth-grid label { font-size: 12px; font-weight: 600; }
.auth-grid .submit { margin-top: 8px; }
.auth-error { color: var(--danger); font-size: 12px; min-height: 20px; }
.disabled-register { border-top: 1px solid var(--border); padding-top: 20px; color: var(--muted); font-size: 12px; }
.image-lightbox { padding: 0; border: 0; border-radius: 8px; max-width: 90vw; max-height: 90vh; }
.image-lightbox::backdrop { background: #182a23bb; }
.image-lightbox-panel { position: relative; max-width: 90vw; padding: 40px; background: #fff; border-radius: 8px; }
.image-lightbox-panel > img { display: block; width: min(640px, 65vw); height: min(640px, 65vh); object-fit: contain; }
.image-lightbox-close { position: absolute; right: 8px; top: 8px; width: 32px; height: 32px; background: #fff; border: 1px solid var(--border); font-size: 22px; }
.app-topbar .ghost-button, .app-topbar .icon-button { color: #e6ede7; border-color: #5f6a62; }
.app-topbar .ghost-button:hover, .app-topbar .icon-button:hover { background: #34443a; }
.app-topbar button img { filter: brightness(0) invert(1); }
.header-section { height: 72px; display: flex; align-items: center; border-bottom: 3px solid var(--specimen); margin-left: 34px; font-size: 13px; }
.workspace-divider { margin: 0 10px; color: var(--border-strong); }
.eyebrow { display: flex; align-items: center; gap: 6px; }
.eyebrow > span { width: 6px; height: 6px; background: var(--coral); }
.number-stepper { display: grid; grid-template-columns: 38px minmax(0,1fr) 38px; border: 1px solid var(--border-strong); border-radius: 6px; height: 46px; overflow: hidden; }
.number-stepper button { border: 0; border-radius: 0; padding: 0; background: transparent; display: grid; place-items: center; }
.number-stepper button:hover:not(:disabled) { background: var(--surface-soft); }
.number-stepper input { border: 0; min-width: 0; width: 100%; padding: 0; color: var(--text); background: transparent; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; appearance: textfield; border-radius: 0; }
.number-stepper input::-webkit-inner-spin-button, .number-stepper input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.number-stepper input:focus-visible { outline-offset: -3px; }
.class-trigger { width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: space-between; text-align: left; gap: 10px; padding: 11px 13px; border: 1px solid var(--border-strong); color: var(--text); background: var(--surface); font-size: 12px; }
.class-trigger:hover { border-color: var(--accent); background: var(--surface-soft); }
.class-trigger img { width: 16px; height: 16px; }
.selected-classes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.class-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; font-size: 11px; color: var(--accent-strong); background: var(--accent-soft); border: 1px solid var(--accent-border); border-radius: 4px; max-width: 100%; }
.class-chip span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.class-chip img { width: 12px; height: 12px; }
.class-dialog { width: min(640px,calc(100% - 32px)); max-height: min(820px,90dvh); padding: 0; border: 1px solid var(--border); border-radius: 8px; color: var(--text); background: var(--surface); overflow: hidden; }
.class-dialog[open] { display: flex; flex-direction: column; animation: dialog-enter .22s cubic-bezier(.2,.8,.2,1); }
.class-dialog::backdrop { background: #172a2266; backdrop-filter: blur(3px); }
.class-dialog-header { display: flex; align-items: center; justify-content: space-between; padding: 24px 26px 18px; gap: 16px; }
.class-dialog-header h2 { margin: 0; font-size: 24px; line-height: 1.3; }
.class-dialog-header .eyebrow { font-size: 10px; margin-bottom: 6px; }
.class-dialog-controls { padding: 0 26px 16px; border-bottom: 1px solid var(--border); }
.class-search { position: relative; }
.class-search > img { width: 18px; height: 18px; position: absolute; top: 14px; left: 13px; opacity: .65; }
.class-search input { padding-left: 40px; background: var(--background); border-color: var(--border); font-size: 13px; }
.class-filters { display: flex; gap: 6px; margin-top: 14px; }
.class-filters button { padding: 7px 11px; color: var(--muted); background: transparent; border: 1px solid transparent; font-size: 12px; font-weight: 600; }
.class-filters button.active { color: var(--accent-strong); border-color: var(--accent-border); background: var(--accent-soft); }
.class-filters button > span { font-size: 10px; margin-left: 4px; }
.class-dialog-body { overflow: auto; overscroll-behavior: contain; min-height: 120px; padding: 0 26px; }
.class-list-label { display: flex; justify-content: space-between; gap: 10px; padding: 13px 0 9px; color: var(--muted); font-size: 10px; }
.class-card { display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-bottom: 1px solid var(--border); cursor: pointer; font-size: 13px; min-height: 54px; }
.class-card:hover, .class-card:has(input:checked) { background: var(--accent-soft); }
.class-card input { width: 17px; height: 17px; accent-color: var(--accent); margin: 0; flex-shrink: 0; }
.class-card > span { display: flex; align-items: center; gap: 14px; }
.class-number { display: grid; place-items: center; width: 30px; height: 30px; flex-shrink: 0; background: var(--surface-soft); border-radius: 4px; font-size: 11px; font-variant-numeric: tabular-nums; }
.class-card:has(input:checked) .class-number { background: var(--accent); color: #fff; }
.class-text { line-height: 1.6; }
.no-classes { padding: 26px 0; text-align: center; color: var(--muted); font-size: 13px; }
.class-selection { padding: 16px 26px; border-top: 1px solid var(--border); background: #f7f9f7; flex-shrink: 0; }
.class-selection > div:first-child { display: flex; align-items: center; justify-content: space-between; }
.class-selection strong { font-size: 12px; font-weight: 600; }
.class-selection .selected-classes { max-height: 90px; overflow: auto; }
.class-selection .selected-classes:empty { margin-top: 0; }
.class-dialog-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 26px; border-top: 1px solid var(--border); }
.class-dialog-footer .submit { min-height: 42px; font-size: 12px; padding: 9px 18px; }
.name-stage { position: relative; overflow: hidden; background: #293a32; color: var(--specimen); padding: 20px 24px; min-height: 245px; display: flex; flex-direction: column; justify-content: space-between; transition: background .3s, color .3s; }
.name-stage[data-direction='beauty'] { background: #efe0da; color: #713b37; }
.name-stage[data-direction='tech'] { background: #dde6eb; color: #294f62; }
.stage-topline, .stage-bottomline { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 10px; font-size: 10px; line-height: 1.6; }
.stage-topline > span:first-child { display: flex; align-items: center; gap: 7px; }
.stage-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.stage-topline { opacity: .95; }.stage-bottomline { padding-top: 13px; border-top: 1px solid currentColor; }
.specimen-word { display: flex; align-items: baseline; padding: 14px 0 16px; font-size: 84px; font-weight: 800; line-height: 1; position: relative; z-index: 1; transform: translate(var(--pointer-x,0px),var(--pointer-y,0px)); transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.specimen-word > span { display: inline-block; animation: letter-enter .65s cubic-bezier(.18,.8,.2,1) both; animation-delay: calc(var(--letter-index,0) * 45ms); }
.specimen-word > span:nth-child(2) { --letter-index: 1; }.specimen-word > span:nth-child(3) { --letter-index: 2; }.specimen-word > span:nth-child(4) { --letter-index: 3; }.specimen-word > span:nth-child(5) { --letter-index: 4; }
.specimen-word em { color: #f29b79; font-style: normal; }
.stage-registration { position: absolute; right: 18px; bottom: 55px; font-size: 72px; line-height: 1; font-weight: 400; opacity: .12; transform: rotate(-12deg); pointer-events: none; }
.starter-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 24px 0 9px; }
.starter-heading h3 { margin: 0; font-size: 14px; font-weight: 700; }.starter-heading > span { color: var(--muted); font-size: 10px; }
.starter-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; color: var(--text); text-align: left; }
.starter-row:hover { background: var(--surface-soft); }.starter-row[aria-pressed='true'] .starter-copy strong { color: var(--action); }
.starter-icon { width: 38px; height: 38px; border-radius: 6px; display: grid; place-items: center; flex-shrink: 0; }.starter-icon.coffee { background: #f3e3cd; }.starter-icon.beauty { background: #f1dfdf; }.starter-icon.tech { background: #dfe9ef; }
.starter-icon img { width: 19px; height: 19px; opacity: .8; }.starter-copy { display: grid; gap: 2px; flex: 1; min-width: 0; }.starter-copy strong { font-size: 12px; font-weight: 700; }.starter-copy > span { color: var(--muted); font-size: 10px; }.starter-arrow { width: 16px; height: 16px; opacity: .55; transition: transform .2s; }
.starter-row:hover .starter-arrow { transform: translate(2px,-2px); }
.example-note { font-size: 10px; color: var(--muted); margin-top: 14px; }.example-mark { color: var(--coral); font-size: 16px; margin-right: 3px; }
.result-views { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--border); border-radius: 6px; margin-top: -4px; }
.result-views button { color: var(--muted); font-size: 10px; font-weight: 600; padding: 5px 9px; border: 0; border-radius: 3px; background: transparent; }
.result-views button.active { color: var(--accent-strong); background: var(--accent-soft); }
.check-report { border-top: 1px solid var(--border); margin-top: 6px; }
.check-report > summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 16px; color: var(--accent); font-size: 12px; font-weight: 700; list-style: none; }
.check-report > summary::-webkit-details-marker { display: none; }
.check-report > summary img { width: 16px; height: 16px; transition: transform .18s; }
.check-report[open] > summary img { transform: rotate(180deg); }
.results-title { white-space: nowrap; }
.review-summary.high { border-color: var(--danger); }.review-summary.medium { border-color: var(--warn); }
.usage-dialog[open], .image-lightbox[open] { animation: dialog-enter .22s cubic-bezier(.2,.8,.2,1); }
.mode-panel:not([hidden]) { animation: panel-enter .2s ease-out; }
.message { animation: panel-enter .3s ease-out; }
.submit > img { transition: transform .18s ease-out; }.submit:hover:not(:disabled) > img { transform: translateX(4px); }.submit:active:not(:disabled) { transform: translateY(1px); }
.brand-card { transition: border-color .2s, box-shadow .2s; }.brand-card:hover { border-color: var(--accent-border); box-shadow: 0 5px 18px #203b2908; }
@keyframes letter-enter { from { opacity: 0; transform: translateY(35px) rotate(6deg); } to { opacity: 1; transform: translateY(0) rotate(0); } }
@keyframes dialog-enter { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes panel-enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1100px) { .specimen-word { font-size: 68px; }.stage-bottomline { flex-wrap: wrap; }.name-stage { padding: 20px; } }
@media (max-width: 520px) { .class-dialog { width: calc(100% - 20px); max-height: 92dvh; }.class-dialog-header { padding: 20px 18px 16px; }.class-dialog-controls, .class-dialog-body { padding-left: 18px; padding-right: 18px; }.class-dialog-header h2 { font-size: 22px; }.class-selection, .class-dialog-footer { padding: 14px 18px; }.class-card { font-size: 12px; padding: 10px 4px; gap: 8px; }.class-card > span { gap: 10px; }.class-search input { font-size: 16px; }.mode-button { gap: 5px; font-size: 11px; }.mode-button img { width: 14px; height: 14px; }.name-stage { min-height: 225px; }.stage-topline { font-size: 9px; }.specimen-word { font-size: 64px; } }

@media (max-width: 1100px) {
  .app-topbar { padding: 0 24px; }.main-workspace { padding: 24px; }.studio { padding: 22px; }.results-workspace { padding: 22px; }.section-caption { display: none; }.brand-head { flex-wrap: wrap; }.brand-card { padding: 18px; }.results-session { display: none; }.workspace-meta { display: none; }
}
@media (max-width: 820px) {
  .app-topbar { height: 64px; padding: 0 18px; }.brand-caption, .header-section { display: none; }.brand-mark { font-size: 20px; }.brand-mark img { width: 28px; height: 28px; }.topbar-right { gap: 8px; }
  .main-workspace { padding: 22px 16px; }.workspace-heading { margin-bottom: 22px; }.workspace-heading h1 { font-size: 28px; }.workspace-heading p { font-size: 12px; }.workspace-inner { grid-template-columns: minmax(0,1fr); }.studio-grid { border-right: 0; border-bottom: 1px solid var(--border); }.studio, .results-workspace { padding: 22px 20px; }
  textarea { min-height: 160px; font-size: 16px; } input[type='text'], input[type='password'], input[type='search'], input:not([type]), select, .select-wrap select { font-size: 16px; }
  .usage-dialog { padding: 20px; }.usage-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.brand-grid { grid-template-columns: minmax(0,1fr); }.metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.results-session { display: block; }
  .results-title { font-size: 17px; }.results-head { gap: 8px; flex-wrap: wrap; }.result-views { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Shared surfaces for accounts and the brief editor. */
:root {
  --background: #f7f8f7;
  --header: #fff;
  --text: #182720;
  --muted: #52625b;
  --action: #215c47;
  --action-hover: #154833;
  --border: #d8dfda;
}
.app-topbar { background: white; color: var(--text); border-color: var(--border); height: 68px; padding-inline: max(24px, calc((100vw - 1104px) / 2)); }
.topbar-left, .topbar-right { gap: 14px; }
.mast-caption { color: var(--muted); font-size: 13px; }
.mast-divider { width: 1px; height: 21px; background: var(--border); }
.app-topbar .ghost-button { color: var(--text); border-color: transparent; }
.app-topbar .ghost-button:hover { background: var(--surface-soft); border-color: var(--border); }
.app-topbar button img { filter: none; }
.app-topbar .account-button { background: #edf3ee; color: var(--accent-strong); }
#accountName { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main-workspace { max-width: 1024px; padding: 46px 32px 80px; }
.workspace-heading { align-items: center; margin-bottom: 24px; }
.workspace-heading h1 { font-weight: 800; font-size: 38px; }
.workspace-heading .ghost-button { background: white; font-size: 13px; }
.workspace-inner { display: block; background: transparent; border: 0; }
.studio-grid { border: 1px solid var(--border); border-radius: 8px; background: white; box-shadow: 0 3px 10px #173b2510; }
.studio { padding: 24px; }
.mode-tabs { width: fit-content; gap: 5px; padding: 0; background: transparent; margin-bottom: 22px; }
.mode-tabs button { padding-inline: 15px; min-height: 36px; }
.mode-tabs button.active { background: #e6efe8; color: #16422f; box-shadow: none; border-color: #b8cebd; }
.mode-tabs button.active img { filter: none; }
.mode-panel .field-label { font-size: 15px; }
.mode-panel textarea { min-height: 112px; padding: 12px 14px; font-size: 15px; line-height: 1.65; background: #fcfdfb; }
.composer-tools { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 14px 20px; border-top: 1px solid var(--border); padding-top: 18px; margin-top: 20px; }
.composer-tools .settings-grid { margin: 0; grid-template-columns: 108px 156px; gap: 14px; }
.composer-tools .selected-classes { flex-basis: 100%; order: 2; margin: 0; }
.composer-tools .launch-card { margin: 0 0 0 auto; width: auto; padding-inline: 24px; min-height: 44px; }
.composer-tools .actions { margin: 0; }
.composer-tools .number-stepper, .composer-tools .class-trigger { min-height: 40px; height: 40px; }
.composer-tools .file-row { gap: 0 7px; max-width: 220px; min-height: 40px; }
.composer-tools .file-button { flex-shrink: 0; }
.composer-tools .file-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-tools .settings-grid:has(.unique-only:not([hidden])) { width: 100%; grid-template-columns: 1fr 1fr; }
.results-workspace { background: transparent; padding: 36px 0 0; }
.results-head { border: 0; padding: 0; min-height: 0; align-items: center; }
.results-title { font-size: 22px; font-weight: 750; }
.result-placeholder { margin: 18px 0; color: var(--muted); }
.chat { padding: 0; margin-top: 18px; }
.chat { --result-inset: clamp(16px, 3vw, 24px); }
.chat > .message { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.message.assistant > .loading { padding: 18px var(--result-inset); align-items: center; }
.message.assistant > .review-loading, .message.assistant > .continue-action,
.message.assistant > .official-alert { margin-inline: var(--result-inset); }
.message.assistant > .message-label + div { padding: 16px var(--result-inset); }
.message.assistant > .message-label, .message.assistant > .meta-line { display: none; }
.report-action { display: flex; flex-direction: row-reverse; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.report-action .ghost-button { min-height: 36px; padding: 6px 12px; font-size: 12px; color: var(--accent-strong); background: var(--surface); }
.report-action .ghost-button:hover:not(:disabled) { background: var(--accent-soft); }
.report-action [role="status"] { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.report-action [role="status"]:empty { display: none; }
.message.assistant > .report-action { padding: 10px var(--result-inset); border-bottom: 1px solid var(--border); }
.brand-card { border: 0; border-radius: 0; border-bottom: 1px solid var(--border); margin: 0; padding: 21px 24px; }
.brand-card:last-child { border-bottom: 0; }
.message.assistant > .brand-card:first-child { border-start-start-radius: 8px; border-start-end-radius: 8px; }
.message.assistant > .brand-card:last-child { border-end-start-radius: 8px; border-end-end-radius: 8px; }
.brand-card:hover { box-shadow: none; }
.brand-title { font-size: 25px; line-height: 1.25; }
.brand-description { margin: 4px 0 10px; }
/* Candidate analysis reads as an editorial note in the studio and in history. */
.brand-detail { container-type: inline-size; }
.brand-card .brand-detail > summary {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 0;
  list-style: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.brand-detail > summary::-webkit-details-marker { display: none; }
.brand-detail > summary img { width: 15px; height: 15px; }
.brand-detail[open] > summary img { transform: rotate(180deg); }
.name-analysis {
  display: grid;
  gap: 22px;
  padding-block: 20px 8px;
  border-top: 1px solid var(--border);
  overflow-wrap: anywhere;
  text-align: start;
}
.name-analysis :is(dl, dd, figure, blockquote) { margin: 0; }
.name-analysis dt, .name-analysis figcaption {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.name-analysis dd, .name-analysis blockquote { white-space: pre-line; }
.name-analysis dd { font-size: 14px; line-height: 1.6; color: var(--text); }
.name-analysis dd + dt { margin-top: 14px; }
.name-portrait, .name-tradeoffs { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 26px; }
.name-story dd:first-of-type { font-size: 18px; line-height: 1.5; font-weight: 600; }
.name-character { border-inline-start: 1px solid var(--border); padding-inline-start: 22px; }
.name-slogan { padding: 13px 18px; border-inline-start: 3px solid var(--accent); background: var(--accent-soft); }
.name-slogan figcaption { color: var(--accent-strong); }
.name-slogan blockquote { font-size: 21px; line-height: 1.4; font-weight: 650; color: var(--accent-strong); }
.name-tradeoffs { grid-template-columns: repeat(2, minmax(0,1fr)); }
.name-tradeoffs dt { display: flex; align-items: center; gap: 7px; color: var(--text); }
.name-tradeoffs img { width: 16px; height: 16px; }
.name-decision { padding-block-start: 14px; border-top: 1px solid var(--border); }
.name-decision dt { color: var(--accent-strong); }
@container (max-width: 570px) {
  .name-analysis { gap: 16px; padding-block-start: 14px; }
  .name-portrait, .name-tradeoffs { grid-template-columns: minmax(0,1fr); gap: 15px; }
  .name-character { border-inline-start: 0; padding-inline-start: 0; }
  .name-story dd:first-of-type { font-size: 16px; }
  .name-slogan blockquote { font-size: 18px; }
}
.message.user { padding: 0; }
.message.user summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; min-height: 44px; padding: 12px var(--result-inset); border-radius: 8px; color: var(--text); font-size: 13px; font-weight: 650; }
.message.user summary::-webkit-details-marker { display: none; }
.message.user summary::after { content: ""; width: 16px; height: 16px; flex: none; background: url('./assets/chevron-down.svg') center / contain no-repeat; }
.message.user details[open] > summary::after { transform: rotate(180deg); }
.message.user details > p { margin: 0; padding: 0 var(--result-inset) 16px; white-space: pre-wrap; }
.app-shell[data-registry="off"] :is(.mode-tabs, .risk, .class-field, #selectedClasses, [data-continue-unique], [data-force-deep-candidate]) { display: none; }
.app-shell[data-registry="off"] .settings-grid { grid-template-columns: 110px; }
.preferences, .templates { width: min(450px, calc(100% - 32px)); }
.preferences { min-height: min(410px, 85vh); }
.preferences #profileName { color: var(--muted); overflow-wrap: anywhere; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-block: 1px solid var(--border); padding: 18px 0; }
.setting-row small { display: block; color: var(--muted); margin-top: 4px; }
.setting-row input { appearance: none; width: 42px; height: 24px; min-width: 42px; margin: 0; padding: 3px; border: 1px solid #8d9b92; border-radius: 20px; background: #c9d0cb; cursor: pointer; }
.setting-row input::before { content: ""; display: block; width: 16px; height: 16px; border-radius: 50%; background: white; box-shadow: 0 1px 3px #243d3040; transition: transform .14s ease; }
.setting-row input:checked { background: var(--action); border-color: var(--action); }
.setting-row input:checked::before { transform: translateX(17px); }
#settingsStatus { min-height: 18px; font-size: 12px; color: var(--muted); margin: 8px 0 16px; }
.model-row { position: relative; display: grid; gap: 7px; margin-bottom: 20px; }
.model-trigger, .model-menu button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 42px; padding: 8px 12px; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.model-trigger { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-weight: 650; }
.model-trigger:hover, .model-trigger[aria-expanded="true"] { border-color: var(--accent); }
.model-trigger[aria-disabled] { opacity: .65; cursor: progress; }
.model-trigger img { width: 16px; height: 16px; transition: transform .15s ease; }
.model-trigger[aria-expanded="true"] img { transform: rotate(180deg); }
.model-menu { position: absolute; z-index: 2; top: calc(100% + 5px); inset-inline: 0; padding: 4px; border: 1px solid var(--accent-border); border-radius: 10px; background: var(--surface); box-shadow: 0 8px 22px #203b291c; }
.model-menu button { border: 0; border-radius: 6px; background: transparent; }
.model-menu button:hover, .model-menu button:focus-visible { background: var(--surface-soft); }
.model-menu button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.model-menu button[aria-checked="true"] { color: var(--accent-strong); background: var(--accent-soft); font-weight: 700; }
.model-menu button[aria-checked="true"]::after { content: ""; width: 16px; height: 16px; background: url('./assets/check.svg') center/contain no-repeat; }
.ledger-dialog { width: min(740px, calc(100% - 24px)); }
.ledger-dialog h3 { margin: 22px 0 4px; font-size: 16px; }
.ledger-totals { display: flex; flex-wrap: wrap; gap: 16px 36px; padding: 16px 0; border-block: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.ledger-totals div { display: grid; align-content: start; gap: 2px; }
.ledger-totals span, .ledger-note, .ledger-rows small { color: var(--muted); font-size: 12px; }
.ledger-totals strong { font-size: 23px; color: var(--accent-strong); }
.ledger-totals b { font-size: 20px; }
.ledger-note { margin: 7px 0; }
.ledger-rows { list-style: none; padding: 0; margin: 0; }
.ledger-rows li { border-bottom: 1px solid var(--border); }
.ledger-rows summary { display: grid; grid-template-columns: minmax(0, 1fr) auto 16px; align-items: center; gap: 12px; padding: 12px 0; list-style: none; }
.ledger-rows summary::-webkit-details-marker { display: none; }
.ledger-rows summary strong, .ledger-rows small { display: block; overflow-wrap: anywhere; }
.ledger-amount { font-size: 13px; font-variant-numeric: tabular-nums; }
.ledger-rows summary img { width: 16px; }
.ledger-rows details[open] summary img { transform: rotate(180deg); }
.ledger-detail { background: var(--surface-soft); padding: 10px 14px; margin: 0 0 12px; font-size: 13px; overflow-wrap: anywhere; }
.ledger-detail p { margin: 0; }
.ledger-detail p + p { margin-top: 6px; color: var(--muted); }
#ledgerStatus:empty { margin: 0; }
#ledgerMore { margin-top: 14px; }
@media(max-width: 500px) {
  .ledger-totals { gap: 8px 20px; }
  .ledger-totals div:first-child { flex-basis: 100%; }
  .ledger-rows summary { gap: 6px; }
}
.auth-screen { padding: 0; min-height: 100svh; grid-template-columns: minmax(300px,.85fr) minmax(420px,1.15fr); }
.auth-mast { position: relative; overflow: hidden; isolation: isolate; align-self: stretch; justify-self: stretch; display: flex; flex-direction: column; justify-content: space-between; padding: 42px; color: #f6f8ee; background: #204838; }
.auth-mast .brand-mark { font-size: 33px; }
.auth-mast .brand-mark img { width: 44px; height: 44px; }
.auth-monogram { position: absolute; top: 50%; left: 50%; width: 86%; transform: translate(-50%, -50%) rotate(-9deg); border-radius: 16%; }
.auth-caption { font-size: 18px; }
.auth-card { width: min(365px, calc(100% - 48px)); padding: 32px 0; }
.auth-card h1 { font-size: 34px; font-weight: 800; margin-bottom: 28px; }
.auth-grid { gap: 6px; }
.auth-grid input { margin-bottom: 12px; }
.auth-grid label { font-size: 14px; }
.auth-grid .hint { margin: 0; font-size: 12px; }
.auth-error:empty { min-height: 0; }
@media (max-width: 760px) {
  .auth-screen { display: flex; flex-direction: column; min-height: 100svh; }
  .auth-mast { padding: 18px 24px; flex-direction: row; align-items: center; }
  .auth-monogram { display: none; }
  .auth-mast .brand-mark { font-size: 22px; }
  .auth-mast .brand-mark img { width: 30px; height: 30px; }
  .auth-caption { font-size: 12px; }
  .auth-card { margin: 64px auto auto; }
  .mast-caption, .mast-divider { display: none; }
  .app-topbar { height: 60px; padding-inline: 16px; }
  .topbar-right { gap: 4px; }
  .main-workspace { padding: 28px 16px 48px; }
  .workspace-heading h1 { font-size: 28px; }
  .workspace-heading { gap: 10px; margin-bottom: 16px; }
  .studio { padding: 16px; }
  .composer-tools { gap: 12px; }
  .composer-tools .launch-card { width: 100%; margin: 0; order: 3; }
  .composer-tools .file-row { max-width: 150px; }
  .brand-card { padding: 18px 14px; }
  .results-workspace { padding-top: 28px; }
  #accountName { max-width: 100px; }
}
@media (max-width: 400px) {
  .workspace-heading .ghost-button { font-size: 12px; padding-inline: 8px; }
  .composer-tools .settings-grid:has(.unique-only:not([hidden])) { grid-template-columns: 1fr; }
  .composer-tools .settings-grid { grid-template-columns: 96px minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .app-topbar .account-button { width: 40px; padding: 8px; }
  .app-topbar #accountName { display: none; }
}

.history-dialog { width: min(790px, calc(100% - 24px)); overflow-wrap: anywhere; }
.history-report-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin: 6px 0 14px; }
.history-report-head .history-meta { margin: 0; }
.history-dialog h3 { margin: 22px 0 12px; font-size: 17px; }
.history-list { list-style: none; margin: 8px 0 16px; padding: 0; }
.history-list li + li { border-top: 1px solid var(--border); }
.history-row { display: flex; gap: 18px; justify-content: space-between; align-items: center; text-align: left; width: 100%; padding: 16px 8px; border: 0; background: transparent; border-radius: 6px; color: var(--text); }
.history-row:hover, .history-row:focus-visible { background: var(--accent-soft); }
.history-row strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 15px; }
.history-row small, .history-meta, .history-brief small { display: block; color: var(--muted); font-size: 12px; }
.history-row small { margin-bottom: 5px; }
.history-count { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 12px; }
.history-count img { width: 16px; }
.history-brief { padding: 16px 18px; background: var(--surface-soft); border-radius: 8px; }
.history-brief h3 { margin: 0; }
.history-brief p { white-space: pre-wrap; margin: 8px 0; }
.history-brief details { margin-top: 12px; }
.history-results { border: 1px solid var(--border); border-radius: 8px; overflow: clip; }
#historyStatus:empty { display: none; }
@media (max-width: 520px) {
  .history-row { display: grid; gap: 6px; }
  .history-count { justify-content: space-between; }

}
@media (max-width: 380px) {
  .app-topbar { gap: 6px; padding-inline: 10px; }
  .topbar-right { gap: 2px; }
}


.app-topbar #usageOpen { gap: 8px; border: 1px solid var(--border); background: var(--surface); }
.app-topbar #usageOpen:hover { border-color: var(--accent-border); background: var(--accent-soft); }
#headerSpend { color: var(--accent-strong); font-variant-numeric: tabular-nums; white-space: nowrap; }
#usageOpen img { width: 13px; height: 13px; }
@media (max-width: 600px) {
  .app-topbar { height: auto; display: grid; grid-template-columns: 1fr auto auto; gap: 4px 8px; padding-block: 8px; }
  .topbar-right { display: contents; }
  #historyOpen { grid-area: 1 / 2; }
  #settingsOpen { grid-area: 1 / 3; }
  .app-topbar #usageOpen { grid-area: 2 / 1 / 3 / -1; min-height: 34px; justify-content: flex-start; }
  #headerSpend { margin-inline-start: auto; }
}
