/* BillCrisp — "crisp paper": light neutral page, white paper editor, deep ink text, one green accent. */

:root {
  --bg: #f3f4f1;
  --paper: #ffffff;
  --ink: #13233a;
  --ink-2: #33415a;
  --muted: #56616f;
  --line: #dde2dc;
  --field: #838d87;
  --accent: #0e7a52;
  --accent-ink: #0a6242;
  --accent-soft: #e6f3ec;
  --danger: #b42318;
  --warn-bg: #fff4dc;
  --warn-ink: #6b4200;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 2px rgba(19, 35, 58, 0.06), 0 6px 20px rgba(19, 35, 58, 0.05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); }
h1, h2, h3, p { margin: 0; }
a { color: var(--accent-ink); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }

:focus-visible, input[type="date"]:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.visually-hidden {
  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;
}

/* ---------- Shell ---------- */
.bc-app {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start;
  max-width: 1240px; margin: 0 auto; padding: 16px 24px 40px;
}
.bc-main { min-width: 0; }
.docview-slot { display: none; }
.is-preview .paper { display: none; }
.is-preview .docview-slot { display: block; }

/* ---------- Controls ---------- */
label { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], select, textarea {
  width: 100%; min-height: 38px; padding: 7px 10px; font: inherit; font-size: 0.9375rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--field); border-radius: 6px;
}
textarea { resize: vertical; line-height: 1.4; }
select { padding-right: 28px; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-2); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; border-color: var(--accent); }
input[type="checkbox"] { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
[aria-invalid="true"] { border-color: var(--danger) !important; box-shadow: 0 0 0 1px var(--danger); }
::placeholder { color: #6d7783; }

.field { margin-bottom: 12px; min-width: 0; }
.field-check { display: grid; grid-template-columns: 28px 1fr; gap: 0 8px; align-items: start; }
.field-check label { margin: 0; font-weight: 500; font-size: 0.9375rem; color: var(--ink); padding-top: 1px; }
.field-check .field-hint, .field-check .field-error { grid-column: 2; }
.field-hint { font-size: 0.8125rem; color: var(--muted); margin-top: 4px; }
.field-error { font-size: 0.8125rem; color: var(--danger); font-weight: 600; }
.field-error:not(:empty) { margin-top: 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; min-width: 24px; padding: 6px 14px; font: inherit; font-size: 0.9375rem; font-weight: 600;
  color: var(--ink); background: var(--paper); border: 1px solid var(--field); border-radius: 6px; cursor: pointer;
}
.btn:hover { border-color: var(--ink); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { color: #fff; background: var(--accent); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-primary[aria-busy="true"] { cursor: progress; }
.btn-block { width: 100%; min-height: 48px; font-size: 1.0625rem; }
.btn-quiet { background: #f7f8f6; }
.btn-link { min-height: 28px; padding: 2px 4px; border-color: transparent; background: none; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.btn-link:hover { border-color: transparent; color: var(--ink); }
.btn-danger { color: var(--danger); }
.btn-dashed { border-style: dashed; background: #fafbf9; color: var(--ink-2); width: 100%; }
.btn-icon { width: 28px; height: 28px; min-height: 28px; padding: 0; font-size: 1rem; line-height: 1; background: none; border-color: transparent; color: var(--ink-2); }
.btn-icon:hover:not(:disabled) { border-color: var(--field); }
.btn-remove:hover:not(:disabled) { color: var(--danger); border-color: var(--danger); }
.btn-add { margin-top: 8px; color: var(--accent-ink); border-style: dashed; background: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- Paper editor ---------- */
.paper {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 36px 40px 40px;
}
.example-note {
  display: block; margin: -12px -16px 24px; padding: 10px 14px; border-radius: var(--radius);
  background: var(--accent-soft); color: var(--ink-2); font-size: 0.875rem;
}
.chip { display: inline-block; padding: 1px 8px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 0.75rem; font-weight: 700; }
.paper-head { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 24px; align-items: start; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.tpl-crisp .paper-head { border-bottom-color: var(--accent); }
.head-right { min-width: 0; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.logo-box { min-width: 0; }
.logo-box .field-hint { margin-top: 6px; }
.logo-box .btn-dashed { min-height: 56px; }
.logo-img { display: block; max-height: 96px; width: auto; margin-bottom: 4px; }
.doc-title { text-align: right; font-size: 2rem; line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 12px; }
.tpl-crisp .doc-title { color: var(--ink); }
.tpl-classic .doc-title { font-family: Georgia, "Times New Roman", serif; font-weight: 400; text-transform: uppercase; letter-spacing: 0.06em; }

.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0 12px; }
.meta-grid .field { margin-bottom: 8px; }
.parties { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; padding: 16px 0 8px; }
.party-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px; font-weight: 700; }

/* Items: shared grid columns for header + rows */
.items { margin: 8px 0 24px; --cols: 24px minmax(0, 1fr) 64px 100px 64px 104px 88px; }
.items.has-code { --cols: 24px minmax(0, 1fr) 88px 64px 100px 64px 104px 88px; }
.items.has-disc { --cols: 24px minmax(0, 1fr) 64px 100px 132px 64px 104px 88px; }
.items.has-code.has-disc { --cols: 24px minmax(0, 1fr) 80px 60px 92px 124px 60px 100px 88px; }
.items-head, .item-row { display: grid; grid-template-columns: var(--cols); gap: 8px; align-items: start; }
.items-head {
  padding: 8px 0; border-bottom: 1px solid var(--ink); font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2);
}
.items-head .c-qty, .items-head .c-price, .items-head .c-tax, .items-head .c-amount, .items-head .c-disc { text-align: right; }
.item-list { list-style: none; margin: 0; padding: 0; }
.item-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.row-num { padding-top: 8px; font-size: 0.8125rem; color: var(--muted); text-align: right; }
.cell { min-width: 0; }
.cell-label { font-size: 0.75rem; margin-bottom: 2px; }
.c-qty input, .c-price input, .c-tax input, .c-disc input { text-align: right; }
.c-disc { display: grid; grid-template-columns: minmax(0, 1fr) 58px; gap: 4px; }
.c-disc .cell-label, .c-disc .field-error { grid-column: 1 / -1; }
.c-disc select { padding: 6px; }
.c-desc textarea { min-height: 38px; }
.c-amount output { display: block; padding-top: 8px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.c-actions { display: flex; gap: 2px; justify-content: flex-end; padding-top: 5px; }

@media (min-width: 761px) {
  .cell-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Notes + totals */
.paper-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 32px; align-items: start; }
.totals { display: grid; gap: 2px; }
.total-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 6px 0; font-variant-numeric: tabular-nums; }
.total-row output { text-align: right; white-space: nowrap; }
.total-row.with-input { grid-template-columns: 112px minmax(0, 1fr) auto; }
.total-row.with-input .field-error { grid-column: 1 / -1; }
.total-inputs { display: flex; gap: 6px; align-items: center; min-width: 0; }
.total-inputs input { min-width: 0; text-align: right; }
.total-inputs select { width: 76px; flex: none; }
.total-inputs .btn-link { white-space: nowrap; font-size: 0.8125rem; }
.mini-label { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.total-label { font-size: 0.9375rem; color: var(--ink-2); }
.tax-rows .total-row { padding: 4px 0; font-size: 0.9375rem; }
.total-row.grand { border-top: 2px solid var(--ink); margin-top: 4px; padding-top: 10px; font-size: 1.125rem; font-weight: 700; }
.total-row.grand .total-label { color: var(--ink); }
.total-row.balance { background: var(--accent-soft); border-radius: 6px; padding: 8px 10px; font-weight: 700; }
.incl-note { font-size: 0.8125rem; color: var(--muted); text-align: right; }
.signature { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.sig-img { display: block; max-height: 80px; width: auto; margin-bottom: 4px; }
.sig-pad-wrap { margin-top: 12px; display: grid; gap: 8px; max-width: 480px; }
.sig-pad { width: 100%; aspect-ratio: 3 / 1; border: 1px dashed var(--field); border-radius: var(--radius); background: #fcfdfb; touch-action: none; cursor: crosshair; }

/* ---------- Panel ---------- */
.panel {
  position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto;
  display: grid; gap: 16px; padding: 18px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.panel-actions { display: grid; gap: 10px; }
.panel-group { border-top: 1px solid var(--line); padding-top: 14px; }
.panel-title { cursor: pointer; font-weight: 700; font-size: 0.9375rem; min-height: 28px; padding: 2px 0; }
.panel-fields { padding-top: 10px; }
.panel-sub { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 14px 0 6px; }
.panel-saved .btn { font-size: 0.875rem; padding: 4px 10px; }
.status { font-size: 0.875rem; color: var(--accent-ink); min-height: 1.3em; }
.alert { padding: 10px 12px; border-radius: var(--radius); background: #fdecea; color: var(--danger); font-size: 0.875rem; font-weight: 600; }
.warn { padding: 8px 12px; border-radius: var(--radius); background: var(--warn-bg); color: var(--warn-ink); font-size: 0.875rem; }
.note-small { font-size: 0.8125rem; color: var(--muted); }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.history-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.history-text { display: grid; min-width: 0; font-size: 0.875rem; }
.history-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-sub { color: var(--muted); font-size: 0.75rem; }
.mobile-bar { display: none; }
.mobile-status { margin-bottom: 6px; color: var(--danger); font-size: 0.875rem; font-weight: 600; }

/* ---------- Tablet / phone ---------- */
@media (max-width: 1080px) {
  .bc-app { grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; padding: 12px 16px 32px; }
  .paper { padding: 28px 24px 32px; }
}
.receipt-warning { display: none; }
@media (max-width: 900px) {
  :root { --mobile-bar-space: calc(108px + env(safe-area-inset-bottom)); }
  html:has(.mobile-bar) { scroll-padding-bottom: var(--mobile-bar-space); }
  .alert { scroll-margin-bottom: var(--mobile-bar-space); }
  .bc-app { grid-template-columns: 1fr; padding: 12px 12px 24px; }
  /* Keep page end (footer, shared GA settings) scrollable above the fixed Download bar. */
  body:has(.mobile-bar) { padding-bottom: var(--mobile-bar-space); }
  .panel { position: static; max-height: none; overflow: visible; }
  .receipt-warning { display: block; margin-top: 10px; }
  .mobile-bar {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(19, 35, 58, 0.08);
  }
  .panel [data-t="download"] { display: none; }
}
@media (max-width: 760px) {
  .paper { padding: 20px 16px 24px; border-radius: var(--radius); }
  .example-note { margin: -4px -4px 16px; }
  .paper-head { grid-template-columns: 1fr; gap: 12px; }
  .head-right { order: -1; }
  .doc-title { text-align: left; font-size: 1.625rem; }
  .parties, .paper-foot { grid-template-columns: 1fr; gap: 0; }
  .pair { grid-template-columns: 1fr; }
  .items-head { display: none; }
  .item-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; position: relative;
    padding: 14px 0 12px; border-bottom: 1px solid var(--line);
  }
  .row-num { position: absolute; left: 0; top: 14px; padding: 0; font-weight: 700; }
  .c-desc { grid-column: 1 / -1; padding-left: 20px; }
  .c-code { grid-column: 1 / -1; }
  .c-amount output { text-align: left; padding-top: 4px; font-size: 1rem; }
  .c-actions { align-self: end; }
  .btn-icon { width: 36px; height: 36px; border-color: var(--line); }
  input[type="text"], input[type="email"], input[type="tel"], input[type="date"], select, textarea { min-height: 44px; font-size: 1rem; }
  .total-row.with-input { grid-template-columns: 1fr auto; }
  .total-row.with-input .total-inputs { grid-column: 1 / -1; grid-row: 2; }
  .btn { min-height: 44px; }
  .btn-link { min-height: 36px; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, input, select, textarea { transition: border-color 0.12s ease, background-color 0.12s ease; }
}

/* Site shell and article content rendered by core (header, intro, content sections, footer). */
.skip-link {
  position: absolute; left: 8px; top: -48px; z-index: 100; padding: 8px 14px; border-radius: 6px;
  background: var(--ink); color: #fff; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 8px; color: #fff; }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header-inner {
  max-width: 1240px; margin: 0 auto; padding: 10px 24px; display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between; gap: 8px 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-height: 44px; }
.brand:hover { color: var(--ink); }
.brand-logo { width: 32px; height: 32px; }
.brand-name { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; }
.site-nav { display: flex; flex-wrap: wrap; gap: 2px 4px; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 4px 10px; border-radius: 6px;
  color: var(--ink-2); font-weight: 600; font-size: 0.9375rem; text-decoration: none;
}
.site-nav a:hover { background: var(--accent-soft); color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--accent-ink); background: var(--accent-soft); }

/* Breadcrumbs */
.breadcrumbs { max-width: 1240px; margin: 0 auto; padding: 10px 24px 0; font-size: 0.875rem; color: var(--muted); }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumbs li + li::before { content: "/"; margin-right: 4px; color: var(--muted); }
.breadcrumbs a { display: inline-block; padding: 2px 0; }

/* Main column */
.page-intro { max-width: 1240px; margin: 0 auto; padding: 20px 24px 4px; }
.page-intro h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); line-height: 1.15; letter-spacing: -0.02em; }
.page-intro .intro { margin-top: 8px; max-width: 760px; font-size: 1.0625rem; color: var(--ink-2); }
.page-intro h1, .page-content > * { max-width: 760px; }
.editor-slot .noscript { max-width: 1240px; margin: 16px auto; padding: 12px 24px; }
.download-note { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.download-note .note { max-width: 916px; }
.page-content { max-width: 1240px; margin: 0 auto; padding: 8px 24px 48px; }

/* Article typography */
.content-section { margin-top: 32px; }
.content-section h2 { font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.01em; margin-bottom: 10px; scroll-margin-top: 16px; }
.content-section h3 { font-size: 1.0625rem; margin: 18px 0 6px; }
.content-section p, .content-section ul, .content-section ol { margin: 0 0 12px; }
.content-section ul, .content-section ol { padding-left: 1.4em; }
.content-section li { margin: 4px 0; }
.content-section a { overflow-wrap: anywhere; }
.note { padding: 12px 14px; border-left: 4px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; background: var(--accent-soft); color: var(--ink-2); font-size: 0.9375rem; }
.note-legal { border-left-color: var(--ink-2); background: #eef0f3; }

/* Tables scroll inside their wrapper instead of widening the page. */
.table-wrap { max-width: 100%; overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.table-wrap table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 0.9375rem; }
.table-wrap caption { caption-side: top; text-align: left; padding: 10px 12px; font-weight: 700; color: var(--ink); }
.table-wrap th, .table-wrap td { padding: 8px 12px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.table-wrap thead th { background: #f6f7f4; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-2); }

/* FAQ and sources */
.faq { display: grid; gap: 8px; }
.faq-item { padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.faq-item h3 { margin: 0 0 4px; }
.faq-item p { margin: 0; }
.sources { font-size: 0.875rem; color: var(--ink-2); }
.accessed { color: var(--muted); }

/* Footer (also hosts the shared Google Analytics settings widget) */
.site-footer { margin-top: 24px; background: var(--paper); border-top: 1px solid var(--line); font-size: 0.875rem; }
.site-footer-inner { max-width: 1240px; margin: 0 auto; padding: 24px; display: grid; gap: 12px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 32px; color: var(--ink-2); }
.footer-nav a:hover { color: var(--ink); }
.footer-note { color: var(--muted); }
.site-footer .ga-consent-details { margin: 0; }
.site-footer .ga-consent-widget button { min-height: 32px; min-width: 64px; }

@media (max-width: 760px) {
  .site-header-inner, .breadcrumbs, .page-intro, .download-note, .page-content, .site-footer-inner { padding-left: 12px; padding-right: 12px; }
  .site-nav { width: 100%; }
  .site-nav a { min-height: 40px; }
}

/* Read-only document view: on screen for Preview, and the printed layout (see print.css). */
.docview {
  background: #fff; color: #13233a; border: 1px solid #dde2dc; border-radius: 12px;
  box-shadow: 0 1px 2px rgba(19, 35, 58, 0.06), 0 6px 20px rgba(19, 35, 58, 0.05);
  padding: 48px 52px; font-size: 0.9375rem; line-height: 1.45;
}
.dv-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: start; margin-bottom: 28px; }
.dv-logo { max-height: 90px; width: auto; }
.dv-titlebox { text-align: right; }
.dv-title { font-size: 1.875rem; font-weight: 700; margin-bottom: 10px; }
.tpl-classic .dv-title { font-family: Georgia, "Times New Roman", serif; font-weight: 400; text-transform: uppercase; letter-spacing: 0.06em; }
.dv-meta { display: grid; grid-template-columns: auto auto; gap: 2px 16px; margin: 0; justify-content: end; font-size: 0.875rem; }
.dv-meta dt { color: #56616f; }
.dv-meta dd { margin: 0; font-weight: 600; text-align: right; }
.dv-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 16px 0; border-top: 2px solid #0e7a52; }
.tpl-classic .dv-parties { border-top-color: #13233a; }
.dv-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: #56616f; margin: 0 0 4px; font-weight: 700; }
.dv-lines { white-space: pre-line; overflow-wrap: anywhere; }
.dv-strong { font-weight: 700; }
.dv-table { width: 100%; border-collapse: collapse; margin: 12px 0 16px; font-variant-numeric: tabular-nums; }
.dv-table th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 8px 6px; border-bottom: 1.5px solid #13233a; }
.tpl-crisp .dv-table th { background: #e6f3ec; border-bottom-color: #0e7a52; }
.dv-table td { padding: 8px 6px; border-bottom: 1px solid #dde2dc; vertical-align: top; }
.tpl-classic .dv-table td { border: 1px solid #c9cfd6; }
.dv-table .num { text-align: right; white-space: nowrap; }
.dv-desc { white-space: pre-line; overflow-wrap: anywhere; width: 45%; }
.dv-totals { margin-left: auto; width: min(100%, 360px); font-variant-numeric: tabular-nums; }
.dv-trow { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; }
.dv-trow.dv-grand { border-top: 2px solid #13233a; margin-top: 4px; padding-top: 8px; font-weight: 700; font-size: 1.0625rem; }
.dv-small { font-size: 0.8125rem; color: #56616f; }
.dv-extra { margin-top: 24px; display: grid; gap: 4px; }
.dv-extra .dv-label { margin-top: 10px; }
.dv-sign { margin-top: 28px; }
.dv-sign img { max-height: 70px; width: auto; display: block; }
.dv-accept { margin-top: 40px; width: 280px; border-top: 1px solid #13233a; padding-top: 4px; }
@media (max-width: 760px) {
  .docview { padding: 20px 16px; font-size: 0.875rem; }
  .dv-head, .dv-parties { grid-template-columns: 1fr; gap: 12px; }
  .dv-titlebox { text-align: left; }
  .dv-meta { justify-content: start; }
  .dv-meta dd { text-align: left; }
  .dv-table { display: block; overflow-x: auto; }
}
