:root {
  --ink: #10202d;
  --paper: #f4fbfb;
  --shell: #eef8f8;
  --surface: rgba(255, 255, 255, 0.72);
  --line: rgba(16, 32, 45, 0.13);
  --line-strong: rgba(16, 32, 45, 0.24);
  --shadow: 0 24px 70px rgba(24, 75, 89, 0.12);
  --search-accent: #1c76b7;
  --search-soft: #dff2fb;
  --home-accent: #169b88;
  --home-soft: #ddf5f0;
  --prep-accent: #227ea6;
  --prep-soft: #deeff7;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 13px;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Instrument Sans", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(163, 239, 217, 0.45), transparent 28%),
    radial-gradient(circle at top right, rgba(128, 204, 244, 0.34), transparent 32%),
    linear-gradient(180deg, #e1f4f2 0%, #e8f2f8 48%, #f6fbfb 100%);
}

@media (max-height: 900px) {
  html {
    font-size: clamp(10px, 1.35vh, 13px);
  }
  .app-shell {
    padding: 12px;
  }
  .app-frame {
    padding: 14px 18px 86px;
    border-radius: 24px;
  }
  .mode-search .app-frame {
    padding: 14px 18px 130px;
  }
  .app-header {
    margin-bottom: 12px;
  }
  .mode-search .app-header,
  .mode-prep .app-header {
    margin-bottom: 12px;
  }
  .mode-search .mode-stage-search {
    gap: 8px;
    transform: translateY(-34px);
  }
  .mode-search .search-swipe-stage {
    padding-top: 52px;
  }
  .mode-search .search-focus-card {
    gap: 10px;
    max-width: 860px;
    padding: 20px 22px 20px;
  }
  .mode-search .search-focus-card .triage-company h2 {
    font-size: 1.8rem;
  }
  .mode-search .search-focus-card .triage-summary {
    font-size: 1.26rem;
    line-height: 1.52;
  }
  .mode-search .search-fit-note {
    gap: 10px;
    padding: 12px 14px 14px;
  }
  .mode-search .search-fit-note-scroll > div p:last-child {
    font-size: 1.26rem;
    line-height: 1.52;
  }
  .mode-search .triage-metrics dd {
    font-size: 1.7rem;
  }
  .mode-search .decision-pill {
    min-width: 68px;
    padding: 8px 12px;
  }
  .mode-hero {
    gap: 6px;
    padding-bottom: 10px;
  }
  .mode-hero h1 {
    font-size: clamp(1.8rem, 3vh, 2.8rem);
  }
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  padding: 18px;
}

.app-frame {
  --frame-scrollbar-top: 92px;
  --frame-scroll-thumb-offset: 0px;
  --frame-scroll-thumb-height: 58px;
  --frame-scroll-thumb-opacity: 0;
  width: min(1320px, calc(100vw - 32px));
  height: calc(100vh - 36px);
  margin: 0 auto;
  padding: 22px 24px 104px;
  border: 1px solid rgba(16, 32, 45, 0.12);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 252, 252, 0.82)),
    var(--shell);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.app-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.44), transparent 40%),
    linear-gradient(90deg, rgba(33, 126, 166, 0.06), transparent 35% 65%, rgba(22, 155, 136, 0.05));
  pointer-events: none;
}

.app-frame::after {
  content: "";
  position: absolute;
  top: var(--frame-scrollbar-top);
  right: 10px;
  width: 10px;
  height: var(--frame-scroll-thumb-height);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.48));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.56),
    0 0 0 1px rgba(16, 32, 45, 0.09),
    0 8px 18px rgba(255, 255, 255, 0.26);
  opacity: var(--frame-scroll-thumb-opacity);
  pointer-events: none;
  z-index: 0;
  transform: translateY(var(--frame-scroll-thumb-offset));
  transition: opacity 160ms ease, transform 160ms ease, height 160ms ease;
}

.mode-search .app-frame::after {
  opacity: 0 !important;
}

.app-header,
.workspace {
  position: relative;
  z-index: 1;
}

.composer-area {
  position: relative;
  z-index: 4;
}

.app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.brand-block {
  max-width: 360px;
}

.brand-mark {
  display: inline-block;
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.08em;
  text-transform: lowercase;
  transform: scale(1.26);
  transform-origin: left top;
}

.brand-note {
  margin: 10px 0 0;
  font-size: 0.95rem;
  line-height: 1.52;
  color: rgba(16, 32, 45, 0.7);
}

.workspace {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 14px;
  padding-bottom: 116px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.workspace::before {
  content: "";
  position: sticky;
  top: 0;
  display: block;
  height: 24px;
  margin-bottom: -24px;
  background: linear-gradient(180deg, rgba(244, 251, 251, 0.98), rgba(244, 251, 251, 0));
  opacity: var(--workspace-top-fade-opacity, 0);
  pointer-events: none;
  z-index: 2;
  transition: opacity 140ms ease;
}

.workspace::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.chat-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.chat-overlay-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  border: 0;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.46), rgba(247, 252, 252, 0.78)),
    rgba(246, 250, 251, 0.3);
  backdrop-filter: blur(18px) saturate(0.92);
  opacity: 0;
  transition: opacity 180ms ease;
}

.chat-history-shell {
  position: absolute;
  left: max(18px, calc((100% - 1124px) / 2));
  right: max(18px, calc((100% - 1124px) / 2));
  top: 26px;
  bottom: 58px;
  width: auto;
  z-index: 1;
  border-radius: 34px;
  overflow: hidden;
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: translate3d(0, 18px, 0);
  transition: transform 220ms ease, opacity 220ms ease;
  opacity: 0;
  pointer-events: none;
  isolation: isolate;
  contain: paint;
  backface-visibility: hidden;
  will-change: transform, opacity;
}

.chat-history-shell::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 0;
  border-radius: 33px;
  background: #fff;
  pointer-events: none;
}

.chat-history-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  border: 1px solid rgba(16, 32, 45, 0.18);
  box-sizing: border-box;
  pointer-events: none;
}

.chat-history-stack {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: 14px;
  width: 100%;
  padding: 20px 34px 136px;
}

.chat-message {
  max-width: min(84%, 620px);
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(16, 32, 45, 0.08);
  box-shadow: 0 8px 18px rgba(16, 32, 45, 0.04);
}

.chat-message p:last-child {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.52;
  font-weight: 500;
  color: rgba(16, 32, 45, 0.84);
}

.chat-message-user {
  justify-self: end;
  border-bottom-right-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
}

.chat-message-assistant {
  justify-self: start;
  border-bottom-left-radius: 12px;
  background: color-mix(in srgb, white 84%, rgba(128, 204, 244, 0.2));
}

.chat-message-role {
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.chat-message-user .chat-message-role {
  color: var(--search-accent);
}

.chat-message-assistant .chat-message-role {
  color: var(--home-accent);
}

.mode-search .workspace {
  padding-top: 0;
  padding-bottom: 18px;
  overflow-y: hidden;
}

.mode-prep .workspace {
  padding-top: 8px;
  padding-bottom: 132px;
}

.mode-home .workspace {
  padding-bottom: 116px;
}

.mode-stage {
  display: none;
  gap: 28px;
}

.mode-stage.active {
  display: grid;
}

.app-header,
.mode-hero,
.home-side-column,
.home-activity-panel,
.thread-notes,
.workspace-flow,
.workspace-card {
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    max-height 180ms ease,
    grid-template-columns 180ms ease,
    margin 180ms ease,
    padding 180ms ease,
    border-color 180ms ease;
}

.mode-hero {
  display: grid;
  gap: 12px;
  max-width: 860px;
  max-height: 360px;
  padding-bottom: 24px;
  border-bottom: 1px solid color-mix(in srgb, var(--mode-accent) 18%, rgba(16, 32, 45, 0.1));
  overflow: hidden;
}

.mode-kicker,
.eyebrow,
.aside-label {
  margin: 0;
  font-size: 1.02rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
  color: rgba(16, 32, 45, 0.55);
}

.mode-hero h1 {
  margin: 0;
  max-width: 12ch;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(2.8rem, 4vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.mode-summary {
  margin: 0;
  max-width: 640px;
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(16, 32, 45, 0.74);
}

.mode-grid {
  display: grid;
  gap: 28px;
}

.search-grid,
.prep-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.95fr);
  align-items: start;
}

.mode-stage-search {
  justify-items: center;
  align-content: start;
  gap: 8px;
  transform: none;
}

.search-minimal-shell {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 0;
  min-height: auto;
  width: 100%;
  padding: 0;
}

.search-swipe-stage {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 860px);
  justify-content: center;
  align-items: start;
  justify-items: center;
  gap: 0;
  min-height: 0;
  padding: 18px 0 0;
}

.search-swipe-stage::before,
.search-swipe-stage::after {
  content: "";
  position: absolute;
  left: 50%;
  width: min(100%, 820px);
  height: 100%;
  max-height: 560px;
  border-radius: 28px;
  border: 1px solid rgba(28, 118, 183, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(238, 247, 252, 0.68)),
    rgba(255, 255, 255, 0.7);
  pointer-events: none;
  z-index: 0;
}

.search-swipe-stage::before {
  transform: translateX(calc(-50% - 10px)) rotate(-2.6deg);
  opacity: 0.72;
}

.search-swipe-stage::after {
  transform: translateX(calc(-50% + 12px)) rotate(2.4deg);
  opacity: 0.52;
}

.search-focus-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  width: min(100%, 820px);
  max-width: 820px;
  min-height: 0;
  grid-template-columns: 1fr;
  align-items: start;
  padding: 22px 18px 22px;
  transform: none;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 252, 252, 0.9)),
    linear-gradient(135deg, rgba(223, 242, 251, 0.8), rgba(221, 245, 240, 0.56));
  box-shadow:
    0 28px 64px rgba(23, 88, 108, 0.12),
    0 0 0 1px rgba(28, 118, 183, 0.04);
}

.search-card-topline,
.search-card-footer,
.search-focus-card .triage-company,
.signal-list,
.search-fit-note {
  grid-column: 1 / -1;
}

.search-focus-card .triage-company {
  align-items: center;
  gap: 12px;
}

.search-focus-card .triage-company > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.search-focus-card .company-sigil {
  width: 52px;
  height: 52px;
  border-radius: 16px;
}

.search-focus-card .triage-company h2 {
  margin: 0;
  font-size: 1.62rem;
  line-height: 1.02;
}

.search-focus-card .triage-company p {
  margin: 6px 0 0;
  font-size: 1.12rem;
}

.search-focus-card .triage-summary {
  align-self: start;
  font-size: 1.26rem;
  line-height: 1.52;
  width: calc(100% - 22px);
  max-width: calc(100% - 22px);
  justify-self: center;
  margin: 0;
  color: rgba(16, 32, 45, 0.9);
  text-align: justify;
}

.search-focus-card::before,
.search-focus-card::after {
  display: none;
}

.search-card-topline,
.search-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.search-card-topline {
  position: absolute;
  top: 28px;
  right: 18px;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 0;
  width: auto;
}

.search-top-meta {
  width: max-content;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.search-status-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.mode-search .app-header,
.mode-prep .app-header {
  margin-bottom: 20px;
}

.mode-search .brand-mark,
.mode-prep .brand-mark {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.08em;
  text-transform: lowercase;
  transform: scale(1.26);
  transform-origin: left top;
}

.mode-search .brand-mark {
  position: relative;
  top: 8px;
  left: 2px;
}

.mode-search .search-focus-card .triage-company {
  width: min(100%, 500px);
  gap: 14px;
}

.mode-search .search-focus-card .company-sigil {
  width: 56px;
  height: 56px;
  border-radius: 18px;
}

.search-card-footer {
  justify-content: center;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--mode-accent) 16%, rgba(16, 32, 45, 0.08));
}

.search-fit-note {
  --discover-note-scroll-thumb-offset: 0px;
  --discover-note-scroll-thumb-height: 42px;
  --discover-note-scroll-thumb-opacity: 0;
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--mode-accent) 18%, rgba(16, 32, 45, 0.08));
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: none;
}

.mode-search .search-fit-note {
  height: 188px;
  overflow: hidden;
}

.mode-search .search-fit-note-scroll {
  height: 100%;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-right: 18px;
}

.mode-search .search-fit-note-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.mode-search .search-fit-note::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 10px;
  width: 8px;
  height: var(--discover-note-scroll-thumb-height);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.52));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.6),
    0 0 0 1px rgba(16, 32, 45, 0.08),
    0 8px 18px rgba(255, 255, 255, 0.24);
  opacity: var(--discover-note-scroll-thumb-opacity);
  pointer-events: none;
  z-index: 2;
  transform: translateY(var(--discover-note-scroll-thumb-offset));
  transition: opacity 160ms ease, transform 160ms ease, height 160ms ease;
}

.search-fit-note-scroll {
  display: grid;
  align-content: start;
  gap: 14px;
}

.search-fit-note-scroll > div {
  display: grid;
  gap: 8px;
  width: calc(100% - 22px);
  justify-self: center;
}

.search-fit-note p {
  margin: 0;
}

.search-fit-note .aside-label {
  width: 100%;
  color: var(--search-accent);
}

.search-fit-note-scroll > div p:last-child {
  width: 100%;
  max-width: none;
  font-size: 1.26rem;
  line-height: 1.52;
  color: rgba(16, 32, 45, 0.9);
  text-align: justify;
}

.search-card-actions {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  width: min(100%, 520px);
  margin: 0 auto;
}

.mode-search .signal-list {
  gap: 12px;
}

.mode-search .status-chip {
  padding: 8px 14px;
  font-size: 1.02rem;
  line-height: 1;
}

.mode-search .decision-pill {
  min-width: 112px;
  padding: 10px 18px;
  font-size: 0.82rem;
  box-shadow: 0 10px 20px rgba(23, 88, 108, 0.08);
}

.decision-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid color-mix(in srgb, var(--mode-accent) 22%, rgba(16, 32, 45, 0.1));
  background: rgba(255, 255, 255, 0.78);
}

.decision-pill-pass {
  justify-self: end;
}

.decision-pill-apply {
  justify-self: center;
  background: var(--mode-accent);
  color: white;
}

.decision-pill-later {
  justify-self: start;
}

.home-grid {
  grid-template-columns: minmax(0, 1.72fr) minmax(320px, 1fr);
  align-items: start;
  gap: 14px;
  max-width: 1140px;
  width: 100%;
}

.mode-stage-home {
  gap: 8px;
  justify-items: center;
  transform: none;
}

.mode-stage-prep {
  gap: 18px;
  justify-items: center;
  transform: none;
}

.prep-blank-shell {
  width: min(100%, 1140px);
  display: grid;
  justify-items: center;
}

.prep-blank-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  width: 100%;
  min-height: clamp(360px, calc(100vh - 360px), 520px);
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.prep-chat-stack {
  display: grid;
  gap: 16px;
  position: relative;
  width: min(100%, 760px);
}

.prep-chat-stack::after {
  content: "";
  position: absolute;
  top: 10px;
  right: -22px;
  width: 1px;
  height: calc(100% + clamp(172px, 22vh, 248px));
  background: color-mix(in srgb, var(--search-accent) 20%, rgba(16, 32, 45, 0.1));
  opacity: 0.9;
}

.prep-chat-section-title {
  margin: 0;
  padding-left: 10px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--search-accent);
}

.prep-chat-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid color-mix(in srgb, var(--search-accent) 18%, rgba(16, 32, 45, 0.08));
  box-shadow: none;
}

.prep-chat-card h3 {
  margin: 0;
  font-family: "Instrument Sans", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 1.34rem;
  line-height: 1.24;
  font-weight: 600;
  letter-spacing: 0;
  color: rgba(16, 32, 45, 0.86);
}

.prep-chat-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 134px;
  padding: 10px 18px;
  border: 0;
  border-radius: 14px;
  background: var(--search-accent);
  color: white;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
}

.prep-action-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(calc(100% - 48px), 660px);
  position: fixed;
  left: 50%;
  bottom: 152px;
  transform: translateX(-50%);
  z-index: 2;
}

.prep-action-prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 7px 10px;
  border-radius: 11px;
  border: 1px solid color-mix(in srgb, var(--home-accent) 36%, rgba(16, 32, 45, 0.08));
  background: rgba(255, 255, 255, 0.96);
  color: rgba(16, 32, 45, 0.82);
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.52;
  text-align: center;
  box-shadow: none;
}

.mode-stage-prep .mode-hero {
  width: min(100%, 1040px);
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
  align-items: start;
  gap: 18px 24px;
  max-height: none;
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--mode-accent) 18%, rgba(16, 32, 45, 0.08));
  border-radius: 24px;
  border-bottom: 1px solid color-mix(in srgb, var(--mode-accent) 18%, rgba(16, 32, 45, 0.08));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(236, 246, 249, 0.9)),
    radial-gradient(circle at top right, rgba(34, 126, 166, 0.08), transparent 58%);
  box-shadow: 0 16px 34px rgba(23, 88, 108, 0.06);
  overflow: visible;
}

.mode-stage-prep .mode-hero h1 {
  max-width: 9ch;
  font-size: clamp(2rem, 2.3vw, 2.8rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.mode-stage-prep .mode-summary {
  max-width: 44ch;
  font-size: 0.98rem;
  line-height: 1.52;
}

.mode-stage-prep .prep-grid {
  grid-template-columns: minmax(0, 1.24fr) minmax(300px, 0.78fr);
  width: min(100%, 1040px);
  align-items: start;
  justify-content: center;
  gap: 18px;
}

.mode-stage-home .mode-hero {
  gap: 8px;
  max-width: 620px;
  padding-bottom: 12px;
}

.mode-stage-home .mode-hero h1 {
  max-width: 10ch;
  font-size: clamp(2.15rem, 3vw, 3.2rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.mode-stage-home .mode-summary {
  max-width: 560px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.search-side-column,
.home-side-column,
.prep-side-column {
  display: grid;
  gap: 24px;
}

.home-side-column,
.thread-notes {
  max-height: 1200px;
  overflow: hidden;
}

.panel {
  padding: 0;
  background: transparent;
  border: 0;
}

.panel-spotlight {
  min-height: 280px;
}

.editorial-sheet {
  padding: 18px 20px 20px;
  border: 1px solid color-mix(in srgb, var(--mode-accent) 22%, rgba(16, 32, 45, 0.1));
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 254, 254, 0.82));
  box-shadow: 0 12px 36px rgba(23, 88, 108, 0.08);
}

.integrated-panel {
  padding-top: 2px;
  border-top: 1px solid color-mix(in srgb, var(--mode-accent) 26%, rgba(16, 32, 45, 0.1));
}

.integrated-panel + .integrated-panel {
  padding-top: 24px;
}

.sheet-header,
.sheet-footer,
.panel-heading,
.panel-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.sheet-header {
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid color-mix(in srgb, var(--mode-accent) 18%, rgba(16, 32, 45, 0.08));
}

.sheet-meta {
  min-width: 190px;
  padding-left: 18px;
  border-left: 1px solid color-mix(in srgb, var(--mode-accent) 18%, rgba(16, 32, 45, 0.08));
}

.sheet-meta span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(16, 32, 45, 0.55);
}

.sheet-meta strong {
  display: block;
  font-size: 0.96rem;
  line-height: 1.45;
}

.panel-heading h3,
.triage-company h2 {
  margin: 4px 0 0;
  font-size: 1.45rem;
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.quiet-stat,
.status-chip {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.72);
}

.triage-card,
.workspace-card,
.prep-brief {
  display: grid;
  gap: 22px;
}

.triage-layout,
.workspace-flow {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.7fr);
  gap: 24px;
  align-items: start;
}

.role-detail,
.role-overview,
.tailor-brief,
.role-score-list {
  display: grid;
  gap: 20px;
}

.triage-main {
  display: grid;
  gap: 20px;
}

.triage-company {
  display: flex;
  align-items: center;
  gap: 14px;
}

.company-sigil {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.triage-company p,
.queue-item p {
  margin: 5px 0 0;
  color: rgba(16, 32, 45, 0.66);
}

.triage-summary,
.score-band p,
.letter-copy,
.signal-notes li {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.68;
}

.signal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.signal-list span {
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  border: 1px solid color-mix(in srgb, var(--mode-accent) 18%, rgba(16, 32, 45, 0.08));
  background: rgba(255, 255, 255, 0.7);
}

.triage-aside,
.thread-notes {
  padding-left: 22px;
  border-left: 1px solid color-mix(in srgb, var(--mode-accent) 20%, rgba(16, 32, 45, 0.08));
}

.signal-notes {
  margin: 16px 0 0;
  padding-left: 18px;
}

.signal-notes li + li {
  margin-top: 10px;
}

.sheet-footer {
  padding-top: 20px;
  border-top: 1px solid color-mix(in srgb, var(--mode-accent) 18%, rgba(16, 32, 45, 0.08));
}

.triage-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 26px;
  margin: 0;
  justify-content: center;
  text-align: center;
}

.triage-metrics-top {
  grid-template-columns: repeat(3, minmax(88px, auto));
  gap: 10px;
  justify-content: end;
  text-align: right;
}

.triage-metrics div {
  padding: 0 18px;
  border-right: 1px solid color-mix(in srgb, var(--mode-accent) 18%, rgba(16, 32, 45, 0.08));
}

.triage-metrics-top div {
  padding: 0 0 0 14px;
}

.triage-metrics div:last-child {
  border-right: 0;
}

.triage-metrics dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  margin-bottom: 10px;
  color: rgba(16, 32, 45, 0.58);
}

.triage-metrics-top dt {
  font-size: 0.68rem;
  margin-bottom: 6px;
}

.triage-metrics dd {
  margin: 0;
  font-size: 2rem;
  font-weight: 750;
  letter-spacing: -0.06em;
}

.triage-metrics-top dd {
  font-size: 1.25rem;
}

.decision-row {
  display: flex;
  gap: 12px;
  min-width: 220px;
}

.decision-button {
  flex: 1;
  border-radius: 18px;
  padding: 14px 18px;
  font-weight: 700;
  border: 1px solid var(--line);
  background: transparent;
}

.queue-panel,
.search-rhythm,
.score-panel,
.draft-panel,
.letter-panel,
.energy-panel {
  min-height: 0;
}

.queue-stack,
.chat-stack,
.feedback-list,
.prep-sequence {
  margin-top: 18px;
}

.queue-stack {
  display: grid;
  gap: 2px;
}

.queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--mode-accent) 16%, rgba(16, 32, 45, 0.08));
}

.queue-item strong {
  display: block;
  font-size: 1rem;
}

.queue-score {
  font-size: 1rem;
  font-weight: 700;
}

.queue-item.muted {
  opacity: 0.62;
}

.rhythm-strip {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
  margin-top: 24px;
  align-items: end;
  min-height: 120px;
}

.rhythm-bar {
  border-radius: 999px;
  width: 100%;
}

.rhythm-bar:nth-child(1) { height: 72px; }
.rhythm-bar:nth-child(2) { height: 94px; }
.rhythm-bar:nth-child(3) { height: 58px; }
.rhythm-bar:nth-child(4) { height: 82px; }
.rhythm-bar:nth-child(5) { height: 40px; }
.rhythm-bar:nth-child(6) { height: 66px; }
.rhythm-bar:nth-child(7) { height: 106px; }
.rhythm-bar:nth-child(8) { height: 44px; }

.legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
  color: rgba(16, 32, 45, 0.7);
  font-size: 0.84rem;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 7px;
}

.chat-stack {
  display: grid;
  gap: 10px;
}

.alignment-meter {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  padding: 0 0 22px;
  border-bottom: 1px solid color-mix(in srgb, var(--mode-accent) 16%, rgba(16, 32, 45, 0.08));
}

.alignment-label,
.role-score-label,
.tailor-caption {
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(16, 32, 45, 0.55);
}

.alignment-copy {
  margin: 6px 0 0;
  font-size: 0.98rem;
  line-height: 1.68;
}

.tailor-brief {
  padding-top: 6px;
}

.tailor-actions {
  display: grid;
  gap: 10px;
  padding-top: 6px;
}

.tailor-button {
  width: fit-content;
  min-width: 240px;
}

.home-focus-panel {
  gap: 24px;
  max-width: none;
  width: 100%;
  margin-inline: 0;
}

.home-goal-panel {
  display: grid;
  gap: 12px;
  grid-column: 1 / -1;
  max-width: none;
  width: 100%;
  margin-inline: 0;
  padding: 18px 22px;
  border-radius: 24px;
  background: color-mix(in srgb, var(--mode-soft) 58%, rgba(255, 255, 255, 0.94));
  border: 1px solid color-mix(in srgb, var(--mode-accent) 14%, rgba(16, 32, 45, 0.08));
  box-shadow: 0 18px 44px rgba(17, 39, 52, 0.08);
}

.home-goal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-goal-copy {
  margin: 0;
  max-width: 68ch;
  font-size: 0.98rem;
  line-height: 1.52;
  color: rgba(16, 32, 45, 0.82);
}

.home-activity-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  align-self: start;
  max-width: none;
  width: 100%;
  margin-inline: 0;
  padding: 20px 22px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(234, 248, 246, 0.9)),
    color-mix(in srgb, var(--mode-soft) 52%, rgba(255, 255, 255, 0.94));
  border: 1px solid color-mix(in srgb, var(--mode-accent) 14%, rgba(16, 32, 45, 0.08));
  box-shadow: 0 18px 40px rgba(17, 39, 52, 0.07);
}

.home-activity-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-activity-intro {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(16, 32, 45, 0.76);
}

.home-activity-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.home-activity-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 10px 14px;
  padding: 16px 18px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--mode-soft) 34%, rgba(255, 255, 255, 0.96));
  border: 1px solid color-mix(in srgb, var(--mode-accent) 11%, rgba(16, 32, 45, 0.06));
  box-shadow: none;
}

.home-activity-number {
  font-size: 2.2rem;
  line-height: 0.9;
  font-weight: 800;
  letter-spacing: -0.06em;
  color: var(--mode-accent);
}

.home-activity-item p {
  margin: 0;
  max-width: none;
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(16, 32, 45, 0.72);
}

.home-focus-body {
  display: grid;
  gap: 28px;
}

.home-alignment-meter {
  grid-template-columns: 1fr;
  justify-items: start;
  padding-bottom: 24px;
}

.home-signal-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.home-signal-group {
  display: grid;
  gap: 14px;
  padding: 20px 22px;
  border-radius: 22px;
  background: color-mix(in srgb, white 94%, rgba(244, 251, 251, 0.72));
  border: 1px solid color-mix(in srgb, var(--mode-accent) 14%, rgba(16, 32, 45, 0.08));
  box-shadow: none;
}

.compact-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mode-stage-home .home-grid {
  gap: 14px;
  height: auto;
  grid-template-rows: auto auto;
  align-items: start;
}

.mode-stage-home .home-goal-panel {
  gap: 4px;
  padding: 10px 14px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--mode-soft) 48%, rgba(255, 255, 255, 0.96));
}

.mode-stage-home .home-goal-copy {
  font-size: 1.34rem;
  line-height: 1.52;
  color: rgba(16, 32, 45, 0.85);
}

.mode-stage-home .home-activity-panel {
  gap: 10px;
  padding: 14px 16px;
  border-radius: 20px;
}

.mode-stage-home .home-activity-intro {
  font-size: 1.34rem;
  font-weight: 500;
  color: rgba(16, 32, 45, 0.8);
}

.mode-stage-home .home-activity-list {
  gap: 8px;
}

.mode-stage-home .home-activity-item {
  grid-template-columns: minmax(56px, 72px) minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  padding: 7px 10px;
  border-radius: 14px;
  box-shadow: none;
}

.mode-stage-home .home-activity-number {
  font-size: 2.2rem;
  width: auto;
  text-align: center;
  line-height: 1;
}

.mode-stage-home .home-activity-item p {
  font-size: 1.12rem;
  line-height: 1.54;
}

.mode-stage-home .sheet-header {
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.mode-stage-home .sheet-meta {
  min-width: 216px;
  padding-left: 16px;
}

.mode-stage-home .sheet-meta span {
  margin-bottom: 4px;
}

.mode-stage-home .sheet-meta strong {
  font-size: 0.92rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.mode-stage-home .alignment-meter {
  gap: 10px;
  padding-bottom: 12px;
}

.mode-stage-home .alignment-copy {
  margin-top: 2px;
  font-size: 1.34rem;
  line-height: 1.76;
}

.mode-stage-home .tailor-actions {
  gap: 8px;
  padding-top: 2px;
}

.mode-stage-home .tailor-button {
  min-width: 204px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.98rem;
  font-weight: 800;
}

.mode-stage-home .home-focus-panel {
  gap: 10px;
  display: flex;
  flex-direction: column;
}

.mode-stage-home .home-focus-body {
  gap: 14px;
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
}

.mode-stage-home .home-alignment-meter {
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--mode-accent) 18%, rgba(16, 32, 45, 0.08));
}

.mode-stage-home .home-signal-columns {
  gap: 10px;
  flex: 1;
}

.mode-stage-home .home-signal-group {
  gap: 10px;
  padding: 12px 14px;
  border-radius: 18px;
  background: color-mix(in srgb, white 95%, rgba(244, 251, 251, 0.68));
  box-shadow: none;
}

.mode-stage-home .compact-list li {
  display: grid;
  grid-template-columns: 0.5em 1fr;
  column-gap: 0.45em;
  align-items: start;
  margin-bottom: 8px;
  padding-left: 0;
  font-size: 1.3rem;
  line-height: 1.62;
  text-align: left;
  color: rgba(16, 32, 45, 0.82);
}

.mode-stage-home .compact-list li::before {
  content: "\2022";
  display: block;
  line-height: 1;
  transform: translateY(0.26em);
}

.compact-list li:last-child {
  margin-bottom: 0;
}

.home-actions {
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: flex-start;
}

.secondary-action {
  min-width: 220px;
}

.mode-stage-home .home-actions {
  gap: 10px;
}

.mode-stage-home .secondary-action {
  min-width: 184px;
}

.role-score-list {
  margin-top: 18px;
}

.role-score-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--mode-accent) 16%, rgba(16, 32, 45, 0.08));
}

.role-score-card:first-child {
  padding-top: 0;
}

.role-score-card:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.role-score-card h4 {
  margin: 5px 0 0;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.role-score-card strong {
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.role-score-card.is-selected {
  color: var(--mode-accent);
}

.chat-bubble {
  max-width: 82%;
  padding: 14px 16px;
  border-radius: 20px;
}

.chat-label {
  margin: 0 0 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chat-bubble p:last-child {
  margin: 0;
  line-height: 1.52;
}

.bubble-user {
  justify-self: end;
}

.bubble-assistant.compact {
  max-width: 70%;
}

.score-band {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  padding: 18px 0 20px;
  border-top: 1px solid color-mix(in srgb, var(--mode-accent) 16%, rgba(16, 32, 45, 0.08));
  border-bottom: 1px solid color-mix(in srgb, var(--mode-accent) 16%, rgba(16, 32, 45, 0.08));
}

.score-number {
  font-size: 2.6rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.08em;
}

.feedback-list,
.prep-block ul,
.prep-sequence {
  padding-left: 18px;
}

.feedback-list li,
.prep-block li,
.prep-sequence li {
  margin-bottom: 10px;
  line-height: 1.55;
}

.mode-stage-home .feedback-list.compact-list {
  padding-left: 0;
}

.draft-panel blockquote {
  margin: 18px 0 0;
  padding-left: 20px;
  border-left: 3px solid color-mix(in srgb, var(--mode-accent) 35%, transparent);
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 1.42rem;
  line-height: 1.45;
  letter-spacing: -0.04em;
}

.prep-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.prep-hero-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  margin-top: 2px;
}

.prep-hero-chip {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--mode-accent) 14%, rgba(16, 32, 45, 0.06));
  background: rgba(255, 255, 255, 0.8);
  display: grid;
  gap: 4px;
}

.prep-hero-chip strong {
  font-size: 1.04rem;
  letter-spacing: -0.04em;
}

.prep-chip-label {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(16, 32, 45, 0.66);
}

.prep-focus-column {
  display: grid;
  gap: 12px;
}

.prep-focus-card {
  position: relative;
  overflow: hidden;
  padding: 24px 24px 22px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(238, 248, 250, 0.9)),
    radial-gradient(circle at top right, rgba(34, 126, 166, 0.08), transparent 52%);
  box-shadow: 0 14px 32px rgba(23, 88, 108, 0.06);
}

.prep-focus-card::after {
  display: none;
}

.prep-focus-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.prep-focus-header h3 {
  margin: 6px 0 0;
  font-size: 1.46rem;
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.prep-focus-meta {
  text-align: right;
  display: grid;
  gap: 6px;
  font-size: 0.98rem;
  color: rgba(16, 32, 45, 0.7);
}

.prep-focus-summary {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  max-width: 66ch;
  font-size: 1rem;
  line-height: 1.56;
  color: rgba(16, 32, 45, 0.82);
}

.prep-focus-tags {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.84rem;
  font-weight: 700;
  color: rgba(16, 32, 45, 0.64);
}

.prep-focus-tags span {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--mode-accent) 14%, rgba(16, 32, 45, 0.06));
  background: rgba(255, 255, 255, 0.68);
}

.prep-progress-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.prep-progress-grid div {
  padding: 10px 11px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--mode-accent) 12%, rgba(16, 32, 45, 0.05));
  background: rgba(255, 255, 255, 0.78);
}

.prep-progress-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(16, 32, 45, 0.58);
  margin-bottom: 4px;
}

.prep-progress-grid strong {
  font-size: 1.18rem;
  letter-spacing: -0.04em;
}

.prep-task-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.84fr);
  gap: 14px;
  align-items: start;
}

.prep-task-block h4 {
  margin: 0 0 10px;
  font-size: 1.04rem;
  letter-spacing: -0.02em;
}

.prep-task-list {
  margin: 0;
  padding-left: 16px;
  font-size: 1rem;
  line-height: 1.62;
  color: rgba(16, 32, 45, 0.78);
}

.prep-task-list li + li {
  margin-top: 8px;
}

.prep-prompt-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed color-mix(in srgb, var(--mode-accent) 20%, rgba(16, 32, 45, 0.08));
  background: rgba(255, 255, 255, 0.84);
  font-size: 0.98rem;
  line-height: 1.52;
}

.prep-prompt-button {
  justify-self: start;
  padding: 8px 14px;
  border-radius: 14px;
  border: 1px solid var(--mode-accent);
  background: transparent;
  color: var(--mode-accent);
  font-weight: 700;
}

.prep-focus-slate {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.prep-quick-card {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--mode-accent) 12%, rgba(16, 32, 45, 0.05));
  background: rgba(255, 255, 255, 0.8);
  display: grid;
  gap: 6px;
}

.prep-quick-card h4 {
  margin: 0;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
}

.prep-quick-card ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.98rem;
  line-height: 1.58;
  color: rgba(16, 32, 45, 0.78);
}

.prep-quick-card-secondary {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(222, 239, 247, 0.82));
}

.prep-stacks {
  display: grid;
  gap: 12px;
  align-self: stretch;
}

.prep-menu-panel {
  min-height: 0;
  gap: 0;
  width: 100%;
  padding: 18px 20px 16px;
  border-radius: 22px;
  box-shadow: 0 14px 30px rgba(23, 88, 108, 0.05);
}

.prep-menu-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--mode-accent) 12%, rgba(16, 32, 45, 0.05));
}

.prep-menu-header h3 {
  margin: 4px 0 0;
  font-size: 1.38rem;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.prep-menu-subtext {
  margin: 6px 0 0;
  font-size: 0.88rem;
  color: rgba(16, 32, 45, 0.66);
}

.prep-menu-list {
  display: grid;
  gap: 8px;
}

.prep-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 14px;
  border: 1px solid color-mix(in srgb, var(--mode-accent) 12%, rgba(16, 32, 45, 0.06));
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
  text-align: left;
}

.prep-menu-item.is-current {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(222, 239, 247, 0.76));
  border-color: color-mix(in srgb, var(--mode-accent) 20%, rgba(16, 32, 45, 0.06));
  box-shadow: 0 10px 20px rgba(34, 126, 166, 0.08);
}

.prep-role-main {
  display: grid;
  gap: 4px;
}

.prep-role-company {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mode-accent);
}

.prep-role-title {
  font-size: 1.08rem;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.prep-role-meta {
  flex: 0 0 auto;
  padding-left: 14px;
  border-left: 1px solid color-mix(in srgb, var(--mode-accent) 18%, rgba(16, 32, 45, 0.08));
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(16, 32, 45, 0.62);
}

.prep-menu-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--mode-accent) 12%, rgba(16, 32, 45, 0.05));
}

.prep-action-button {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 16px;
  font-size: 0.94rem;
  font-weight: 700;
  border: 1px solid color-mix(in srgb, var(--mode-accent) 18%, rgba(16, 32, 45, 0.09));
}

.prep-action-primary {
  background: var(--mode-accent);
  color: white;
  box-shadow: 0 14px 28px color-mix(in srgb, var(--mode-accent) 26%, transparent);
}

.prep-action-secondary {
  background: rgba(255, 255, 255, 0.82);
  color: var(--mode-accent);
}

.prep-schedule-card {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(23, 88, 108, 0.05);
}

.prep-schedule-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.prep-schedule-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.prep-schedule-list li {
  display: grid;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--mode-accent) 16%, rgba(16, 32, 45, 0.08));
}

.prep-schedule-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.prep-schedule-list strong {
  font-size: 1rem;
}

.prep-schedule-list span {
  font-size: 0.9rem;
  color: rgba(16, 32, 45, 0.7);
}

.prep-block {
  padding: 18px 0 0;
  border-top: 1px solid color-mix(in srgb, var(--mode-accent) 16%, rgba(16, 32, 45, 0.08));
}

.prep-block h4 {
  margin: 0 0 14px;
  font-size: 1rem;
  letter-spacing: -0.03em;
}

.composer-area {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 10px;
  display: grid;
  gap: 8px;
}

.chat-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.chat-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
}

.chat-shell-icon {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 50%;
  position: relative;
  color: rgba(16, 32, 45, 0.64);
}

.chat-shell-icon::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  right: -5px;
  bottom: -4px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(45deg);
}

.chat-shell input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--ink);
}

.send-button {
  border: 0;
  border-radius: 14px;
  padding: 0 16px;
  min-height: 44px;
  font-weight: 700;
  color: white;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--mode-accent) 28%, transparent);
}

.bottom-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(14px);
}

.nav-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(16, 32, 45, 0.68);
  font-weight: 700;
}

.mode-home .composer-area,
.mode-search .composer-area,
.mode-prep .composer-area {
  gap: 10px;
  left: 50%;
  right: auto;
  bottom: 26px;
  width: min(calc(100% - 48px), 1120px);
  transform: translateX(-50%);
}

.mode-home .composer-area {
  isolation: isolate;
}

.mode-home .composer-area::before {
  content: "";
  position: absolute;
  left: -56px;
  right: -56px;
  top: -120px;
  bottom: -28px;
  border-radius: 40px;
  background:
    linear-gradient(
      180deg,
      rgba(244, 251, 251, 0) 0%,
      rgba(244, 251, 251, 0.18) 16%,
      rgba(244, 251, 251, 0.52) 34%,
      rgba(244, 251, 251, 0.82) 58%,
      rgba(244, 251, 251, 0.97) 100%
    );
  filter: blur(26px);
  pointer-events: none;
  z-index: -1;
}

.mode-home .chat-bar,
.mode-search .chat-bar,
.mode-prep .chat-bar {
  position: relative;
  gap: 10px;
  width: min(100%, 1080px);
  justify-self: center;
}

.mode-home .chat-shell,
.mode-search .chat-shell,
.mode-prep .chat-shell {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.82);
}

.mode-home .chat-shell input,
.mode-search .chat-shell input,
.mode-prep .chat-shell input {
  font-size: 1.18rem;
  font-weight: 500;
}

.mode-home .chat-shell input::placeholder,
.mode-search .chat-shell input::placeholder,
.mode-prep .chat-shell input::placeholder {
  font-size: 1.18rem;
  font-weight: 500;
}

.mode-home .send-button,
.mode-search .send-button,
.mode-prep .send-button {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 13px;
}

.mode-home .bottom-nav,
.mode-search .bottom-nav,
.mode-prep .bottom-nav {
  position: relative;
  gap: 4px;
  padding: 4px;
  width: min(100%, 780px);
  justify-self: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.mode-home .nav-button,
.mode-search .nav-button,
.mode-prep .nav-button {
  min-height: 32px;
  border-radius: 10px;
  font-size: 0.92rem;
}

.mode-home .nav-button svg,
.mode-search .nav-button svg,
.mode-prep .nav-button svg {
  width: 17px;
  height: 17px;
}

.nav-button svg {
  width: 20px;
  height: 20px;
}

.mode-search {
  --mode-accent: var(--search-accent);
  --mode-soft: var(--search-soft);
}

.mode-home {
  --mode-accent: var(--home-accent);
  --mode-soft: color-mix(in srgb, var(--home-soft) 88%, rgba(255, 255, 255, 0.12));
}

.mode-home .score-number,
.mode-home .home-activity-number {
  color: var(--search-accent);
}

.mode-home .eyebrow,
.mode-home .aside-label,
.mode-stage-home .home-alignment-meter .score-number {
  color: var(--home-accent);
}

.mode-home .chat-shell,
.mode-home .bottom-nav,
.mode-search .chat-shell,
.mode-search .bottom-nav,
.mode-prep .chat-shell,
.mode-prep .bottom-nav {
  border-color: color-mix(in srgb, var(--search-accent) 18%, rgba(16, 32, 45, 0.12));
}

.mode-home .send-button,
.mode-home .nav-button.active,
.mode-search .send-button,
.mode-search .nav-button.active,
.mode-prep .send-button,
.mode-prep .nav-button.active {
  background: var(--search-accent);
  color: white;
}

.mode-search .brand-note,
.mode-home .brand-note,
.mode-prep .brand-note {
  display: none;
}

.mode-search .brand-mark,
.mode-prep .brand-mark {
  color: var(--home-accent);
}

.mode-prep {
  --mode-accent: var(--prep-accent);
  --mode-soft: var(--prep-soft);
}

.app-shell,
.app-frame,
.nav-button,
.send-button,
.decision-button,
.status-chip,
.quiet-stat,
.chat-shell,
.editorial-sheet {
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.mode-kicker,
.eyebrow,
.aside-label,
.queue-score,
.score-number,
.brand-mark {
  color: var(--mode-accent);
}

.nav-button.active,
.send-button,
.decision-save {
  background: var(--mode-accent);
  color: white;
}

.mode-search .nav-button.active {
  background: var(--mode-accent) !important;
  color: white !important;
}

.mode-search .nav-button[data-mode="search"] {
  background: rgba(255, 255, 255, 0.96) !important;
  color: rgba(16, 32, 45, 0.82) !important;
}

.mode-search .nav-button[data-mode="search"].active {
  background: var(--mode-accent) !important;
  color: white !important;
}

.mode-search .nav-button[data-mode="home"],
.mode-search .nav-button[data-mode="prep"] {
  background: rgba(255, 255, 255, 0.96) !important;
  color: rgba(16, 32, 45, 0.82) !important;
}

.mode-search .nav-button:not(.active) {
  background: rgba(255, 255, 255, 0.96) !important;
  color: rgba(16, 32, 45, 0.82) !important;
}

.bottom-nav,
.chat-shell,
.app-frame {
  border-color: color-mix(in srgb, var(--mode-accent) 18%, rgba(16, 32, 45, 0.12));
}

.status-chip,
.quiet-stat,
.signal-list span,
.decision-button,
.chat-bubble.bubble-user {
  color: var(--mode-accent);
}

.company-sigil,
.rhythm-bar.saved,
.dot-saved {
  background: var(--mode-accent);
  color: white;
}

.chat-bubble.bubble-assistant {
  background: var(--mode-soft);
}

.decision-skip,
.chat-bubble.bubble-user {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid color-mix(in srgb, var(--mode-accent) 22%, rgba(16, 32, 45, 0.12));
}

.decision-skip:hover {
  background: color-mix(in srgb, var(--mode-soft) 72%, white);
}

.rhythm-bar.reviewed,
.dot-reviewed {
  background: color-mix(in srgb, var(--mode-accent) 50%, white);
}

.rhythm-bar.skipped,
.dot-skipped {
  background: rgba(16, 32, 45, 0.28);
}

.input-active .chat-overlay {
  opacity: 1;
  pointer-events: auto;
}

.input-active .chat-overlay-backdrop,
.input-active .chat-history-shell {
  opacity: 1;
}

.input-active .chat-history-shell {
  bottom: 34px;
  transform: translate3d(0, 0, 0);
}

.input-active .composer-area {
  z-index: 6;
}

.input-active .app-frame::after {
  opacity: 0 !important;
}

.input-active .workspace,
.input-active .app-header {
  opacity: 0.28;
  filter: blur(14px);
  user-select: none;
  pointer-events: none;
}

.input-active .bottom-nav {
  opacity: 0;
  visibility: hidden;
  filter: none;
  backdrop-filter: none;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  pointer-events: none;
}

.input-active .chat-shell {
  background: rgba(255, 255, 255, 1);
  backdrop-filter: none;
  box-shadow: none;
}

.input-active .send-button {
  box-shadow: none;
}

.input-active .mode-home .composer-area {
  isolation: auto;
}

.input-active .mode-home .composer-area::before {
  content: none;
  opacity: 0;
}

@media (max-width: 980px) {
  .app-shell {
    padding: 16px;
  }

  .app-frame {
    min-height: calc(100vh - 32px);
    padding: 20px 20px 132px;
  }

  .app-header,
  .sheet-header,
  .sheet-footer,
  .panel-heading,
  .panel-topline,
  .triage-layout,
  .workspace-flow {
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .search-grid,
  .home-grid,
  .prep-grid,
  .prep-focus-slate,
  .prep-columns,
  .home-activity-list,
  .home-signal-columns,
  .home-actions,
  .prep-menu-actions,
  .mode-stage-prep .mode-hero,
  .prep-hero-strip,
  .prep-progress-grid {
    grid-template-columns: 1fr;
  }

  .search-swipe-stage {
    grid-template-columns: 1fr;
    gap: 18px;
    min-height: 0;
  }

  .swipe-hint {
    max-width: none;
    text-align: center;
  }

  .swipe-hint-up {
    position: static;
    transform: none;
    order: 1;
  }

  .swipe-hint-left {
    order: 2;
  }

  .search-focus-card {
    order: 3;
    min-height: 0;
    max-width: min(100%, 560px);
  }

  .search-card-topline {
    position: static;
    width: 100%;
    justify-content: flex-start;
  }

  .search-top-meta {
    width: 100%;
    justify-items: start;
  }

  .search-status-group {
    justify-content: flex-start;
  }

  .mode-search .search-focus-card .triage-company {
    width: 100%;
  }

  .prep-menu-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .prep-role-meta {
    padding-left: 0;
    border-left: 0;
  }

  .prep-task-grid {
    grid-template-columns: 1fr;
  }

  .prep-focus-column {
    grid-template-columns: 1fr;
  }

  .mode-stage-prep {
    transform: none;
  }

  .mode-stage-prep .mode-hero {
    gap: 10px;
  }

  .swipe-hint-right {
    order: 4;
  }

  .sheet-meta,
  .triage-aside,
  .thread-notes {
    min-width: 0;
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid color-mix(in srgb, var(--mode-accent) 18%, rgba(16, 32, 45, 0.08));
    padding-top: 16px;
  }

  .triage-metrics div {
    border-right: 0;
    padding-right: 0;
  }

  .decision-row {
    min-width: 0;
    width: 100%;
  }

  .tailor-button {
    width: 100%;
  }

  .secondary-action {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 680px) {
  .mode-hero h1 {
    max-width: none;
    font-size: 2.7rem;
  }

  .composer-area {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  .mode-home .composer-area {
    left: 16px;
    right: 16px;
    width: auto;
    transform: none;
  }

  .mode-search .composer-area,
  .mode-prep .composer-area {
    left: 16px;
    right: 16px;
    width: auto;
    transform: none;
  }

  .mode-home .composer-area::before,
  .mode-home .chat-bar::before,
  .mode-home .bottom-nav::before {
    display: none;
  }

  .chat-bar {
    grid-template-columns: 1fr;
  }

  .chat-history-shell {
    top: 18px;
    bottom: 74px;
    left: 12px;
    right: 12px;
    width: auto;
  }

  .chat-history-stack {
    padding: 26px 16px 144px;
  }

  .chat-message {
    max-width: 100%;
    padding: 14px 15px;
  }

  .bottom-nav,
  .triage-metrics {
    grid-template-columns: 1fr;
  }

  .search-card-topline,
  .search-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-card-actions {
    width: 100%;
  }

  .decision-pill {
    flex: 1;
  }

  .nav-button span {
    font-size: 0.86rem;
  }
}
