:root {
  --brand: #1f5a46;
  --brand-strong: #173f34;
  --accent: #386f61;
  --surface: #fffdf9;
  --paper: #f7f4ed;
  --ink: #1c2521;
  --muted: #606963;
  --line: #cbc7bd;
  --focus: #165f9f;
  --shadow: 0 18px 48px rgba(25, 37, 52, 0.13);
  --body-font:
    "Aptos", "Nirmala UI", "Segoe UI Variable Text", "Noto Sans", system-ui, sans-serif;
  --display-font: "Charter", "Palatino Linotype", "Noto Serif", Georgia, serif;
  font-family: var(--body-font);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  min-width: 320px;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(16, 45, 85, 0.025) 0 1px,
    transparent 1px 5px
  );
}
body.high {
  --paper: #fff;
  --ink: #000;
  --muted: #242424;
  --line: #111;
  --surface: #fff;
}
body.large {
  font-size: 18px;
}
body.reduce *,
body.reduce *:before,
body.reduce *:after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.shell {
  max-width: 1360px;
  margin: auto;
  padding: 0 34px;
}
.btn {
  border: 1px solid var(--line);
  min-height: 42px;
  padding: 0 13px;
  background: var(--surface);
  color: var(--brand-strong);
  font-weight: 700;
  border-radius: 5px;
}
.btn.primary {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
  color: #fff;
}
.btn.icon {
  width: 42px;
  padding: 0;
  font-size: 18px;
}
.mobile {
  display: none;
}
.page {
  min-height: calc(100vh - 83px);
  padding: 34px 0 55px;
}
.eyebrow,
.kicker {
  font-size: 11px;
  letter-spacing: 1.4px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 15px;
}
.head h1 {
  font:
    400 clamp(42px, 5vw, 72px) / 0.98 "DM Serif Display",
    serif;
  margin: 0;
  color: var(--brand-strong);
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.bottom {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  margin-top: 28px;
}
.band {
  border-top: 3px solid var(--brand-strong);
  padding: 20px 0;
}
.band:last-child {
  border-color: var(--brand);
}
.band h2,
.block h2 {
  font:
    400 28px "DM Serif Display",
    serif;
  color: var(--brand-strong);
  margin: 0 0 8px;
}
.band p,
.block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.head {
  border-bottom: 1px solid var(--line);
  padding: 15px 0 24px;
  margin-bottom: 24px;
}
.head h1 {
  font-size: 48px;
}
.head p {
  color: var(--muted);
  max-width: 700px;
  margin: 10px 0 0;
}
.block {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 28px;
}
.field {
  display: grid;
  gap: 6px;
  max-width: 570px;
  margin: 14px 0;
}
.field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-strong);
}
.field input,
.field select {
  min-height: 47px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 12px;
  border-radius: 4px;
}
.result {
  margin-top: 22px;
  border-left: 4px solid var(--accent);
  background: #edf4fb;
  padding: 18px;
  max-width: 700px;
}
.result.error {
  border-color: #a33b2b;
  background: #fff0ed;
}
.result h3 {
  margin: 0 0 6px;
  color: var(--brand-strong);
}
.case {
  max-width: 1080px;
}
.case-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
}
.case-top h1 {
  font:
    400 46px "DM Serif Display",
    serif;
  color: var(--brand-strong);
  margin: 0;
}
.case-top p {
  color: var(--muted);
  margin: 8px 0 0;
}
.case-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
  gap: 28px;
  margin-top: 24px;
}
.case-reading,
.case-rail {
  display: grid;
  align-content: start;
  gap: 20px;
}
.record-note {
  font-size: 12px;
}
.record-block {
  border-top: 4px solid var(--brand-strong);
  box-shadow: 0 8px 24px rgba(16, 45, 84, 0.08);
  padding: 28px;
}
.record-layers {
  display: grid;
  gap: 12px;
}
.record-layers article {
  border-left: 4px solid var(--brand-strong);
  padding: 18px 20px;
  background: var(--surface);
  color: var(--ink);
}
.record-layers .record-meaning {
  border-left-color: var(--brand);
  background: #edf7f0;
}
.record-layers .record-verify {
  border-left-color: var(--accent);
  background: #fff4e8;
}
.record-layers b {
  display: block;
  color: var(--brand-strong);
}
.record-layers p {
  margin: 7px 0 0;
  color: var(--ink);
  line-height: 1.6;
}
.history-block {
  min-height: 0;
}
.case-help {
  width: 100%;
  min-height: 48px;
  justify-content: center;
}
.status {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.status div {
  border-top: 2px solid var(--accent);
  padding-top: 8px;
}
.status strong {
  display: block;
  color: var(--brand-strong);
  font-size: 18px;
}
.status span {
  font-size: 12px;
  color: var(--muted);
}
.reading {
  display: grid;
  gap: 10px;
}
.reading article {
  padding: 14px;
  border-left: 3px solid var(--accent);
  background: #f5f8fc;
}
.reading article:nth-child(2) {
  border-color: var(--brand);
  background: #f1f8f2;
}
.reading article:nth-child(3) {
  border-color: var(--accent);
  background: #fff7ed;
}
.reading b {
  color: var(--brand-strong);
  display: block;
}
.reading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.timeline div {
  display: grid;
  grid-template-columns: 23px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.dot {
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  margin-top: 4px;
}
.timeline div:first-child .dot {
  background: var(--accent);
}
.timeline b {
  display: block;
}
.timeline span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.doc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 13px 0;
}
.doc b {
  display: block;
}
.doc span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.pdf-boundary {
  margin: 0 0 18px;
  border-left: 4px solid var(--accent);
  padding: 12px 14px;
  background: #fff4e8;
  color: var(--ink);
}
.help {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.help article {
  padding: 22px;
  background: var(--surface);
  border-top: 3px solid var(--brand);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.help article:nth-child(2) {
  border-top-color: var(--accent);
}
.help article:nth-child(3) {
  border-top-color: var(--accent);
}
.help h2 {
  font:
    400 27px "DM Serif Display",
    serif;
  color: var(--brand-strong);
  margin: 0 0 8px;
}
.help p {
  color: var(--muted);
  margin: 0;
}
.footer {
  border-top: 1px solid var(--line);
  padding: 16px 0 28px;
  color: var(--muted);
  font-size: 12px;
  display: grid;
  gap: 4px;
}
.footer .prototype-badge {
  max-width: none;
  padding: 0;
  border: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}
.footer p {
  margin: 0;
}
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 25, 43, 0.62);
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal {
  width: min(660px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--paper);
  box-shadow: var(--shadow);
  border-top: 5px solid var(--accent);
  padding: 28px;
  position: relative;
}
.modal h2 {
  font:
    400 34px "DM Serif Display",
    serif;
  color: var(--brand-strong);
  margin: 0 0 8px;
}
.modal p {
  color: var(--muted);
}
.close {
  position: absolute;
  top: 12px;
  right: 12px;
}
.steps {
  display: flex;
  gap: 7px;
  margin: 18px 0;
}
.steps i {
  height: 5px;
  flex: 1;
  background: var(--line);
}
.steps i.on {
  background: var(--accent);
}
.paper {
  margin: 18px 0;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  font-family: Georgia, serif;
  line-height: 1.7;
}
.settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-strong);
  color: #fff;
  padding: 12px 16px;
  z-index: 30;
  box-shadow: var(--shadow);
}
[hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  .shell {
    padding: 0 18px;
  }
  .nav {
    display: none;
  }
  .mobile {
    display: inline-flex;
  }
  .tools .btn:not(.icon) {
    display: none;
  }
  .page {
    padding: 22px 0 36px;
  }
  .bottom,
  .finder,
  .case-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .tabs {
    display: flex;
    overflow: auto;
    gap: 16px;
    border-top: 0;
    border-bottom: 1px solid var(--line);
    padding: 0;
  }
  .tabs button {
    white-space: nowrap;
    width: auto;
    border: 0;
    padding: 10px 0;
  }
  .panel {
    padding: 20px;
    border-left: 0;
    border-right: 0;
  }
  .head h1,
  .case-top h1 {
    font-size: 39px;
  }
  .case-top {
    display: grid;
  }
  .status {
    grid-template-columns: 1fr;
  }
  .help {
    grid-template-columns: 1fr;
  }
  .case-grid {
    margin-top: 18px;
  }
  .case-reading,
  .case-rail {
    display: contents;
  }
  .agenda-block {
    order: 1;
  }
  .record-block {
    order: 2;
    padding: 20px;
  }
  .preparation-block {
    order: 3;
  }
  .documents-block {
    order: 4;
  }
  .history-block {
    order: 5;
  }
  .case-help {
    order: 6;
  }
  .whatsapp-case {
    order: 7;
  }
  .block {
    padding: 18px;
  }
  .settings {
    grid-template-columns: 1fr;
  }
  .modal {
    padding: 23px 18px;
  }
  .menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--paper);
    z-index: 25;
    border-top: 4px solid var(--accent);
    padding: 18px;
    box-shadow: 0 -12px 35px rgba(0, 0, 0, 0.2);
  }
  .menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 15px 4px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    color: var(--brand-strong);
    font-weight: 700;
  }
}

/* Citizen journey, guided start, preparation and communication preview */
.journey-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 18px 0 0;
  border: 1px solid var(--line);
  background: var(--surface);
}
.journey-strip button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 58px;
  padding: 10px 13px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  text-align: left;
}
.journey-strip button:last-child { border-right: 0; }
.journey-strip button span {
  display: grid;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid #93a19a;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}
.journey-strip button b { overflow-wrap: anywhere; }
.journey-strip button.active {
  box-shadow: inset 0 -4px var(--accent);
  background: #fff7ed;
  color: var(--brand-strong);
}
.journey-strip button.complete { color: var(--brand); }
.journey-strip button.complete span { border-color: var(--brand); background: var(--brand); color: #fff; }
.journey-strip button:disabled { cursor: not-allowed; opacity: .48; }
.journey-strip .ui-icon { width: 14px; height: 14px; }
.first-tour {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 26px;
  padding: 17px 20px;
  border: 1px solid #b8c9bf;
  border-left: 5px solid var(--brand);
  background: #f3f8f5;
}
.first-tour img { width: 84px; height: 84px; object-fit: cover; }
.first-tour h2 { margin: 0 0 4px; color: var(--brand-strong); font: 400 25px var(--display-font); }
.first-tour p { margin: 0; color: var(--muted); }
.first-tour .tour-count { color: var(--accent); font-size: 12px; font-weight: 800; }
.first-tour .actions { margin-top: 12px; }
.home-page .whatsapp-entry {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  margin-top: 10px;
  padding: 15px 18px;
  border: 1px solid #9ebcaf;
  background: #f2faf5;
  color: var(--brand-strong);
  text-align: left;
}
.whatsapp-entry > .ui-icon { width: 27px; height: 27px; align-self: center; }
.whatsapp-entry span, .whatsapp-entry b { display: block; }
.whatsapp-entry span span { margin-top: 3px; color: var(--muted); font-size: 13px; }
.voice-field { position: relative; }
.voice-field input { padding-right: 60px !important; }
.voice-button {
  position: absolute;
  top: 6px;
  right: 7px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-left: 1px solid var(--line);
  background: #fff;
  color: var(--brand);
}
.voice-button[aria-pressed="true"] { background: #fff0e3; color: var(--accent); }
.voice-button .ui-icon { width: 21px; height: 21px; }
.voice-status { display: block; min-height: 20px; margin-top: 5px; color: var(--muted); font-size: 12px; }
.preparation-block { margin-top: 16px; border-top: 5px solid var(--brand); padding: 28px; }
.preparation-block > h2 { margin-bottom: 7px; }
.preparation-block > p:not(.kicker):not(.prep-caution) { max-width: 720px; color: var(--muted); }
.role-selector { display: flex; flex-wrap: wrap; gap: 7px; margin: 20px 0; }
.role-selector button {
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid #92a198;
  border-radius: 3px;
  background: #fff;
  color: var(--brand-strong);
  font-weight: 750;
}
.role-selector button.active { border-color: var(--brand); background: var(--brand); color: #fff; }
.official-service-action { margin-left: auto; }
.prep-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.prep-columns > div { padding: 18px; border: 1px solid var(--line); background: #f7f8f5; }
.prep-columns h3 { margin: 0 0 12px; color: var(--brand-strong); }
.prep-columns ul, .consent-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.prep-columns li { display: grid; grid-template-columns: 19px 1fr; gap: 8px; line-height: 1.45; }
.prep-columns .ui-icon { width: 17px; height: 17px; margin-top: 2px; color: var(--brand); }
.prep-caution { margin: 14px 0 18px; padding: 11px 13px; border-left: 3px solid var(--accent); background: #fff4e8; color: var(--ink); font-size: 13px; }
.whatsapp-case { width: 100%; justify-content: center; margin-top: 9px; }
.phone-preview { margin: 20px 0; overflow: hidden; border: 1px solid #a8b8af; border-radius: 8px; background: #eef3ef; }
.phone-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; background: var(--brand); color: #fff; }
.phone-head span, .phone-head b, .phone-head small { display: block; }
.phone-head small { margin-top: 2px; opacity: .8; }
.phone-head .ui-icon { width: 24px; height: 24px; }
.chat-message { display: grid; gap: 6px; width: min(88%, 470px); margin: 18px 16px 8px auto; padding: 13px 15px; border-radius: 7px 7px 0 7px; background: #dff2e4; color: var(--ink); line-height: 1.45; }
.chat-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; padding: 4px 16px 18px; }
.chat-actions button { padding: 8px 10px; border: 1px solid #97ad9f; border-radius: 4px; background: #fff; color: var(--brand); opacity: 1; }
.consent-list { margin: 0 0 20px; }
.consent-list li { position: relative; padding-left: 20px; color: var(--muted); }
.consent-list li:before { content: ""; position: absolute; left: 2px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
@media (max-width: 760px) {
  .journey-strip { display: flex; margin: 12px -18px 0; overflow-x: auto; border-left: 0; border-right: 0; }
  .journey-strip button { flex: 0 0 132px; min-height: 62px; }
  .first-tour { grid-template-columns: 60px minmax(0, 1fr); padding: 14px; }
  .first-tour img { width: 60px; height: 60px; }
  .first-tour h2 { font-size: 21px; }
  .prep-columns { grid-template-columns: 1fr; }
  .preparation-block { padding: 20px 17px; }
  .role-selector button { flex: 1 1 calc(50% - 7px); }
  .official-service-action { width: 100%; margin-left: 0; justify-content: center; }
}

.term {
  appearance: none;
  position: relative;
  border: 0;
  border-bottom: 2px dotted var(--accent);
  padding: 0;
  background: transparent;
  color: var(--brand-strong);
  font: inherit;
  font-weight: 700;
  cursor: help;
}
.term:hover,
.term:focus-visible {
  color: var(--accent);
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.term:after {
  content: attr(data-explanation);
  display: none;
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 10;
  width: min(290px, 70vw);
  padding: 11px 12px;
  background: var(--brand-strong);
  color: #fff;
  text-align: left;
  font:
    500 13px/1.45 "DM Sans",
    "Noto Sans Devanagari",
    sans-serif;
  box-shadow: var(--shadow);
  pointer-events: none;
}
.term:hover:after,
.term:focus-visible:after {
  display: block;
}
.language-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 18px;
}
.language-list button {
  min-height: 52px;
  border: 1px solid var(--line);
  background: #fffdf9;
  color: var(--brand-strong);
  padding: 10px;
  text-align: left;
  font:
    600 14px "DM Sans",
    "Noto Sans Devanagari",
    sans-serif;
}
.language-list button.active {
  border-color: var(--accent);
  box-shadow: inset 3px 0 var(--accent);
  background: #f5f9ff;
}
.doc-studio {
  display: grid;
  grid-template-columns: 210px minmax(300px, 0.85fr) minmax(330px, 1.15fr);
  gap: 20px;
  align-items: start;
}
.template-list {
  border-top: 3px solid var(--brand-strong);
}
.template-choice {
  width: 100%;
  min-height: 64px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 11px 4px;
  text-align: left;
  color: var(--brand-strong);
}
.template-choice b,
.template-choice span {
  display: block;
}
.template-choice span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.template-choice.active {
  box-shadow: inset 4px 0 var(--accent);
  padding-left: 13px;
  background: #fff9f0;
}
.draft-form,
.draft-preview {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 22px;
}
.draft-form h2 {
  font:
    400 30px "DM Serif Display",
    serif;
  color: var(--brand-strong);
  margin: 0 0 5px;
}
.draft-form > p {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 17px;
}
.draft-form textarea {
  min-height: 92px;
  resize: vertical;
  border: 1px solid var(--line);
  background: #fff;
  padding: 11px;
  border-radius: 4px;
  font: inherit;
}
.draft-form .field {
  margin: 11px 0;
}
.draft-preview {
  position: sticky;
  top: 16px;
  background: #fff;
  min-height: 600px;
  box-shadow: 0 12px 35px rgba(25, 37, 52, 0.09);
  font-family: Georgia, serif;
  color: #252525;
}
.draft-preview .draft-label {
  font:
    700 10px "DM Sans",
    sans-serif;
  letter-spacing: 1.2px;
  color: var(--accent);
}
.draft-preview h2 {
  font:
    700 23px Georgia,
    serif;
  text-align: center;
  color: #1d2e42;
  margin: 28px 0 22px;
}
.draft-preview p {
  white-space: pre-wrap;
  line-height: 1.65;
  margin: 0 0 13px;
}
.draft-preview .draft-warning {
  border-top: 1px solid #bbb;
  margin-top: 28px;
  padding-top: 14px;
  font:
    600 11px/1.5 "DM Sans",
    sans-serif;
  color: #6a4a21;
}
.privacy-note {
  border-left: 4px solid var(--brand);
  background: #eef7f1;
  padding: 13px 15px;
  margin: 0 0 20px;
  color: #244b37;
  font-size: 13px;
}
.doc-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.template-tag {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.official-note {
  border-top: 3px solid var(--accent);
  background: #fff8ee;
  padding: 16px;
  margin-top: 20px;
  color: #68451f;
  font-size: 13px;
}
@media (min-width: 761px) {
  .tasks.five {
    grid-template-columns: repeat(5, 1fr);
  }
}
@media (max-width: 980px) {
  .doc-studio {
    grid-template-columns: 190px 1fr;
  }
  .draft-preview {
    grid-column: 1/-1;
    position: static;
    min-height: 440px;
  }
}
@media (max-width: 760px) {
  .language-list {
    grid-template-columns: 1fr;
  }
  .term {
    font-size: inherit;
  }
  .term:after {
    display: none !important;
  }
  .doc-studio {
    grid-template-columns: 1fr;
  }
  .template-list {
    display: flex;
    overflow: auto;
    gap: 8px;
    border-top: 0;
    padding-bottom: 7px;
  }
  .template-choice {
    min-width: 170px;
    border: 1px solid var(--line);
    padding: 10px;
  }
  .template-choice.active {
    padding-left: 10px;
  }
  .draft-form,
  .draft-preview {
    padding: 18px;
  }
  .draft-preview {
    grid-column: auto;
    min-height: 420px;
  }
  .tasks.five {
    grid-template-columns: 1fr;
  }
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.help-page {
  max-width: 1180px;
}
.help-page .head {
  margin-bottom: 20px;
}
.help-intro {
  display: grid;
  align-items: end;
  gap: 24px;
}
.help-boundary {
  max-width: 760px;
}
.help-services {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 26px;
}
.service-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 13px;
  background: var(--surface);
  color: var(--brand-strong);
  font-weight: 700;
  text-decoration: none;
}
.service-link:hover {
  border-color: var(--accent);
  background: #f3f8fd;
}
.service-link:focus-visible,
.source-link:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.external-mark {
  color: var(--accent);
  font-size: 15px;
}
.help-tools {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 1.25fr);
  gap: 26px;
  align-items: end;
  padding: 21px 0 23px;
  border-top: 3px solid var(--brand-strong);
  border-bottom: 1px solid var(--line);
}
.help-search {
  display: grid;
  gap: 7px;
}
.help-search label,
.suggested-next h2 {
  margin: 0;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 700;
}
.help-search input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  padding: 0 13px;
  color: var(--ink);
}
.help-count,
.suggestion-privacy {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.suggested-next {
  min-width: 0;
}
.suggestion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.suggestion-row {
  display: flex;
  gap: 8px;
  min-width: 0;
}
.suggestion {
  min-height: 44px;
  flex: 1;
  border: 1px solid #b9c9da;
  border-radius: 4px;
  padding: 9px 11px;
  background: #f3f8fd;
  color: var(--brand-strong);
  font-weight: 700;
  text-align: left;
  line-height: 1.3;
}
.suggestion:hover {
  background: #e7f1fb;
  border-color: var(--accent);
}
.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 38px;
  margin-top: 31px;
}
.knowledge-base {
  min-width: 0;
  border-top: 4px solid var(--brand);
  padding-top: 18px;
}
.knowledge-base.portal {
  border-color: var(--accent);
}
.knowledge-label {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}
.knowledge-base h2 {
  margin: 0 0 6px;
  color: var(--brand-strong);
  font:
    400 30px "DM Serif Display",
    serif;
}
.knowledge-base > p {
  min-height: 42px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.faq-list {
  border-bottom: 1px solid var(--line);
}
.faq-item {
  border-top: 1px solid var(--line);
  background: transparent;
}
.faq-item summary {
  position: relative;
  min-height: 58px;
  padding: 17px 42px 16px 0;
  color: var(--brand-strong);
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary:after {
  content: "+";
  position: absolute;
  right: 7px;
  top: 12px;
  color: var(--accent);
  font:
    400 26px "DM Serif Display",
    serif;
}
.faq-item[open] summary:after {
  content: "-";
  color: var(--brand);
}
.faq-item[open] summary {
  color: var(--accent);
}
.faq-answer {
  padding: 0 34px 18px 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}
.faq-answer p {
  margin: 0 0 12px;
}
.source-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-underline-offset: 3px;
}
.help-empty {
  margin: 30px 0 0;
  border-left: 4px solid var(--accent);
  background: #fff7ed;
  padding: 18px;
}
.help-empty h2 {
  margin: 0 0 5px;
  color: var(--brand-strong);
  font:
    400 25px "DM Serif Display",
    serif;
}
.help-empty p {
  margin: 0 0 14px;
  color: var(--muted);
}
.help-language-note {
  border-left: 3px solid var(--accent);
  padding-left: 11px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12px;
}
.help-disclaimer {
  margin-top: 31px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
@media (max-width: 860px) {
  .help-tools {
    grid-template-columns: 1fr;
  }
  .knowledge-grid {
    gap: 24px;
  }
  .suggestion-row {
    overflow-x: auto;
    padding: 0 2px 5px;
  }
  .suggestion {
    flex: 0 0 min(260px, 78vw);
  }
}
@media (max-width: 760px) {
  .help-intro {
    display: block;
  }
  .help-services {
    display: grid;
    grid-template-columns: 1fr;
    margin-bottom: 22px;
  }
  .service-link {
    justify-content: space-between;
  }
  .help-tools {
    margin-left: -18px;
    margin-right: -18px;
    padding: 18px;
  }
  .suggestion-head {
    align-items: flex-start;
  }
  .suggestion-privacy {
    max-width: 170px;
    text-align: right;
  }
  .knowledge-grid {
    grid-template-columns: 1fr;
    margin-top: 26px;
    gap: 32px;
  }
  .knowledge-base > p {
    min-height: 0;
  }
  .faq-item summary {
    min-height: 62px;
    padding: 18px 42px 17px 0;
  }
  .faq-answer {
    padding-right: 8px;
  }
  .help-page .head h1 {
    font-size: 38px;
  }
}

/* Task 5 Finder */
.finder-page {
  max-width: 1120px;
}
.finder-page .head {
  margin-bottom: 30px;
}
.finder {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.tabs {
  border-top: 4px solid var(--brand);
  padding-top: 8px;
}
.tabs button {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 12px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: #4b5650;
  font-weight: 700;
  text-align: start;
}
.tabs button.active {
  box-shadow: inset 4px 0 var(--accent);
  padding-left: 16px;
  color: var(--brand);
  background: #f4f7f4;
}
.panel {
  border: 0;
  border-top: 6px solid var(--brand);
  border-radius: 2px;
  background: #fff;
  padding: 36px 40px;
  box-shadow: 0 12px 32px rgba(20, 63, 53, 0.11);
}
.panel h2 {
  margin: 0 0 8px;
  color: var(--brand-strong);
  font: 400 31px var(--display-font);
}
.panel > p {
  margin: 0 0 20px;
  color: var(--muted);
  max-width: 690px;
}
.panel .field {
  max-width: 720px;
  margin: 22px 0 16px;
}
.panel .field input {
  min-height: 56px;
  border: 2px solid #66716b;
  padding: 0 16px;
  color: #171b19;
  background: #fff;
}
.panel .field input:focus {
  border-color: var(--brand);
}
.btn.secondary {
  background: #fff;
  color: var(--brand);
  border-color: #8d9992;
}
.finder-result {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #bdc7c1;
}
.sample-disclosure {
  margin: 12px 0 0 !important;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--muted) !important;
  font-size: 13px;
  font-weight: 500;
}
.finder-result h2,
.finder-empty h2,
.finder-help h2 {
  margin: 0 0 8px;
  color: var(--brand);
  font: 400 29px var(--display-font);
}
.result-context {
  color: #3f4944 !important;
  line-height: 1.6;
}
.finder-result dl {
  margin: 22px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid #c7d0cb;
}
.finder-result dl div {
  padding: 15px 18px 15px 0;
  border-bottom: 1px solid #c7d0cb;
}
.finder-result dt {
  color: #5a655f;
  font-size: 12px;
  font-weight: 700;
}
.finder-result dd {
  margin: 5px 0 0;
  color: #1e2521;
  font-weight: 700;
}
.finder-empty {
  margin-top: 28px;
  border-left: 5px solid #9d382d;
  background: #fff3ef;
  padding: 20px;
}
.finder-empty p {
  margin-bottom: 15px;
}
.sample-paper {
  display: grid;
  gap: 8px;
  max-width: 720px;
  border-top: 4px solid var(--brand);
}
.sample-paper b {
  color: var(--brand);
}
.sample-paper span {
  display: block;
}
.finder-help {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid #c7d0cb;
}
.finder-help h2 {
  font-size: 22px;
}
.finder-help p {
  margin-bottom: 12px;
}
.finder-help .btn {
  margin-top: 2px;
}
@media (max-width: 760px) {
  .finder {
    display: block;
  }
  .finder-page .head {
    margin-bottom: 20px;
  }
  .finder-page .head h1 {
    font-size: 38px;
  }
  .tabs {
    display: flex;
    width: 100%;
    margin: 0;
    padding: 0 0 7px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    border-top: 0;
    border-bottom: 1px solid #bbc5bf;
    gap: 8px;
  }
  .tabs button {
    flex: 0 0 auto;
    width: auto;
    min-height: 48px;
    padding: 10px 11px;
    border: 0;
  }
  .tabs button.active {
    box-shadow: inset 0 -4px var(--accent);
    padding-left: 11px;
    background: #f4f7f4;
  }
  .panel {
    margin-top: 18px;
    padding: 26px 20px;
  }
  .panel .field input {
    min-height: 52px;
  }
  .finder-result dl {
    grid-template-columns: 1fr;
  }
  .finder-result dl div {
    padding-right: 0;
  }
  .finder-result h2,
  .finder-empty h2 {
    font-size: 25px;
  }
  .finder-help {
    margin-top: 28px;
  }
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--body-font);
  font-weight: 400;
}

.brand,
.head h1,
.case-top h1,
.panel h2,
.band h2,
.block h2,
.help h2,
.modal h2,
.draft-form h2,
.knowledge-base h2,
.help-empty h2 {
  font-family: var(--display-font);
}

html:not([lang="en"]) .display,
html:not([lang="en"]) h1,
html:not([lang="en"]) h2 {
  font-family: var(--body-font);
  font-weight: 500;
}

[dir="rtl"] .record-value,
[dir="rtl"] [data-record-id] {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: start;
}

/* Civic shell and action-first Home */
.ui-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.masthead-main {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.top {
  display: flex;
  align-items: center;
  min-height: 72px;
  gap: 18px;
}

.brand {
  min-height: 48px;
  display: flex;
  align-items: center;
  color: var(--brand-strong);
  text-decoration: none;
}

.brand > span {
  display: grid;
}

.brand b {
  font: 400 25px var(--display-font);
}

.brand small {
  color: var(--muted);
  font: 650 11px var(--body-font);
}

.prototype-badge {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.nav {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
}

.nav button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--ink);
  font-weight: 650;
  white-space: nowrap;
}

.nav button.active {
  border-color: var(--brand);
  color: var(--brand-strong);
}

.nav button .ui-icon {
  width: 17px;
  height: 17px;
}

.tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tool-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--brand-strong);
  font-weight: 700;
}

.tool-button.icon-only {
  width: 44px;
  padding: 0;
}

.tool-button.mobile {
  display: none;
}

.back-button {
  display: none;
}

.home-button {
  display: inline-flex;
}

.page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.page-nav .btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dock {
  display: none;
}

.home-page {
  padding-top: 26px;
}

.service-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 32px;
  align-items: end;
  padding: 0 0 24px;
  border-bottom: 3px solid var(--brand);
}

.service-intro .eyebrow,
.service-intro h1,
.service-intro > p {
  grid-column: 1;
}

.service-intro h1 {
  max-width: 760px;
  margin: 0;
  color: var(--brand-strong);
  font: 400 48px/1.05 var(--display-font);
}

.service-intro > p:not(.eyebrow) {
  max-width: 680px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.service-intro .actions {
  grid-column: 2;
  grid-row: 1 / 4;
  align-self: center;
}

.service-intro .btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tasks {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--surface);
}

.task {
  min-height: 112px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 11px;
  padding: 18px 14px;
  border: 0;
  border-inline-end: 1px solid var(--line);
  background: transparent;
  text-align: start;
}

.task:last-child {
  border-inline-end: 0;
}

.task:hover {
  background: #f0eee8;
}

.task-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--brand);
  overflow: hidden;
  background: #efebe3;
}

.task-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.task b,
.assisted-entry b {
  display: block;
  color: var(--brand-strong);
  font-size: 14px;
}

.task span,
.assisted-entry span {
  display: block;
}

.task span span,
.assisted-entry span span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.assisted-entry {
  width: 100%;
  min-height: 70px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--paper);
  text-align: start;
}

.assisted-entry > .ui-icon {
  color: var(--brand);
}

.editorial-band {
  margin: 32px 0 0;
}

.editorial-band > div,
.editorial-photo {
  height: 280px;
  overflow: hidden;
  background: url("citizen-justice-hero.jpg?v=20260827q") center 46% / cover
    no-repeat;
}

.editorial-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
  display: block;
}

.editorial-band figcaption {
  padding: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.assisted-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: -8px 0 20px;
  padding: 14px 16px;
  border-left: 4px solid var(--brand);
  background: #edf3ef;
}

.assisted-notice > div {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.assisted-notice p,
.assisted-notice span {
  display: block;
  margin: 0;
}

.assisted-notice b {
  color: var(--brand-strong);
}

.assisted-notice span {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.45;
}

.bottom {
  margin-top: 20px;
}

.modal,
.menu,
.field,
.footer {
  text-align: start;
}

.close {
  inset-inline-end: 12px;
  right: auto;
}

.record-value {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: start;
}

@media (max-width: 1050px) {
  .nav button span {
    display: none;
  }
}

@media (max-width: 760px) {
  .top {
    min-height: 64px;
    gap: 8px;
  }

  .back-button {
    display: inline-flex;
    width: 44px;
    min-height: 44px;
    padding: 0;
    flex: 0 0 44px;
  }

  .back-button span,
  .home-button span {
    display: none;
  }

  .home-button {
    width: 44px;
    min-height: 44px;
    padding: 0;
    flex: 0 0 44px;
  }

  .dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 15;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: 56px;
    padding: 4px 2px calc(8px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: var(--surface);
  }

  .dock button {
    min-height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.15;
    padding: 4px 2px;
  }

  .dock button.active {
    color: var(--brand-strong);
  }

  .dock .ui-icon {
    width: 20px;
    height: 20px;
  }

  .page {
    padding-bottom: 108px;
  }

  .footer {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }

  .nav {
    display: none;
  }

  .tools {
    margin-inline-start: auto;
  }

  .tool-button.mobile {
    display: inline-flex;
  }

  .service-intro {
    display: block;
    padding-bottom: 18px;
  }

  .service-intro h1 {
    font-size: 34px;
  }

  .service-intro .actions {
    margin-top: 18px;
  }

  .service-intro .actions .btn {
    flex: 1 1 145px;
  }

  .tasks {
    grid-template-columns: 1fr 1fr;
  }

  .task {
    min-height: 90px;
    border-bottom: 1px solid var(--line);
  }

  .task:nth-child(even) {
    border-inline-end: 0;
  }

  .task:last-child {
    grid-column: 1 / -1;
    border-bottom: 0;
  }

  .assisted-notice {
    align-items: stretch;
    flex-direction: column;
  }

  .editorial-band > div,
  .editorial-photo {
    height: 160px;
  }
}

@media (max-width: 430px) {
  .brand small,
  .language-button span {
    display: none;
  }

  .brand b {
    font-size: 21px;
  }

  .tasks {
    grid-template-columns: 1fr;
  }

  .task,
  .task:nth-child(even) {
    border-inline-end: 0;
  }

  .task:last-child {
    grid-column: auto;
  }
}

.courts-page {
  --phi: 1.618;
  --phi-minor: 1fr;
  --phi-major: 1.618fr;
  --phi-8: 8px;
  --phi-13: 13px;
  --phi-21: 21px;
  --phi-34: 34px;
  --phi-55: 55px;
  max-width: none;
}

.courts-stage {
  display: grid;
  grid-template-columns: minmax(240px, var(--phi-minor)) minmax(0, var(--phi-major));
  gap: var(--phi-34);
  align-items: start;
}

.courts-guide {
  position: relative;
  padding: var(--phi-34) var(--phi-21) var(--phi-21);
  border: 1px solid var(--line);
  background: var(--surface);
}

.courts-guide:before,
.courts-panel:before,
.courts-shared:before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: var(--phi-13);
  height: var(--phi-13);
  border-top: 3px solid var(--brand-strong);
  border-left: 3px solid var(--brand-strong);
  pointer-events: none;
}

.courts-guide:after,
.courts-panel:after,
.courts-shared:after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: var(--phi-13);
  height: var(--phi-13);
  border-right: 3px solid var(--brand-strong);
  border-bottom: 3px solid var(--brand-strong);
  pointer-events: none;
}

.courts-mark {
  display: block;
  width: var(--phi-21);
  height: var(--phi-21);
  margin-bottom: var(--phi-21);
  background: var(--brand-strong);
  box-shadow: var(--phi-8) var(--phi-8) 0 var(--accent);
}

.courts-guide .kicker {
  margin-bottom: var(--phi-13);
}

.courts-guide h1 {
  margin: 0;
  max-width: 22ch;
  color: var(--brand-strong);
  font: 400 clamp(34px, 3.4vw, 55px) / 1.05 var(--display-font);
}

.courts-intro {
  margin: var(--phi-13) 0 var(--phi-21);
  color: var(--muted);
  line-height: 1.5;
}

.courts-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 0 var(--phi-21);
  border: 1px solid var(--line);
  background: #f4f1ea;
}

.courts-tabs button {
  min-height: 48px;
  padding: 8px var(--phi-13);
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.courts-tabs button.active {
  background: var(--brand-strong);
  color: #fff;
  box-shadow: none;
}

.courts-chooser {
  margin: 0;
  padding: var(--phi-13) var(--phi-13) var(--phi-13) var(--phi-21);
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  background: #f7f4ed;
  color: var(--ink);
  line-height: 1.5;
}

.courts-panel {
  position: relative;
  min-height: calc(var(--phi-55) * 4.236);
  padding: var(--phi-21);
  border: 1px solid var(--line);
  background: var(--surface);
}

.service-rows {
  display: grid;
  gap: var(--phi-13);
}

.courts-subjects {
  grid-template-columns: minmax(0, var(--phi-minor)) minmax(0, var(--phi-major));
}

.courts-subjects .service-row:first-child {
  grid-column: 1 / -1;
  grid-template-columns: 55px minmax(0, 1fr);
  min-height: 144px;
  padding: var(--phi-34);
}

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

.service-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: var(--phi-13);
  align-items: start;
  min-height: 89px;
  padding: var(--phi-21) var(--phi-13);
  border: 1px solid var(--line);
  background: #fffcf6;
}

.service-index {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--brand-strong);
  background: var(--brand-strong);
  color: #fff;
  font: 700 11px/1 var(--body-font);
  letter-spacing: 0.04em;
}

.courts-subjects .service-row:first-child .service-index {
  width: 55px;
  height: 55px;
  font-size: 16px;
}

.service-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.service-row h3 {
  margin: 0;
  font: 700 16px var(--body-font);
}

.official-link {
  color: var(--brand-strong);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  overflow-wrap: anywhere;
}

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

.service-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.official-destination {
  font-size: 12px;
}

.courts-shared {
  position: relative;
  display: grid;
  grid-template-columns: minmax(200px, var(--phi-minor)) minmax(0, var(--phi-major));
  gap: var(--phi-34);
  align-items: start;
  margin-top: var(--phi-55);
  padding: var(--phi-34) var(--phi-21);
  border: 1px solid var(--line);
  background: var(--surface);
}

.courts-shared-head h2 {
  margin: 0;
  max-width: 12ch;
  color: var(--brand-strong);
  font: 400 34px/1.1 var(--display-font);
}

body.high .courts-guide,
body.high .courts-panel,
body.high .courts-shared,
body.high .service-row,
body.high .courts-tabs,
body.high .courts-chooser {
  border-width: 2px;
}

@media (max-width: 900px) {
  .courts-stage,
  .courts-shared,
  .courts-subjects {
    grid-template-columns: 1fr;
  }

  .courts-panel {
    min-height: 0;
  }

  .courts-subjects .service-row:first-child {
    min-height: 0;
    padding: var(--phi-21);
  }
}

@media (max-width: 760px) {
  .courts-guide,
  .courts-panel,
  .courts-shared {
    padding: var(--phi-21) 14px;
  }

  .courts-guide h1 {
    font-size: 34px;
    max-width: none;
  }

  .courts-tabs button {
    width: 100%;
    min-height: 44px;
    padding: 10px 8px;
    text-align: center;
  }

  .courts-support,
  .courts-subjects {
    grid-template-columns: 1fr;
  }

  .service-row {
    min-height: 0;
  }

  .courts-shared-head h2 {
    max-width: none;
    font-size: 28px;
  }
}

/* Final visual pass: depth, ornaments, stills, light motion */
.framed {
  position: relative;
}

.framed:before,
.framed:after,
.panel:before,
.panel:after,
.draft-preview:before,
.draft-preview:after,
.home-page .band:before,
.home-page .band:after {
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
  pointer-events: none;
}

.framed:before,
.panel:before,
.draft-preview:before,
.home-page .band:before {
  top: -1px;
  left: -1px;
  border-top: 3px solid var(--brand-strong);
  border-left: 3px solid var(--brand-strong);
}

.framed:after,
.panel:after,
.draft-preview:after,
.home-page .band:after {
  right: -1px;
  bottom: -1px;
  border-right: 3px solid var(--brand-strong);
  border-bottom: 3px solid var(--brand-strong);
}

.home-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 1.618fr);
  column-gap: 34px;
  row-gap: 0;
}

.home-page .service-intro {
  display: block;
  grid-column: 1;
  grid-row: 1;
  align-self: end;
  border-bottom: 0;
  padding-bottom: 8px;
}

.home-page .service-intro .actions {
  grid-column: auto;
  grid-row: auto;
  margin-top: 18px;
}

.home-page .editorial-band {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  align-self: end;
}

.home-page .tasks,
.home-page .assisted-entry,
.home-page .bottom {
  grid-column: 1 / -1;
}

.home-page .tasks {
  margin-top: 24px;
  border-top: 3px solid var(--brand);
}

.home-page .band {
  position: relative;
  margin-top: 0;
  padding: 28px 24px 24px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.home-page .band:last-child {
  border-color: var(--line);
}

.page-still {
  width: 100%;
  margin: 0 0 21px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #efebe3;
}

.page-still img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.courts-guide .page-still {
  height: 89px;
}

.courts-guide .page-still img {
  object-position: 50% 70%;
}

.documents-page .head,
.help-page .help-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.618fr) minmax(240px, 1fr);
  gap: 28px;
  align-items: end;
}

.help-page .help-intro {
  justify-content: stretch;
}

.documents-page .page-still,
.help-still {
  min-width: 0;
  width: 100%;
  height: 168px;
  margin: 0;
}

.documents-page .page-still img,
.help-still img {
  width: 100%;
  height: 168px;
  object-fit: cover;
}

.help-still img {
  object-position: 40% 55%;
}

.documents-page .page-still img {
  object-position: 50% 40%;
}

.panel {
  position: relative;
}

.draft-preview {
  box-shadow:
    0 1px 0 #d9d4c8,
    8px 8px 0 #efeae0,
    9px 9px 0 #cbc7bd,
    0 18px 40px rgba(25, 37, 52, 0.1);
}

.doc {
  transition:
    background 0.18s ease,
    transform 0.18s ease;
}

.btn {
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

.btn:hover {
  box-shadow: 0 6px 16px rgba(23, 63, 52, 0.08);
}

.btn.primary:hover {
  background: var(--brand);
  border-color: var(--brand);
}

.btn:active {
  transform: translateY(1px);
}

/* Focused case journey */
.home-button,
.back-button {
  display: none !important;
}

.page-nav .assisted-shortcut {
  margin-inline-start: auto;
}

.case-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 18px 0 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.case-meta-grid div {
  min-width: 0;
  padding: 12px 14px;
  background: #fff;
}

.case-meta-grid dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.case-meta-grid dd {
  margin: 4px 0 0;
  color: var(--brand-strong);
  font-weight: 750;
  overflow-wrap: anywhere;
}

.next-action-block {
  margin-top: 16px;
  padding: 28px;
  border-top: 5px solid #ad4d19;
  background: #fffdf9;
}

.next-action-block > h2 {
  max-width: 760px;
  margin-bottom: 7px;
}

.action-basis {
  max-width: 760px;
  color: var(--muted);
}

.section-label {
  margin: 24px 0 10px;
  color: var(--brand-strong);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

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

.priority-card {
  display: flex;
  min-height: 230px;
  flex-direction: column;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid #a9b2ad;
  border-radius: 2px;
  background: #fff;
}

.priority-card:first-child {
  border-color: #ad4d19;
  box-shadow: inset 0 4px #ad4d19;
}

.priority-label {
  color: #853c17;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.priority-card h3 {
  margin: 12px 0 6px;
  color: var(--brand-strong);
  font: 700 18px/1.25 var(--body-font);
}

.priority-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.priority-card .btn {
  width: 100%;
  margin-top: auto;
  border: 2px solid var(--brand);
  color: var(--brand-strong);
  font-weight: 800;
}

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

.action-checklists > div {
  padding: 18px;
  border: 1px solid var(--line);
  background: #f5f7f4;
}

.action-checklists h3 {
  margin: 0 0 12px;
  color: var(--brand-strong);
  font-size: 16px;
}

.action-checklists ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.action-checklists li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  line-height: 1.4;
}

.action-checklists .ui-icon {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--brand);
}

.whatsapp-action {
  min-height: 50px;
}

.case [data-stage-panel],
.case [data-context-panel] {
  transition: opacity 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.case-stage-understand [data-stage-panel]:not([data-stage-panel="understand"]),
.case-stage-action [data-stage-panel]:not([data-stage-panel="action"]),
.case-stage-prepare [data-stage-panel]:not([data-stage-panel="prepare"]),
.case [data-context-panel] {
  opacity: 1;
  filter: none;
  border-color: #d8d5ce;
  background: #f1f0eb;
  box-shadow: none;
}

.case-stage-understand [data-stage-panel="understand"],
.case-stage-action [data-stage-panel="action"],
.case-stage-prepare [data-stage-panel="prepare"] {
  opacity: 1;
  filter: none;
  box-shadow: 0 12px 28px rgba(13, 55, 43, .11);
}

.case-stage-action .next-action-block h2,
.case-stage-action .next-action-block h3,
.case-stage-action .next-action-block p,
.case-stage-action .next-action-block li {
  color: var(--ink);
}

.case-stage-action .next-action-block .priority-label {
  color: #853c17;
}

.case-stage-action .next-action-block .btn.primary {
  color: #fff;
}

.case .block > h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 2px solid #b8c1bc;
  color: #102f27;
  font-weight: 600;
}

.heading-icon {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #9cafaa;
  background: #e8f0ec;
  color: var(--brand-strong);
}

.heading-icon .ui-icon {
  width: 20px;
  height: 20px;
}

.next-action-block > h2 {
  border-bottom-color: #d19a78;
}

.next-action-block > h2 .heading-icon {
  border-color: #ca8a65;
  background: #fff0e4;
  color: #853c17;
}

.priority-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 13px;
}

.priority-title .ui-icon {
  flex: 0 0 21px;
  width: 21px;
  height: 21px;
  color: var(--brand);
}

.priority-title h3 {
  margin: 0;
}

.action-checklists > div {
  position: relative;
  padding: 0 20px 20px;
  overflow: hidden;
  border: 1px solid #aeb9b3;
  border-top-width: 4px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(20, 48, 39, .06);
}

.action-checklists > .online-checklist {
  border-top-color: #2165a1;
}

.action-checklists > .offline-checklist {
  border-top-color: #ad4d19;
}

.action-checklists h3 {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 -20px 16px;
  padding: 14px 20px;
  border-bottom: 1px solid #d4d9d5;
  background: #edf4f8;
  color: #143b57;
  font-size: 17px;
}

.action-checklists .offline-checklist h3 {
  background: #fff1e7;
  color: #713615;
}

.action-checklists h3 > span {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid currentColor;
  background: #fff;
}

.action-checklists h3 .ui-icon {
  width: 18px;
  height: 18px;
  margin: 0;
  color: inherit;
}

.action-checklists ul {
  counter-reset: action-item;
  gap: 0;
}

.action-checklists li {
  counter-increment: action-item;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  min-height: 48px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid #e1e3df;
  color: #25342e;
}

.action-checklists li:last-child {
  border-bottom: 0;
}

.action-checklists li::before {
  content: counter(action-item);
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: #dceaf3;
  color: #143b57;
  font-size: 12px;
  font-weight: 850;
}

.action-checklists .offline-checklist li::before {
  background: #f7dfcf;
  color: #713615;
}

.action-checklists li > .ui-icon {
  display: none;
}

@media (max-width: 760px) {
  .case-meta-grid,
  .priority-grid,
  .action-checklists {
    grid-template-columns: 1fr;
  }

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

  .next-action-block {
    padding: 20px 17px;
  }

  .priority-card {
    min-height: 190px;
  }
}

.task,
.service-row,
.template-choice,
.service-link,
.suggestion {
  transition:
    background 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.task:hover,
.service-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(23, 63, 52, 0.08);
  z-index: 1;
}

.nav button {
  transition:
    border-color 0.18s ease,
    color 0.18s ease;
}

.dock button {
  transition:
    color 0.18s ease,
    transform 0.18s ease;
}

.dock button.active .ui-icon {
  transform: translateY(-1px);
}

.overlay {
  animation: fade-in 0.2s ease;
}

.modal,
.menu {
  animation: rise 0.28s ease;
}

.page {
  animation: rise 0.38s ease both;
}

.task:nth-child(1) {
  animation: rise 0.42s ease both;
  animation-delay: 0.04s;
}

.task:nth-child(2) {
  animation: rise 0.42s ease both;
  animation-delay: 0.08s;
}

.task:nth-child(3) {
  animation: rise 0.42s ease both;
  animation-delay: 0.12s;
}

.task:nth-child(4) {
  animation: rise 0.42s ease both;
  animation-delay: 0.16s;
}

.task:nth-child(5) {
  animation: rise 0.42s ease both;
  animation-delay: 0.2s;
}

.editorial-photo img {
  animation: drift 32s ease-in-out infinite alternate;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes drift {
  from {
    transform: scale(1.02);
  }
  to {
    transform: scale(1.08);
  }
}

body.high .editorial-photo img,
body.high .page-still img,
body.high .task-icon img {
  filter: grayscale(1) contrast(1.15);
}

@media (prefers-reduced-motion: reduce) {
  .page,
  .task,
  .overlay,
  .modal,
  .menu,
  .editorial-photo img {
    animation: none !important;
  }
}

@media (max-width: 900px) {
  .home-page .first-tour {
    order: 1;
  }

  .home-page {
    display: flex;
    flex-direction: column;
  }

  .home-page .service-intro {
    order: 2;
  }

  .home-page .tasks {
    order: 3;
  }

  .home-page .assisted-entry {
    order: 4;
  }

  .home-page .whatsapp-entry {
    order: 5;
  }

  .home-page .editorial-band {
    order: 6;
    margin-top: 28px;
  }

  .home-page .bottom {
    order: 7;
  }

  .documents-page .head,
  .help-page .help-intro {
    display: block;
  }

  .documents-page .page-still,
  .help-still {
    height: 110px;
    margin: 12px 0 0;
  }

  .documents-page .page-still img,
  .help-still img {
    height: 110px;
  }
}

@media (max-width: 760px) {
  .home-page .service-intro h1 {
    font-size: 34px;
  }

  .courts-guide .page-still {
    height: 72px;
  }

  .task-icon {
    width: 48px;
    height: 48px;
  }

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