@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-latin-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/ibm-plex-mono-latin-500.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  --bene-blue: #0f7ec1;
  --bene-blue-dark: #075b91;
  --bene-blue-pale: #eef7fc;
  --bene-magenta: #df1682;
  --ink: #17324b;
  --muted: #576b80;
  --line: #d7e1e8;
  --line-strong: #bdcbd6;
  --canvas: #f3f6f8;
  --surface: #ffffff;
  --green: #19744f;
  --green-pale: #eaf6ef;
  --red: #ae2b34;
  --red-pale: #fff0f1;
  --font-numbers: "IBM Plex Mono", ui-monospace, monospace;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--bene-blue-dark); }

.skip {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
}
.skip:focus { top: 12px; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 220px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  padding: 0 18px 22px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.brand {
  min-height: 112px;
  padding: 23px 6px 17px;
  border-bottom: 1px solid var(--line);
}
.brand img {
  display: block;
  width: 122px;
  height: auto;
  margin-bottom: 12px;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 14px; font-weight: 700; }
.brand small { margin-top: 1px; color: var(--muted); font-size: 12px; }

.sidebar nav { margin-top: 24px; }
.sidebar nav::before {
  display: block;
  margin: 0 10px 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  content: "OPERATIVITÀ";
}
.sidebar nav a {
  position: relative;
  display: block;
  margin: 2px 0;
  padding: 11px 12px 11px 15px;
  border-radius: 6px;
  color: #3f5870;
  font-weight: 600;
  text-decoration: none;
}
.sidebar nav a:hover { background: #f4f8fb; }
.sidebar nav a.active {
  background: var(--bene-blue-pale);
  color: var(--bene-blue-dark);
}
.sidebar nav a.active::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--bene-magenta);
  content: "";
}

.side-note {
  margin-top: auto;
  padding: 12px;
  border-left: 3px solid var(--bene-blue);
  background: #f3f8fb;
}
.side-note strong, .side-note span { display: block; }
.side-note strong { font-size: 12px; }
.side-note span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.version { margin: 15px 4px 0; color: var(--muted); font-size: 11px; }

.workspace { min-height: 100vh; margin-left: 220px; }
.topbar {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
#breadcrumb { color: var(--muted); font-size: 12px; }
.identity { display: flex; align-items: center; gap: 10px; }
.identity strong, .identity span { display: block; }
.identity strong { font-size: 13px; }
.identity span { color: var(--muted); font-size: 11px; }
.avatar {
  width: 34px;
  height: 34px;
  display: grid !important;
  place-items: center;
  border-radius: 50%;
  background: var(--bene-blue-pale);
  color: var(--bene-blue-dark) !important;
  font-size: 11px !important;
  font-weight: 800;
}

main { width: min(1240px, calc(100% - 56px)); margin: 0 auto; padding: 26px 0 60px; }
.page-title { display: flex; justify-content: space-between; align-items: end; margin-bottom: 22px; }
.page-title h1 { margin: 0; font-size: 29px; line-height: 1.15; letter-spacing: -.025em; }
.page-title p { margin: 6px 0 0; color: var(--muted); }

.list-section,
.case-header,
.work-panel,
.disclosure,
.case-file {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 9px;
}
.list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.list-heading h2 { margin: 0; font-size: 18px; }
.list-heading p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.as-of { color: var(--muted); font-size: 12px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fa;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.data-table td { padding: 17px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfdfe; }
.data-table td strong, .data-table td span { display: block; }
.data-table td span { margin-top: 2px; color: var(--muted); font-size: 12px; }
.row-link { white-space: nowrap; font-weight: 700; text-decoration: none; }
.debtor-link { display: block; font-weight: 700; text-decoration: none; }
.data-table td .status-tag { display: inline-block; margin-top: 5px; font-size: 10px; white-space: nowrap; }
.data-table td { font-size: 13px; }
.data-table td:first-child { white-space: nowrap; }
.queue-summary { display: flex; align-items: center; gap: 24px; margin: -4px 0 25px; color: var(--muted); font-size: 14px; }
.queue-summary strong { margin-right: 5px; color: var(--ink); font-size: 20px; }
.queue-summary > span:first-child strong { color: var(--red); }
.queue-summary a { margin-left: auto; font-size: 13px; text-decoration: none; font-weight: 700; }
.list-tabs { display: flex; gap: 24px; }
.list-tabs button { padding: 0 0 6px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); cursor: pointer; font-weight: 700; font-size: 14px; }
.list-tabs button[aria-pressed="true"] { border-color: var(--bene-blue); color: var(--bene-blue-dark); }
.list-tabs span { padding: 2px 6px; margin-left: 5px; background: #eef2f5; font-size: 12px; }
.search-form { display: flex; gap: 8px; }
.search-form input { width: 240px; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 3px; }
.empty-state { padding: 36px 22px; color: var(--muted); }
.dataset-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.text-button { padding: 6px 2px; border: 0; background: none; color: #41586c; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.text-button:hover { color: var(--bene-blue-dark); text-decoration: underline; text-underline-offset: 4px; }
.button.danger { border-color: var(--red); color: var(--red); background: #fff; }
:focus-visible { outline: 2px solid #526a7e; outline-offset: 3px; }

.back-link { display: inline-block; margin: 0 0 12px; font-size: 13px; font-weight: 650; text-decoration: none; }
.case-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.case-toolbar .back-link { margin: 0; }
.direct-link { display: inline-flex; align-items: center; gap: 18px; text-decoration: none; }
.case-header {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto;
  gap: 30px;
  align-items: center;
  padding: 24px 26px;
  box-shadow: 0 1px 2px rgba(23, 50, 75, .025);
}
.case-code { color: var(--muted); font-size: 11px; font-weight: 550; letter-spacing: .025em; }
.case-header h1 { margin: 5px 0 0; font-size: 30px; line-height: 1.15; font-weight: 650; letter-spacing: -.035em; }
.case-header p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.case-amounts { display: flex; align-items: end; gap: 24px; margin: 0; }
.case-amounts > div { min-width: 94px; }
.case-amounts dt { min-height: 32px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.case-amounts dt small { display: block; font-size: 10px; }
.case-amounts dd { margin: 5px 0 0; min-height: 43px; display: flex; align-items: baseline; color: #415367; font-family: var(--font-numbers); font-variant-numeric: tabular-nums lining-nums; font-size: 21px; font-weight: 400; letter-spacing: -.06em; line-height: 43px; white-space: nowrap; }
.case-amounts .residual { padding-left: 23px; border-left: 1px solid var(--line); }
.case-amounts .residual dd { color: var(--ink); font-size: 32px; font-weight: 500; }
.money-decimal { font-size: .72em; letter-spacing: -.025em; }
.money-currency { margin-left: 4px; color: var(--muted); font-size: .65em; letter-spacing: 0; }

.button {
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  transition: background .15s, border-color .15s;
}
.button.primary { border-color: var(--bene-magenta); background: #f2f5f7; color: var(--ink); box-shadow: none; }
.button.primary:hover { border-color: var(--bene-magenta); background: #fff5fa; }
.button.primary.action-emphasis { padding: 9px 14px; border-color: var(--bene-magenta); background: #f2f5f7; color: var(--ink); font-size: 14px; font-weight: 600; box-shadow: none; }
.button.primary.action-emphasis:hover { background: #fff5fa; border-color: var(--bene-magenta); }
.button.primary span[aria-hidden] { margin-left: 8px; }
.button.secondary { border-color: var(--line-strong); background: #fff; color: var(--ink); }
.button.secondary:hover { border-color: #8798a8; background: #f8fafb; }

.case-layout {
  display: grid;
  grid-template-columns: 222px minmax(0, 1fr);
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}
.process-rail { padding: 6px 8px 8px 2px; }
.rail-heading { padding: 3px 0 16px; border-bottom: 1px solid var(--line); }
.section-label { color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .075em; }
.rail-heading h2 { margin: 5px 0 0; font-size: 14px; font-weight: 650; }
.process-rail ol { margin: 0; padding: 17px 0 0; list-style: none; }
.process-rail li {
  position: relative;
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr) 20px;
  gap: 8px;
  min-height: 62px;
}
.process-rail li:not(:last-child)::before {
  position: absolute;
  top: 23px;
  bottom: -2px;
  left: 10px;
  width: 1px;
  background: var(--line);
  content: "";
}
.process-rail li.done:not(:last-child)::before { background: #a5c4b5; }
.rail-marker {
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid #a6b5c1;
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.done .rail-marker { border-color: #a7c9b8; background: var(--green-pale); color: var(--green); }
.current .rail-marker { border: 2px solid var(--bene-blue); color: transparent; box-shadow: 0 0 0 3px #e5f1f9; }
.current .rail-marker::after { width: 8px; height: 8px; border-radius: 50%; background: var(--bene-blue); content: ""; }
.process-rail li > div:not(.explanation-bubble) { padding-top: 1px; }
.process-rail li strong, .process-rail li time { display: block; }
.process-rail li strong { font-size: 13px; font-weight: 550; line-height: 1.4; }
.process-rail li.current strong { color: var(--bene-blue-dark); font-weight: 700; }
.process-rail li time { margin-top: 3px; color: var(--muted); font-size: 12px; }
.rail-link { display: block; width: 100%; padding: 1px 0 8px; border: 0; background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.rail-link:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.rail-link:hover { color: var(--bene-blue-dark); }
.process-rail .future strong, .process-rail .future time { color: #576b80; }
.skipped strong, .skipped time { color: var(--muted); }
.skipped .rail-marker { border-color: transparent; background: #e8edf1; }

.explanation { position: relative; align-self: start; }
.explanation summary {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  list-style: none;
}
.explanation summary::-webkit-details-marker { display: none; }
.explanation-bubble {
  position: absolute;
  top: -8px;
  left: 34px;
  z-index: 10;
  width: 280px;
  padding: 13px 15px;
  border: 1px solid #92c5aa;
  border-radius: 7px;
  background: var(--green-pale);
  box-shadow: 0 7px 20px rgba(20, 60, 43, .15);
  color: #174d38;
}
.explanation-bubble::before {
  position: absolute;
  top: 12px;
  left: -7px;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  border: solid #92c5aa;
  border-width: 0 0 1px 1px;
  background: var(--green-pale);
  content: "";
}
.explanation-bubble strong, .explanation-bubble span { display: block; }
.explanation-bubble strong { font-size: 12px; }
.explanation-bubble span { margin-top: 4px; font-size: 12px; line-height: 1.45; }

.case-work { min-width: 0; }
.work-panel { padding: 23px 25px 21px; box-shadow: 0 1px 3px rgba(23, 50, 75, .025); }
.work-panel-head { display: flex; align-items: center; justify-content: space-between; }
.work-panel h2 { margin: 16px 0 6px; font-size: 24px; font-weight: 600; line-height: 1.2; letter-spacing: -.03em; }
.work-panel > p { max-width: 710px; margin: 0; color: var(--muted); font-size: 13px; }
.status-tag {
  padding: 3px 7px;
  border: 1px solid #dce4e9;
  border-radius: 4px;
  background: #f4f7f9;
  color: #50677b;
  font-size: 11px;
  font-weight: 550;
}
.status-tag.overdue { border-color: #edc6c9; background: var(--red-pale); color: var(--red); }
.status-tag.complete { border-color: #bfd9cb; background: var(--green-pale); color: var(--green); }
.activity-data {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1.3fr;
  gap: 18px;
  margin: 22px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}
.activity-data dt { color: var(--muted); font-size: 11px; }
.activity-data dd { display: flex; align-items: center; gap: 6px; margin: 5px 0 0; font-size: 12px; font-weight: 550; }
.activity-data .activity-due dd { font-size: 17px; letter-spacing: -.035em; font-weight: 600; line-height: 1.25; }
.activity-data .explanation { flex: 0 0 auto; }
.activity-data .explanation-bubble, .channel-status .explanation-bubble { left: auto; right: 28px; top: 0; }
.activity-data .explanation-bubble::before, .channel-status .explanation-bubble::before { left: auto; right: -7px; border-width: 1px 1px 0 0; }
.action-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; margin-top: 20px; }

.contact-strip { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 4px; padding: 18px 2px 19px; }
.contact-strip p { margin: 3px 0 0; font-size: 13px; color: #415367; }
.contact-strip .button { flex-shrink: 0; }
.latest-communication { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 22px; border-bottom: 1px solid var(--line); }
.latest-communication p { margin: 4px 0 0; font-size: 13px; font-weight: 550; }
.latest-communication p span { display: block; margin-top: 3px; font-size: 11px; font-weight: 400; color: var(--muted); }
.case-tabs { display: flex; gap: 30px; padding: 0 2px; margin: 8px 0 24px; border-bottom: 1px solid var(--line-strong); }
.case-tabs button { display: flex; align-items: center; gap: 6px; padding: 14px 0 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 13px; font-weight: 550; cursor: pointer; }
.case-tabs button:hover { color: var(--ink); }
.case-tabs button[aria-selected="true"] { border-bottom-color: var(--bene-blue); color: var(--ink); font-weight: 650; }
.case-identifiers { display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: 11px; }
.case-identifiers strong { display: block; margin-top: 2px; color: var(--ink); font-size: 12px; font-weight: 600; }
.case-identifiers .missing-reference { color: #895c28; }
.practice-panel .case-layout { margin-top: 0; }
.practice-panel:not(#activity) { padding: 25px 30px; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 24px; }
.section-heading h2 { font-size: 19px; margin: 0; }
.section-heading > span { color: var(--muted); font-size: 12px; }
.timeline-event { display: grid; grid-template-columns: 140px 1fr; gap: 22px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.timeline-event:last-child { border-bottom: 0; }
.timeline-date { padding-top: 3px; font-size: 13px; }
.timeline-date span { display: block; margin-top: 5px; font-size: 12px; color: var(--muted); }
.event-title { padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; }
.event-title:hover { text-decoration: underline; }
.event-title > span { margin-left: 8px; color: var(--muted); }
.timeline-content p { margin: 5px 0 10px; font-size: 13px; color: var(--muted); }
.event-attachments { display: flex; flex-wrap: wrap; gap: 8px; }
.attachment-link { border: 1px solid var(--line); border-radius: 5px; padding: 6px 10px; background: #f8fafb; color: var(--ink); font-size: 12px; cursor: pointer; }
.attachment-link:hover { border-color: var(--line-strong); background: #edf2f5; }
.attachment-link span { color: var(--muted); }
.unlinked-documents { margin-top: 25px; padding-top: 18px; border-top: 1px solid var(--line); }
.unlinked-documents h3 { font-size: 14px; }
.responsibility { font-size: 13px !important; color: var(--ink) !important; margin: 18px 0 0 !important; }
.postal-status { padding: 22px 25px; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.postal-status header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 12px; }
.postal-status h2 { margin: 0; font-size: 16px; width: 100%; }
.postal-status header > span { font-size: 12px; color: var(--muted); }
.postal-status [data-postal] { display: grid; grid-template-columns: 130px 1fr; gap: 5px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.postal-status [data-postal] > span { color: var(--muted); }
.postal-status [data-postal] > strong { font-weight: 550; }
.postal-status [data-postal] > button, .postal-status [data-postal] > small { grid-column: 2; justify-self: start; padding: 0; font-size: 12px; }
.postal-status footer { padding-top: 15px; font-size: 12px; color: var(--muted); }
.approval-block { padding: 10px 12px; background: #fff5e8; color: #785224; font-size: 13px; }
.case-tabs button span { min-width: 18px; padding: 0 4px; border-radius: 4px; background: #eef2f5; color: var(--muted); font-size: 10px; line-height: 18px; }
.case-tabpanel { padding: 2px 22px 8px; }
.case-tabpanel .document-row strong, .case-tabpanel .monitor-list strong { font-size: 13px; font-weight: 550; }
.case-tabpanel .document-row span { font-size: 11px; }
.case-tabpanel .document-status { max-width: 110px; font-size: 11px; }
.event-meta { flex-shrink: 0; text-align: right; }
.channel-status { display: flex; align-items: center; gap: 10px; }
.case-work > .disclosure { background: transparent; border: 0; border-radius: 0; margin-top: 8px; }
.case-work > .disclosure > summary { padding: 15px 3px; font-size: 12px; font-weight: 550; }
.case-work > .disclosure > summary small { display: none; }

.disclosure { margin-top: 12px; }
.disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 20px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
}
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary::after { margin-left: auto; color: var(--bene-blue-dark); content: "+"; font-size: 20px; font-weight: 400; }
.disclosure[open] > summary::after { content: "−"; }
.disclosure > summary small { margin-left: auto; color: var(--muted); font-weight: 400; }
.disclosure-body { padding: 0 20px 20px; border-top: 1px solid var(--line); }
.monitor-list > div, .document-row, .workflow-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.monitor-list > div:last-child, .document-row:last-child, .workflow-list > div:last-child { border-bottom: 0; }
.monitor-list strong, .monitor-list span, .document-row strong, .document-row span, .workflow-list strong, .workflow-list span { display: block; }
.monitor-list span, .document-row span, .workflow-list span { margin-top: 2px; color: var(--muted); font-size: 12px; }
.monitor-list small, .document-status { color: var(--muted); font-size: 12px; text-align: right; }
.workflow-list > div { display: grid; grid-template-columns: 230px 1fr; align-items: start; }
.simulation-tools { margin-top: 25px; padding-top: 12px; border-top: 1px dashed var(--line-strong); color: var(--muted); font-size: 12px; }
.simulation-tools summary { cursor: pointer; }
.simulation-tools > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-top: 12px; }
.simulation-tools .button { font-size: 12px; }
.recorded-contact { padding: 16px 0; border-bottom: 1px solid var(--line); }
.recorded-contact p { margin: 5px 0; }
.recorded-contact small { color: var(--muted); }
.document-metadata { display: grid; grid-template-columns: 110px 1fr; gap: 12px; }
.document-metadata dt { color: var(--muted); }
.document-metadata dd { margin: 0; }

dialog {
  width: min(780px, calc(100vw - 34px));
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 0;
  border-radius: 4px;
  box-shadow: 0 22px 70px rgba(13, 39, 60, .28);
  color: var(--ink);
}
dialog::backdrop { background: rgba(15, 35, 52, .55); }
.dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: start;
  justify-content: space-between;
  padding: 21px 24px;
  border-top: 4px solid var(--bene-magenta);
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.dialog-head h2 { margin: 3px 0 0; font-size: 22px; }
.eyebrow { color: var(--muted); font-size: 11px; font-weight: 750; }
.icon-button { width: 34px; height: 34px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 26px; }
.dialog-content { padding: 24px; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.notice-confirmation { position: sticky; bottom: 0; padding: 14px 24px 20px; border-top: 1px solid var(--line); background: #fff; box-shadow: 0 -6px 14px #17324b08; }
.notice-confirmation .confirm-box { margin-top: 0; }
.notice-confirmation .dialog-actions { margin-top: 12px; }
.responsibility:empty { display: none; }
.notice-review { display: flex; flex-wrap: wrap; gap: 18px 32px; margin: 0 0 22px; }
.notice-review dt { color: var(--muted); font-size: 12px; }
.notice-review dd { margin: 5px 0 0; font-weight: 600; }
.notice-review .review-amount { font-family: var(--font-numbers); font-size: 19px; }
.notice-address { margin: 0 0 22px; padding: 16px; border: 1px solid var(--line); border-radius: 6px; }
.notice-address legend { padding: 0 6px; font-weight: 600; font-size: 13px; }
.notice-address .street-field { grid-column: 1 / -1; }
.notice-address .field input { min-width: 0; }
[data-letter-address] { display: block; white-space: pre-line; font-style: normal; margin-top: 6px; }
.letter h3 { margin: 0 0 16px; font-family: Inter, sans-serif; font-size: 12px; font-weight: 500; color: var(--muted); }
.letter-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; }
.choice-list { display: grid; gap: 9px; }
.choice { padding: 15px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; text-align: left; }
.choice:hover { border-color: var(--bene-blue); background: var(--bene-blue-pale); }
.choice strong, .choice span { display: block; }
.choice span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.choice.danger { border-color: #e5b7bb; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.field { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.field input, .field textarea { width: 100%; padding: 10px 11px; border: 1px solid var(--line-strong); color: var(--ink); }
.confirm-box { display: flex; align-items: start; gap: 9px; margin-top: 18px; padding: 13px; background: #f4f8fa; font-size: 13px; }
.letter { margin-top: 18px; padding: 24px; border: 1px solid var(--line); background: #fff; font-family: Georgia, serif; color: #243747; }
.letter-head { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 12px; }
.signature { margin-top: 28px; }
#dialog-error { margin-top: 12px; color: var(--red); font-size: 13px; font-weight: 700; }
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  max-width: 390px;
  padding: 12px 15px;
  transform: translateY(90px);
  opacity: 0;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .2);
  transition: .2s ease;
}
.toast.show { transform: none; opacity: 1; }

.negotiation-heading { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 17px; }
.negotiation-heading h2 { margin: 4px 0 0; font-size: 24px; font-weight: 600; letter-spacing: -.025em; }
.negotiation-heading > .explanation .explanation-bubble { left: auto; right: 30px; }
.negotiation-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(290px, 1fr); align-items: start; gap: 22px; }
.negotiation-panel { padding: 22px; background: white; border: 1px solid var(--line); border-radius: 9px; }
.negotiation-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.negotiation-panel h3 { margin: 0; font-size: 15px; font-weight: 650; }
.negotiation-panel header small { color: var(--muted); font-size: 11px; }
.offer-types { display: flex; gap: 4px; margin: 0 0 20px; padding: 4px; border: 1px solid var(--line); border-radius: 7px; background: #f4f6f8; }
.offer-types label { position: relative; flex: 1; cursor: pointer; }
.offer-types input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.offer-types span { display: block; padding: 8px 4px; border: 1px solid transparent; border-radius: 4px; text-align: center; color: var(--muted); font-size: 12px; font-weight: 550; }
.offer-types input:checked + span { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: 0 1px 2px rgba(23, 50, 75, .04); }
.offer-types input:focus-visible + span { outline: 2px solid var(--bene-blue); outline-offset: 2px; }
.ready-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(115px, 1fr)); gap: 8px; }
.plan-option { padding: 11px; border: 1px solid var(--line); border-radius: 6px; text-align: left; background: #fff; color: var(--ink); cursor: pointer; }
.plan-option[aria-pressed="true"] { border-color: #607b8f; box-shadow: inset 0 0 0 1px #607b8f; background: #f4f8fa; }
.plan-option span, .plan-option strong, .plan-option small { display: block; }
.plan-option span { font-size: 12px; }
.plan-option strong { margin: 4px 0; font-family: var(--font-numbers); font-size: 19px; font-weight: 500; letter-spacing: -.04em; }
.plan-option small { color: var(--muted); font-size: 10px; }
.custom-term { max-width: 220px; margin-top: 16px; }
.offer-amount { display: grid; grid-template-columns: 1fr auto; gap: 3px 16px; align-items: center; margin-top: 18px; padding-top: 19px; border-top: 1px solid var(--line); }
.offer-amount > span { color: var(--muted); font-size: 12px; }
.offer-amount strong { grid-column: 2; grid-row: 1 / 3; font-family: var(--font-numbers); font-size: 30px; font-weight: 500; letter-spacing: -.06em; }
.offer-amount small { font-size: 12px; }
.offer-authority { margin: 13px 0; font-size: 12px; color: #6c571a; }
.offer-authority.invalid, #negotiation-error { color: var(--red); font-size: 13px; }
.policy-limits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.policy-limits dt { color: var(--muted); font-size: 10px; }
.policy-limits dd { margin: 3px 0 0; font-size: 12px; font-weight: 550; }
.policy-reference { margin-top: 16px; padding: 12px 14px; background: #f6f8fa; border-radius: 5px; }
.policy-reference > * { display: block; }
.policy-reference span, .policy-reference small { font-size: 11px; color: var(--muted); }
.policy-reference strong { margin: 6px 0; font-family: var(--font-numbers); font-weight: 500; font-size: 18px; }
.call-record { margin-top: 18px; }
.call-record .field { margin-bottom: 15px; }
.field select { width: 100%; min-height: 40px; padding: 9px 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; color: var(--ink); }
.call-save-row { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 14px; margin-top: 16px; }
.call-save-row span { color: var(--muted); font-size: 11px; }
#negotiation-error:not(:empty) { margin-top: 12px; }
.call-assistance { position: sticky; top: 22px; }
#conversation-script ol { list-style: none; counter-reset: script; margin: 0; padding: 0; }
#conversation-script li { position: relative; padding: 0 0 22px 30px; counter-increment: script; }
#conversation-script li:last-child { padding-bottom: 0; }
#conversation-script li::before { position: absolute; left: 0; top: 0; content: counter(script, decimal-leading-zero); color: var(--muted); font-size: 11px; }
#conversation-script h4 { margin: 0 0 8px; font-size: 12px; font-weight: 650; }
#conversation-script p { margin: 0; color: #40546a; font-size: 13px; line-height: 1.65; }
.script-empty { color: var(--muted); font-size: 13px; }
.previous-call { margin-top: 18px; padding: 17px 4px; }
.previous-call h3 { font-size: 14px; margin: 6px 0; }
.previous-call p { color: var(--muted); font-size: 12px; }
.previous-call small { display: block; font-size: 11px; }
.negotiation-closed { margin-top: 24px; }
.negotiation-closed a { display: inline-block; margin-top: 18px; text-decoration: none; }
.mail-copy { white-space: pre-wrap; font: inherit; font-size: 13px; line-height: 1.7; padding-top: 18px; border-top: 1px solid var(--line); }
.mail-automation { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; color: var(--muted); font-size: 12px; }

@media (max-width: 1380px) {
  .case-layout { grid-template-columns: 204px minmax(0, 1fr); gap: 20px; }
  .case-amounts { gap: 18px; }
  .case-amounts .residual { padding-left: 18px; }
}

@media (min-width: 821px) and (max-width: 1100px) {
  .negotiation-layout { grid-template-columns: 1fr; }
  .call-assistance { position: static; grid-row: 1; }
  .case-header { grid-template-columns: 1fr; gap: 22px; }
  .case-amounts { gap: 30px; }
  .case-layout { grid-template-columns: 188px minmax(0, 1fr); gap: 16px; }
  .work-panel { padding: 20px; }
  .activity-data { grid-template-columns: 1fr 1fr; }
  .activity-data > div:last-child { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .negotiation-layout { grid-template-columns: 1fr; }
  .call-assistance { position: static; }
  .sidebar { position: static; width: 100%; min-height: auto; padding-bottom: 12px; }
  .brand { min-height: auto; }
  .sidebar nav { display: flex; margin-top: 10px; }
  .sidebar nav::before, .side-note, .version { display: none; }
  .workspace { margin-left: 0; }
  .topbar { padding: 0 18px; }
  #breadcrumb { display: none; }
  main { width: calc(100% - 28px); padding-top: 22px; }
  .case-header { grid-template-columns: 1fr; gap: 20px; }
  .case-amounts { flex-wrap: wrap; }
  .case-layout { grid-template-columns: 1fr; }
  .process-rail { padding-right: 0; }
  .activity-data { grid-template-columns: repeat(3, 1fr); }
  .explanation-bubble { left: auto; right: 32px; }
  .workflow-list > div { grid-template-columns: 1fr; }
  .list-heading { flex-wrap: wrap; gap: 16px; }
  .queue-summary { flex-wrap: wrap; }
  .queue-summary a { margin-left: 0; }
  .simulation-tools > div { flex-wrap: wrap; }
}

@media (max-width: 560px) {
  .timeline-event { grid-template-columns: 1fr; gap: 8px; }
  .timeline-date { display: flex; gap: 14px; }
  .timeline-date span { margin-top: 0; }
  .practice-panel:not(#activity) { padding: 18px; }
  .postal-status { padding: 18px; }
  .postal-status [data-postal] { grid-template-columns: 1fr; }
  .postal-status [data-postal] > button, .postal-status [data-postal] > small { grid-column: 1; }
  .negotiation-panel { padding: 18px; }
  .policy-limits { grid-template-columns: 1fr 1fr; }
  .call-save-row { flex-wrap: wrap; }
  .sidebar nav a { flex: 1; padding: 10px 8px; text-align: center; }
  .page-title h1 { font-size: 25px; }
  .case-amounts { display: grid; grid-template-columns: 1fr 1fr; }
  .case-amounts .residual { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); padding: 14px 0 0; }
  .case-amounts .residual dt { min-height: auto; }
  .case-header { padding: 20px; }
  .work-panel { padding: 20px; }
  .activity-data { grid-template-columns: 1fr 1fr; }
  .activity-data > div:last-child { grid-column: 1 / -1; }
  .contact-strip { flex-wrap: wrap; }
  .case-tabs { gap: 18px; padding: 0 16px; }
  .case-tabpanel { padding: 2px 16px 8px; }
  .document-row { flex-wrap: wrap; gap: 8px; }
  .document-row > div:first-child { flex: 1 1 100%; }
  .data-table { min-width: 670px; }
  .search-form { width: 100%; }
  .search-form input { min-width: 0; width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .disclosure > summary small { display: none; }
}
