@import url("/typography/icons.css");

@font-face {
  font-family: Geist;
  src: url("/typography/geist.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 750;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/typography/instrument-serif.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #292521;
  --muted: #69635b;
  --paper: #f7f6f2;
  --surface: #fffefa;
  --soft: #f0eee8;
  --line: #e5e0d6;
  --line-strong: #d7cfc0;
  --accent: #a13d2d;
  --accent-deep: #823024;
  --accent-soft: #f4e7df;
  --danger: #9a322c;
  --radius: 12px;
  --display: "Instrument Serif", Georgia, serif;
  --ease: cubic-bezier(.2,.75,.25,1);
  font: 15px/1.52 Geist, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: var(--accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .19em; }
button, input, select, textarea { font: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.skip-link { position: fixed; left: 1rem; top: .75rem; z-index: 5; padding: 10px 14px; background: var(--surface); clip-path: inset(50%); }
.skip-link:focus { clip-path: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
h1, h2, h3, p { margin: 0; }
h1 { font: 400 clamp(3.1rem, 6vw, 5.45rem)/.96 var(--display); letter-spacing: -.022em; text-wrap: balance; }
h2, h3 { color: var(--ink); line-height: 1.22; letter-spacing: -.025em; }
h2 { font-size: 1.16rem; font-weight: 640; }
h3 { font-size: 1rem; font-weight: 640; }
p { max-width: 65ch; text-wrap: pretty; }
small { display: block; font-size: .79rem; }
.muted, small { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 620; }
.workspace { min-height: 100dvh; }
.app-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.app-header-inner {
  width: min(calc(100% - 72px), 1300px);
  min-height: 74px;
  margin-inline: auto;
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 1.42rem; font-weight: 700; letter-spacing: -.065em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand small { font-size: .72rem; font-weight: 520; letter-spacing: 0; }
.brand-mark { position: relative; display: inline-grid; place-items: center; inline-size: 34px; block-size: 34px; border-radius: 7px; background: var(--accent); flex: none; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; background: #fff5e9; border-radius: 1px; }
.brand-mark::before { width: 13px; height: 16px; transform: translate(-2px,1px) skewY(-13deg); }
.brand-mark::after { width: 4px; height: 16px; transform: translate(7px,-2px) skewY(-13deg); }
.app-nav { display: flex; gap: 2px; align-items: center; }
.app-nav a {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 9px; border-radius: 7px;
  font-size: .86rem; font-weight: 540; color: var(--muted); white-space: nowrap;
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.app-nav a:hover { background: var(--soft); text-decoration: none; color: var(--ink); }
.app-nav a[aria-current="page"] { background: var(--soft); color: var(--ink); font-weight: 650; }
.app-nav a[aria-current="page"] .ph { color: var(--accent); }
.app-nav .ph { font-size: 1.1rem; }
.app-tools { display: flex; align-items: center; justify-content: flex-end; gap: 7px; min-width: 138px; }
.app-tools form { margin: 0; }
.menu-toggle { display: none !important; }
.main { width: min(calc(100% - 72px), 1250px); margin-inline: auto; padding: 23px 0 66px; }
.main:focus { outline: none; }
.environment { display: inline-flex; align-items: center; gap: 7px; color: #735137; font-size: .75rem; font-weight: 630; }
.environment > span:first-child { inline-size: 6px; block-size: 6px; border-radius: 50%; background: #b26745; }
.environment-note { margin-left: 3px; padding-left: 10px; border-left: 1px solid var(--line-strong); color: var(--muted); font-weight: 470; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin: 27px 0 34px; }
.head p { margin-top: 10px; font-size: .97rem; }
.head .actions { padding-bottom: 3px; }
.breadcrumb { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); margin-top: 19px; font-size: .84rem; font-weight: 570; }
.breadcrumb + .head { margin-top: 11px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.button, button, .action-menu > summary {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px; padding: 8px 13px; border: 1px solid var(--line-strong); border-radius: 7px;
  background: var(--surface); color: var(--ink); font-size: .88rem; font-weight: 620; line-height: 1.2;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease);
}
.button:hover, button:hover, .action-menu > summary:hover { background: var(--soft); text-decoration: none; }
.button:active, button:active { transform: translateY(1px); }
.button.primary, button.primary { color: #fffefa; background: var(--ink); border-color: var(--ink); }
.button.primary:hover, button.primary:hover { background: #45332c; border-color: #45332c; }
.button.primary .ph, button.primary .ph { color: #f4d8c9; }
button:disabled { opacity: .62; cursor: wait; }
button:disabled:active { transform: none; }
.button .ph, button .ph, summary .ph { font-size: 1.12rem; }
.button.text, button.text { padding-inline: 6px; border-color: transparent; background: transparent; color: var(--accent-deep); }
.icon-button { min-height: 42px; min-width: 42px; padding: 7px; background: transparent; }
.danger, .button.danger { color: var(--danger); }
button.danger-fill { background: var(--danger); color: white; border-color: var(--danger); }
.section-link { display: inline-flex; align-items: center; gap: 5px; font-size: .85rem; font-weight: 620; white-space: nowrap; }
.section-link .ph { transition: transform 160ms var(--ease); }
.section-link:hover .ph { transform: translateX(2px); }
.card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin: 0 0 18px; }
.card > h2 { margin-bottom: 16px; }
.card > p { margin-bottom: 13px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.section-heading p { margin-top: 5px; }
.table-card { overflow: hidden; padding: 0; }
.table-card .section-heading { padding: 19px 22px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: #f6f4ee; color: var(--muted); font-size: .77rem; font-weight: 610; white-space: nowrap; }
td { font-size: .87rem; }
td a { font-weight: 640; overflow-wrap: anywhere; }
td:first-child, th:first-child { padding-left: 22px; }
td:last-child, th:last-child { padding-right: 22px; }
.table-card.align-amount :is(th,td):last-child { text-align: right; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #faf8f3; }
td small { margin-top: 2px; line-height: 1.25; }
td .button, td button { min-height: 36px; }
.empty-state { display: grid; justify-items: start; gap: 8px; padding: 26px 22px 30px; }
.empty-state .ph { padding: 8px; border-radius: 8px; background: var(--soft); color: var(--accent-deep); font-size: 1.24rem; }
.empty-state p { color: var(--muted); font-size: .87rem; }
.empty-state .section-link { margin-top: 3px; }
.empty-state .section-link .ph { background: transparent; padding: 0; font-size: 1rem; }
.pill {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 6px; padding: 3px 7px;
  font-size: .74rem; font-weight: 650; white-space: nowrap; color: #5d5549; background: #efebe3;
}
.pill::before { content: ""; block-size: 5px; inline-size: 5px; border-radius: 50%; background: currentColor; }
.pill.ok { background: #e8efe4; color: #32633e; }
.pill.warn { background: #f9edda; color: #784b24; }
.pill.bad { background: #f7e5e1; color: #96392f; }
.pill.info { background: #e9eef0; color: #3e5d69; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 13px 15px; }
.stack { display: grid; gap: 13px; }
.row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.row > * { min-width: 0; }
.row label { flex: 1 1 150px; }
label { display: grid; min-width: 0; gap: 5px; color: #494139; font-size: .82rem; font-weight: 620; }
input:not([type=checkbox]), select, textarea {
  min-width: 0; width: 100%; min-height: 42px; border-radius: 7px; padding: 9px 11px;
  border: 1px solid var(--line-strong); color: var(--ink); background: #fffefa; font-size: .9rem;
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease);
}
input::placeholder { color: #797166; }
input:hover, select:hover, textarea:hover { border-color: #b7a997; }
input[readonly] { background: var(--soft); }
input[type=checkbox] { inline-size: 1.04rem; block-size: 1.04rem; margin: 0; accent-color: var(--accent-deep); }
label.check { display: flex; align-items: flex-start; gap: 8px; }
.check input { flex: none; margin-top: 2px; }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.field-error { color: var(--danger); font-size: .76rem; font-weight: 540; }
.notice, .error, .success { max-width: none; padding: 12px 14px; margin-bottom: 16px; border-radius: 8px; font-size: .87rem; }
.notice { background: #f3ebdc; color: #684b32; }
.notice a { font-weight: 650; text-decoration: underline; text-underline-offset: .15em; }
.error { background: #f7e6e2; color: #842d28; }
.success { background: #e8eee4; color: #365b3b; }
#feedback { margin-top: 16px; }
.toolbar { margin-bottom: 16px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tabs :is(a,button) {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px 11px;
  min-height: 42px; background: transparent; border: 0; border-radius: 5px 5px 0 0;
  border-bottom: 2px solid transparent; color: var(--muted); font-size: .88rem; font-weight: 590;
}
.tabs :is(a,button):hover { background: var(--soft); text-decoration: none; }
.tabs :is([aria-current="page"],[aria-pressed="true"]) { color: var(--ink); border-bottom-color: var(--accent); font-weight: 670; }
.tabs small { min-width: 1.5ch; font-size: .72rem; color: var(--muted); }
.filter-card { padding: 14px 17px; align-items: flex-end; }
.filter-card .filter-search { flex: 2 1 220px; }
.filter-card .filter-search .ph { color: var(--muted); }
details.card summary, .disclosure summary { font-weight: 650; cursor: pointer; }
details.card[open] summary, .disclosure[open] summary { margin-bottom: 14px; }
.disclosure { margin-top: 16px; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.body-copy { color: var(--muted); font-size: .86rem; }
.pagination { margin: 0 0 20px; justify-content: flex-end; }
.pagination span { color: var(--muted); font-size: .83rem; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.76fr) minmax(280px, 1fr); gap: 19px; align-items: start; }
.dashboard-grid > * { min-width: 0; }
.ledger { background: #f0ece3; padding: 5px; border: 1px solid #e9e1d2; border-radius: 15px; margin-bottom: 18px; }
.ledger .card { margin: 0; border-color: #e3dccc; border-radius: 10px; padding: 22px 23px 18px; }
.ledger-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ledger-period { color: var(--muted); font-size: .81rem; border: 1px solid var(--line); padding: 5px 8px; border-radius: 6px; }
.ledger-figure { font: 400 clamp(2.85rem,5.4vw,4.2rem)/1 var(--display); letter-spacing: -.015em; margin: 11px 0 3px; }
.ledger-note { color: var(--muted); font-size: .79rem; }
.chart { margin: 20px 0 10px; }
.chart-body { position: relative; display: flex; gap: clamp(3px,1.1vw,12px); height: 103px; border-bottom: 1px solid var(--line); }
.chart-gridlines { position: absolute; pointer-events: none; inset: 0; display: grid; grid-template-rows: repeat(3, 1fr); }
.chart-gridlines i { border-top: 1px dashed var(--line); }
.chart-month { height: 100%; display: flex; flex: 1 1 0; flex-direction: column; justify-content: flex-end; position: relative; min-width: 0; z-index: 1; }
.chart-bar { display: block; width: 80%; min-height: 2px; margin-inline: auto; border-radius: 4px 4px 0 0; background: #c78470; height: var(--bar); }
.chart-bar.chart-zero { background: #e2d8ca; }
.chart-bar.chart-negative { background: #756359; }
.chart-month:focus-visible { outline-offset: 1px; }
.chart-labels { display: flex; gap: clamp(3px,1.1vw,12px); margin-top: 6px; }
.chart-labels span { flex: 1 1 0; text-align: center; font-size: clamp(.62rem,1.6vw,.74rem); color: var(--muted); }
.ledger-footer { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 13px; border-top: 1px solid var(--line); padding-top: 12px; }
.ledger-footer p { margin: 0; }
.dashboard-card { padding: 22px; }
.dashboard-card .section-heading { margin-bottom: 12px; }
.task-list { display: grid; padding: 0; margin: 0; list-style: none; }
.task-list li + li { border-top: 1px solid var(--line); }
.task-row { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 13px 0; color: var(--ink); }
a.task-row:hover { text-decoration: none; color: var(--accent-deep); }
.task-row .tile-icon { background: #f2e9de; color: var(--accent-deep); font-size: 1.1rem; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 7px; }
.task-row .tile-icon.complete { color: #44694d; background: #e9efe5; }
.task-row strong { display: block; font-size: .88rem; font-weight: 640; }
.task-row small { margin-top: 2px; }
.task-row .ph:last-child { font-size: .96rem; }
.task-row > .num { font-size: 1.05rem; }
.due-list { padding: 0; margin: 0; list-style: none; }
.due-list li { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 11px 0; }
.due-list li + li { border-top: 1px solid var(--line); }
.due-list .due-day { padding: 6px 8px; text-align: center; border-radius: 6px; background: var(--soft); font-size: .75rem; font-weight: 630; }
.due-list .due-day.late { color: var(--danger); background: #f7e5e1; }
.due-list a { overflow-wrap: anywhere; font-weight: 620; font-size: .86rem; }

.editor-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(240px, .42fr); gap: 20px; align-items: start; }
.editor-layout > * { min-width: 0; }
.editor-layout > .error { grid-column: 1 / -1; }
.editor-aside { position: sticky; top: 16px; }
.editor-aside .card { background: #f4f0e7; border-color: #e7dfd0; }
.editor-aside .button, .editor-aside button { width: 100%; }
.editor-aside .estimate { font: 400 clamp(2.3rem,4vw,3.4rem)/1 var(--display); letter-spacing: -.025em; margin: 7px 0 13px; }
.editor-aside dl { margin: 0 0 15px; display: grid; gap: 6px; }
.editor-aside dl > div { display: flex; justify-content: space-between; gap: 12px; }
.editor-aside dt { color: var(--muted); font-size: .8rem; }
.editor-aside dd { margin: 0; text-align: right; font-size: .84rem; font-weight: 570; }
.editor-aside .body-copy { margin: 0 0 16px; }
.editor-card .section-heading { margin-bottom: 16px; }
.editor-card .grid + .grid { margin-top: 12px; }
.editor-card summary { font-weight: 640; }
.contact-tools { margin-top: 13px; }
.contact-search { flex: 1 1 240px; }
.contact-tools .body-copy { margin-top: 7px; }
.line, .rates { border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-bottom: 10px; background: #fbf9f4; }
.line-main { display: grid; grid-template-columns: minmax(128px,2.5fr) minmax(62px,.7fr) minmax(89px,1fr) auto; gap: 8px; align-items: end; }
.line details { padding-top: 9px; }
.line details summary { font-size: .8rem; color: var(--muted); font-weight: 560; }
.line details[open] summary { margin-bottom: 8px; }
.rates { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)) auto; gap: 8px; align-items: end; }
.editor-row-actions { margin-top: 13px; }
.editor-row-actions > label { flex: 1 1 180px; }
.editor-aside .primary { margin-top: 5px; }
.mobile-save { display: none; }
.invoice-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 18px; }
.invoice-summary .grid { align-items: start; }
.invoice-summary .grid div { overflow-wrap: anywhere; }
.invoice-total { border-left: 1px solid var(--line); padding-left: 22px; min-width: 125px; }
.invoice-total strong { font: 400 clamp(2.2rem,4vw,3.35rem)/1.06 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.invoice-progress { display: flex; list-style: none; gap: 10px 22px; flex-wrap: wrap; border-top: 1px solid var(--line); margin: 18px 0 0; padding: 14px 0 0; }
.invoice-progress li { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: .81rem; }
.invoice-progress .done { color: #3b6246; font-weight: 580; }
.invoice-progress [aria-current] { color: var(--accent-deep); font-weight: 655; }
.action-menu { position: relative; }
.action-menu > summary { list-style: none; }
.action-menu > summary::-webkit-details-marker { display: none; }
.action-menu-list { position: absolute; z-index: 2; inset: calc(100% + 6px) 0 auto auto; min-width: 175px; background: var(--surface); border: 1px solid var(--line-strong); padding: 5px; border-radius: 8px; box-shadow: 0 8px 20px #33241610; }
.action-menu-list :is(a,button) { display: flex; width: 100%; min-height: 38px; justify-content: flex-start; border-color: transparent; text-align: left; }
.quick-metrics { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.quick-metrics .metric { padding: 13px 16px; border-left: 1px solid var(--line-strong); }
.metric strong { display: block; font-variant-numeric: tabular-nums; color: var(--ink); font-size: 1.3rem; letter-spacing: -.045em; margin-top: 4px; }

.dialog { width: min(100% - 28px, 450px); padding: 24px; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--ink); background: var(--surface); }
.dialog.wide { width: min(100% - 28px, 660px); }
.dialog::backdrop { background: #34291f60; }
.dialog h2 { font: 400 2rem/1.04 var(--display); margin-bottom: 12px; }
.dialog p { color: var(--muted); }
.dialog footer { display: flex; justify-content: flex-end; gap: 7px; margin-top: 20px; }
.login { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.auth-card { max-width: 440px; width: 100%; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.auth-card h1 { font-size: clamp(2.9rem,7vw,4rem); margin: 26px 0 20px; }
.auth-card p { margin-bottom: 12px; color: var(--muted); }
.auth-card form + form { margin-top: 12px; }
.auth-card .link { border-color: transparent; color: var(--accent-deep); padding-inline: 5px; margin-top: 8px; }
.qr svg { max-width: 168px; width: 100%; height: auto; }
.skeleton { background: #eee9de; border-radius: 8px; }
.skeleton-title { width: 242px; height: 59px; margin: 38px 0 28px; }
.skeleton-body { width: 100%; min-height: 230px; }
#content[aria-busy="false"] > .head { animation: enter 260ms var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@media (max-width: 1110px) {
  .app-header-inner { gap: 12px; }
  .app-nav .ph { display: none; }
  .app-nav a { padding-inline: 8px; }
}
@media (max-width: 860px) {
  .app-header-inner, .main { width: calc(100% - 38px); }
  .app-header-inner { min-height: 66px; flex-wrap: wrap; row-gap: 0; }
  .app-nav { display: none; order: 3; width: 100%; grid-template-columns: repeat(3,minmax(0,1fr)); padding-bottom: 12px; }
  .app-nav[data-open] { display: grid; }
  .app-nav .ph { display: inline-block; }
  .app-nav a { white-space: normal; }
  .app-tools { min-width: 0; }
  .menu-toggle { display: inline-flex !important; }
  .dashboard-grid, .editor-layout { grid-template-columns: minmax(0,1fr); gap: 0; }
  .editor-aside { position: static; }
  .dashboard-grid.aside-first .dashboard-card { order: -1; }
}
@media (max-width: 570px) {
  .main, .app-header-inner { width: calc(100% - 28px); }
  .app-header-inner { min-height: 62px; gap: 8px; padding-block: 7px; }
  .brand { font-size: 1.23rem; gap: 7px; }
  .brand-mark { width: 31px; height: 31px; }
  .app-nav { padding-block: 2px 6px; }
  .app-nav a { padding-inline: 5px; font-size: .77rem; gap: 4px; min-height: 43px; }
  .app-nav a .ph { font-size: .91rem; }
  .top-create { padding-inline: 7px; font-size: .79rem; gap: 4px; }
  .app-tools { gap: 4px; }
  .app-tools .icon-button { min-width: 38px; }
  .environment-note { display: none; }
  .head { align-items: flex-start; flex-direction: column; gap: 13px; margin: 22px 0 23px; }
  .head p { margin-top: 8px; }
  .head .actions { padding: 0; }
  .grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .card { padding: 16px; }
  .table-card { padding: 0; }
  .table-card .section-heading { padding: 15px; }
  td, th { padding: 11px 10px; }
  td:first-child, th:first-child { padding-left: 15px; }
  td:last-child, th:last-child { padding-right: 15px; }
  :is(.document-records,.schedule-records) .table-wrap { overflow: visible; }
  :is(.document-records,.schedule-records) :is(table,tbody) { display: block; }
  :is(.document-records,.schedule-records) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  :is(.document-records,.schedule-records) tbody tr {
    display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: baseline;
    gap: 4px 10px; padding: 12px 15px; border-top: 1px solid var(--line);
  }
  :is(.document-records,.schedule-records) tbody td { padding: 0; border: 0; overflow-wrap: anywhere; }
  .document-records tbody td:nth-child(2), .schedule-records tbody td:nth-child(3) { grid-area: 1 / 1; font-weight: 630; }
  :is(.document-records,.schedule-records) tbody td:nth-child(5) { grid-area: 1 / 2; }
  .document-records tbody td:nth-child(1), .schedule-records tbody td:nth-child(2) { grid-area: 2 / 1; }
  :is(.document-records,.schedule-records) tbody td:nth-child(4) { grid-area: 2 / 2; justify-self: end; }
  .document-records tbody td:nth-child(3), .schedule-records tbody td:nth-child(1) { grid-area: 3 / 1; color: var(--muted); }
  .document-records tbody td small { display: inline; margin-left: 5px; }
  .ledger .card { padding: 15px 14px; }
  .ledger-footer { flex-wrap: wrap; }
  .chart-body { height: 81px; }
  .empty-state { padding: 19px 15px; }
  .line-main { grid-template-columns: repeat(2,minmax(0,1fr)) auto; gap: 7px; }
  .line-main > :first-child { grid-column: 1 / -1; }
  .rates { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .rates > button { justify-self: end; align-self: end; }
  .editor-layout { padding-bottom: 44px; }
  .editor-aside { display: none; }
  .mobile-save {
    position: fixed; z-index: 3; inset: auto 0 0; display: flex; justify-content: space-between; align-items: center; gap: 10px;
    padding: 9px 14px calc(9px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line-strong);
  }
  .mobile-save button { min-height: 44px; }
  .invoice-summary { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .invoice-total { padding: 10px 0 0; border: 0; border-top: 1px solid var(--line); }
  .quick-metrics { gap: 5px; }
  .quick-metrics .metric { padding: 9px; }
  .quick-metrics .metric strong { font-size: 1.13rem; }
  .quick-metrics .metric small { font-size: .73rem; }
  input:not([type=checkbox]), select, textarea { font-size: 16px; }
  .auth-card { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

