:root {
  --ink: #eaf2ff;
  --muted: #9fb1cf;
  --line: #274a82;
  --paper: #05070d;
  --panel: #071f4f;
  --panel-alt: #06183d;
  --accent: #8fb4e8;
  --accent-dark: #5e83bd;
  --terminal-yellow: #c0c0c0;
  --terminal-black: #111111;
  --green: #16845b;
  --green-bg: #e5f6ef;
  --amber: #9b6400;
  --amber-bg: #fff3d6;
  --red: #b42318;
  --red-bg: #fee4e2;
  --blue: #175cd3;
  --blue-bg: #e7f0ff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  padding-bottom: 44px;
}

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

button {
  border: 0;
  cursor: pointer;
}

a {
  color: #cfe1ff;
}

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

.sidebar,
.workspace {
  min-width: 0;
}

.anime-analyst {
  position: fixed;
  top: 8px;
  right: 8px;
  z-index: 5;
  width: 72px;
  height: 72px;
  object-fit: cover;
  object-position: 50% 18%;
  border: 1px solid #365b94;
  border-radius: 2px;
  box-shadow: none;
  background: #06183d;
}

.workspace {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  background: #061225;
}

.sidebar {
  min-height: calc(100vh - 44px);
  background: #c0c0c0;
  border-right: 3px solid var(--terminal-black);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
  padding: 12px;
  min-height: 60px;
  color: var(--terminal-black);
  background: #c0c0c0;
  border-bottom: 2px solid var(--terminal-black);
}

.mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 2px;
  background: #000080;
  color: #ffffff;
  border: 2px solid var(--terminal-black);
  font-weight: 800;
}

.brand h1,
.brand p,
h1,
h2,
h3,
p {
  margin: 0;
}

.brand h1 {
  font-size: 20px;
}

.brand p,
.muted,
.small-note {
  color: var(--muted);
}

.sidebar .brand p {
  color: #171717;
}

.small-note {
  font-size: 12px;
}

.form-result {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.form-result.success {
  color: var(--green);
  font-weight: 750;
}

.form-result.error {
  color: var(--red);
  font-weight: 750;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: none;
  color: #eaf2ff;
}

.compact {
  padding: 14px;
  margin-bottom: 0;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-head h2 {
  font-size: 15px;
}

.stack {
  display: grid;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  color: #d6e6ff;
  font-size: 13px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #4b6388;
  border-radius: 1px;
  padding: 10px 11px;
  background: #e8eef7;
  color: #050b19;
}

textarea {
  resize: vertical;
}

.primary,
.secondary,
.ghost {
  min-height: 38px;
  border-radius: 1px;
  padding: 9px 12px;
  font-weight: 750;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.primary {
  background: #173b78;
  color: #f4f8ff;
  border: 1px solid #6f8fc0;
}

.primary:hover {
  background: #0d2a5b;
}

.secondary {
  background: #bdbdbd;
  color: #050505;
  border: 1px solid #f6f6f6;
}

.ghost {
  background: transparent;
  color: #d6e6ff;
}

.queue-panel {
  max-height: calc(100vh - 106px);
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: #c0c0c0;
}

.sidebar .panel-head {
  padding: 10px 12px;
  margin: 0;
  color: var(--terminal-black);
  border-bottom: 2px solid var(--terminal-black);
}

.sidebar .ghost {
  color: var(--terminal-black);
}

.sidebar .compact {
  padding: 0;
}

.case-list,
.inbox-list,
.checklist,
.timeline,
.evidence-graph {
  display: grid;
  gap: 8px;
}

.sidebar .case-list {
  gap: 0;
}

.case-row-wrap {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: stretch;
  background: #c0c0c0;
  border: 0;
  border-bottom: 2px solid var(--terminal-black);
  border-radius: 0;
  color: var(--terminal-black);
}

.case-row-wrap.active {
  border-left: 6px solid var(--terminal-black);
  background: #000080;
  color: #ffffff;
}

.case-row {
  display: grid;
  min-width: 0;
  gap: 6px;
  padding: 12px;
  text-align: left;
  color: inherit;
  background: transparent;
}

.case-row-title {
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-row-meta {
  color: #151515;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-row-wrap.active .case-row-meta {
  color: #dce7ff;
}

.case-row-wrap.agent-working {
  box-shadow: inset 3px 0 0 #00d1ff;
}

.case-row-loading {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  padding: 3px 6px;
  border: 1px solid #111;
  color: #001528;
  background: #d7edf8;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.case-row-wrap.active .case-row-loading {
  border-color: #b8d5ff;
  color: #eaf6ff;
  background: #003a7c;
}

.case-delete-button {
  align-self: stretch;
  min-width: 42px;
  padding: 0 6px;
  border-left: 2px solid #111;
  color: #ffffff;
  background: #7c1111;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.case-delete-button:hover {
  color: #ffffff;
  background: #b00020;
}

.queue-new-case-button {
  width: calc(100% - 12px);
  margin: 8px 6px 10px;
  padding: 8px 10px;
  border: 1px solid #4f4f4f;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  border-right-color: #333333;
  border-bottom-color: #333333;
  border-radius: 0;
  color: #050505;
  background: #d4d4d4;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
  font-size: 12px;
  font-weight: 900;
  text-align: left;
}

.queue-new-case-button:hover {
  background: #e1e1e1;
}

.queue-new-case-button:active {
  border-top-color: #333333;
  border-left-color: #333333;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35);
  transform: translate(1px, 1px);
}

.topbar,
.case-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  min-height: 74px;
  background: #071f4f;
}

.topbar h2 {
  font-size: 24px;
}

.top-actions,
.case-actions,
.portal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.eyebrow {
  color: #9fb1cf;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar .eyebrow {
  color: var(--terminal-black);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 16px;
  align-items: stretch;
}

.empty-workspace {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 36px;
  background: #071f4f;
}

.empty-workspace h3 {
  max-width: 720px;
  font-size: 30px;
  line-height: 1.16;
}

.empty-workspace p {
  max-width: 760px;
  color: #b9cbed;
  line-height: 1.55;
}

.hero-copy {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 44px;
  border-radius: 2px;
  color: white;
  background:
    linear-gradient(90deg, rgba(11, 22, 44, 0.86), rgba(11, 22, 44, 0.58)),
    url("https://images.unsplash.com/photo-1450101499163-c8848c66ca85?auto=format&fit=crop&w=1500&q=80");
  background-size: cover;
  background-position: center;
}

.hero-copy .eyebrow {
  color: #b9d4ff;
}

.hero-copy h3 {
  max-width: 760px;
  font-size: 34px;
  line-height: 1.08;
}

.hero-copy p {
  max-width: 700px;
  color: #e6edf8;
  line-height: 1.6;
}

.hero-copy .primary {
  width: fit-content;
}

.process-strip {
  display: grid;
  gap: 10px;
}

.process-strip div {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: white;
  font-weight: 800;
}

.process-strip span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 2px;
  background: var(--ink);
  color: white;
  font-size: 13px;
  flex: 0 0 auto;
}

.case-view {
  display: grid;
  gap: 16px;
}

.case-header,
.topbar {
  padding: 18px;
}

.case-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-start;
  overflow: hidden;
}

.case-header > div {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  flex: 1 1 auto;
}

.case-header > a {
  flex: 0 0 auto;
  white-space: nowrap;
}

.case-title {
  font-size: 26px;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(360px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.single-grid {
  display: grid;
  gap: 16px;
}

.lower {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr);
}

.checklist-panel,
.main-grid > .panel,
.single-grid > .panel,
.recommendation-panel,
.inbox-panel {
  padding: 16px;
}

.company-info-strip {
  display: block;
  grid-column: 1 / -1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  contain: inline-size;
  border: 1px solid rgba(153, 190, 255, 0.42);
  border-radius: 2px;
  background: #082a63;
}

.company-info-strip table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: white;
}

.company-info-strip th,
.company-info-strip td {
  padding: 10px 12px;
  border-right: 1px solid rgba(185, 212, 255, 0.22);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.company-info-strip th {
  color: #9fbff6;
  background: #061f4d;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  white-space: nowrap;
}

.company-info-strip td {
  color: #eef5ff;
  line-height: 1.35;
  white-space: nowrap;
}

.company-info-strip th:nth-child(1),
.company-info-strip td:nth-child(1),
.company-info-strip th:nth-child(2),
.company-info-strip td:nth-child(2),
.company-info-strip th:nth-child(3),
.company-info-strip td:nth-child(3) {
  width: 1%;
}

.company-info-strip th:nth-child(4),
.company-info-strip td:nth-child(4) {
  min-width: 120px;
}

.company-info-strip th:nth-child(5),
.company-info-strip td:nth-child(5) {
  min-width: 360px;
  max-width: 560px;
  white-space: normal;
}

.company-info-strip th:nth-child(6),
.company-info-strip td:nth-child(6) {
  min-width: 260px;
  max-width: 420px;
  white-space: normal;
}

.company-info-strip .muted,
.company-info-strip .empty-line {
  color: #cfe1ff;
}

.checklist {
  overflow-x: auto;
}

.checklist-header,
.check-summary {
  display: grid;
  grid-template-columns: 22px minmax(210px, 1fr) 72px minmax(180px, 260px) 64px 148px;
  align-items: center;
  column-gap: 10px;
  min-width: 780px;
}

.checklist-header {
  padding: 7px 10px;
  border: 1px solid rgba(153, 190, 255, 0.42);
  border-radius: 2px;
  color: #9fbff6;
  background: #061f4d;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.check-item {
  display: block;
  min-width: 780px;
  padding: 0;
  border: 1px solid rgba(153, 190, 255, 0.42);
  border-radius: 2px;
  background: #082a63;
  color: white;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.check-summary {
  min-height: 42px;
  padding: 8px 10px;
  cursor: pointer;
  list-style: none;
}

.check-summary::-webkit-details-marker {
  display: none;
}

.check-summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid #9fbff6;
  color: #cfe1ff;
  background: #061f4d;
  font-weight: 900;
  grid-column: 1;
  grid-row: 1;
}

.check-item[open] .check-summary::before {
  content: "-";
}

.check-name {
  min-width: 0;
  color: white;
  font-size: 13px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  grid-column: 2;
  grid-row: 1;
}

.check-cell {
  min-width: 0;
  color: #eaf2ff;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.check-answer,
.check-risk {
  color: white;
}

.check-risk {
  text-align: right;
}

.check-summary .status-chip {
  justify-self: end;
  max-width: 148px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.check-detail {
  display: grid;
  gap: 10px;
  padding: 10px;
  border-top: 1px solid rgba(185, 212, 255, 0.22);
  background: #061f4d;
}

.check-question,
.reason {
  color: #d7e6ff;
  font-size: 13px;
  line-height: 1.45;
}

.check-foot {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: #b9d4ff;
  font-size: 12px;
}

.evidence-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ev-tag {
  border-radius: 1px;
  padding: 4px 8px;
  color: #062257;
  background: #cfe1ff;
  font-size: 12px;
  font-weight: 750;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border-radius: 1px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 850;
  text-transform: capitalize;
  white-space: nowrap;
}

.status-chip.good {
  color: var(--green);
  background: var(--green-bg);
}

.status-chip.amber {
  color: var(--amber);
  background: var(--amber-bg);
}

.status-chip.red {
  color: var(--red);
  background: var(--red-bg);
}

.status-chip.blue {
  color: var(--blue);
  background: var(--blue-bg);
}

.status-chip.neutral {
  color: #475467;
  background: #eef2f7;
}

.recommendation {
  padding: 14px;
  border-radius: 2px;
  color: #eaf2ff;
  background: #06183d;
  border: 1px solid #274a82;
  line-height: 1.5;
  font-weight: 750;
}

.recommendation:empty,
.memo:empty {
  display: none;
}

.memo {
  margin-top: 12px;
  padding: 14px;
  min-height: 120px;
  border-radius: 2px;
  background: #06183d;
  color: #d7e6ff;
  border: 1px solid #274a82;
  line-height: 1.55;
  white-space: pre-wrap;
}

.chat-box {
  margin-top: 16px;
}

.chat-log {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.chat-q,
.chat-a {
  padding: 10px 12px;
  border-radius: 2px;
  line-height: 1.45;
}

.chat-q {
  justify-self: end;
  color: white;
  background: var(--accent);
}

.chat-a {
  background: #f1f4f8;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 10px;
}

.evidence-node {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 13px;
  border: 1px solid #274a82;
  border-radius: 2px;
  background: #071f4f;
}

.evidence-node h3 {
  margin-top: 8px;
  font-size: 15px;
}

.evidence-node p {
  margin-top: 6px;
  color: #d7e6ff;
  line-height: 1.45;
  font-size: 13px;
}

.evidence-node small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
}

.timeline-entry {
  padding: 12px;
  border-left: 3px solid #8fb4e8;
  background: #071f4f;
  border-radius: 0 2px 2px 0;
}

.timeline-loading {
  border-left-color: #00d1ff;
  background: #062b64;
  box-shadow: inset 0 0 0 1px rgba(0, 209, 255, 0.25);
}

.timeline-loading strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.timeline-entry span {
  color: var(--muted);
  font-size: 12px;
}

.timeline-entry strong {
  display: block;
  margin: 4px 0;
}

.message {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #071f4f;
}

.message-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.message pre {
  max-height: 170px;
  overflow: auto;
  margin: 0;
  padding: 10px;
  border: 1px solid #343434;
  border-radius: 1px;
  background: #050505;
  color: #f4f4f4;
  white-space: pre-wrap;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
}

.portal-link {
  display: inline-flex;
  width: fit-content;
  border-radius: 1px;
  padding: 8px 10px;
  color: #050505;
  background: var(--accent);
  text-decoration: none;
  font-weight: 750;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.68);
}

.modal-window {
  width: min(460px, 100%);
  padding: 0;
  border-color: #6d7f9e;
  background: #071f4f;
}

.modal-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  padding: 4px 6px 4px 10px;
  color: #050505;
  background: #b8b8b8;
  border-bottom: 1px solid #4c4c4c;
}

.modal-titlebar h2 {
  font-size: 13px;
}

.modal-body {
  padding: 14px;
}

.warning-window {
  border-color: #7c1111;
}

.warning-copy {
  color: #f4f4f4;
  line-height: 1.45;
}

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.danger-button {
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid #d97777;
  border-radius: 1px;
  color: white;
  background: #7c1111;
  font-weight: 800;
}

.danger-button:hover {
  background: #a01818;
}

.window-button,
.taskbar-button {
  border: 1px solid #5f5f5f;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  border-right-color: #4a4a4a;
  border-bottom-color: #4a4a4a;
  border-radius: 0;
  color: #050505;
  background: #c6c6c6;
  font-size: 12px;
  font-weight: 700;
}

.window-button {
  min-width: 24px;
  min-height: 22px;
  padding: 1px 6px;
}

.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 8px;
  height: 44px;
  padding: 4px;
  color: #050505;
  background: #b8b8b8;
  border-top: 1px solid #ffffff;
  box-shadow: inset 0 1px 0 #e7e7e7;
}

.taskbar-status,
.taskbar-actions {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.taskbar-status {
  flex: 1 1 auto;
  overflow: hidden;
}

.taskbar-actions {
  flex: 0 0 auto;
  gap: 4px;
}

.taskbar-cell {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 4px 8px;
  border: 1px solid #808080;
  border-top-color: #6f6f6f;
  border-left-color: #6f6f6f;
  border-right-color: #eeeeee;
  border-bottom-color: #eeeeee;
  background: #a9a9a9;
  font-size: 12px;
  white-space: nowrap;
}

.taskbar-cell span {
  color: #242424;
  font-weight: 700;
}

.taskbar-cell strong,
.taskbar-cell small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.risk-cell {
  min-width: 160px;
}

.warning-cell {
  min-width: 130px;
  background: #d6d0b0;
}

.warning-sign {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid #111;
  color: #111;
  background: #c87500;
  font-weight: 900;
  line-height: 1;
}

.taskbar-cell.agent-working {
  border-top-color: #101010;
  border-left-color: #101010;
  border-right-color: #f3f3f3;
  border-bottom-color: #f3f3f3;
  background: #9cc4dc;
  animation: agent-cell-pulse 1.2s steps(2, end) infinite;
}

.loading-text::after,
.loading-dots::after {
  content: "...";
  display: inline-block;
  overflow: hidden;
  width: 0;
  text-align: left;
  vertical-align: bottom;
  animation: loading-dots 1.1s steps(4, end) infinite;
}

.mini-spinner {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-turn 0.75s linear infinite;
}

@keyframes loading-dots {
  0% {
    width: 0;
  }
  25% {
    width: 0.35em;
  }
  50% {
    width: 0.7em;
  }
  75%,
  100% {
    width: 1.05em;
  }
}

@keyframes spinner-turn {
  to {
    transform: rotate(360deg);
  }
}

@keyframes agent-cell-pulse {
  0%,
  100% {
    background: #9cc4dc;
  }
  50% {
    background: #c2deec;
  }
}

.risk-light {
  display: inline-block;
  width: 11px;
  height: 11px;
  border: 1px solid #111;
  background: #6d6d6d;
}

.risk-light.good {
  background: #18a05e;
}

.risk-light.amber {
  background: #c87500;
}

.risk-light.red {
  background: #d12d2d;
}

.taskbar-button {
  min-width: 68px;
  padding: 4px 10px;
}

.taskbar-button:active,
.window-button:active {
  border-top-color: #4a4a4a;
  border-left-color: #4a4a4a;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
}

.taskbar-button.dormant {
  color: #555;
}

.hidden {
  display: none !important;
}

.empty-line {
  padding: 12px;
}

.portal-body {
  background: #050505;
  color: #f4f4f4;
}

.portal-shell {
  width: min(1020px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
}

.portal-intro {
  margin-bottom: 18px;
}

.portal-intro h1 {
  margin-top: 6px;
  font-size: 34px;
}

.portal-intro p:last-child {
  margin-top: 8px;
  color: #c9d3e6;
}

.portal-form {
  padding: 20px;
}

.mail-shell {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
}

.mail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.mail-header h1 {
  margin-top: 6px;
  font-size: 34px;
}

.mail-header p:last-child {
  margin-top: 8px;
  color: #f4f4f4;
  max-width: 720px;
}

.inbox-page-panel {
  padding: 18px;
  background: #050505;
  border-color: #3a3a3a;
  color: #f4f4f4;
}

.mail-header .eyebrow,
.portal-intro .eyebrow {
  color: #b8c7df;
}

.mail-message {
  background: #050505;
  border-color: #3a3a3a;
  color: #f4f4f4;
}

.mail-message .muted,
.inbox-page-panel .muted {
  color: #f4f4f4;
}

.mail-message pre {
  max-height: none;
}

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

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

.consent-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 16px 0;
  line-height: 1.45;
}

.consent-line input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

@media (max-width: 940px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    grid-column: 1 / -1;
  }

  .anime-analyst {
    position: static;
    float: right;
    margin: 10px 10px 0 0;
    width: 82px;
    height: 82px;
  }
}

@media (max-width: 840px) {
  .app-shell,
  .hero,
  .main-grid,
  .lower,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    padding: 0;
  }

  .hero-copy {
    min-height: 320px;
    padding: 26px;
  }

  .hero-copy h3,
  .portal-intro h1 {
    font-size: 28px;
  }

  .topbar,
  .case-header,
  .mail-header {
    align-items: stretch;
  }

  .check-summary {
    grid-template-columns: 22px minmax(210px, 1fr) 72px minmax(180px, 260px) 64px 148px;
    align-items: center;
  }

  .check-name,
  .check-summary::before {
    grid-row: 1;
  }

  .check-name {
    grid-column: 2;
  }
}
