:root {
  color-scheme: light;
  --bg: #eef1f3;
  --panel: #ffffff;
  --ink: #18201f;
  --muted: #65706e;
  --line: #d7dddc;
  --line-strong: #bac6c3;
  --green: #173b36;
  --green-2: #2d655c;
  --green-soft: #e5efec;
  --blue: #2a547d;
  --amber: #9a6300;
  --amber-soft: #fff4d8;
  --red: #8b3333;
  --red-soft: #f9e8e6;
  --sidebar: #142421;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button, input, select { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--sidebar);
  color: #edf5f2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 24px 16px;
  position: sticky;
  top: 0;
}

.brand {
  align-items: center;
  color: inherit;
  display: flex;
  gap: 12px;
  padding: 0 8px 28px;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: #d9e8e4;
  color: var(--sidebar);
  display: inline-flex;
  font-size: 12px;
  font-weight: 850;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; }
.brand small { color: #9fb3ae; font-size: 11px; margin-top: 2px; }

.area-nav { flex: 1; }
.area-label {
  color: #829a94;
  font-size: 11px;
  font-weight: 750;
  padding: 10px 12px;
  text-transform: uppercase;
}

.nav-item {
  align-items: center;
  border-left: 3px solid transparent;
  color: #bfd0cc;
  display: flex;
  font-size: 14px;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  text-decoration: none;
}

.nav-item:hover, .nav-item.active {
  background: #203733;
  border-left-color: #7eb4a8;
  color: #ffffff;
}

.sidebar-status {
  align-items: center;
  border-top: 1px solid #2d423e;
  display: flex;
  gap: 10px;
  padding: 18px 8px 0;
}

.sidebar-status strong, .sidebar-status small { display: block; }
.sidebar-status strong { font-size: 12px; }
.sidebar-status small { color: #8fa49f; font-size: 11px; margin-top: 2px; }

.status-dot {
  background: #53b486;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(83, 180, 134, .15);
  flex: 0 0 auto;
  height: 8px;
  width: 8px;
}
.status-dot.neutral { background: #7b8b88; box-shadow: none; }
.status-dot.warning { background: #c58a27; box-shadow: none; }

.workspace { min-width: 0; }
.topbar {
  align-items: center;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 84px;
  padding: 16px 32px;
}

.eyebrow { color: var(--muted); font-size: 12px; }
h1 { font-size: 22px; line-height: 1.2; margin: 5px 0 0; }
h2 { font-size: 18px; line-height: 1.25; margin: 4px 0 0; }
h3 { font-size: 17px; line-height: 1.35; margin: 12px 0; }
p { line-height: 1.55; }

.capability-status {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 12px;
  gap: 9px;
}

.view { padding: 24px 32px 48px; }
.notice {
  background: var(--amber-soft);
  border: 1px solid #e9cf91;
  color: #684711;
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 18px;
  padding: 12px 16px;
}

.progress-band {
  background: var(--panel);
  border: 1px solid var(--line);
  margin-bottom: 18px;
  padding: 16px 18px 18px;
}

.progress-heading {
  align-items: center;
  display: flex;
  font-size: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}
.progress-heading span { color: var(--muted); }

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.workflow-step {
  border-top: 3px solid var(--line);
  color: var(--muted);
  min-width: 0;
  padding: 10px 14px 0 0;
}
.workflow-step span { display: block; font-size: 10px; margin-bottom: 4px; }
.workflow-step strong { display: block; font-size: 12px; overflow-wrap: anywhere; }
.workflow-step.active { border-color: var(--green-2); color: var(--green); }
.workflow-step.next { border-color: #93aaa5; }

.content-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, .8fr);
}

.form-panel, .result-panel, .civil-workspace {
  background: var(--panel);
  border: 1px solid var(--line);
  min-width: 0;
  padding: 22px;
}

.section-heading {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
}
.section-heading.compact { margin-bottom: 16px; }
.step-number {
  color: var(--green-2);
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.required-note { color: var(--muted); font-size: 11px; }

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

label > span, legend {
  color: #3d4947;
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 7px;
}

input[type="text"], input[type="date"], select {
  background: #fbfcfc;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--ink);
  min-height: 42px;
  padding: 0 11px;
  width: 100%;
}
input:focus, select:focus { border-color: var(--green-2); outline: 2px solid #dbeae6; }

fieldset { border: 0; margin: 22px 0 0; padding: 0; }
legend { margin-bottom: 10px; }
.check-grid { border: 1px solid var(--line); }
.check-row {
  align-items: center;
  display: flex;
  gap: 10px;
  min-height: 42px;
  padding: 8px 12px;
}
.check-row + .check-row { border-top: 1px solid var(--line); }
.check-row span { font-size: 13px; font-weight: 500; margin: 0; }
.check-row input { accent-color: var(--green-2); height: 16px; width: 16px; }

.form-actions {
  align-items: center;
  display: flex;
  gap: 14px;
  margin-top: 22px;
}
.primary-button {
  align-items: center;
  background: var(--green);
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 750;
  gap: 12px;
  min-height: 44px;
  padding: 0 16px;
}
.primary-button:hover { background: var(--green-2); }
.primary-button:disabled { cursor: wait; opacity: .65; }
.form-state { color: var(--muted); font-size: 12px; }

.empty-state { color: var(--muted); padding: 44px 10px; text-align: center; }
.document-stack { height: 54px; margin: 0 auto 16px; position: relative; width: 58px; }
.document-stack span {
  background: #f7f9f8;
  border: 1px solid var(--line-strong);
  height: 46px;
  left: 7px;
  position: absolute;
  top: 5px;
  width: 42px;
}
.document-stack span:nth-child(2) { left: 11px; top: 2px; }
.document-stack span:nth-child(3) { left: 15px; top: 0; }

.result-state, .pill {
  background: var(--green-soft);
  color: var(--green);
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  padding: 5px 7px;
  text-transform: uppercase;
}
.result-state.attorney-review-required { background: var(--red-soft); color: var(--red); }
.blocker-list { background: var(--red-soft); color: #6f2d2d; font-size: 12px; padding: 12px; }
.blocker-list ul { margin: 8px 0 0; padding-left: 18px; }
.clear-flag { background: var(--green-soft); color: var(--green); font-size: 12px; padding: 11px; }
.clear-flag span { margin-right: 7px; }

.task-list { list-style: none; margin: 18px 0 0; padding: 0; }
.task-list li { display: grid; gap: 10px; grid-template-columns: 10px minmax(0, 1fr); padding: 0 0 16px; }
.task-list li > span { background: var(--green-2); height: 7px; margin-top: 5px; width: 7px; }
.task-list strong, .task-list small { display: block; }
.task-list strong { font-size: 12px; line-height: 1.45; }
.task-list small { color: var(--muted); font-size: 10px; margin-top: 3px; }
.privacy-line { border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; margin: 0; padding-top: 12px; }

.civil-workspace { min-height: 430px; }
.civil-workspace > div:first-child p { color: var(--muted); font-size: 13px; }
.registry-table { border: 1px solid var(--line); margin-top: 26px; }
.registry-row { display: grid; font-size: 12px; grid-template-columns: 1.2fr .6fr 1.4fr; min-height: 44px; }
.registry-row + .registry-row { border-top: 1px solid var(--line); }
.registry-row span { align-items: center; display: flex; padding: 10px 12px; }
.registry-row.header { background: #f4f7f6; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.error-line { color: var(--red); font-size: 12px; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar { padding: 20px 10px; }
  .brand { justify-content: center; padding: 0 0 24px; }
  .brand > span:last-child, .area-label, .nav-item:not(.active) { }
  .brand > span:last-child, .nav-item { font-size: 0; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-item span { font-size: 17px; }
  .sidebar-status span:last-child { display: none; }
  .sidebar-status { justify-content: center; }
  .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .app-shell { display: block; }
  .sidebar { flex-direction: row; min-height: auto; padding: 10px 14px; position: static; }
  .brand { flex: 1; justify-content: flex-start; padding: 0; }
  .brand > span:last-child { display: block; }
  .area-nav { display: flex; flex: 0; }
  .area-label, .sidebar-status { display: none; }
  .nav-item { border-bottom: 3px solid transparent; border-left: 0; min-height: 42px; width: 44px; }
  .nav-item.active { border-bottom-color: #7eb4a8; border-left: 0; }
  .topbar { align-items: start; min-height: 76px; padding: 14px 16px; }
  .capability-status { max-width: 140px; text-align: right; }
  .view { padding: 16px; }
  .workflow-steps { grid-template-columns: 1fr; }
  .workflow-step { display: none; }
  .workflow-step.active { display: block; }
  .field-grid { grid-template-columns: 1fr; }
  .form-panel, .result-panel, .civil-workspace { padding: 16px; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .primary-button { justify-content: center; width: 100%; }
  .registry-row { grid-template-columns: 1fr; padding: 8px 0; }
  .registry-row.header { display: none; }
  .registry-row span { padding: 5px 10px; }
}

