:root {
  color-scheme: light;
  --bg: #f5f2ea;
  --bg-soft: rgba(255, 255, 255, 0.72);
  --surface: rgba(255, 252, 246, 0.76);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --line: rgba(28, 34, 43, 0.12);
  --line-strong: rgba(28, 34, 43, 0.18);
  --text: #13202d;
  --muted: #5d6873;
  --accent: #136f63;
  --accent-soft: rgba(19, 111, 99, 0.14);
  --accent-warm: #c86f31;
  --accent-low: #8d3e2a;
  --shadow: 0 24px 60px rgba(18, 32, 45, 0.08);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(19, 111, 99, 0.12), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(200, 111, 49, 0.12), transparent 22%),
    linear-gradient(180deg, #f8f5ef 0%, #f3efe6 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(19, 32, 45, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 32, 45, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.22), transparent 72%);
}

.shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.hero,
.composer,
.board {
  position: relative;
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 32px;
  padding: 32px;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.hero::after,
.composer::after,
.board::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 36%);
}

.hero-copy,
.hero-meter,
.composer,
.board {
  position: relative;
  z-index: 1;
}

.eyebrow,
.meter-kicker,
.context-label,
.summary-label,
.insight-label,
.footer-label,
.field-label {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.eyebrow,
.meter-kicker,
.summary-label,
.context-label,
.insight-label,
.footer-label,
.field-label {
  color: var(--muted);
}

.brand-mark {
  display: inline-flex;
  align-items: flex-end;
  width: fit-content;
  margin: 0;
  padding: 0.18em 0.3em 0.48em 0.24em;
  background: linear-gradient(135deg, #173549, #136f63);
  clip-path: polygon(0 0, 100% 0, 100% 80%, 0 100%);
}

.brand-mark-text {
  display: block;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(4.2rem, 10vw, 7.2rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 0.8;
  text-transform: uppercase;
  color: #f8f5ef;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.04em;
}

h1 {
  max-width: 11ch;
  margin-top: 14px;
  font-size: clamp(2.5rem, 6vw, 4.6rem);
  line-height: 0.94;
}

.hero-copy h2 {
  font-size: 1.8rem;
}

.lede {
  max-width: 56ch;
  margin: 18px 0 0;
  font-size: 1.06rem;
  line-height: 1.6;
  color: var(--muted);
}

.hero-actions {
  margin-top: 32px;
  display: grid;
  gap: 12px;
  align-items: start;
}

.primary-button,
.secondary-button,
.sample-pill,
.mode-button {
  border: 0;
  cursor: pointer;
  font: inherit;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    border-color 180ms ease;
}

.primary-button {
  width: fit-content;
  padding: 14px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #173549, #136f63);
  color: white;
  box-shadow: 0 16px 40px rgba(19, 111, 99, 0.26);
}

.primary-button:hover,
.secondary-button:hover,
.sample-pill:hover,
.mode-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.84;
  transform: none;
  box-shadow: none;
  background: linear-gradient(135deg, #8b969f, #77838d);
  color: rgba(255, 255, 255, 0.92);
}

.primary-button:disabled[data-disabled-reason] {
  position: relative;
}

.primary-button:disabled[data-disabled-reason]::after {
  content: attr(data-disabled-reason);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  width: max-content;
  max-width: min(280px, 72vw);
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.98);
  box-shadow: 0 14px 24px rgba(19, 32, 45, 0.14);
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
  z-index: 4;
}

.primary-button:disabled[data-disabled-reason]:hover::after {
  opacity: 1;
}

.secondary-button {
  width: fit-content;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
}

.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none;
}

.microcopy,
.drawer-note,
.status-message,
.metric-note,
.context-block p,
.footer-block p,
.insight-panel p:last-child,
.summary-copy p {
  margin: 0;
  line-height: 1.6;
  color: var(--muted);
}

.hero-meter {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  border-radius: calc(var(--radius-xl) - 8px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.3)),
    radial-gradient(circle at 50% 0%, rgba(19, 111, 99, 0.15), transparent 55%);
}

.meter-stack {
  display: grid;
  gap: 22px;
  justify-items: center;
  text-align: center;
}

.mini-meter-ring,
.confidence-meter {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.mini-meter-ring {
  width: 196px;
  aspect-ratio: 1;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.95) 0 54%, transparent 55% 100%),
    conic-gradient(var(--meter-color, var(--accent)) 0 var(--meter-progress, 0%), rgba(19, 32, 45, 0.08) 0 100%);
  box-shadow: inset 0 0 0 1px rgba(19, 32, 45, 0.04);
}

.mini-meter-progress-74 {
  --meter-progress: 74%;
}

.mini-meter-core,
.confidence-core {
  display: grid;
  place-items: center;
  text-align: center;
}

.mini-meter-value,
.confidence-value {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.06em;
}

.mini-meter-value {
  font-size: 2.8rem;
}

.mini-meter-label,
.confidence-caption {
  font-size: 0.85rem;
  color: var(--muted);
}

.hero-meter-text h2 {
  max-width: 14ch;
  margin: 6px auto 0;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1;
}

.hero-metrics {
  display: flex;
  gap: 10px;
  padding: 0;
  margin: 20px 0 0;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-metrics li,
.mode-chip,
.confidence-chip {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
}

.hero-metrics span,
.mode-chip {
  color: var(--muted);
}

.hero-metrics strong,
.confidence-chip {
  font-weight: 600;
}

.workspace {
  margin-top: 22px;
  display: grid;
  gap: 22px;
}

.composer,
.board {
  border-radius: var(--radius-xl);
  padding: 28px;
}

.section-heading {
  max-width: 48rem;
}

.section-heading h2 {
  margin-top: 4px;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.02;
}

.viewer-mode-banner {
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(19, 32, 45, 0.16);
  border-radius: 14px;
  background: rgba(19, 32, 45, 0.08);
  color: #2d3c4a;
  font-size: 0.92rem;
  line-height: 1.45;
}

.viewer-mode-banner[hidden] {
  display: none;
}

.sample-strip,
.footer-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.sample-strip {
  margin-top: 20px;
}

.sample-strip[hidden] {
  display: none;
}

.sample-pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid transparent;
  color: var(--text);
}

.sample-pill.is-selected {
  border-color: rgba(19, 111, 99, 0.4);
  background: var(--accent-soft);
}

.composer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 18px;
  margin-top: 20px;
  align-items: start;
}

.prompt-panel,
.context-panel,
.summary-panel,
.insight-panel,
.footer-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
}

.prompt-panel,
.context-panel,
.summary-panel {
  padding: 20px;
}

.prompt-panel textarea,
.structured-intake input,
.structured-intake textarea,
.drawer-field input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: 16px 18px;
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
}

.prompt-panel textarea {
  resize: vertical;
  min-height: 160px;
  margin-top: 10px;
  line-height: 1.55;
}

.structured-intake textarea {
  min-height: 0;
  margin-top: 10px;
  resize: vertical;
  line-height: 1.55;
}

.structured-intake input {
  margin-top: 10px;
}

.prompt-panel textarea:focus,
.structured-intake input:focus,
.structured-intake textarea:focus,
.drawer-field input:focus {
  outline: 2px solid rgba(19, 111, 99, 0.18);
  border-color: rgba(19, 111, 99, 0.4);
}

.structured-intake {
  display: grid;
  gap: 16px;
  margin-top: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.structured-intake[hidden] {
  display: none;
}

.refine-shell {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.46);
}

.refine-shell[hidden] {
  display: none;
}

.refine-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.refine-copy {
  display: grid;
  gap: 6px;
}

.refine-summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.refine-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.draft-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(19, 111, 99, 0.12);
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 400;
}

.intake-section {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.58);
}

.intake-section.is-suggested {
  border-color: rgba(19, 111, 99, 0.32);
  background: rgba(19, 111, 99, 0.08);
}

.intake-section-head,
.option-card-head,
.criteria-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.intake-help,
.option-help {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.92rem;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.evidence-toolbar {
  display: flex;
  justify-content: flex-end;
}

.workspace-library-block {
  display: grid;
  gap: 12px;
}

.workspace-evidence-library-panel {
  display: grid;
  gap: 12px;
}

.workspace-evidence-library-panel[hidden] {
  display: none;
}

.workspace-library-actions-row {
  justify-content: flex-start;
}

.workspace-library-list {
  margin-top: 0;
  max-height: 19rem;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.workspace-library-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.workspace-library-status {
  margin-top: 0;
}

.workspace-library-status.is-plan-disabled {
  min-height: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding: 12px 14px;
  border: 1px solid rgba(19, 32, 45, 0.16);
  border-radius: 14px;
  background: rgba(19, 32, 45, 0.08);
  color: #2d3c4a;
  font-size: 0.92rem;
  line-height: 1.45;
}

.workspace-library-card.is-attached {
  border-color: rgba(19, 111, 99, 0.34);
  background: rgba(19, 111, 99, 0.08);
}

.workspace-library-attach-button.is-attached {
  border-color: rgba(19, 111, 99, 0.38);
  background: rgba(19, 111, 99, 0.16);
  color: var(--accent);
}

.workspace-library-delete-button {
  padding: 8px 11px;
  font-size: 0.74rem;
}

.evidence-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.evidence-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.evidence-badge,
.evidence-meta-text {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.evidence-badge {
  background: rgba(19, 111, 99, 0.1);
  color: var(--accent);
  text-transform: uppercase;
}

.evidence-type-note {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  border: 1px solid rgba(19, 32, 45, 0.08);
}

.evidence-type-pdf {
  background: rgba(200, 111, 49, 0.14);
  color: #a24d20;
}

.evidence-type-docx {
  background: rgba(49, 115, 197, 0.14);
  color: #245ca7;
}

.evidence-type-link {
  background: rgba(19, 32, 45, 0.12);
  color: var(--text);
}

.evidence-scope-library-reference {
  background: rgba(19, 111, 99, 0.18);
  color: #0f6258;
}

.evidence-badge.is-failed {
  background: rgba(141, 62, 42, 0.12);
  color: var(--accent-low);
}

.evidence-meta-text {
  background: rgba(19, 32, 45, 0.06);
  color: var(--muted);
}

.field-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.suggested-flag {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(19, 111, 99, 0.12);
  color: var(--accent);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.suggested-flag[hidden] {
  display: none;
}

.compact-button,
.option-remove {
  padding: 10px 14px;
}

.options-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.evidence-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.evidence-status-message {
  margin-top: 10px;
  margin-bottom: 2px;
}

.clarify-shell {
  margin-top: 12px;
}

.clarify-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.clarify-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(19, 32, 45, 0.1);
  background: rgba(255, 255, 255, 0.74);
}

.clarify-question,
.clarify-note {
  margin: 0;
  line-height: 1.55;
}

.clarify-question {
  font-weight: 600;
  color: var(--text);
}

.clarify-note {
  margin-top: 10px;
  color: var(--muted);
}

.clarify-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.clarify-actions .secondary-button.is-selected {
  background: rgba(19, 111, 99, 0.12);
  border-color: rgba(19, 111, 99, 0.3);
  color: var(--accent);
}

.derived-assumptions {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(19, 32, 45, 0.08);
}

.option-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(19, 32, 45, 0.1);
  background: rgba(255, 255, 255, 0.74);
}

.evidence-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(19, 32, 45, 0.1);
  background: rgba(255, 255, 255, 0.74);
  display: grid;
  gap: 10px;
}

.evidence-card textarea,
.evidence-card input {
  margin-top: 8px;
}

.evidence-title,
.evidence-preview,
.evidence-error,
.evidence-link {
  margin: 0;
  line-height: 1.55;
}

.evidence-title {
  font-weight: 600;
}

.evidence-preview,
.evidence-link {
  color: var(--muted);
}

.evidence-link {
  text-decoration: none;
}

.evidence-link:hover {
  text-decoration: underline;
}

.evidence-error {
  color: var(--accent-low);
}

.evidence-empty {
  margin-top: 12px;
}

.option-index {
  margin: 0;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.option-remove {
  border-radius: 999px;
}

.option-remove:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

.criteria-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.criteria-field {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(19, 32, 45, 0.1);
  background: rgba(255, 255, 255, 0.74);
}

.criteria-head span {
  font-size: 0.94rem;
  color: var(--muted);
}

.criteria-head strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.criteria-field input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  margin: 0;
  height: 24px;
  background: transparent;
  cursor: pointer;
}

.criteria-field input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(19, 32, 45, 0.12);
}

.criteria-field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -5px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #173549, #136f63);
  box-shadow: 0 6px 18px rgba(19, 111, 99, 0.25);
}

.criteria-field input[type="range"]::-moz-range-track {
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(19, 32, 45, 0.12);
}

.criteria-field input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #173549, #136f63);
  box-shadow: 0 6px 18px rgba(19, 111, 99, 0.25);
}

.criteria-field input[type="range"]:focus-visible {
  outline: none;
}

.criteria-field input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow:
    0 0 0 4px rgba(19, 111, 99, 0.14),
    0 6px 18px rgba(19, 111, 99, 0.25);
}

.criteria-field input[type="range"]:focus-visible::-moz-range-thumb {
  box-shadow:
    0 0 0 4px rgba(19, 111, 99, 0.14),
    0 6px 18px rgba(19, 111, 99, 0.25);
}

.suggested-field,
.option-card.is-suggested,
.criteria-field.is-suggested {
  border-color: rgba(19, 111, 99, 0.32);
  background: rgba(19, 111, 99, 0.08);
}

.structured-intake textarea.suggested-field,
.structured-intake input.suggested-field {
  color: var(--accent);
  border-color: rgba(19, 111, 99, 0.32);
  background: rgba(19, 111, 99, 0.08);
}

.structured-intake textarea.suggested-field::placeholder,
.structured-intake input.suggested-field::placeholder {
  color: rgba(19, 111, 99, 0.55);
}

.criteria-field.is-suggested .criteria-head span,
.criteria-field.is-suggested .criteria-head strong {
  color: var(--accent);
}

.criteria-field.is-suggested input[type="range"]::-webkit-slider-runnable-track {
  background: rgba(19, 111, 99, 0.16);
}

.criteria-field.is-suggested input[type="range"]::-moz-range-track {
  background: rgba(19, 111, 99, 0.16);
}

.composer-footer {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.composer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
}

.mode-button {
  padding: 10px 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
}

.mode-button.is-active {
  background: var(--text);
  color: white;
}

.settings-drawer {
  margin-top: 16px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.66);
}

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

.drawer-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.drawer-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.status-message {
  min-height: 1.5em;
  margin-top: 12px;
}

.status-message.is-error {
  color: var(--accent-low);
}

.status-message.is-success {
  color: var(--accent);
}

.context-panel {
  display: grid;
  gap: 14px;
  align-self: start;
}

.history-block {
  display: grid;
  gap: 12px;
}

.workspace-block {
  display: grid;
  gap: 12px;
}

.workspace-user {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.workspace-actions,
.merge-actions,
.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.merge-prompt {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(19, 111, 99, 0.06);
}

.merge-prompt[hidden] {
  display: none;
}

.merge-prompt p:last-child,
.merge-prompt p {
  margin: 0;
}

.history-head {
  display: grid;
  gap: 4px;
}

.history-caption,
.history-empty {
  font-size: 0.88rem;
  color: var(--muted);
}

.history-list {
  display: grid;
  gap: 10px;
  max-height: 22rem;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.history-delete-button {
  white-space: nowrap;
}

.workspace-meta {
  display: grid;
  gap: 6px;
}

.workspace-meta-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.workspace-meta strong {
  font-size: 0.95rem;
}

.workspace-role-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid transparent;
}

.workspace-role-pill.is-owner {
  background: rgba(19, 111, 99, 0.14);
  border-color: rgba(19, 111, 99, 0.28);
  color: var(--accent);
}

.workspace-role-pill.is-editor {
  background: rgba(200, 111, 49, 0.14);
  border-color: rgba(200, 111, 49, 0.28);
  color: #9d531d;
}

.workspace-role-pill.is-viewer {
  background: rgba(19, 32, 45, 0.1);
  border-color: rgba(19, 32, 45, 0.2);
  color: #44515d;
}

.workspace-role-pill.is-personal {
  background: rgba(49, 167, 141, 0.16);
  border-color: rgba(49, 167, 141, 0.3);
  color: #0f6f5f;
}

.workspace-meta code {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(19, 32, 45, 0.06);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.83rem;
}

.workspace-reset {
  justify-self: start;
}

.auth-modal-shell {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.auth-modal-shell[hidden] {
  display: none;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(19, 32, 45, 0.34);
  backdrop-filter: blur(8px);
}

.auth-modal {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 252, 246, 0.96);
  box-shadow: var(--shadow);
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.workspace-modal {
  width: min(1120px, calc(100vw - 32px));
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.workspace-modal-columns {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 16px;
  min-height: 0;
}

.workspace-modal-column {
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.workspace-modal-column[hidden] {
  display: none;
}

.auth-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.auth-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  font: inherit;
  color: var(--text);
}

.workspace-modal-section input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  font: inherit;
  color: var(--text);
}

.workspace-modal-section select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  font: inherit;
  color: var(--text);
}

#accountModalShell .auth-actions {
  margin-top: 14px;
}

.account-modal {
  width: min(960px, calc(100vw - 32px));
}

.account-modal-columns {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 16px;
  align-items: start;
}

.account-plan-summary {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
}

.account-plan-head {
  display: grid;
  gap: 6px;
}

.account-plan-head strong {
  font-size: 1.1rem;
}

.account-plan-head .intake-help {
  margin: 0;
}

.account-quota-list {
  display: grid;
  gap: 8px;
}

.account-quota-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
}

.account-quota-label {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.account-quota-label-context {
  font-size: 0.7rem;
  letter-spacing: 0.01em;
  opacity: 0.85;
}

.account-quota-row strong {
  font-size: 0.92rem;
}

.account-quota-footnote {
  margin: 0;
}

.workspace-modal-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
}

.workspace-danger-section {
  border-color: rgba(141, 62, 42, 0.24);
  background: rgba(141, 62, 42, 0.06);
}

.danger-button {
  border-color: rgba(141, 62, 42, 0.34);
  color: #8d3e2a;
}

.danger-button:hover {
  background: rgba(141, 62, 42, 0.1);
}

.workspace-modal-headline {
  align-items: start;
}

.workspace-switcher-list {
  display: grid;
  gap: 10px;
}

.workspace-switcher-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.workspace-switcher-item:hover {
  transform: translateY(-1px);
  border-color: rgba(19, 111, 99, 0.26);
}

.workspace-switcher-item.is-active {
  border-color: rgba(19, 111, 99, 0.4);
  background: var(--accent-soft);
}

.workspace-switcher-copy {
  display: grid;
  gap: 4px;
}

.workspace-switcher-copy strong {
  font-size: 0.98rem;
}

.workspace-switcher-copy span,
.workspace-switcher-indicator {
  color: var(--muted);
  font-size: 0.86rem;
}

.workspace-switcher-indicator {
  white-space: nowrap;
}

.workspace-members-list,
.workspace-pending-list {
  display: grid;
  gap: 10px;
}

.workspace-invite-form {
  display: grid;
  gap: 10px;
}

.workspace-collab-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed rgba(19, 111, 99, 0.3);
  border-radius: 12px;
  background: rgba(19, 111, 99, 0.08);
  color: var(--accent);
  font-size: 0.86rem;
  line-height: 1.45;
}

.workspace-collab-note[hidden] {
  display: none;
}

.workspace-member-row,
.workspace-invite-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.workspace-member-copy,
.workspace-invite-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.workspace-member-copy strong,
.workspace-invite-copy strong {
  font-size: 0.94rem;
}

.workspace-member-copy span,
.workspace-invite-copy span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
  word-break: break-word;
}

.workspace-member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.workspace-role-select {
  min-width: 120px;
}

.history-item {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  text-align: left;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.history-item strong {
  font-size: 0.95rem;
}

.history-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.history-item-actions {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  margin-left: auto;
}

.history-item-title {
  display: grid;
  gap: 4px;
}

.history-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
}

.history-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(19, 111, 99, 0.1);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
}

.history-item span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.history-item.is-active {
  border-color: rgba(19, 111, 99, 0.4);
  background: var(--accent-soft);
}

.history-item:hover {
  transform: translateY(-1px);
}

.context-block {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.context-block:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.board-topline,
.summary-head,
.board-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.board-topline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.board-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 18px;
  margin-top: 22px;
}

.summary-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin-top: 18px;
}

.summary-meter-column {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.confidence-meter {
  width: 220px;
  aspect-ratio: 1;
  --band-color: var(--accent);
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.97) 0 56%, transparent 57% 100%),
    conic-gradient(var(--band-color) 0 var(--progress, 0%), rgba(19, 32, 45, 0.08) 0 100%);
  box-shadow:
    inset 0 0 0 1px rgba(19, 32, 45, 0.06),
    0 18px 40px rgba(19, 32, 45, 0.08);
  transform: rotate(-90deg);
}

.confidence-core {
  transform: rotate(90deg);
}

.confidence-value {
  font-size: 3.6rem;
}

.summary-copy h3 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.96;
}

.summary-copy p {
  margin-top: 12px;
  font-size: 1.02rem;
}

.inline-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.metric-help {
  justify-self: end;
}

.inline-help-label {
  white-space: nowrap;
}

.info-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: help;
}

.info-trigger:hover,
.info-trigger:focus-visible {
  border-color: rgba(19, 111, 99, 0.34);
  outline: none;
}

.info-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  z-index: 5;
  width: min(320px, calc(100vw - 48px));
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.98);
  box-shadow: var(--shadow);
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.inline-help:hover .info-popover,
.inline-help:focus-within .info-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.metric-rail {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.metric-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.confidence-breakdown {
  margin-top: 20px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.confidence-breakdown[hidden] {
  display: none;
}

.confidence-breakdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  list-style: none;
}

.confidence-breakdown-toggle::-webkit-details-marker {
  display: none;
}

.confidence-breakdown-toggle-copy {
  color: var(--muted);
  font-size: 0.92rem;
}

.confidence-breakdown-toggle::after {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(19, 32, 45, 0.06);
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  flex: 0 0 auto;
}

.confidence-breakdown[open] .confidence-breakdown-toggle::after {
  content: "-";
}

.confidence-breakdown-body {
  margin-top: 16px;
}

.confidence-breakdown-rows {
  display: grid;
  gap: 12px;
}

.confidence-driver {
  display: grid;
  gap: 8px;
}

.confidence-driver-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.confidence-driver-label {
  font-size: 0.92rem;
  color: var(--text);
}

.confidence-driver-score {
  font-family: var(--font-display);
  font-size: 1rem;
}

.confidence-driver-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(19, 32, 45, 0.08);
  overflow: hidden;
}

.confidence-driver-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #173549, #136f63);
}

.confidence-driver-note,
.confidence-breakdown-summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.confidence-breakdown-summary {
  margin-top: 14px;
}

.metric-row {
  display: grid;
  gap: 8px;
}

.metric-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.98rem;
}

.metric-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(19, 32, 45, 0.08);
  overflow: hidden;
}

.metric-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #31a78d);
  transition: width 640ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.insight-panel,
.footer-block {
  padding: 18px;
}

.insight-panel {
  min-height: 188px;
  opacity: 0;
  transform: translateY(12px);
  animation: riseIn 520ms ease forwards;
}

.insight-panel:nth-child(2) {
  animation-delay: 60ms;
}

.insight-panel:nth-child(3) {
  animation-delay: 120ms;
}

.insight-panel:nth-child(4) {
  animation-delay: 180ms;
}

.insight-label {
  margin: 0 0 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.detail-panel {
  padding: 18px;
}

.detail-panel-wide {
  grid-column: 1 / -1;
}

.detail-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
  flex-wrap: wrap;
}

.board-option-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.board-option-card {
  display: grid;
  gap: 16px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(19, 32, 45, 0.1);
  background: rgba(255, 255, 255, 0.7);
}

.board-option-card.is-recommended {
  border-color: rgba(19, 111, 99, 0.34);
  background: rgba(19, 111, 99, 0.08);
  box-shadow: inset 0 0 0 1px rgba(19, 111, 99, 0.08);
}

.board-option-top,
.board-option-meta,
.board-option-metrics {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.board-option-labels {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.board-option-rank,
.board-option-recommended,
.board-option-score {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.board-option-rank,
.board-option-score {
  background: rgba(19, 32, 45, 0.06);
  color: var(--muted);
}

.board-option-recommended {
  background: rgba(19, 111, 99, 0.12);
  color: var(--accent);
}

.board-option-card h4,
.board-option-card p {
  margin: 0;
}

.board-option-card h4 {
  font-size: 1.1rem;
}

.board-option-details,
.board-option-summary,
.board-option-note {
  color: var(--muted);
  line-height: 1.6;
}

.board-option-summary {
  color: var(--text);
  font-weight: 500;
}

.board-option-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.board-option-metric {
  padding: 12px;
  border-radius: 14px;
  background: rgba(19, 32, 45, 0.04);
}

.board-option-metric span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 6px;
}

.board-option-metric strong {
  font-size: 1.1rem;
}

.detail-list {
  margin: 12px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
}

.detail-list li,
.detail-empty,
.detail-panel p:last-child {
  line-height: 1.6;
}

.guidance-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.guidance-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem 1.05rem;
  background: rgba(255, 255, 255, 0.72);
}

.guidance-card p {
  margin: 0;
}

.guidance-question {
  color: var(--ink);
  font-weight: 700;
}

.guidance-source,
.guidance-why {
  margin-top: 0.45rem !important;
  color: var(--muted);
}

.guidance-source {
  color: var(--accent-deep);
  font-weight: 600;
}

.detail-empty {
  margin: 12px 0 0;
  color: var(--muted);
}

.board-footer {
  margin-top: 18px;
  align-items: stretch;
  flex-direction: column;
}

.sensitivity-shell {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.74);
  overflow: hidden;
}

.sensitivity-shell[hidden] {
  display: none;
}

.sensitivity-toggle {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
}

.sensitivity-toggle::-webkit-details-marker {
  display: none;
}

.sensitivity-toggle::after {
  content: "+";
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--muted);
}

.sensitivity-shell[open] .sensitivity-toggle::after {
  content: "−";
}

.sensitivity-body {
  padding: 0 20px 20px;
  display: grid;
  gap: 16px;
}

.sensitivity-note,
.sensitivity-baseline {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.sensitivity-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sensitivity-results {
  display: grid;
  gap: 12px;
}

.sensitivity-result-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(19, 32, 45, 0.1);
  background: rgba(255, 255, 255, 0.7);
}

.sensitivity-result-card.is-recommended {
  border-color: rgba(19, 111, 99, 0.34);
  background: rgba(19, 111, 99, 0.08);
  box-shadow: inset 0 0 0 1px rgba(19, 111, 99, 0.08);
}

.sensitivity-flip {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(19, 32, 45, 0.05);
  color: var(--text);
  line-height: 1.6;
}

.sensitivity-flip.is-flipped {
  background: rgba(19, 111, 99, 0.1);
  color: var(--accent-deep);
}

.footer-block {
  flex: 1;
}

.footer-block-actions {
  max-width: 360px;
}

.hidden {
  display: none;
}

.confidence-low {
  --band-color: var(--accent-low);
}

.confidence-medium {
  --band-color: var(--accent-warm);
}

.confidence-high {
  --band-color: var(--accent);
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero,
  .composer-grid,
  .board-grid,
  .summary-layout,
  .board-footer {
    grid-template-columns: 1fr;
  }

  .hero-meter {
    min-height: auto;
    padding: 24px 0;
  }

  .composer-footer,
  .board-topline,
  .summary-head,
  .board-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .drawer-grid,
  .insight-grid {
    grid-template-columns: 1fr;
  }

  .criteria-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-block-actions {
    max-width: none;
  }

  .detail-grid,
  .board-option-metrics {
    grid-template-columns: 1fr;
  }

  .summary-meter-column {
    justify-items: start;
  }

  .metric-rail-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric-help {
    justify-self: start;
  }

  .account-modal-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 1200px);
    padding-top: 12px;
  }

  .hero,
  .composer,
  .board {
    padding: 20px;
    border-radius: 24px;
  }

  h1 {
    margin-top: 10px;
    font-size: 2.6rem;
  }

  .brand-mark {
    padding: 0.18em 0.24em 0.42em 0.18em;
  }

  .brand-mark-text {
    font-size: clamp(3.4rem, 15vw, 5.1rem);
    letter-spacing: 0.05em;
  }

  .section-heading h2,
  .summary-copy h3 {
    font-size: 1.8rem;
  }

  .confidence-meter {
    width: min(74vw, 220px);
  }

  .summary-layout {
    justify-items: center;
  }

  .summary-meter-column {
    justify-items: center;
  }

  .criteria-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .composer-actions,
  .refine-toolbar,
  .field-row,
  .intake-section-head,
  .option-card-head,
  .criteria-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-modal-shell {
    padding: 12px;
  }

  .auth-modal {
    width: min(520px, calc(100vw - 20px));
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 20px;
    border-radius: 20px;
  }

  .workspace-modal {
    width: min(100vw - 20px, 1120px);
  }

  .workspace-modal-columns {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  }

  .workspace-switcher-list {
    max-height: none;
  }

  .workspace-member-row,
  .workspace-invite-row {
    flex-direction: column;
    align-items: stretch;
  }

  .workspace-member-actions {
    justify-content: flex-start;
  }

  .workspace-role-select {
    width: 100%;
  }

  .account-modal {
    width: min(100vw - 20px, 960px);
  }
}
