:root {
  color-scheme: light;
  --navy: #0a122a;
  --navy-2: #131d3b;
  --green: #21cc36;
  --green-dark: #16a92a;
  --green-soft: #eafbee;
  --white: #ffffff;
  --soft: #f7f7f7;
  --platinum: #f1f3f5;
  --ink: #10162b;
  --body: #636466;
  --muted: #9297a3;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --warning: #d8a900;
  --warning-soft: #fff9df;
  --pending: #d97706;
  --info: #4a90e2;
  --danger: #d32f2f;
  --radius-control: 10px;
  --radius-surface: 16px;
  --shadow-overlay: 0 16px 38px rgba(10, 18, 42, 0.2);
  --nav-height: 68px;
  --content-gutter: 18px;
  font-family: "Inter", system-ui, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: #e9eaed;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: #e9eaed;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

button,
[role="button"],
a,
select {
  touch-action: manipulation;
}

button:not(:disabled):active,
[role="button"]:active,
a:active {
  opacity: 0.72;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

button {
  border: 0;
}

svg {
  display: block;
}

::selection {
  color: var(--navy);
  background: rgba(33, 204, 54, 0.28);
}

.prototype-shell {
  position: relative;
  width: min(100%, 430px);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--soft);
  border: none;
}

.hero {
  position: relative;
  display: flex;
  min-height: 270px;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(52px + env(safe-area-inset-top)) 20px 32px;
  color: var(--white);
  background: var(--navy);
  border: none;
  overflow: hidden;
}

.hero--status {
  padding-bottom: 28px;
}

.hero__body {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.hero.is-scrolled .hero__body {
  opacity: 0;
  transform: translateY(-16px) scale(0.98);
  pointer-events: none;
}

/* Fluid Minimal Fixed Header */
.fluid-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  width: min(100%, 430px);
  height: calc(52px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 18px 0;
  display: flex;
  align-items: center;
  background: rgba(10, 18, 42, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--white);
  z-index: 40;
  border: none;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.fluid-header.is-active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.hero__home-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 0;
  color: var(--white);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero__home-icon:active {
  transform: scale(0.92);
}

.screen {
  min-height: calc(100dvh + 112px);
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 76px);
}

.screen--home {
  min-height: calc(100dvh + 270px);
}

.screen--document-viewer {
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  padding-bottom: 0;
  background: #e6e9ed;
  position: relative;
  z-index: 60;
}

.screen--document-viewer.is-closing {
  display: none;
}

.document-viewer {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  color: var(--ink);
  background: #e6e9ed;
  overflow: hidden;
}

.document-viewer__header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: grid;
  width: 100%;
  box-sizing: border-box;
  min-height: calc(64px + env(safe-area-inset-top));
  grid-template-columns: 44px minmax(0, 1fr) 88px;
  align-items: center;
  gap: 10px;
  padding: env(safe-area-inset-top) 14px 0;
  color: var(--white);
  background: var(--navy);
}

.document-viewer__title {
  min-width: 0;
  text-align: center;
}

.document-viewer__title strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
}

.viewer-icon-button,
.document-file-nav-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: var(--radius-control);
}

.viewer-icon-button {
  color: var(--white);
  background: transparent;
}

.viewer-icon-button--danger {
  color: #fecaca;
}

.document-viewer__actions {
  display: flex;
  justify-content: flex-end;
}

.document-viewer__viewport {
  width: 100%;
  height: 100dvh;
  overflow: auto;
  overscroll-behavior: contain;
  padding: calc(64px + env(safe-area-inset-top)) 0 calc(96px + env(safe-area-inset-bottom));
  touch-action: none;
  -webkit-overflow-scrolling: touch;
}

.document-viewer__stage {
  position: relative;
  flex: 0 0 auto;
  margin: 0 auto;
}

.document-preview {
  position: relative;
  width: 300px;
  height: 424px;
  overflow: hidden;
  padding: 30px 26px;
  color: #172033;
  background: var(--white);
  border: 0;
  transform-origin: top left;
  user-select: none;
}

.document-preview__seal {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 22px;
  place-items: center;
  color: var(--white);
  background: var(--navy);
  border-radius: 50%;
  font-family: "Raleway", "Inter", sans-serif;
  font-size: 18px;
  font-weight: 800;
}

.document-preview__kicker {
  display: block;
  color: #697386;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.document-preview h2 {
  margin: 7px 0 12px;
  font-family: "Raleway", "Inter", sans-serif;
  font-size: 20px;
  line-height: 1.1;
}

.document-preview p {
  margin: 0;
  color: #596273;
  font-size: 8px;
  line-height: 1.65;
}

.document-preview__rule {
  height: 1px;
  margin: 20px 0;
  background: #dce1e7;
}

.document-preview__details {
  display: grid;
  gap: 12px;
  margin: 0;
}

.document-preview__details div {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 10px;
}

.document-preview__details dt,
.document-preview__details dd {
  margin: 0;
  font-size: 7px;
}

.document-preview__details dt {
  color: #7b8493;
}

.document-preview__details dd {
  font-weight: 700;
}

.document-preview__signature {
  position: absolute;
  right: 26px;
  bottom: 42px;
  width: 92px;
}

.document-preview__signature span {
  display: block;
  border-top: 1px solid #8d96a4;
}

.document-preview__signature small {
  display: block;
  margin-top: 4px;
  color: #7b8493;
  font-size: 6px;
  text-align: center;
}

.document-preview__passport-band {
  margin: -30px -26px 24px;
  padding: 20px 18px;
  color: var(--white);
  background: #163d73;
  font-family: "Raleway", "Inter", sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.document-preview__passport-grid {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 18px;
}

.document-preview__portrait {
  display: grid;
  height: 116px;
  place-items: center;
  color: #667085;
  background: #dfe5eb;
  border: 1px solid #c5ccd5;
}

.document-preview__portrait span {
  align-self: end;
  font-size: 26px;
  font-weight: 700;
}

.document-preview__portrait small {
  align-self: start;
  font-size: 6px;
}

.document-preview__fields {
  display: grid;
  gap: 8px;
}

.document-preview__fields span,
.document-preview__fields small,
.document-preview__fields strong {
  display: block;
}

.document-preview__fields small {
  color: #7b8493;
  font-size: 6px;
}

.document-preview__fields strong {
  margin-top: 2px;
  font-size: 8px;
}

.document-preview__machine-lines {
  position: absolute;
  right: 26px;
  bottom: 48px;
  left: 26px;
  padding-top: 12px;
  border-top: 1px solid #c9d0d9;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 7px;
  letter-spacing: 0.05em;
  line-height: 1.8;
}

.document-preview__page-number {
  position: absolute;
  right: 14px;
  bottom: 12px;
  color: #8a93a1;
  font-size: 6px;
}

.document-viewer__filebar {
  position: absolute;
  bottom: calc(14px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 50;
  display: grid;
  width: calc(70% - 20px);
  min-width: 240px;
  max-width: 282px;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  padding: 6px;
  color: var(--white);
  background: var(--navy);
  border-radius: 14px;
  transform: translateX(-50%);
}

.document-file-nav-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.document-file-nav-button:disabled {
  color: rgba(255, 255, 255, 0.3);
}

.document-viewer__file-info {
  min-width: 0;
  text-align: center;
}

.document-viewer__file-info strong,
.document-viewer__file-info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-viewer__file-info strong {
  font-size: 12px;
  font-weight: 700;
}

.document-viewer__file-info small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.document-delete-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  width: 100%;
  background: rgba(10, 18, 42, 0.48);
  animation: overlayFadeIn 0.2s ease forwards;
}

.document-delete-sheet {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 50%;
  z-index: 71;
  width: min(100%, 430px);
  padding: 22px 18px calc(18px + env(safe-area-inset-bottom));
  background: var(--white);
  border-radius: 20px 20px 0 0;
  transform: translate3d(-50%, 0, 0);
  animation: slideUpEvidenceSheet 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.14);
}

.document-delete-sheet__icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--danger);
  background: #fee2e2;
  border-radius: 50%;
}

.document-delete-sheet h2 {
  margin: 16px 0 8px;
  font-size: 19px;
}

.document-delete-sheet p {
  margin: 0;
  color: var(--body);
  font-size: 13px;
  line-height: 1.55;
}

.document-delete-sheet__actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 10px;
  margin-top: 22px;
}

.danger-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  color: var(--white);
  background: var(--danger);
  border-radius: var(--radius-control);
  font-size: 12px;
  font-weight: 700;
}

.hero__greeting {
  display: block;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.page-heading h1 {
  margin: 0;
  font-family: "Raleway", "Inter", sans-serif;
  font-size: clamp(28px, 8vw, 34px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.hero p {
  max-width: 34ch;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  line-height: 1.48;
}

.hero__link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 0 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-control);
  font-size: 13px;
  font-weight: 700;
}

.content {
  padding: 32px var(--content-gutter) 24px;
}

.hero + .content,
.flat-case-timeline + .content,
.screen--home .content,
.content--tight {
  padding-top: var(--content-gutter);
}

.surface {
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
}

.surface + .surface,
.section + .section {
  margin-top: 16px;
}

.card-header,
.surface-header,
.surface > .section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -18px -18px 14px -18px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.surface-divider,
.card-divider {
  height: 1px;
  background: var(--line);
  margin: 16px -18px;
}

.schedule-card {
  padding: 18px;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
}

.schedule-card h2,
.section-title,
.section-heading h2,
.surface h2,
.surface h3,
.doc-accordion-title,
.evidence-criterion-title {
  margin: 0;
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.schedule-card p,
.surface p,
.helper-copy {
  margin: 8px 0 0;
  color: var(--body);
  font-size: 13px;
  line-height: 1.5;
}

.schedule-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}

.primary-button,
.secondary-button,
.dark-button,
.record-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: var(--radius-control);
  font-size: 13px;
  font-weight: 700;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.primary-button {
  color: var(--navy);
  background: var(--green);
}

.primary-button:disabled {
  color: var(--muted);
  background: var(--platinum);
}

.secondary-button {
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--line-strong);
}

.dark-button {
  color: #fff;
  background: var(--navy);
  border: 1px solid var(--navy);
}

.duration {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.lock-inline-note {
  margin: 16px auto 20px auto;
  padding: 0 16px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 500;
}

.host-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 -18px 0 -18px;
  padding: 0 18px 18px 18px;
  border-bottom: 1px solid var(--line);
}

.host-avatar,
.avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--navy);
  background: var(--green);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

.host-avatar {
  width: 44px;
  height: 44px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.host-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.host-row strong,
.host-row small {
  display: block;
}

.host-row strong {
  font-size: 14px;
}

.host-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.field-label {
  display: block;
  margin: 18px 0 10px;
  color: var(--body);
  font-size: 12px;
  font-weight: 700;
}

.date-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(68px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: none;
}

.date-row::-webkit-scrollbar {
  display: none;
}

.date-option,
.time-option,
.segment-button {
  min-height: 44px;
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
}

.date-option {
  padding: 9px 12px;
  text-align: left;
}

.date-option small,
.date-option strong {
  display: block;
}

.date-option small {
  color: var(--muted);
  font-size: 10px;
}

.date-option strong {
  margin-top: 3px;
  font-size: 12px;
}

.date-option.is-selected,
.time-option.is-selected {
  color: var(--navy);
  background: var(--green-soft);
  border-color: var(--green);
}

.time-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.time-option {
  font-size: 12px;
  font-weight: 700;
}

.confirm-booking {
  width: 100%;
  margin-top: 18px;
}

.scheduled-meeting-card {
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
}

.scheduled-meeting-card__body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.scheduled-meeting-card__details {
  min-width: 0;
}

.scheduled-meeting-card__date {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.scheduled-meeting-card__time {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  margin-top: 2px;
}

.scheduled-meeting-card__host {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.meeting-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: -18px -18px 20px -18px;
  padding: 16px 18px;
  color: var(--navy);
  background: var(--white);
  border-top: none;
  border-bottom: 1px solid var(--line);
}

.meeting-strip .host-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.meeting-strip__copy {
  min-width: 0;
}

.meeting-strip__action {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px;
  color: var(--white);
  background: var(--green);
  border: none;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.1s ease, opacity 0.1s ease;
}

.meeting-strip__action:active {
  transform: scale(0.95);
  opacity: 0.9;
}

.meeting-strip strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.meeting-strip__time {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  margin-top: 2px;
}

.meeting-strip small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.input-with-voice-wrap {
  position: relative;
  margin-top: 14px;
}

.input-with-voice-wrap .about-textarea {
  min-height: 140px;
  margin-top: 0;
  padding-bottom: 48px;
  field-sizing: content;
  max-height: 420px;
  font-size: 13px;
  line-height: 1.55;
}

.voice-mic-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(10, 18, 42, 0.2);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
  z-index: 3;
}

.voice-mic-btn:active {
  transform: scale(0.92);
}

.voice-mic-btn.is-recording {
  background: #e11d48;
  color: var(--white);
  border: none;
  animation: mic-pulse-ring 1.4s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes mic-pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.6);
    transform: scale(1);
  }
  60% {
    box-shadow: 0 0 0 12px rgba(225, 29, 72, 0);
    transform: scale(1.08);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(225, 29, 72, 0);
    transform: scale(1);
  }
}

.about-textarea {
  width: 100%;
  min-height: 100px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  resize: vertical;
  font-size: 13px;
  line-height: 1.5;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.about-textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(33, 204, 54, 0.15);
}

.status-stage {
  margin-top: 24px;
  padding: 0;
  background: transparent;
  border: none;
}

.status-stage__top,
.section-heading,
.item-row,
.timeline-item {
  display: flex;
  align-items: center;
}

.status-stage__top,
.section-heading {
  justify-content: space-between;
  gap: 12px;
}

.status-stage__top strong {
  font-size: 13px;
}

.status-stage__top span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
}

.progress-track {
  height: 5px;
  margin-top: 13px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.13);
  border-radius: 99px;
}

.progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: inherit;
}

.section-title,
.section-heading h2 {
  font-size: 15px;
}

.section-count {
  color: var(--muted);
  font-size: 11px;
}

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

.case-item {
  display: flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.case-item:not(.is-locked):active {
  transform: scale(0.985);
  background: #f8fafc;
}

.case-item__body {
  flex: 1;
  min-width: 0;
}

.case-item strong,
.case-item small {
  display: block;
}

.case-item strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.case-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.case-item.is-locked {
  color: var(--muted);
  background: var(--platinum);
  border: none;
  box-shadow: none;
  cursor: not-allowed;
}

.case-item.is-locked .icon-tile {
  background: #EEF0F4;
  color: #8A94A6;
}

.case-item.is-locked strong {
  color: #475569;
}

.lock-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94A3B8;
}

.case-item__label-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.pending-alert-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  background: #ef4444;
  border-radius: 999px;
  border: none;
  outline: none;
  box-shadow: none;
}

.mini-progress {
  width: 46px;
  height: 4px;
  overflow: hidden;
  background: var(--line);
  border-radius: 99px;
}

.mini-progress > span {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: inherit;
}

.feed {
  margin-top: 12px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
}

.timeline-item {
  position: relative;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
}

.timeline-item + .timeline-item {
  border-top: 1px solid var(--line);
}

.timeline-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--navy);
  background: var(--platinum);
  border-radius: 50%;
}

.timeline-item.is-done .timeline-icon {
  color: var(--green-dark);
  background: var(--green-soft);
}

.timeline-item.is-active .timeline-icon {
  color: var(--info);
  background: #edf5ff;
}

.timeline-item strong,
.timeline-item small {
  display: block;
}

.timeline-item strong {
  font-size: 12px;
  line-height: 1.4;
}

.timeline-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.live-badge,
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
}

.live-badge {
  color: var(--green-dark);
  background: var(--green-soft);
}

.live-badge::before {
  width: 6px;
  height: 6px;
  content: "";
  background: var(--green);
  border-radius: 50%;
}

.page-heading-shell {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  transition: padding 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
}

.page-heading {
  padding: calc(20px + env(safe-area-inset-top)) 18px 18px;
  background: var(--white);
  transition: padding 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-heading h1 {
  color: var(--ink);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  white-space: nowrap;
  transition: font-size 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-heading p {
  margin: 4px 0 0;
  color: var(--body);
  font-size: 12px;
  line-height: 1.4;
}

.completion-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  min-width: 0;
  transition: margin 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.completion-row .progress-track {
  flex: 1;
  margin: 0;
  background: var(--line);
}

.completion-row strong {
  font-size: 11px;
}

/* Compact sticky state on scroll */
.page-heading-shell.is-scrolled .page-heading {
  padding: calc(12px + env(safe-area-inset-top)) 18px 12px;
}

.page-heading-shell.is-scrolled .page-heading.page-heading--with-progress {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(118px, 1fr);
  align-items: center;
  gap: 16px;
}

.page-heading-shell.is-scrolled .page-heading h1 {
  font-size: 18px;
  line-height: 1.15;
}

.page-heading-shell.is-scrolled .completion-row {
  margin-top: 0;
}

.surface-divider {
  height: 1px;
  background: var(--line);
  margin: 20px -18px 18px -18px;
}

.form-stack > .surface-divider {
  margin: 4px -18px 2px -18px;
}

.sub-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.form-stack {
  display: grid;
  gap: 13px;
}

.form-field > label:not(.choice-tile) {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.text-input,
.select-input {
  display: block;
  width: 100%;
  height: 42px;
  min-height: 42px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink);
  background-color: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  outline: none;
  box-sizing: border-box;
  line-height: 1.35;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.text-input::placeholder,
.about-textarea::placeholder {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 400;
}

.text-input:focus,
.select-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(33, 204, 54, 0.18);
}

.select-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 36px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 15px 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.req-star {
  color: #e11d48;
  font-weight: bold;
}

.helper-text {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* Mobile-Friendly Selection Tiles (Touch-optimized Radio & Checkboxes) */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 5px;
}

.choice-grid--stacked {
  grid-template-columns: 1fr;
}

.choice-tile {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start;
  gap: 8px;
  height: 42px;
  min-height: 42px;
  padding: 0 12px;
  margin: 0 !important;
  background: var(--white);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-control);
  font-size: 13px;
  font-weight: 400;
  color: var(--ink);
  cursor: pointer;
  box-sizing: border-box;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.35;
}

.choice-tile > span:not(.choice-tile__indicator) {
  display: flex;
  align-items: center;
  line-height: 1.35;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink);
  margin: 0;
  padding: 0;
}

.choice-tile:active {
  transform: scale(0.98);
}

.choice-tile.is-selected {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--ink);
  font-weight: 600;
}

.choice-tile input[type="radio"],
.choice-tile input[type="checkbox"] {
  display: none;
}

.choice-tile__indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: var(--white);
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: all 0.15s ease;
}

.choice-tile.is-selected .choice-tile__indicator {
  border-color: var(--green);
  background: var(--green);
}

.choice-tile.is-selected .choice-tile__indicator::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--white);
}

.choice-tile--checkbox .choice-tile__indicator {
  border-radius: 5px;
}

.choice-tile--checkbox.is-selected .choice-tile__indicator::after {
  content: "✓";
  color: var(--white);
  font-size: 11px;
  font-weight: 800;
  width: auto;
  height: auto;
  background: transparent;
}

.phone-field-group {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 8px;
}

.phone-prefix-select {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 8px;
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  font-size: 13px;
  font-weight: 400;
  color: var(--ink);
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
}

.document-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.search-field {
  display: flex;
  min-height: 44px;
  flex: 1;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
}

/* ==========================================================================
   DOCUMENTS ACCORDION BOXES & ITEMS
   ========================================================================== */

.doc-accordion-box {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.doc-accordion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 18px;
  background: var(--white);
  border: none;
  cursor: pointer;
  text-align: left;
  user-select: none;
}

.doc-accordion-head:active {
  background: #f8fafc;
}

.doc-accordion-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.doc-accordion-title .doc-optional {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.doc-percent-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--body);
  background: var(--platinum);
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.doc-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: #f8fafc;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.doc-row {
  padding: 14px 18px;
  border-bottom: 1px solid #edf2f7;
  display: flex;
  align-items: center;
  gap: 12px;
}

.doc-row:last-child {
  border-bottom: none;
}

.doc-status-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.doc-status--empty {
  color: var(--pending);
  background: transparent;
  width: 22px;
  height: 22px;
}

.doc-status--optional {
  color: #94a3b8;
}

.doc-status--uploaded {
  color: var(--white);
  background: var(--green);
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

.doc-status--uploaded svg {
  stroke: var(--white);
  stroke-width: 2.6;
}

.doc-status--changes {
  color: var(--white);
  background: #ef4444;
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

.doc-status--changes svg {
  stroke: var(--white);
  stroke-width: 2.6;
}

.doc-row__info {
  flex: 1;
  min-width: 0;
}

.doc-row__name {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}

.doc-row__name > span:first-child {
  min-width: 0;
}

.doc-file-count {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  padding-inline: 5px;
  color: var(--muted);
  background: var(--platinum);
  border-radius: 6px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.doc-row__sub {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.doc-row__actions {
  display: flex;
  width: 86px;
  flex: 0 0 86px;
  justify-content: flex-end;
  gap: 6px;
}

.doc-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.doc-upload-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.doc-upload-btn:active {
  transform: scale(0.92);
  background: #f8fafc;
}

.doc-row__notes {
  width: 100%;
}

.doc-notes-input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  background: #fdfdfd;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.doc-notes-input::placeholder {
  color: #94a3b8;
  font-size: 13px;
}

.doc-notes-input:focus {
  border-color: var(--green);
  background: var(--white);
  box-shadow: 0 0 0 2px rgba(33, 204, 54, 0.15);
}

/* Answer later toggle switch */
.answer-later-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.answer-later-toggle .toggle-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.answer-later-toggle input {
  display: none;
}

.switch-slider {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 24px;
  background-color: #cbd5e1;
  border-radius: 99px;
  transition: background-color 0.2s ease;
}

.switch-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background-color: var(--white);
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.answer-later-toggle input:checked + .switch-slider {
  background-color: var(--green);
}

.answer-later-toggle input:checked + .switch-slider::after {
  transform: translateX(16px);
}

/* Evidence Toolbar & Expandable Search (Option 2) */
.evidence-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
  min-height: 40px;
}

.evidence-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.evidence-search-toggle-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--navy);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.evidence-search-toggle-btn:active,
.evidence-search-toggle-btn.is-active,
.evidence-search-toggle-btn.active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.evidence-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 42px;
  padding: 0 14px;
  background: var(--white);
  border: 1.5px solid var(--green);
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(33, 204, 54, 0.18);
  animation: searchExpandAnim 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.evidence-search-bar:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 2.5px rgba(33, 204, 54, 0.25);
}

.evidence-search-bar__icon {
  display: flex;
  align-items: center;
  color: var(--green);
  flex-shrink: 0;
}

@keyframes searchExpandAnim {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.evidence-search-bar input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink);
  outline: none;
  font-family: inherit;
}

.evidence-search-bar input::placeholder {
  color: #94a3b8;
  font-size: 13px;
}

.evidence-search-clear-btn {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}

.evidence-search-clear-btn:active {
  background: #e2e8f0;
  color: var(--ink);
}

.evidence-empty-search {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
  gap: 8px;
}

.evidence-empty-search h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.evidence-empty-search p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.evidence-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--body);
  cursor: pointer;
  transition: all 0.18s ease;
}

.evidence-filter-pill.active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.evidence-filter-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.07);
  color: inherit;
}

.evidence-filter-pill.active span {
  background: rgba(255, 255, 255, 0.22);
}

/* Level 1: Criterion Head (Expands/Collapses on title, upload button on right) */
.evidence-criterion-box {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
}

.evidence-criterion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 60px;
  padding: 0 14px 0 18px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  gap: 12px;
}

.evidence-criterion-head[aria-expanded="false"] {
  border-bottom: none;
}

.evidence-criterion-head__toggle {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  min-height: 60px;
  padding: 0;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  outline: none;
}

.evidence-criterion-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

/* Standard Slide Sheet Pattern (Minimal, Unified & Animated) */
.slide-sheet-overlay,
.evidence-upload-overlay,
.document-delete-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  width: 100%;
  background: rgba(10, 18, 42, 0.48);
  animation: overlayFadeIn 0.2s ease forwards;
}

@keyframes overlayFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.slide-sheet,
.evidence-upload-sheet,
.document-delete-sheet {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 50%;
  z-index: 71;
  width: min(100%, 430px);
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  background: var(--white);
  border-radius: 20px 20px 0 0;
  transform: translate3d(-50%, 0, 0);
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.14);
  animation: slideUpSheetAnim 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform;
}

@keyframes slideUpSheetAnim {
  from {
    transform: translate3d(-50%, 100%, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

@keyframes slideDownSheetAnim {
  from {
    transform: translate3d(-50%, 0, 0);
    opacity: 1;
  }
  to {
    transform: translate3d(-50%, 100%, 0);
    opacity: 0.9;
  }
}

@keyframes overlayFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.slide-sheet.is-closing,
.evidence-upload-sheet.is-closing,
.document-delete-sheet.is-closing {
  animation: slideDownSheetAnim 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.slide-sheet-overlay.is-closing,
.document-delete-overlay.is-closing,
.drawer-overlay.is-closing {
  animation: overlayFadeOut 0.22s ease forwards !important;
}

@media (max-width: 430px) {
  .slide-sheet,
  .evidence-upload-sheet,
  .document-delete-sheet {
    left: 0;
    right: 0;
    width: 100%;
    transform: translate3d(0, 0, 0);
    animation: slideUpSheetMobileAnim 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  @keyframes slideUpSheetMobileAnim {
    from {
      transform: translate3d(0, 100%, 0);
    }
    to {
      transform: translate3d(0, 0, 0);
    }
  }

  @keyframes slideDownSheetMobileAnim {
    from {
      transform: translate3d(0, 0, 0);
      opacity: 1;
    }
    to {
      transform: translate3d(0, 100%, 0);
      opacity: 0.9;
    }
  }

  .slide-sheet.is-closing,
  .evidence-upload-sheet.is-closing,
  .document-delete-sheet.is-closing {
    animation: slideDownSheetMobileAnim 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  }
}

.slide-sheet__icon,
.document-delete-sheet__icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
}

.slide-sheet__icon--upload {
  color: var(--navy);
  background: #f1f5f9;
}

.slide-sheet__icon--danger,
.document-delete-sheet__icon {
  color: var(--danger);
  background: #fee2e2;
}

.slide-sheet h2,
.evidence-upload-sheet h2,
.document-delete-sheet h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

.slide-sheet p,
.document-delete-sheet p {
  margin: 0;
  color: var(--body);
  font-size: 13px;
  line-height: 1.55;
}

.slide-sheet__actions,
.evidence-upload-sheet__actions,
.document-delete-sheet__actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  margin-top: 4px;
}

/* Doc Info Sheet */
.doc-info-sheet {
  gap: 20px;
}

.doc-info-sheet__header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.doc-info-sheet__icon {
  display: grid;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
}

.doc-info-sheet__icon--alert {
  background: #ef4444;
  color: #fff;
}

.doc-info-sheet__icon--alert svg {
  stroke: #fff;
  stroke-width: 2.6;
}

.doc-info-sheet__icon--ok {
  background: var(--green);
  color: #fff;
}

.doc-info-sheet__icon--ok svg {
  stroke: #fff;
  stroke-width: 2.6;
}

.doc-info-sheet__icon--pending {
  background: #f1f5f9;
  color: var(--body);
}

.doc-info-feedback-list {
  display: flex;
  flex-direction: column;
}

.doc-info-feedback-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc-info-feedback-separator {
  width: 100%;
  height: 1px;
  margin: 28px 0;
  background: var(--line);
}

.doc-info-feedback-file {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.doc-info-feedback-file strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-info-feedback-file span {
  color: var(--muted);
  font-size: 12px;
}

.doc-info-alert-box {
  padding: 12px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.doc-info-alert-byline {
  margin: 0;
  font-size: 12px;
  color: #dc2626;
}

.doc-info-alert-byline strong {
  font-weight: 700;
}

.doc-info-alert-box p {
  margin: 0;
  font-size: 13px;
  color: #7f1d1d;
  line-height: 1.5;
}

.doc-info-feedback-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 0;
}

.doc-info-feedback-icon-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.doc-info-feedback-icon-button {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
}

.doc-info-feedback-icon-button--danger {
  color: #dc2626;
}

.doc-info-feedback-actions .dark-button {
  gap: 6px;
}

.evidence-sheet-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.evidence-sheet-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--body);
}

.evidence-sheet-select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink);
  outline: none;
  font-family: inherit;
}

.evidence-sheet-tap-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  cursor: pointer;
  transition: all 0.15s ease;
}

.evidence-sheet-tap-btn.is-selected {
  background: #f0fdf4;
  border-color: var(--green);
  color: var(--ink);
}

.evidence-sheet-tap-btn:active {
  background: #f1f5f9;
}

/* Level 2: Fact Group (Compact subheader exception) */
.evidence-fact-group {
  border-top: 1px solid #edf2f7;
}

.evidence-fact-group:first-child {
  border-top: none;
}

.evidence-fact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 0 18px;
  background: #f8fafc;
  border-bottom: 1px solid #edf2f7;
}

.evidence-fact-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}

.evidence-fact-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--body);
  background: var(--platinum);
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

/* Level 3: Item Row (Reference height = 60px) */
.evidence-item-row {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid #edf2f7;
  transition: background 0.15s ease;
}

.evidence-item-row:last-child {
  border-bottom: none;
}

.evidence-item-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 0 18px;
}

.evidence-code-tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--navy);
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.evidence-item-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.35;
}

.evidence-toggle-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  color: #94a3b8;
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
}

.evidence-toggle-btn:active {
  color: var(--ink);
}

/* Level 4: Simple list with unified 60px height */
.evidence-files-list {
  background: #f8fafc;
  border-top: 1px solid #edf2f7;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.evidence-file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 0 18px 0 48px;
  border-bottom: 1px solid #edf2f7;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease;
}

.evidence-file-item:last-child {
  border-bottom: none;
}

.evidence-file-item:active {
  background: #edf2f7;
}

.evidence-file-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evidence-file-size {
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
}

.criterion {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
}

.criterion + .criterion {
  margin-top: 12px;
}

.criterion__head {
  display: flex;
  width: 100%;
  min-height: 64px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  text-align: left;
  background: var(--white);
}

.criterion__number {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--navy);
  background: var(--green-soft);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
}

.criterion__head span:nth-child(2) {
  flex: 1;
  font-size: 12px;
  font-weight: 700;
}

.criterion__body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--line);
}

.evidence-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
}

.evidence-row + .evidence-row {
  border-top: 1px solid var(--line);
}

.evidence-row > span:nth-child(2) {
  flex: 1;
}

.evidence-row strong,
.evidence-row small {
  display: block;
}

.evidence-row strong {
  font-size: 11px;
}

.evidence-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.upload-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  color: var(--navy);
  background: var(--green-soft);
  border: 1px solid rgba(33, 204, 54, 0.35);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  right: max(0px, calc((100vw - 430px) / 2));
  bottom: 0;
  left: max(0px, calc((100vw - 430px) / 2));
  display: grid;
  min-height: 56px;
  grid-template-columns: repeat(4, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--white);
  border-top: 1px solid var(--line);
  box-shadow: none;
  border-radius: 0;
}

.bottom-nav button {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.15s ease, transform 0.1s ease;
}

.bottom-nav button.is-active {
  color: var(--navy);
}

.bottom-nav button.is-active svg {
  stroke: var(--navy);
  color: var(--navy);
}

.bottom-nav button:disabled {
  color: #cbd5e1;
}

.nav-icon-wrap {
  position: relative;
}

.nav-lock {
  position: absolute;
  right: -8px;
  bottom: -3px;
  display: grid;
  width: 13px;
  height: 13px;
  place-items: center;
  color: var(--navy);
  background: #9095a2;
  border: 1px solid var(--navy);
  border-radius: 50%;
}

.nav-badge-dot {
  position: absolute;
  top: -1px;
  right: -3px;
  width: 7px;
  height: 7px;
  background: #f59e0b;
  border-radius: 50%;
}

.notifications-list {
  display: flex;
  flex-direction: column;
}

.notification-section + .notification-section {
  margin-top: 28px;
}

.notification-section__heading {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
}

.notification-section__heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.notification-section__heading span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  color: #92400e;
  background: #fef3c7;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.notification-item {
  display: flex;
  width: 100%;
  min-height: 76px;
  align-items: flex-start;
  gap: 11px;
  padding: 14px 2px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
}

.notification-item:active {
  background: #f8fafc;
}

.notification-item__icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--muted);
  background: var(--platinum);
  border-radius: 50%;
}

.notification-item__icon--alert {
  color: #b45309;
  background: #fef3c7;
}

.notification-item__body {
  flex: 1;
  min-width: 0;
}

.notification-item__title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.notification-item strong,
.notification-item__document,
.notification-item small,
.notification-item time {
  display: block;
}

.notification-item strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.notification-item__document {
  margin-top: 2px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.notification-item small {
  margin-top: 3px;
  color: var(--body);
  font-size: 12px;
  line-height: 1.4;
}

.notification-item time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
}

.notification-item__chevron {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 9px;
  color: var(--muted);
}

.notification-section--history {
  opacity: 0.52;
}

.notification-item--history {
  min-height: 66px;
}

.notification-card {
  position: relative;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.notification-card.is-unread {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.icon-tile--unread {
  background: #fee2e2;
  color: #dc2626;
}

.notification-unread-dot {
  display: inline-block;
  width: 6.5px;
  height: 6.5px;
  background: #ef4444;
  border-radius: 50%;
  margin-left: 2px;
}

.notification-time {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.drawer-overlay {
  position: fixed;
  z-index: 65;
  inset: 0;
  background: rgba(10, 18, 42, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: overlayFadeIn 0.2s ease forwards;
}

.sheet-overlay {
  position: fixed;
  z-index: 55;
  inset: 0;
  background: rgba(10, 18, 42, 0.42);
}

.mobile-sheet {
  position: fixed;
  z-index: 60;
  right: max(0px, calc((100vw - 430px) / 2));
  bottom: 0;
  left: max(0px, calc((100vw - 430px) / 2));
  padding: 10px 18px max(22px, env(safe-area-inset-bottom));
  color: var(--ink);
  background: var(--white);
  border-radius: 20px 20px 0 0;
  box-shadow: var(--shadow-overlay);
}

.sheet-handle {
  width: 40px;
  height: 4px;
  margin: 0 auto 16px;
  background: var(--line-strong);
  border-radius: 99px;
}

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

.sheet-heading h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.sheet-options {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.sheet-option {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  text-align: left;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  font-size: 13px;
  font-weight: 700;
}

.sheet-option.is-selected {
  background: var(--green-soft);
  border-color: var(--green);
}

.drawer {
  position: fixed;
  z-index: 70;
  bottom: 0;
  left: 50%;
  right: auto;
  top: auto;
  display: flex;
  width: min(100%, 430px);
  max-height: 88dvh;
  flex-direction: column;
  color: var(--white);
  background: var(--navy);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  transform: translate3d(-50%, 100%, 0);
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.drawer.is-open {
  transform: translate3d(-50%, 0, 0);
}

.drawer-handle {
  width: 36px;
  height: 4px;
  margin: 10px auto 4px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  flex-shrink: 0;
}

.drawer-profile {
  padding: 18px 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 10px;
}

.drawer-user-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.drawer-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: none;
  box-shadow: none;
  background: transparent;
  flex-shrink: 0;
}

.drawer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.16);
  display: block;
}

.drawer-user-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.drawer-user-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-user-email {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.52);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-process-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer-process-select-wrap {
  position: relative;
  width: 100%;
}

.drawer-process-select {
  width: 100%;
  appearance: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 32px 10px 12px;
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.drawer-process-select:focus {
  border-color: var(--green);
  background: rgba(255, 255, 255, 0.09);
}

.drawer-process-select option {
  background: var(--navy);
  color: var(--white);
}

.drawer-process-chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

.drawer-navigation {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  flex: 1;
}

.drawer-nav-item-wrap {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.drawer-nav-row {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.drawer-nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  min-height: 38px;
  padding: 6px 12px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: color 0.15s ease;
}

.drawer-expand-btn {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-radius: 7px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  margin-right: 4px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.15s ease, color 0.15s ease;
}

.drawer-expand-btn:hover,
.drawer-expand-btn:active {
  background: rgba(239, 68, 68, 0.28);
  color: #ff8a8a;
}

.drawer-expand-btn.is-expanded {
  transform: rotate(180deg);
  background: #ef4444;
  color: var(--white);
  border-color: #ef4444;
}

.drawer-substates-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0 6px 36px;
  animation: searchExpandAnim 0.18s ease forwards;
}

.drawer-substate-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 30px;
  padding: 4px 10px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.drawer-substate-btn:hover,
.drawer-substate-btn:active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
}

.drawer-substate-btn.is-selected {
  color: #f87171;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.12);
}

.drawer-substate-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.drawer-substate-btn.is-selected .drawer-substate-dot {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.7);
}

.drawer-nav-btn:hover,
.drawer-nav-btn:active,
.drawer-nav-btn.is-active {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

.drawer-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  color: rgba(255, 255, 255, 0.65);
}

.drawer-nav-btn:hover .drawer-nav-icon,
.drawer-nav-btn:active .drawer-nav-icon,
.drawer-nav-btn.is-active .drawer-nav-icon {
  color: rgba(255, 255, 255, 0.65);
}

.drawer-nav-label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.drawer-nav-pct {
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.38);
  padding: 2px 0;
  background: transparent;
}

.drawer-nav-pct.is-complete {
  color: #21cc36;
  background: transparent;
  font-weight: 700;
}

.drawer-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--pending);
  color: var(--white);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
}

.drawer__footer {
  margin-top: auto;
  padding: 12px 14px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-logout-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.drawer-logout-btn:hover,
.drawer-logout-btn:active {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

.toast {
  display: none !important;
}

/* UI Lab State Badges & Banners */
.banner-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-control);
  font-size: 12px;
  line-height: 1.45;
}

.banner-note--warning {
  color: #855b00;
  background: var(--warning-soft);
  border: 1px solid rgba(216, 169, 0, 0.3);
}

.banner-note--danger {
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.banner-note--success {
  color: #166534;
  background: var(--green-soft);
  border: 1px solid rgba(33, 204, 54, 0.3);
}

.banner-note--info {
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.empty-state-box {
  padding: 32px 20px;
  text-align: center;
  background: var(--white);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-surface);
}

.empty-state-box .icon-tile {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 12px;
}

.empty-state-box h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.empty-state-box p {
  margin: 6px 0 16px;
  font-size: 12px;
  color: var(--body);
  line-height: 1.5;
}

/* Status Chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.chip--needed {
  color: var(--body);
  background: var(--platinum);
}

.chip--uploaded {
  color: #166534;
  background: var(--green-soft);
  border: 1px solid rgba(33, 204, 54, 0.25);
}

.chip--review {
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.chip--changes {
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.chip--approved {
  color: #166534;
  background: #dcfce7;
  border: 1px solid #86efac;
}

.chip--signed {
  color: var(--navy);
  background: #e0e7ff;
  border: 1px solid #c7d2fe;
}

/* Drawer State Switcher */
.drawer-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 10px 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-section-title strong {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.state-switcher-grid {
  display: grid;
  gap: 6px;
  padding: 4px 10px 12px;
}

.state-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-control);
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  transition: all 120ms ease;
}

.state-button:active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  transform: scale(0.98);
}

.state-button.is-active {
  color: var(--navy);
  background: var(--green);
  border-color: var(--green);
  font-weight: 700;
}

.state-button .state-tag {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.15);
}

.state-button.is-active .state-tag {
  background: rgba(10, 18, 42, 0.2);
}

.state-indicator-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 3px 8px;
  color: var(--navy);
  background: var(--green-soft);
  border: 1px solid rgba(33, 204, 54, 0.35);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (min-width: 431px) {
  body {
    padding: 18px 0;
  }

  .prototype-shell {
    min-height: calc(100dvh - 36px);
    border-radius: 20px;
  }

  .page-heading-shell {
    border-radius: 20px 20px 0 0;
  }

  .bottom-nav {
    bottom: 18px;
    overflow: hidden;
    border-radius: 0;
  }
}

@media (min-width: 360px) {
  .hero:not(.is-collapsed) {
    height: 279px;
  }
}

/* ==========================================================================
   RECOMMENDATION LETTERS STYLES (Mobile-First Lifecycle Experience)
   ========================================================================== */

/* Action Affordances (After Letters List): [Request a letter] or [Upload] */
.letters-action-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
  margin-bottom: 28px;
}

.letters-action-bar__request {
  flex: 1;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  padding: 0 12px;
  border-radius: 10px;
  white-space: nowrap;
}

.letters-action-bar__or {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  flex-shrink: 0;
  user-select: none;
}

.letters-action-bar__upload {
  flex: 1;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  padding: 0 12px;
  border-radius: 10px;
  white-space: nowrap;
}

.letters-action-bar__upload:disabled {
  color: #94a3b8;
  background: #f8fafc;
  border-color: #e2e8f0;
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
  transform: none !important;
}

/* Scannable Individual Letter Card Row */
.letter-list-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.letter-card-row {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  min-height: 120px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  position: relative;
  padding: 0;
}

.letter-card-row:active {
  background: #f8fafc;
}

.letter-card-row:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.letter-card-row__content {
  padding: 16px 16px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.letter-card-row__top-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.letter-card-row__name {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.letter-card-row__sub-line {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.3;
  word-break: break-word;
}

.letter-card-row__footer {
  width: 100%;
  line-height: 0;
  margin-top: auto;
  border: none;
  padding: 0;
}

.letter-airmail-strip {
  width: 100%;
  height: 4px;
  opacity: 0.5;
  display: block;
  border: none;
  background: repeating-linear-gradient(
    45deg,
    #dc2626 0px,
    #dc2626 8px,
    #ffffff 8px,
    #ffffff 13px,
    #1d4ed8 13px,
    #1d4ed8 21px,
    #ffffff 21px,
    #ffffff 26px
  );
}

.letter-status-pill--simple {
  padding: 2.5px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.25;
}

.letter-card-row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 11.5px;
}

.letter-evidence-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  color: #334155;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.letter-date-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
}


/* Status Badges */
.letter-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  line-height: 1.25;
}

.letter-status-pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Status Badges - Simplified 3-Color Semantic System (Option 2: Gray, Amber, Green) */
.letter-status-pill--awaiting_response,
.letter-status-pill--review,
.letter-status-pill--ready_sign,
.letter-status-pill--awaiting_sign {
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}
.letter-status-pill--awaiting_response .letter-status-pill__dot,
.letter-status-pill--review .letter-status-pill__dot,
.letter-status-pill--ready_sign .letter-status-pill__dot,
.letter-status-pill--awaiting_sign .letter-status-pill__dot {
  background: #94a3b8;
}

.letter-status-pill--changes {
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
}
.letter-status-pill--changes .letter-status-pill__dot {
  background: #f59e0b;
}

.letter-status-pill--verification,
.letter-status-pill--accepted {
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}
.letter-status-pill--verification .letter-status-pill__dot,
.letter-status-pill--accepted .letter-status-pill__dot {
  background: #22c55e;
}

/* Responsible Party Indicator */
.letter-party-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}

.letter-party-pill__prefix {
  color: #94a3b8;
}

.letter-party-pill__name {
  font-weight: 600;
  color: #475569;
}

/* Empty State */
.letters-empty-state {
  text-align: center;
  padding: 52px 16px 8px;
  background: transparent;
  border: none;
  box-shadow: none;
}

.letters-empty-state .icon-tile {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(26, 86, 219, 0.08);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.letters-empty-state h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.letters-empty-state p {
  font-size: 13.5px;
  color: var(--muted);
  max-width: 320px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Form Checkbox and Custom Choice Fields */
.letter-checkbox-field {
  margin-top: 10px;
}

.letter-checkbox-field .choice-tile {
  align-items: flex-start;
  padding: 12px 14px;
}

.choice-tile__content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}

.choice-tile__title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.choice-tile__desc {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
}

/* Letter Detail Sheet: Timeline & Actions */
#letter-sheet.slide-sheet {
  padding-left: 0;
  padding-right: 0;
}

.letter-sheet-fixed-header {
  flex-shrink: 0;
  padding: 0 20px 12px;
}

.letter-detail-separator {
  height: 1px;
  background: var(--line);
  margin: 0;
  border: none;
  width: 100%;
}

.letter-linked-case {
  display: none;
}

.letter-detail-timeline {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 12px 20px 12px;
  margin-bottom: 12px;
}

.letter-detail-timeline__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.letter-detail-timeline__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.letter-detail-timeline__items {
  display: flex;
  flex-direction: column;
}

.letter-detail-timeline__item {
  display: flex;
  gap: 12px;
  min-height: 44px;
  position: relative;
}

.letter-detail-timeline__item:last-child {
  min-height: auto;
}

.letter-detail-timeline__track {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 18px;
  flex-shrink: 0;
  position: relative;
  align-self: stretch;
}

.letter-detail-timeline__node {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 2px;
  background: #f1f5f9;
  color: #64748b;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}

.letter-detail-timeline__item.is-completed .letter-detail-timeline__node {
  background: #dcfce7;
  color: #15803d;
}

.letter-detail-timeline__item.is-completed .letter-detail-timeline__title {
  color: var(--ink);
  font-weight: 600;
}

.letter-detail-timeline__item.is-current .letter-detail-timeline__node {
  background: var(--ink);
  color: #ffffff;
}

.letter-detail-timeline__item.is-current .letter-detail-timeline__title {
  color: var(--ink);
  font-weight: 700;
}

.letter-detail-timeline__item.is-upcoming .letter-detail-timeline__node {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: transparent;
}

.letter-detail-timeline__item.is-upcoming .letter-detail-timeline__title {
  color: #94a3b8;
  font-weight: 500;
}

.letter-detail-timeline__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
}

.letter-detail-timeline__line {
  position: absolute;
  top: 20px;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  background: #cbd5e1;
  z-index: 1;
}

.letter-detail-timeline__item.is-completed .letter-detail-timeline__line {
  background: #22c55e;
}

.letter-detail-timeline__content {
  flex: 1;
  min-width: 0;
  padding-top: 1px;
  padding-bottom: 14px;
}

.letter-detail-timeline__item:last-child .letter-detail-timeline__content {
  padding-bottom: 0;
}

.letter-detail-timeline__title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.letter-detail-timeline__desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.35;
}

/* Bottom Actions in Letter Sheet */
.letter-sheet-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 8px 20px 0;
}

.letter-sheet-delete-btn {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 12px;
  border: 1px solid #fee2e2;
  background: #fef2f2;
  color: #dc2626;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.letter-sheet-delete-btn:active {
  background: #fee2e2;
  transform: scale(0.96);
}

.letter-sheet-view-btn {
  flex: 1;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
}

/* Validation & Feedback Banners */
.form-error-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  margin-top: 12px;
  line-height: 1.4;
}

/* Ghost Danger Button */
.danger-ghost-btn {
  background: transparent;
  border: 1px solid #fecaca;
  color: #dc2626;
  min-height: 44px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
}

.danger-ghost-btn:active {
  background: #fef2f2;
}

/* Sending State Spinner */
.letter-btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: letterSpin 0.7s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}

@keyframes letterSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 360px) {
  .letters-action-bar {
    gap: 7px;
  }
  .letters-action-bar__request {
    font-size: 12px;
    padding: 0 8px;
  }
  .letters-action-bar__upload {
    font-size: 12px;
    padding: 0 8px;
  }
  .letters-action-bar__or {
    font-size: 11.5px;
  }
  .letter-card-row {
    min-height: 112px;
  }
  .letter-card-row__content {
    padding: 14px 12px 10px;
  }
  .letter-card-row__meta {
    gap: 6px;
  }
}

/* ==========================================================================
   Home: Compact Progress Header & Flat Case Timeline
   ========================================================================== */

.home-page-container {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* Compact Dark Header */
.home-progress-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--navy);
  color: var(--white);
  padding: calc(14px + env(safe-area-inset-top)) 20px 16px;
  box-sizing: border-box;
  transition: padding 0.24s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.24s ease,
              border-color 0.24s ease;
}

.home-progress-header.is-scrolled {
  padding: calc(11px + env(safe-area-inset-top)) 20px 11px;
  background: rgba(10, 18, 42, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.home-progress-header__top {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  transition: margin 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-progress-header.is-scrolled .home-progress-header__top {
  margin-bottom: 0;
}

.home-header__logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-header__logo svg {
  display: block;
  max-width: 100%;
  height: auto;
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center center;
}

.home-progress-header.is-scrolled .home-header__logo svg {
  transform: scale(0.94);
}

.home-header__notify-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  color: #ffffff;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  border-radius: 8px;
  transition: opacity 0.15s ease;
}

.home-header__notify-btn:hover {
  opacity: 0.8;
}

.notify-badge-dot {
  position: absolute;
  top: 9px;
  right: 8px;
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  border: 1.5px solid var(--navy);
}

.home-progress-header__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  max-height: 30px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.24s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              margin 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-progress-header.is-scrolled .home-progress-header__meta {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
  pointer-events: none;
}

.home-visa-title {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: -0.2px;
}

.home-stage-count {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.2px;
}

.home-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  overflow: hidden;
  max-height: 4px;
  opacity: 1;
  transition: max-height 0.24s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              margin 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-progress-header.is-scrolled .home-progress-track {
  max-height: 0;
  opacity: 0;
  margin: 0;
  pointer-events: none;
}

.home-progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* Flat Full-Width Case Timeline */
.flat-case-timeline {
  width: 100%;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 18px 20px 6px;
  box-sizing: border-box;
  transition: padding 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.24s ease;
}

.flat-case-timeline.is-collapsed {
  padding: 18px 20px 18px;
}

.flat-case-timeline.is-expanded {
  cursor: pointer;
}

.timeline-steps-list {
  display: flex;
  flex-direction: column;
}

.timeline-step {
  display: flex;
  align-items: stretch;
  gap: 14px;
  position: relative;
  max-height: 140px;
  opacity: 1;
  padding-bottom: 22px;
  overflow: visible;
  transition: max-height 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              padding-bottom 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-step:last-child {
  padding-bottom: 12px;
}

.flat-case-timeline.is-collapsed .timeline-step.is-current {
  max-height: 140px;
  opacity: 1;
  padding-bottom: 0;
}

.flat-case-timeline.is-collapsed .timeline-step:not(.is-current) {
  max-height: 0;
  opacity: 0;
  padding-bottom: 0;
  overflow: hidden;
  pointer-events: none;
  margin: 0;
}

.timeline-step__marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 22px;
  flex-shrink: 0;
  position: relative;
  align-self: stretch;
}

.timeline-step__badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  z-index: 2;
  box-sizing: border-box;
  flex-shrink: 0;
}

/* Active / Current step */
.timeline-step.is-current .timeline-step__badge {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(33, 204, 54, 0.22);
}

.timeline-dot-active {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--white);
}

/* Completed step */
.timeline-step.is-completed .timeline-step__badge {
  background: var(--green);
  color: var(--white);
}

/* Future / Inactive step */
.timeline-step.is-future .timeline-step__badge {
  background: #ffffff;
  border: 2px solid #e2e8f0;
}

.timeline-dot-future {
  display: none;
}

/* Connecting line */
.timeline-step__line {
  position: absolute;
  top: 11px;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  background: #e2e8f0;
  z-index: 1;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.flat-case-timeline.is-collapsed .timeline-step__line {
  opacity: 0;
}

.timeline-step.is-completed .timeline-step__line {
  background: var(--green);
}

.timeline-step__content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex: 1;
  min-height: 22px;
}

.timeline-step__text-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.timeline-step__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}

.timeline-step__title {
  font-size: 15px;
  font-weight: 500;
  color: #0f172a;
  line-height: 22px;
  letter-spacing: -0.01em;
}

.timeline-step.is-future .timeline-step__title {
  color: #0f172a;
}

.timeline-eta-badge {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  padding: 1.5px 7px;
  font-size: 10.5px;
  font-weight: 500;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.jumpstart-underline {
  text-decoration: underline;
  text-underline-offset: 2.5px;
  font-weight: 600;
  color: var(--navy);
}

.timeline-step__desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
  font-weight: 400;
  max-height: 60px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.24s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.flat-case-timeline.is-collapsed .timeline-step__desc {
  max-height: 0;
  opacity: 0;
}

.timeline-inline-expand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  width: 44px;
  height: 22px;
  min-width: 44px;
  min-height: 22px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  margin: 0 0 0 auto;
  opacity: 1;
  transform: rotate(0deg);
  transition: color 0.15s ease, opacity 0.2s ease, transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.flat-case-timeline.is-expanded .timeline-inline-expand-btn {
  opacity: 0;
  pointer-events: none;
  transform: rotate(180deg);
}

.timeline-inline-expand-btn:hover {
  color: var(--navy);
}

.timeline-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 32px;
  max-height: 36px;
  padding: 6px 0 2px;
  background: transparent;
  color: var(--muted);
  border: none;
  cursor: pointer;
  opacity: 1;
  overflow: hidden;
  transition: color 0.15s ease, max-height 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), min-height 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.flat-case-timeline.is-collapsed .timeline-toggle-btn {
  max-height: 0;
  min-height: 0;
  opacity: 0;
  padding: 0;
  pointer-events: none;
}

.timeline-toggle-btn:hover {
  color: var(--navy);
  opacity: 0.8;
}

/* ==========================================================================
   Chat Screen — Clean Direct Conversation
   ========================================================================== */

.screen--chat {
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
}

.chat-screen {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  width: 100%;
  background: #f8fafc;
  position: relative;
  overflow: hidden;
  padding-bottom: calc(56px + env(safe-area-inset-bottom));
}

/* Chat Messages Thread */
.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: calc(env(safe-area-inset-top) + 20px) 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #f8fafc;
}

.chat-date-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0 10px;
}

.chat-date-divider span {
  font-size: 11.5px;
  font-weight: 600;
  color: #94a3b8;
  background: #f1f5f9;
  padding: 3px 14px;
  border-radius: 12px;
  letter-spacing: 0.02em;
}

/* Messages */
.chat-msg {
  width: 100%;
  display: flex;
  animation: chatMsgFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.chat-msg--user {
  justify-content: flex-end;
}

.chat-msg--assistant {
  justify-content: flex-start;
}

.chat-msg__content {
  max-width: 84%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Bubbles */
.chat-bubble {
  position: relative;
  word-break: break-word;
}

.chat-bubble--assistant {
  background: #ffffff;
  color: #1e293b;
  border-radius: 18px;
  padding: 12px 16px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.035);
  font-size: 13.5px;
  line-height: 1.55;
}

.chat-bubble__sender-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  padding-bottom: 0;
  border-bottom: none;
}

.chat-bubble__sender-name {
  font-size: 11.5px;
  font-weight: 700;
  color: #0f766e;
  letter-spacing: -0.01em;
}

.chat-bubble__sender-time {
  font-size: 10.5px;
  color: #94a3b8;
  font-weight: 500;
}

.chat-bubble--user {
  background: #0f172a;
  color: #ffffff;
  border-radius: 18px;
  padding: 12px 16px 8px;
  max-width: 84%;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
  font-size: 13.5px;
  line-height: 1.5;
}

.chat-user-text p {
  margin: 0 0 4px;
}

.chat-user-text p:last-child {
  margin-bottom: 0;
}

.chat-meta--user {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 4px;
}

.chat-checks {
  color: #34d399;
  display: inline-flex;
}

.chat-p {
  margin: 0 0 8px;
}

.chat-p:last-child {
  margin-bottom: 0;
}

.chat-line-gap {
  height: 6px;
}

.chat-list,
.chat-ordered-list {
  margin: 6px 0 8px;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.5;
}

.chat-list li,
.chat-ordered-list li {
  margin-bottom: 4px;
}

.chat-code {
  background: #f1f5f9;
  color: #0f766e;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Thinking Indicator */
.chat-bubble--thinking {
  padding: 10px 14px;
}

.chat-typing-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.chat-typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 3.5px;
}

.chat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #059669;
  animation: chatDotPulse 1.4s infinite ease-in-out both;
}

.chat-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.chat-dot:nth-child(2) {
  animation-delay: -0.16s;
}

.chat-thinking-text {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

/* Docked Floating Chat Composer */
.chat-composer-shell {
  position: relative;
  z-index: 25;
  padding: 6px 12px 8px;
  background: #f8fafc;
  border: none;
  box-shadow: none;
  flex-shrink: 0;
}

.chat-composer-form {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 2px 4px 2px 8px;
  box-shadow: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.chat-composer-form:focus-within {
  border-color: var(--green-dark);
  background: #ffffff;
  box-shadow: 0 0 0 2.5px rgba(33, 204, 54, 0.2);
}

.chat-attach-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #64748b;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 0.15s ease;
  padding: 0;
  flex-shrink: 0;
}

.chat-attach-btn:hover {
  color: #0f172a;
}

.chat-attach-btn:active {
  transform: scale(0.92);
}

.chat-input-field {
  flex: 1;
  min-height: 44px;
  border: none;
  background: transparent;
  font-size: 16px;
  color: var(--ink);
  outline: none;
  padding: 0 2px;
  min-width: 0;
}

.chat-input-field::placeholder {
  color: #94a3b8;
}

.chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #e2e8f0;
  color: #94a3b8;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
  padding: 0;
}

.chat-send-btn.is-active {
  background: var(--green);
  color: var(--white);
  box-shadow: none;
}

.chat-send-btn.is-active:active {
  transform: scale(0.92);
}

@media (min-width: 431px) {
  .chat-screen {
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }
}

/* Animations */
@keyframes chatMsgFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes chatDotPulse {
  0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}
