/* Collective: a quiet, optical layer over the working application. */
:root {
  color-scheme: light;
  --ink: #202126;
  --muted: #64666f;
  --paper: #f1f2f5;
  --line: rgba(43, 48, 62, .11);
  --green: #282a31;
  --gold: #737782;
  --gold-light: #eceef2;
  --danger: #a53736;
  --accent: #1857cc;
  --accent-deep: #1648a6;
  --accent-soft: #e9f1ff;
  --glass: rgba(255, 255, 255, .63);
  --glass-edge: rgba(255, 255, 255, .9);
  --glass-shadow: 0 12px 38px -20px rgba(34, 42, 61, .22), 0 1px 3px rgba(34, 42, 61, .035);
}
html { min-width: 280px; background: var(--paper); }
body {
  background: radial-gradient(ellipse at 95% 8%, rgba(86, 147, 245, .14), transparent 48%), linear-gradient(145deg, #fafbfe 0%, #f2f4f9 42%, #e7edf7 100%);
  background-attachment: fixed;
  font-family: var(--app-font, 'Manrope', ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font-family: inherit; }
button, .btn, .text-btn, summary { -webkit-tap-highlight-color: transparent; }
button, .btn, .text-btn { min-height: 44px; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible,
select:focus-visible, summary:focus-visible, :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
h1, h2, h3 { font-weight: 600; color: var(--ink); }
h1 { font-size: clamp(34px, 4vw, 50px); line-height: 1.12; letter-spacing: -.055em; }
h2 { letter-spacing: -.04em; font-size: 24px; line-height: 1.25; }
h3 { letter-spacing: -.018em; }
.eyebrow { font-size: 10px; letter-spacing: .11em; font-weight: 650; color: var(--muted); }
.shell { display: block; min-height: 100dvh; padding: 18px 28px 0; }
.shell .sidebar {
  position: sticky;
  top: 18px;
  bottom: auto;
  left: auto;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  width: 100%;
  max-width: 1376px;
  height: 72px;
  margin: 0 auto;
  padding: 10px 18px 10px 25px;
  color: var(--ink);
  background: linear-gradient(165deg, rgba(255, 255, 255, .83), rgba(255, 255, 255, .47));
  border: 1px solid var(--glass-edge);
  border-radius: 26px;
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(255, 255, 255, .6), var(--glass-shadow);
  -webkit-backdrop-filter: blur(26px) saturate(1.45);
  backdrop-filter: blur(26px) saturate(1.45);
}
.sidebar > .brand { display: flex; min-width: 0; width: fit-content; gap: 11px; }
.brand { color: var(--ink); font-size: 15px; letter-spacing: -.03em; font-weight: 650; }
.brand img, .brand .brand-logo-light { display: block; width: 36px; height: 39px; object-fit: contain; flex-shrink: 0; }
.brand-name { white-space: nowrap; }
.shell .nav { flex-direction: row; align-items: center; gap: 4px; margin: 0; padding: 4px; }
.shell .nav button {
  min-width: 93px;
  min-height: 44px;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: 17px;
  color: #656770;
  background: transparent;
  flex: initial;
  flex-direction: row;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.shell .nav button:hover { background: rgba(255, 255, 255, .68); color: var(--ink); }
.shell .nav button.active {
  color: var(--accent-deep);
  background: linear-gradient(165deg, #fff, rgba(215, 231, 255, .74));
  border-color: rgba(136, 177, 245, .28);
  box-shadow: 0 3px 10px rgba(41, 49, 72, .07), inset 0 1px 0 #fff;
}
.nav-icon { width: 17px; height: 17px; display: inline-grid; place-items: center; flex-shrink: 0; }
.nav-icon svg { width: 17px; height: 17px; }
.shell .nav .num { margin-left: 0; color: var(--accent-deep); background: var(--accent-soft); }
.account-menu { display: flex; justify-content: flex-end; align-items: center; gap: 9px; min-width: 0; }
.account-name { font-size: 11px; font-weight: 600; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 110px; }
.appearance-trigger, .signout-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 9px 12px;
  border-radius: 15px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}
.appearance-trigger { font-weight: 650; color: #454750; background: rgba(255, 255, 255, .43); border: 1px solid rgba(255, 255, 255, .8); }
.appearance-trigger svg, .signout-btn svg { display: block; width: 18px; height: 18px; }
.appearance-trigger:hover, .signout-btn:hover { background: #fff; color: var(--ink); }
.main { max-width: 1184px; margin: 0 auto; padding: 0 32px 64px; min-width: 0; }
.main .topbar { min-height: 56px; height: auto; margin: 14px 0 34px; padding: 12px 0; border: 0; gap: 20px; }
.topbar .breadcrumb { display: block; font-size: 11px; color: #747680; }
.top-status { font-size: 10px; color: #747680; gap: 7px; }
.dot { width: 5px; height: 5px; background: #7e8a80; }
.home-intro { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 0 0 34px; }
.home-intro > div { min-width: 0; }
.home-intro > .btn { flex-shrink: 0; }
.home-intro h1 { font-size: clamp(36px, 4.6vw, 54px); font-weight: 550; }
.home-intro p { color: var(--muted); font-size: 14px; margin-top: 13px; max-width: 580px; }
.workspace-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 12px; margin-top: 16px; }
.workspace-summary strong { color: #444751; font-weight: 600; }
.workspace-summary > span + span { position: relative; }
.workspace-summary > span + span::before { content: ''; width: 3px; height: 3px; border-radius: 50%; background: #a4a8b0; position: absolute; top: calc(50% - 1.5px); left: -10px; }
.focus-card, .surface, .card, .metric-card, .source-card, .insights-lead {
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  border-radius: 24px;
  box-shadow: inset 0 1px 0 #fff, var(--glass-shadow);
  color: var(--ink);
}
.focus-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 247px;
  padding: 36px 40px;
  margin: 0 0 24px;
  background: linear-gradient(122deg, rgba(255, 255, 255, .94), rgba(255, 255, 255, .55) 58%, rgba(180, 208, 251, .4));
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(255, 255, 255, .7), 0 15px 38px -24px rgba(30, 43, 70, .24);
  overflow: hidden;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.focus-copy { min-width: 0; max-width: 690px; }
.focus-copy .eyebrow { color: var(--accent); margin-bottom: 14px; }
.focus-copy h2 { font-size: clamp(25px, 2.9vw, 35px); letter-spacing: -.045em; font-weight: 550; }
.focus-copy > p { margin-top: 13px; max-width: 535px; font-size: 13px; color: var(--muted); }
.focus-copy .button-row { margin-top: 26px; gap: 12px; }
.focus-meta { flex-shrink: 0; min-width: 142px; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 7px; padding-left: 32px; border-left: 1px solid var(--line); color: var(--muted); font-size: 11px; text-align: right; }
.focus-meta strong { display: block; font-size: 44px; font-weight: 450; line-height: 1.2; letter-spacing: -.05em; color: var(--ink); }
.focus-meta > span { font-size: 11px; }
.home-columns { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 22px; align-items: stretch; }
.surface { padding: 25px 29px; min-width: 0; }
.surface-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 17px; }
.surface-heading > svg { color: var(--accent); }
.surface-heading h2 { font-size: 17px; font-weight: 600; letter-spacing: -.03em; }
.surface-heading .text-btn { font-size: 11px; white-space: nowrap; }
.room-row { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 0; min-height: 65px; border-bottom: 1px solid var(--line); color: var(--ink); background: none; text-align: left; font: inherit; }
.room-row:last-child { border: 0; padding-bottom: 4px; }
.room-row:first-child { padding-top: 2px; }
.room-row > div { flex: 1; min-width: 0; }
.room-row > .avatar { flex: 0 0 34px; width: 34px; height: 34px; font-size: 10px; }
.room-row strong, .room-row h3 { font-size: 13px; font-weight: 600; }
.room-row p, .room-row small, .room-row .muted { font-size: 11px; color: var(--muted); display: block; margin-top: 4px; }
.room-row > span:last-child { color: #757983; font-size: 12px; }
.room-row button { flex-shrink: 0; }
.source-entry { min-height: 137px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 22px; }
.source-entry p { font-size: 13px; line-height: 1.7; color: var(--muted); max-width: 340px; }
.source-entry .btn { font-size: 12px; }
.quiet-note { color: var(--muted); margin-top: 24px; padding: 12px 2px; }
details.quiet-note, .quiet-note details { border: 0; }
.quiet-note summary { font-size: 11px; min-height: 44px; display: flex; gap: 8px; align-items: center; list-style: none; }
.quiet-note summary::before { content: '+'; color: #747984; font-size: 16px; }
.quiet-note[open] summary::before, .quiet-note details[open] summary::before { content: '−'; }
.quiet-note summary::-webkit-details-marker { display: none; }
.quiet-note p { max-width: 720px; font-size: 12px; }
.cycle-line { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 11px; color: var(--muted); margin: 24px 0; }
.cycle-line span { display: inline-flex; align-items: center; gap: 7px; }
.cycle-line .done, .cycle-line .active { color: var(--ink); font-weight: 600; }
.context-nav { display: flex; gap: 5px; padding: 5px; margin: 0 0 28px; width: fit-content; max-width: 100%; overflow-x: auto; background: rgba(212, 218, 229, .4); border: 1px solid rgba(255, 255, 255, .6); border-radius: 17px; }
.context-nav button { min-height: 44px; padding: 10px 17px; border-radius: 12px; color: #677080; background: transparent; font-size: 12px; white-space: nowrap; }
.context-nav button.active, .context-nav button[aria-current='page'] { color: var(--accent-deep); background: rgba(255, 255, 255, .9); box-shadow: 0 2px 7px rgba(39, 50, 70, .05); }
.page-heading { margin-bottom: 29px; }
.page-heading h1 { font-weight: 550; }
.page-heading p { font-size: 13px; }
.btn, .btn.gold { color: #fff; background: linear-gradient(160deg, #286bea, #1d55c7); border: 1px solid #225aca; border-radius: 14px; min-height: 46px; padding: 12px 19px; font-size: 12px; font-weight: 600; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 4px 10px rgba(31, 36, 49, .08); }
.btn:hover { background: var(--accent-deep); }
.btn.secondary, .btn.outline { color: #3d414b; background: rgba(255, 255, 255, .7); border: 1px solid rgba(91, 101, 125, .15); box-shadow: inset 0 1px 0 #fff, 0 2px 4px rgba(24, 35, 55, .025); }
.btn.secondary:hover, .btn.outline:hover { background: #fff; border-color: rgba(78, 87, 108, .25); }
.btn.small { min-height: 44px; border-radius: 12px; padding: 9px 14px; font-size: 11px; }
.text-btn { color: var(--accent-deep); padding: 9px 2px; font-size: 12px; }
.text-btn:hover { color: #113982; text-decoration: underline; text-underline-offset: 3px; }
.badge, .badge.gold, .badge.gray { color: #616570; background: #edf0f3; text-transform: none; font-size: 10px; letter-spacing: 0; font-weight: 600; padding: 5px 9px; }
.badge.red { color: #9b3636; background: #faeaea; }
input, textarea, select, .searchbar input, .filter-bar input, .filter-bar select, .saved-views input {
  color: var(--ink);
  background: rgba(255, 255, 255, .74);
  border: 1px solid rgba(64, 75, 96, .16);
  border-radius: 12px;
  min-height: 46px;
  padding: 12px 14px;
  font-size: 13px;
  box-shadow: inset 0 1px 2px rgba(41, 51, 69, .02);
}
input::placeholder, textarea::placeholder { color: #80848f; opacity: 1; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); background: #fff; }
input[type='checkbox'], input[type='radio'] { min-height: auto; box-shadow: none; }
input[type='file'] { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.field span { font-size: 11px; color: #525661; font-weight: 600; margin-bottom: 8px; }
.field small { font-size: 11px; }
.card, .surface { overflow: hidden; }
.pad { padding: 28px; }
.card-head { padding: 22px 28px; }
.row { padding: 18px 25px; }
.row .index, .row p, .row h3 + p { color: var(--muted); }
.circle, .avatar, .job-icon, .file-symbol, .document-icon { color: var(--accent-deep); background: var(--accent-soft); border-color: #d7e5fb; }
.choice { border-radius: 12px; padding: 15px; }
.choice:has(input:checked) { border-color: #83a9ed; background: var(--accent-soft); }
.notice, .subtle-box, .review-reason, .sample-banner, .sample-invite, .workbench-entry { color: #5c6271; background: rgba(233, 237, 244, .66); border: 1px solid rgba(127, 140, 164, .15); border-radius: 17px; }
.subtle-box strong, .review-reason p, .workbench-entry p, .workbench-entry .eyebrow, .sample-invite p { color: #5a606d; }
.quote { border-color: #a7b0c2; color: #454c5c; }
.timestamp { color: #515b70; background: #edf0f5; min-height: 36px; height: fit-content; }
.steps { gap: 12px; }
.step { border-color: #d5d9e0; color: #727783; }
.step.active, .step.done { color: var(--accent-deep); border-color: #83a9ed; }
.upload { border-radius: 17px; background: rgba(255, 255, 255, .48); border-color: #b8beca; }
.upload input::file-selector-button, .file-drop input::file-selector-button { background: #e5e9f0; color: #495263; border-radius: 8px; min-height: 36px; }
.job:hover, button.row.job:hover { background: rgba(255, 255, 255, .65); }
.timeline { border-color: #d4d9e2; }
.timeline-item::before { background: #939eb3; }
.timeline-item time, .muted-line { color: #727885; }
.chip, .progress-list span { background: #edf0f4; color: #626a79; border-radius: 6px; }
.progress-list .done { background: #e4eaf2; color: #4d5d72; }
.pill-nav { padding: 4px; background: rgba(210, 216, 226, .34); border-radius: 16px; width: fit-content; max-width: 100%; gap: 4px; }
.pill-nav button { border-radius: 12px; color: #616875; background: none; min-height: 44px; }
.pill-nav button.active { color: #303640; background: rgba(255, 255, 255, .9); box-shadow: 0 2px 6px rgba(34, 41, 58, .06); }
.media-caption { background: rgba(255, 255, 255, .65); }
#toast { background: rgba(39, 42, 51, .93); border: 1px solid #5b5e68; border-radius: 16px; -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); padding: 14px 22px; font-size: 12px; }
.workbench { --soft-green: #edf0f5; }
.workspace-toolbar { margin-bottom: 22px; }
.segmented { padding: 4px; background: rgba(216, 222, 232, .48); border: 1px solid rgba(255, 255, 255, .7); border-radius: 16px; }
.segmented button { min-height: 44px; color: #616875; border-radius: 12px; font-size: 11px; padding: 10px 15px; }
.segmented button.selected { color: #333945; background: rgba(255, 255, 255, .92); box-shadow: 0 2px 7px rgba(34, 41, 58, .06); }
.workspace-status, .metric-card > span, .metric-card > small, .source-foot, .job-main p, .filter-bar label > span, .dataset-footer, .workbench details summary { color: #686f7c; }
.sample-mark { border-color: #bfc8d7; color: #5c677b; border-radius: 5px; }
.wb-tabs { gap: 25px; margin-bottom: 27px; }
.wb-tabs button { min-height: 48px; color: #727984; font-size: 12px; }
.wb-tabs button[aria-current] { color: var(--accent-deep); border-color: var(--accent); }
.metric-grid { gap: 14px; }
.metric-card { border-radius: 19px; padding: 22px 25px; box-shadow: inset 0 1px 0 #fff, 0 4px 15px rgba(40, 51, 72, .025); }
.metric-card > span { font-size: 11px; }
.metric-card > strong { font-size: 33px; font-weight: 450; letter-spacing: -.045em; }
.metric-card > small { font-size: 10px; }
.import-card .file-drop { border-color: #bcc4d2; border-radius: 16px; background: rgba(238, 242, 248, .6); }
.file-drop:hover { background: #edf1f7; border-color: #8592a9; }
.file-drop:focus-within { outline-color: #687fa5; }
.file-drop input { color: #626c7d; }
.source-card { border-radius: 21px; padding: 25px; }
.source-card:hover { border-color: #c0c9d9; box-shadow: 0 8px 25px rgba(51, 64, 91, .07), inset 0 1px 0 #fff; }
.document-icon { border-radius: 7px 12px 7px 7px; }
.empty-symbol { color: #8390a5; }
.data-tabs { background: rgba(255, 255, 255, .45); }
.data-tabs button { border-radius: 12px; color: #6a7280; min-height: 44px; }
.data-tabs button.active { color: var(--accent-deep); background: var(--accent-soft); }
.filter-bar, .data-table th, .dataset-footer { background: rgba(237, 241, 247, .64); }
.data-table th { color: #626d80; }
.data-table th small, .data-table .row-number { color: #798394; }
.data-table td { border-color: var(--line); }
.data-table tr:hover td { background: rgba(255, 255, 255, .68); }
.missing-cell { background: #eee9dd; color: #786442; }
.saved-views { background: rgba(255, 255, 255, .35); }
.bar-track, .funnel-track { background: #e5eaf2; border-radius: 6px; }
.bar-fill { background: linear-gradient(90deg, #386ed6, #89aff1); border-radius: 6px; }
.bar-fill.negative { background: #bd9473; }
.bar-zero { background: #a4afc2; }
.insights-lead { padding: 32px; }
.insights-lead h2 { font-size: 30px; }
.insights-lead p, .insights-lead .eyebrow { color: var(--muted); }
.insights-glyph { color: #b0bacb; }
.funnel-index { color: #929cb0; }
.funnel-track i { background: #5485df; }
.loading-line { background: #b8c3d7; }
.login {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  padding: 56px 24px;
}
.login-inner {
  width: 100%;
  max-width: 422px;
  padding: 38px;
  border: 1px solid var(--glass-edge);
  border-radius: 32px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .45));
  box-shadow: inset 0 1px 0 #fff, 0 22px 70px -40px rgba(48, 62, 93, .32), 0 1px 3px rgba(32, 45, 72, .04);
  -webkit-backdrop-filter: blur(28px);
  backdrop-filter: blur(28px);
}
.login-brand { display: flex; align-items: center; gap: 12px; margin: 0 0 36px; color: var(--ink); }
.login-brand img { display: block; width: 43px; height: 48px; object-fit: contain; }
.login-brand span { font-size: 19px; font-weight: 600; letter-spacing: -.035em; }
.login-heading { margin-bottom: 30px; }
.login-heading h1 { font-size: 32px; letter-spacing: -.055em; font-weight: 550; }
.login-heading p { margin-top: 10px; font-size: 13px; color: var(--muted); }
.login-inner .field { margin-bottom: 18px; }
.login-inner .field input { background: rgba(255, 255, 255, .78); font-size: 14px; min-height: 48px; }
.login-inner .btn.full { min-height: 49px; margin-top: 7px; }
.login-inner .login-foot { color: #777b85; line-height: 1.7; font-size: 10px !important; margin: 24px 0 0 !important; }
#toggle-join { width: 100%; min-height: 44px; margin-top: 13px; font-size: 11px; }
.appearance-dialog {
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
  padding: 29px;
  margin: auto;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 28px;
  color: var(--ink);
  background: linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(243, 246, 251, .92));
  box-shadow: 0 24px 90px rgba(34, 45, 66, .22), inset 0 1px 0 #fff;
  -webkit-backdrop-filter: blur(32px);
  backdrop-filter: blur(32px);
  font-family: inherit;
}
.appearance-dialog::backdrop { background: rgba(52, 61, 79, .22); -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px); }
.appearance-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.appearance-heading h2 { font-size: 24px; }
.appearance-close { width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: rgba(214, 221, 233, .42); color: #656d7c; font-size: 22px; }
.appearance-close svg { width: 18px; height: 18px; }
.appearance-intro { color: var(--muted); font-size: 12px; margin: 9px 0 22px; }
.appearance-options { padding: 0; margin: 0; border: 0; display: grid; gap: 9px; }
.appearance-option { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; cursor: pointer; background: rgba(255, 255, 255, .5); }
.appearance-option:has(input:checked) { border-color: #83a9ed; background: var(--accent-soft); }
.appearance-option input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); }
.appearance-option strong { display: block; font-size: 13px; font-weight: 600; }
.appearance-option span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.appearance-upload { margin-top: 20px; }
.appearance-upload > label, .appearance-preview > label, .appearance-preview > span { display: block; color: #5f6879; font-size: 11px; font-weight: 600; margin-bottom: 8px; }
.appearance-upload input { width: 100%; background: rgba(255, 255, 255, .55); font-size: 11px; padding: 9px; }
.appearance-upload input::file-selector-button { min-height: 34px; border: 0; border-radius: 8px; background: #e4eaf4; color: #566278; padding: 8px 11px; font: inherit; margin-right: 10px; }
.appearance-file-name { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; margin-top: 7px; }
.appearance-preview { border-top: 1px solid var(--line); margin-top: 23px; padding-top: 21px; }
.appearance-preview p, .appearance-preview output { display: block; font-size: 23px; line-height: 1.35; letter-spacing: -.035em; overflow-wrap: anywhere; }
.appearance-preview small { display: block; color: var(--muted); font-size: 13px; margin-top: 7px; }
.appearance-status { font-size: 11px; color: #5c6c83; margin-top: 13px; }
.appearance-error { font-size: 12px; color: var(--danger); margin-top: 13px; }
.appearance-error:empty, .appearance-status:empty { display: none; }
.appearance-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 25px; }
.appearance-actions button { min-height: 44px; padding: 10px 14px; border-radius: 12px; color: #5a6373; background: transparent; font-size: 11px; }
.appearance-actions .appearance-reset { margin-right: auto; padding-left: 0; }
.appearance-actions .appearance-cancel { border: 1px solid var(--line); background: rgba(255, 255, 255, .6); }
.appearance-actions .appearance-save { background: var(--accent); color: #fff; padding-inline: 20px; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
@media (min-width: 801px) and (max-width: 1100px) {
  .shell { padding: 14px 18px 0; }
  .shell .sidebar { top: 14px; padding-inline: 18px; }
  .brand-name { display: none; }
  .shell .nav button { min-width: 80px; padding-inline: 13px; }
  .account-name { display: none; }
  .main { padding-inline: 22px; }
}
@media (max-width: 800px) {
  .shell { padding: 14px 16px 0; }
  .shell .sidebar {
    position: relative;
    top: 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 12px;
    height: 54px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .sidebar > .brand { display: flex; gap: 9px; }
  .brand { font-size: 14px; }
  .brand img, .brand .brand-logo-light { width: 30px; height: 35px; }
  .shell .nav {
    position: fixed;
    z-index: 40;
    left: 16px;
    right: 16px;
    bottom: calc(13px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: row;
    gap: 4px;
    padding: 6px;
    min-height: 65px;
    margin: 0 auto;
    max-width: 500px;
    border: 1px solid rgba(255, 255, 255, .93);
    border-radius: 25px;
    background: linear-gradient(165deg, rgba(255, 255, 255, .88), rgba(241, 243, 248, .72));
    box-shadow: inset 0 1px 0 #fff, 0 8px 30px rgba(34, 45, 71, .14);
    -webkit-backdrop-filter: blur(25px) saturate(1.5);
    backdrop-filter: blur(25px) saturate(1.5);
  }
  .shell .nav button { display: flex; flex: 1; min-width: 0; min-height: 51px; flex-direction: column; gap: 3px; padding: 6px 4px; font-size: 10px; border-radius: 19px; }
  .shell .nav button.active { box-shadow: 0 2px 8px rgba(40, 50, 73, .08), inset 0 1px 0 #fff; }
  .nav-icon, .nav-icon svg { width: 18px; height: 18px; }
  .shell .nav .num { display: none; }
  .account-menu { gap: 3px; }
  .account-name { display: none; }
  .appearance-trigger, .signout-btn { min-width: 44px; padding: 9px; font-size: 10px; }
  .main { padding: 0 0 calc(110px + env(safe-area-inset-bottom)); max-width: 650px; }
  .main .topbar { margin: 9px 0 23px; padding: 6px 0; min-height: 30px; gap: 12px; }
  .topbar .breadcrumb { font-size: 10px; }
  .top-status { font-size: 9px; }
  .home-intro { align-items: flex-start; flex-direction: column; gap: 18px; margin-bottom: 27px; }
  .home-intro h1 { font-size: 38px; }
  .home-intro p { font-size: 12px; margin-top: 10px; max-width: 325px; }
  .workspace-summary { font-size: 10px; gap: 7px 17px; margin-top: 14px; }
  .focus-card { min-height: 0; padding: 27px 25px; margin-bottom: 18px; border-radius: 23px; flex-direction: column; align-items: stretch; gap: 23px; }
  .focus-copy h2 { font-size: 28px; line-height: 1.23; }
  .focus-copy > p { font-size: 12px; }
  .focus-copy .eyebrow { margin-bottom: 12px; font-size: 9px; }
  .focus-copy .button-row { margin-top: 23px; gap: 8px; }
  .focus-meta { padding: 18px 0 0; border-left: 0; border-top: 1px solid var(--line); align-items: flex-start; min-width: 0; text-align: left; flex-direction: row; justify-content: flex-start; gap: 8px; flex-wrap: wrap; }
  .focus-meta strong { display: inline; font-size: 17px; letter-spacing: -.02em; }
  .focus-meta > span { font-size: 10px; }
  .home-columns { grid-template-columns: 1fr; gap: 18px; }
  .surface { padding: 21px 24px; border-radius: 23px; }
  .surface-heading { margin-bottom: 10px; }
  .surface-heading h2 { font-size: 17px; }
  .source-entry { min-height: 135px; gap: 20px; }
  .source-entry p { font-size: 12px; }
  .room-row { padding-block: 14px; }
  .quiet-note { margin-top: 17px; }
  .cycle-line { gap: 8px 13px; font-size: 10px; }
  .page-heading { margin-top: 6px; gap: 12px; flex-wrap: wrap; }
  .page-heading h1, .workbench .page-heading h1 { font-size: 34px; letter-spacing: -.05em; }
  .page-heading p { font-size: 12px; }
  .page-heading > .btn { font-size: 11px; padding: 10px 14px; }
  .btn, .btn.small { min-height: 46px; padding: 11px 15px; font-size: 11px; }
  .pad { padding: 22px; }
  .card-head { padding: 20px 22px; }
  .card, .lesson-layout .card { border-radius: 22px; }
  .field input, .field textarea, .field select, .searchbar input, .workbench .field input, .workbench .field select, .workbench .field textarea { font-size: 16px; }
  .metric-grid { gap: 11px; }
  .metric-card { padding: 17px; border-radius: 18px; }
  .metric-card > strong { font-size: 29px; }
  .metric-card > small { font-size: 9px; }
  .wb-tabs { gap: 22px; margin-bottom: 22px; }
  .wb-tabs button { font-size: 11px; }
  .source-card { padding: 23px; }
  .source-card h3 { font-size: 17px; }
  .sample-banner, .sample-invite { padding: 16px; font-size: 11px; }
  .analysis-controls, .filter-bar { padding: 18px; }
  .filter-bar input, .filter-bar select { font-size: 13px; padding: 10px; }
  .bar-row { grid-template-columns: 70px minmax(35px, 1fr) 40px; gap: 8px; }
  #toast { bottom: calc(98px + env(safe-area-inset-bottom)); }
  .login { padding: 30px 20px; }
  .login-inner { max-width: 390px; padding: 31px 27px; border-radius: 30px; }
  .login-brand { margin-bottom: 31px; }
  .login-heading h1 { font-size: 30px; }
  .login-inner .field input { font-size: 16px; }
  .appearance-dialog { padding: 23px; border-radius: 25px; }
}
@media (max-width: 360px) {
  .shell { padding-inline: 13px; }
  .brand-name { font-size: 12px; }
  .appearance-trigger, .signout-btn { font-size: 9px; padding-inline: 7px; }
  .shell .nav { left: 12px; right: 12px; }
  .main .topbar { gap: 8px; }
  .top-status { font-size: 8px; }
  .home-intro h1 { font-size: 34px; }
  .focus-card, .surface { padding: 22px 20px; }
  .focus-copy h2 { font-size: 25px; }
  .focus-copy .button-row > .btn { flex: 1; white-space: nowrap; padding-inline: 10px; }
  .surface-heading h2 { font-size: 16px; }
  .surface-heading .text-btn { font-size: 10px; }
  .room-row { gap: 10px; }
  .login { padding: 20px 13px; }
  .login-inner { padding: 27px 23px; }
  .appearance-dialog { padding: 20px; }
  .appearance-actions { gap: 6px; }
  .appearance-actions button { padding-inline: 10px; font-size: 10px; }
  .appearance-actions .appearance-save { padding-inline: 14px; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .source-card, .appearance-trigger { transition: background .16s ease, border-color .16s ease, box-shadow .16s ease; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .shell .sidebar, .shell .nav, .focus-card, .surface, .card, .metric-card, .source-card, .login-inner, .appearance-dialog { background: #f9fafc; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .appearance-dialog::backdrop { background: rgba(35, 44, 61, .45); -webkit-backdrop-filter: none; backdrop-filter: none; }
  #toast { background: #303540; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .shell .sidebar, .shell .nav, .focus-card, .login-inner { background: #f7f9fc; }
}

/* Final composition spacing. */
.home-intro + .workspace-summary { margin: -14px 0 22px; }
.login-foot { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.login-foot .appearance-trigger { display: inline-flex; align-items: center; gap: 7px; }
.focus-meta .cycle-line { max-width: 230px; justify-content: flex-end; }
.btn.text-btn { background: transparent; border-color: transparent; box-shadow: none; color: var(--accent-deep); padding-inline: 5px; }
@media(max-width:800px) { .focus-meta .cycle-line { flex-basis: 100%; max-width: none; justify-content: flex-start; margin: 6px 0 0; } }

.workbench .workspace-summary { margin: 0 0 24px; }
.appearance-upload[hidden] { display: none; }
