/* Mainspring Customer Archive, in the look of themainspring.ai: cool near-white pages under a
   soft blue wash, a floating white bar, Inter throughout, navy pill buttons, bright blue links.
   The font and logo are served from this folder, so the viewer works with no internet connection. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/InterVariable.woff2") format("woff2");
}

:root {
  --paper: #f8f9fd;
  --card: #ffffff;
  --ink: #111318;
  --muted: #4f4f4f;
  --faint: #7b8394;
  --line: #dde3ef;
  --line-soft: #ebeff6;
  --accent: #006aea;          /* links, focus, highlights */
  --accent-deep: #0052b4;
  --accent-wash: #edf4ff;
  --accent-line: #bad9ff;
  --navy: #22379b;            /* main buttons and the current section */
  --navy-deep: #1a2b7c;
  --hover: #f3f7ff;
  --amber: #8a5300;
  --amber-wash: #fff4dc;
  --amber-line: #fbd98b;
  --red: #96291c;
  --red-wash: #f7e0db;
  --mark: #ffe3a3;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --radius: 12px;             /* cards and panels */
  --radius-control: 8px;      /* text boxes and menus */
  --shadow: 0 1px 2px rgba(17, 19, 24, 0.04), 0 12px 28px -18px rgba(34, 55, 155, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(60rem 30rem at 88% -8rem, #c7dcff 0%, rgba(199, 220, 255, 0) 70%),
    radial-gradient(46rem 26rem at 8% -10rem, #e2e0ff 0%, rgba(226, 224, 255, 0) 70%),
    var(--paper);
  background-repeat: no-repeat;
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
#view:focus { outline: none; }

/* Headings use Inter's display cut (the "opsz" setting), as the Mainspring site does. */
h1, h2, .brand-name, .tile-figure, .empty-title { font-family: var(--sans); font-variation-settings: "opsz" 32; }
h1, h2 { font-weight: 500; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.4rem); line-height: 1.15; }
h2 { font-size: 1.15rem; }
p { margin: 0; }

mark { background: var(--mark); color: inherit; padding: 0 1px; border-radius: 2px; }

.mono { font-family: var(--mono); font-size: 0.9em; letter-spacing: 0; }
.faint { color: var(--faint); }
.nowrap { white-space: nowrap; }
.num { text-align: right; }
.count { font-size: 0.8rem; font-weight: 500; color: var(--muted); margin-left: 0.35rem; font-variation-settings: normal; letter-spacing: -0.01em; }

/* "≈ 2016": an estimated year. Dotted underline says "hover for why". */
.approx { border-bottom: 1px dotted var(--faint); cursor: help; }
.lost { color: var(--amber); font-style: italic; font-size: 0.92em; }
.lost.block { display: block; }

/* ---------------------------------------------------------------- masthead */

.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 0.75rem 1.5rem 0;
}
.masthead-inner {
  max-width: calc(1180px - 3rem);     /* lines up with the page content below */
  margin: 0 auto;
  padding: 0.55rem 0.9rem 0.55rem 1.1rem;
  min-height: 3.2rem;                 /* same height signed out, when the bar holds only the logo */
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(17, 19, 24, 0.05), 0 14px 30px -20px rgba(34, 55, 155, 0.45);
}
.brand { display: flex; align-items: center; gap: 0.75rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-logo { display: block; height: 1.35rem; width: auto; }
.brand-name {
  padding-left: 0.75rem;
  border-left: 1px solid var(--line);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.35rem;
  white-space: nowrap;
}

.nav { display: flex; gap: 0.25rem; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.95rem;
}
.nav a:hover { color: var(--navy); background: var(--accent-wash); }
.nav a[aria-current] { color: #fff; background: var(--navy); }

.quick-search { margin-left: auto; }
.quick-search input {
  width: 15rem;
  font: inherit;
  font-size: 0.95rem;
  letter-spacing: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
}
.quick-search input::placeholder { color: var(--faint); }
.quick-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; background: #fff; }
.on-home .quick-search { visibility: hidden; }

.progress { position: absolute; top: 0; left: 0; right: 0; height: 3px; overflow: hidden; pointer-events: none; }
.is-loading .progress::after {
  content: "";
  display: block;
  height: 100%;
  width: 35%;
  background: var(--accent);
  animation: slide 0.9s ease-in-out infinite;
}
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(390%); } }

/* ---------------------------------------------------------------- page frame */

.page { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 2rem 1.5rem 3rem; }

.colophon {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem 1.5rem 2rem;
  color: var(--faint);
  font-size: 0.82rem;
  border-top: 1px solid var(--line);
  white-space: pre-wrap;
}

.page-head { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.list-count { color: var(--muted); font-size: 0.95rem; }

/* ---------------------------------------------------------------- home */

.hero { max-width: 760px; margin: 2.5rem auto 2.25rem; text-align: center; }
.hero h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.1rem); margin-bottom: 1.4rem; }
.hint { color: var(--muted); font-size: 0.92rem; margin-top: 0.85rem; }
.has-query .hero { margin: 0 auto 1.75rem; }
.has-query .hero h1, .has-query .hero .eyebrow, .has-query .hint { display: none; }
.hero .eyebrow { margin-bottom: 0.7rem; }

.search-input {
  font: inherit;
  letter-spacing: inherit;
  width: 100%;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 0.5rem 0.75rem;
}
.search-input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.search-input-large {
  font-size: 1.2rem;
  padding: 0.95rem 1.4rem;
  border-radius: 999px;
  border-color: #cfd8ea;
  box-shadow: var(--shadow);
}

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.tile {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 1.1rem 1.25rem 1.2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
a.tile:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); color: inherit; }
.tile-plain { background: transparent; border-style: dashed; }
.tile-figure { font-size: 2.1rem; font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; color: var(--navy); }
.tile-label { font-weight: 600; }
.tile-detail { color: var(--muted); font-size: 0.88rem; }

.about {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-wash);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem;
  max-width: 62rem;
}
.about h2 { font-size: 1rem; margin-bottom: 0.25rem; }

.result-group { margin-bottom: 2.25rem; }
.result-group > h2 { margin-bottom: 0.7rem; }
.more { display: inline-block; margin-top: 0.75rem; font-weight: 600; font-size: 0.95rem; }

.empty { text-align: center; color: var(--muted); padding: 3rem 1rem; }
.empty-title { font-size: 1.3rem; font-weight: 500; color: var(--ink); margin-bottom: 0.3rem; }

/* ---------------------------------------------------------------- filters */

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.7rem 0.8rem;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.filters > .search-input { flex: 1 1 16rem; min-width: 12rem; }
.filters-inline { border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; margin: 0; background: transparent; }

.field { display: flex; flex-direction: column; gap: 0.15rem; }
.field-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.field select {
  font: inherit;
  font-size: 0.93rem;
  letter-spacing: inherit;
  color: var(--ink);
  max-width: 13.5rem;
  padding: 0.42rem 0.5rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
}
.field-active select { border-color: var(--accent); background: var(--accent-wash); }

.check { display: flex; align-items: center; gap: 0.4rem; font-size: 0.93rem; padding-bottom: 0.45rem; cursor: pointer; }
.check input { accent-color: var(--navy); width: 1rem; height: 1rem; }

.scope:not(:empty) { margin-bottom: 0.9rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.35rem 0.25rem 0.75rem;
  background: var(--accent-wash);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  font-size: 0.9rem;
}
.chip button {
  border: 0;
  background: transparent;
  font-size: 1.1rem;
  line-height: 1;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  color: var(--accent-deep);
  cursor: pointer;
}
.chip button:hover { background: #cfe4ff; }

.list-body { transition: opacity 0.15s; }
.list-body.is-stale { opacity: 0.55; }

.pager { display: flex; align-items: center; justify-content: center; gap: 1.25rem; margin-top: 1.25rem; }
.pager-status { color: var(--muted); font-size: 0.93rem; }
.pager button {
  font: inherit;
  font-size: 0.93rem;
  letter-spacing: inherit;
  padding: 0.45rem 1.05rem;
  color: var(--navy);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}
.pager button:hover:not(:disabled) { border-color: var(--navy); }
.pager button:disabled { color: var(--faint); cursor: default; opacity: 0.6; }

/* ---------------------------------------------------------------- badges */

.badge {
  display: inline-block;
  padding: 0.08rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge-open { color: var(--accent-deep); background: var(--accent-wash); border-color: var(--accent-line); }
.badge-closed { color: var(--muted); background: #f0f2f7; border-color: var(--line); }
.badge-alert { color: var(--red); background: var(--red-wash); border-color: #e8bdb5; }
.badge-plain { color: var(--amber); background: var(--amber-wash); border-color: var(--amber-line); }

/* ---------------------------------------------------------------- customer table */

.table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table th.num { text-align: right; }
.table td { padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table td:first-child { min-width: 13rem; }   /* on narrow screens the table scrolls sideways instead of crushing names */
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover { background: var(--hover); }
.row-title { font-weight: 600; text-decoration: none; color: var(--ink); }
tr:hover .row-title { color: var(--accent); text-decoration: underline; }
.row-sub { display: block; color: var(--faint); font-size: 0.82rem; }

/* ---------------------------------------------------------------- case rows */

.case-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card-flush .case-list { border: 0; border-radius: 0; }
.case-row {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr) auto;
  gap: 0.2rem 1rem;
  padding: 0.8rem 1rem;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line-soft);
}
.case-row:last-child { border-bottom: 0; }
.case-row:hover { background: var(--hover); color: inherit; }
.case-number { font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0; color: var(--muted); padding-top: 0.15rem; }
.case-main { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.case-subject { font-weight: 600; overflow-wrap: anywhere; }
.case-row:hover .case-subject { color: var(--accent); }
.case-context { color: var(--muted); font-size: 0.88rem; white-space: pre-wrap; }
.case-excerpt { color: #363c4a; font-size: 0.9rem; overflow-wrap: anywhere; }
.excerpt-source { color: var(--faint); }
.case-side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.2rem; font-size: 0.86rem; color: var(--muted); white-space: nowrap; }

/* ---------------------------------------------------------------- one record */

.record-head { margin-bottom: 1.5rem; }
.crumb { display: inline-block; margin-bottom: 0.8rem; font-size: 0.93rem; text-decoration: none; }
.crumb:hover { text-decoration: underline; }
/* The small blue capitals above a title, as on the Mainspring site. */
.eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.35rem; }
.record-head h1 { overflow-wrap: anywhere; }
.record-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; margin-top: 0.7rem; color: var(--muted); font-size: 0.95rem; }

.record-body { display: grid; grid-template-columns: minmax(0, 1fr) 21.5rem; gap: 1.5rem; align-items: start; }
.record-main, .record-side { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem 1.25rem; }
.card > h2 { margin-bottom: 0.7rem; }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: baseline; gap: 0.75rem; padding: 1.1rem 1.25rem 0.4rem; }
.card-note { color: var(--muted); font-size: 0.85rem; margin-bottom: 0.7rem; }
.record-side .card > h2 { font-size: 0.75rem; font-weight: 600; font-variation-settings: normal; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.prose { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 72ch; }
.lines { white-space: pre-line; }
.footnote { color: var(--muted); font-size: 0.86rem; max-width: 72ch; padding: 0 0.25rem; }

.facts { display: grid; grid-template-columns: minmax(6.5rem, max-content) minmax(0, 1fr); gap: 0.4rem 1rem; margin: 0; font-size: 0.93rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }

.notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.note { padding: 0.95rem 0 0.95rem 1.1rem; border-left: 2px solid var(--line); margin-left: 0.2rem; position: relative; }
.note::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 1.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--accent);
}
.note-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.8rem; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.25rem; }
.note-author { font-weight: 600; color: var(--ink); }

.plain-list, .people { list-style: none; margin: 0; padding: 0; font-size: 0.93rem; }
.plain-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.3rem 0; border-bottom: 1px solid var(--line-soft); }
.plain-list li:last-child { border-bottom: 0; }
.plain-list .faint { white-space: nowrap; font-size: 0.85rem; }

.people li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 0.75rem; padding: 0.45rem 0; border-bottom: 1px solid var(--line-soft); }
.people li:last-child { border-bottom: 0; }
.person-main { overflow-wrap: anywhere; }
.person-sub { grid-column: 1; color: var(--muted); font-size: 0.84rem; white-space: pre-wrap; }
.person-cases { grid-column: 2; grid-row: 1; font-size: 0.85rem; white-space: nowrap; }
.more-people summary, .references summary { cursor: pointer; color: var(--accent); font-size: 0.9rem; padding: 0.4rem 0; }
.references { padding: 0 0.25rem; color: var(--muted); }
.references .facts { font-size: 0.85rem; margin-top: 0.4rem; }

/* ---------------------------------------------------------------- signing in, accounts, users */

[hidden] { display: none !important; }

.signed-out .nav, .signed-out .quick-search, .signed-out .account, .signed-out .colophon { display: none; }

.account { display: flex; align-items: center; gap: 0.6rem; font-size: 0.92rem; white-space: nowrap; }
.account-name { color: var(--ink); text-decoration: none; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; }
.account-name::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; margin-right: 0.45rem; border-radius: 50%; background: var(--accent); }
.account-name:hover { color: var(--accent-deep); text-decoration: underline; }
.account-out {
  font: inherit;
  letter-spacing: inherit;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  cursor: pointer;
}
.account-out:hover { color: var(--navy); border-color: var(--navy); }

.sign-in { max-width: 24rem; margin: 3.5rem auto 2rem; }
.sign-in h1 { margin-bottom: 0.4rem; }
.sign-in-lede { color: var(--muted); margin-bottom: 1.25rem; }
.sign-in-help { color: var(--muted); font-size: 0.88rem; margin-top: 1rem; }
.sign-in .card { box-shadow: var(--shadow); }
.notice { padding: 0.6rem 0.85rem; margin-bottom: 1rem; color: var(--amber); background: var(--amber-wash); border: 1px solid var(--amber-line); border-radius: var(--radius-control); font-size: 0.93rem; }

.narrow { max-width: 34rem; display: flex; flex-direction: column; gap: 1rem; }
.narrow .page-head { margin-bottom: 0.1rem; }

.form { display: flex; flex-direction: column; align-items: flex-start; gap: 0.9rem; }
.form-field { display: flex; flex-direction: column; gap: 0.2rem; width: 100%; }
.form-field select { max-width: 100%; align-self: flex-start; }
.form-field-with-button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.2rem 0.5rem; align-items: center; }
.form-field-with-button > .field-label, .form-field-with-button > .form-hint { grid-column: 1 / -1; }
.form-hint { color: var(--muted); font-size: 0.84rem; }
.form-problem, .form-done { font-size: 0.93rem; }
.form-problem:empty, .form-done:empty { display: none; }
.form-problem { color: var(--red); background: var(--red-wash); border: 1px solid #e8bdb5; border-radius: var(--radius-control); padding: 0.5rem 0.75rem; width: 100%; }
.form-done { color: var(--accent-deep); background: var(--accent-wash); border: 1px solid var(--accent-line); border-radius: var(--radius-control); padding: 0.5rem 0.75rem; margin-bottom: 1rem; }
.card > .form-done { margin: 1rem 0 0; }

/* Buttons are pills, as on the Mainspring site: navy for the main action, white for the rest. */
.button {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: inherit;
  padding: 0.5rem 1.2rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.button:hover:not(:disabled) { border-color: var(--navy); color: var(--navy); }
.button:disabled { opacity: 0.6; cursor: default; }
.button-primary { color: #fff; background: var(--navy); border-color: var(--navy); }
.button-primary:hover:not(:disabled) { color: #fff; background: var(--navy-deep); border-color: var(--navy-deep); }
.button-small { font-size: 0.85rem; padding: 0.3rem 0.8rem; }
.button-danger { color: var(--red); }
.button-danger:hover:not(:disabled) { color: var(--red); border-color: var(--red); background: var(--red-wash); }
.button-danger-solid { color: #fff; background: var(--red); border-color: var(--red); }
.button-danger-solid:hover:not(:disabled) { color: #fff; background: #7a1f14; border-color: #7a1f14; }

.users { display: flex; flex-direction: column; gap: 1.5rem; }
.users > .card { width: 100%; max-width: 34rem; }
.table-static tbody tr { cursor: default; }
.table-static tbody tr:hover { background: transparent; }
.table-static tr:hover .row-title { color: var(--ink); text-decoration: none; }
.table-static td { vertical-align: middle; }
.table-static td:first-child { min-width: 9rem; }
.you { margin-left: 0.5rem; }
.row-actions { text-align: right; white-space: nowrap; font-size: 0.88rem; }
.row-actions .button + .button { margin-left: 0.4rem; }

.dialog {
  width: min(27rem, calc(100vw - 2rem));
  padding: 1.4rem 1.5rem 1.5rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 60px -20px rgba(20, 30, 90, 0.55);
}
.dialog::backdrop { background: rgba(20, 30, 90, 0.4); }
.dialog h2 { margin-bottom: 0.75rem; overflow-wrap: anywhere; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 0.6rem; width: 100%; margin-top: 1.1rem; }
.form .dialog-actions { margin-top: 0.2rem; }

/* ---------------------------------------------------------------- small screens */

@media (max-width: 980px) {
  .record-body { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .masthead { padding: 0.5rem 0.75rem 0; }
  .masthead-inner { flex-wrap: wrap; gap: 0.6rem 1rem; padding: 0.6rem 0.8rem; }
  .account { margin-left: auto; }
  .quick-search { margin-left: 0; flex: 1 1 100%; order: 3; }
  .quick-search input { width: 100%; }
  .on-home .quick-search { display: none; }
  .page { padding: 1.25rem 1rem 2.5rem; }
  .hero { margin-top: 1rem; }
  .case-row { grid-template-columns: minmax(0, 1fr); }
  .case-side { flex-direction: row; align-items: center; gap: 0.75rem; }
  .field select { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  .masthead, .filters, .pager, .colophon, .dialog { display: none; }
  body { background: #fff; }
  .card, .case-list, .table-wrap { border-color: #bbb; }
}

.import-log { margin-top: 0.8rem; max-height: 22rem; overflow: auto; white-space: pre-wrap; font-size: 0.8rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.7rem 0.9rem; }
.field progress { width: 100%; }
