:root {
  color-scheme: light;
  --background: #f7f3ea;
  --card: #fff;
  --text: #171719;
  --muted: #666463;
  --accent: #f04e2a;
  --accent-text: #c6280c;
  --secondary: #e5dfd7;
  --line: #eae6df;
  --radius: 28px;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--background);
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; overscroll-behavior: none; }
button, input, textarea, select { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
svg { width: 24px; height: 24px; flex-shrink: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 5px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; z-index: 10; top: -100px; left: 16px; padding: 12px; background: white; }
.skip-link:focus { top: 12px; }
#viewport { position: fixed; inset: 0; overflow-y: auto; overscroll-behavior-y: none; scroll-padding-top: calc(env(safe-area-inset-top) + 64px); scroll-padding-bottom: 120px; }
.page { max-width: 680px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 56px) 20px calc(env(safe-area-inset-bottom) + 116px); }
h1 { margin: 0 0 24px; font-size: 36px; font-weight: 750; line-height: 1.15; letter-spacing: -1.3px; transform-origin: left center; }
h1:focus { outline: none; }
h2, h3, p { margin: 0; }
h2 { font-size: 23px; line-height: 1.22; letter-spacing: -.6px; }
h3 { font-size: 18px; line-height: 1.3; letter-spacing: -.3px; }
p { line-height: 1.55; }
.topbar { position: fixed; z-index: 3; top: 0; left: 0; right: 0; padding-top: env(safe-area-inset-top); pointer-events: none; background: transparent; }
.topbar-inner { position: relative; max-width: 680px; margin: 0 auto; height: 48px; display: flex; align-items: center; justify-content: center; }
#compact-title { opacity: 0; font-size: 17px; font-weight: 700; }
.brand { display: none; }
.icon-button { border: 0; border-radius: 50%; min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; background: var(--background); }
#back { position: absolute; left: 12px; pointer-events: auto; background: transparent; color: var(--accent-text); }
#content { display: grid; gap: 20px; }
.card { border-radius: var(--radius); background: var(--card); padding: 24px; box-shadow: 0 8px 30px rgb(23 23 25 / 2%); }
.muted { color: var(--muted); }
.icon-tile { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 22px; background: var(--background); color: var(--accent); }
.icon-tile svg { width: 32px; height: 32px; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.eyebrow { text-transform: uppercase; letter-spacing: 1.4px; font-size: 11px; font-weight: 700; color: var(--muted); }
.overview-banner {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: start;
  gap: 10px;
  padding: 16px;
}
.overview-banner h2 { font-size: 18px; margin-top: 2px; }
.overview-banner p { font-size: 13px; margin-top: 4px; }
.overview-banner p:not(.error-text) { color: var(--muted); }
.overview-banner .icon-tile { width: 44px; height: 44px; border-radius: 15px; }
.overview-banner .icon-tile svg { width: 23px; height: 23px; }
.overview-banner .icon-button { font-size: 24px; }
.overview-banner .error-text { grid-column: 2 / -1; }
.overview-grid { display: grid; gap: 12px; }
.overview-card {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 9px;
  padding: 18px;
}
.overview-card-head { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 9px; align-items: center; }
.overview-card-head h3 { font-size: 15px; font-weight: 650; }
.overview-symbol { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; background: #fff0e9; color: var(--accent-text); }
.overview-symbol svg { width: 19px; height: 19px; }
.overview-receipts .overview-symbol { background: #eaf4ed; color: #2f694e; }
.overview-due .overview-symbol { background: #f6efe3; color: #835320; }
.overview-arrow { color: var(--muted); font-size: 25px; line-height: 1; }
.overview-value {
  display: block;
  font-size: clamp(26px, 7vw, 36px);
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: -.8px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.overview-card-detail { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.overview-card:active { background: #fbf9f4; }
.overview-report { display: grid; gap: 16px; min-width: 0; }
.overview-report h2 { font-size: 20px; }
.overview-totals { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.overview-totals > div, .debt-chart li > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  flex-wrap: wrap;
}
.overview-totals dt, .debt-chart li span { font-size: 14px; color: var(--muted); }
.overview-totals dd, .debt-chart strong { margin: 0 0 0 auto; font-weight: 650; font-variant-numeric: tabular-nums; }
.debt-chart { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.debt-track { height: 8px; border-radius: 8px; background: var(--background); overflow: hidden; margin-top: 6px; }
.debt-track i { display: block; height: 100%; border-radius: inherit; }
.chart-late { background: #b84640; }
.chart-neutral { background: #64778b; }
.chart-received { background: #40735b; }
.chart-due { background: #aa7437; }
.overview-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; color: var(--muted); }
.overview-legend span { display: inline-flex; align-items: center; gap: 6px; }
.overview-legend i { width: 10px; height: 10px; border-radius: 3px; }
.overview-chart {
  --plot-height: 112px;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px;
  margin-top: 4px;
}
.overview-axis { position: relative; height: var(--plot-height); font-size: 10px; color: var(--muted); }
.overview-axis span { position: absolute; right: 0; transform: translateY(-50%); white-space: nowrap; }
.overview-axis span:first-child { position: relative; display: block; }
.overview-axis span:nth-child(2) { top: 50%; }
.overview-axis span:last-child { top: 100%; }
.overview-plot {
  display: grid;
  grid-template-columns: repeat(var(--periods), minmax(0, 1fr));
  background: linear-gradient(var(--line), var(--line)) top / 100% 1px no-repeat,
    linear-gradient(var(--line), var(--line)) 0 calc(var(--plot-height) / 2) / 100% 1px no-repeat,
    linear-gradient(var(--line), var(--line)) 0 var(--plot-height) / 100% 1px no-repeat;
}
.overview-bar-group { min-width: 0; text-align: center; font-size: 10px; color: var(--muted); }
.overview-bar-group span { display: block; margin-top: 7px; }
.overview-bars { height: var(--plot-height); display: flex; justify-content: center; align-items: end; gap: 3px; padding-inline: 3px; }
.overview-bars i { width: min(27px, 40%); height: var(--value); border-radius: 4px 4px 0 0; }
.overview-bars .chart-nonzero { min-height: 2px; }
.overview-table-wrap { overflow-x: auto; }
.overview-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.overview-table th, .overview-table td { text-align: right; padding: 9px 0 9px 8px; border-bottom: 1px solid var(--line); }
.overview-table th:first-child { text-align: left; padding-left: 0; white-space: nowrap; }
.overview-table thead th { font-size: 12px; color: var(--muted); }
.overview-table tbody th { font-weight: 500; }
.overview-report-list { display: grid; }
.overview-report-list a { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding: 11px 0; min-height: 48px; }
.overview-report-list a span { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.overview-report-list small { color: var(--muted); font-size: 12px; }
.overview-report-list b { text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (min-width: 760px) {
  .overview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .overview-card { grid-template-rows: minmax(42px, auto) auto auto; }
  .overview-card .overview-value { font-size: 27px; }
}
.section-heading { margin: 10px 0 0; }
.section-grid { display: grid; gap: 12px; }
.section-card { display: flex; align-items: center; gap: 16px; padding: 20px; }
.section-card .icon-tile { width: 52px; height: 52px; border-radius: 18px; }
.section-card .icon-tile svg { width: 26px; height: 26px; }
.section-card .section-copy { flex: 1; min-width: 0; }
.section-card p { color: var(--muted); font-size: 14px; margin-top: 5px; }
.chevron { color: var(--muted); width: 18px; height: 18px; }
.button { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; border: 0; border-radius: 18px; padding: 14px 20px; background: var(--text); color: white; font-weight: 600; text-align: center; width: 100%; }
.button.secondary { background: var(--secondary); color: var(--text); }
.deal-heading { display: grid; gap: 12px; }
.deal-heading h2 { overflow-wrap: anywhere; }
.deal-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; }
.deal-stage { border-radius: 20px; padding: 6px 12px; background: var(--background); color: var(--accent-text); font-weight: 600; }
.deal-client { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--muted); overflow-wrap: anywhere; }
.deal-dialog {
  --dialog-inset: max(12px, env(safe-area-inset-top), env(safe-area-inset-bottom));
  position: fixed;
  inset: var(--dialog-inset) 12px;
  margin: auto;
  width: min(500px, calc(100% - 24px));
  height: fit-content;
  max-height: calc(100dvh - var(--dialog-inset) - var(--dialog-inset));
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  background: var(--background);
  color: var(--text);
  box-shadow: 0 18px 48px rgb(23 23 25 / 20%);
}
.deal-dialog::backdrop { background: rgb(23 23 25 / 38%); }
.deal-dialog-header { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px; padding: 16px 16px 10px; }
.deal-dialog-header h2 { grid-column: 2; text-align: center; font-size: 21px; }
.deal-dialog-header h2:focus { outline: none; }
.deal-dialog-header .icon-button { background: var(--secondary); font-size: 24px; }
.deal-dialog-body, .deal-edit-form { display: grid; gap: 14px; }
.deal-dialog-body { padding: 0 16px 16px; }
.deal-action-group { border-radius: 18px; background: var(--card); padding: 6px 14px; }
.deal-action-group h3 { margin: 8px 0 2px; color: var(--muted); font-size: 13px; font-weight: 600; }
.deal-menu-row {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 9px 0;
  border: 0;
  background: transparent;
  text-align: left;
}
.deal-menu-row + .deal-menu-row { border-top: 1px solid var(--line); }
.deal-menu-row:is([data-action="return"], [data-action="loss"], [data-action="delete"]),
.button.secondary.deal-danger { color: var(--accent-text); }
.deal-dialog button:disabled { opacity: .6; cursor: wait; }
.deal-paper { padding: 16px; border-radius: 16px; background: white; overflow-wrap: anywhere; font-family: Georgia, "Times New Roman", serif; }
.deal-paper header { margin-bottom: 16px; }
.deal-paper :is(h2,h3), .deal-paper header > p { text-align: center; }
.deal-paper h2 { margin: 6px 0; }
.deal-paper h3, .deal-paper table { margin-top: 16px; }
.contract-dateline { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.contract-dateline .contract-line { width: 48%; }
.contract-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; margin: 7px 0; }
.contract-line span { flex: 1 1 90px; border-bottom: 1px solid currentColor; min-height: 1.2em; }
.contract-obligations { columns: 2; column-gap: 36px; padding-left: 20px; }
.contract-obligations li { border-bottom: 1px solid currentColor; min-height: 1.65em; break-inside: avoid; }
.contract-signatures { display: flex; justify-content: space-between; gap: 10px; margin: 24px 0 18px; text-align: center; break-inside: avoid; }
.contract-signatures strong { flex: 1; border-top: 1px solid currentColor; padding-top: 5px; font-size: .9em; }
.contract-appendix { margin-top: 24px; }
.deal-paper table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.deal-paper :is(th, td) { border-bottom: 1px solid var(--line); padding: 7px 4px; text-align: left; }
.deal-paper :is(th, td):last-child { text-align: right; }
#deal-paper { display: none; }
@media print {
  body:has(> #deal-paper) > :not(#deal-paper) { display: none !important; }
  #deal-paper { display: block; padding: 0; border-radius: 0; }
  #deal-paper header { break-after: avoid; }
  #deal-paper tr { break-inside: avoid; }
  #deal-paper .contract-appendix { break-before: page; margin-top: 0; }
}
.button, .section-card, .person-card, .icon-button { transition: opacity 120ms var(--ease-out); }
.button:active, .section-card:active, .person-card:active, .icon-button:active { opacity: .65; }
.bottom-nav { position: fixed; bottom: calc(env(safe-area-inset-bottom) + 12px); left: 50%; transform: translateX(-50%); z-index: 4; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); width: calc(100% - 24px); max-width: 630px; padding: 5px; border-radius: 32px; background: rgb(247 243 234 / 96%); border: 1px solid #d6d0c7; box-shadow: 0 5px 24px rgb(23 23 25 / 7%), inset 0 0 0 1px white; }
.nav-link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 62px; padding: 8px 0; border-radius: 27px; font-size: 11px; font-weight: 600; }
.nav-link svg { width: 25px; height: 25px; }
.nav-link[aria-current="page"] { color: var(--accent-text); background: var(--secondary); }
.nav-link[aria-current="page"] svg { color: var(--accent); }
.page-footer { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 36px; color: var(--muted); font-size: 10px; letter-spacing: 2.5px; font-weight: 650; }
.page-footer strong { color: var(--accent); font-size: 20px; letter-spacing: -1px; font-weight: 750; }
.page-footer span { font-size: 12px; font-weight: 400; letter-spacing: 0; }
.demo-note { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.demo-note svg { width: 17px; height: 17px; }
.search { display: flex; align-items: center; gap: 10px; border-radius: 16px; padding: 0 16px; background: var(--secondary); }
.search svg { width: 20px; height: 20px; color: var(--muted); }
.search input { width: 100%; min-width: 0; border: 0; background: transparent; min-height: 50px; color: var(--text); font-size: 16px; }
.search input:focus { outline: none; }
.search:focus-within { box-shadow: inset 0 0 0 1px var(--muted); }
.people-list { display: grid; gap: 12px; }
.person-card { display: flex; align-items: center; gap: 14px; padding: 20px; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--background); color: var(--accent-text); font-weight: 600; display: grid; place-items: center; flex-shrink: 0; }
.person-copy { flex: 1; min-width: 0; }
.person-copy h3 { overflow-wrap: anywhere; }
.person-copy p { margin-top: 5px; font-size: 13px; color: var(--muted); }
.profile { text-align: center; }
.profile .avatar { width: 76px; height: 76px; margin: 0 auto 18px; font-size: 24px; }
.profile p { color: var(--muted); margin-top: 8px; }
.profile h2 { overflow-wrap: anywhere; }
.detail-row { padding: 15px 0; border-top: 1px solid var(--line); }
.detail-row:first-of-type { margin-top: 18px; }
.detail-row:last-child { padding-bottom: 0; }
.detail-row dt { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.detail-row dd { margin: 0; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
dl { margin: 0; }
.empty { text-align: center; padding-top: 40px; padding-bottom: 40px; }
.empty .icon-tile { margin: 0 auto 24px; }
.empty p { margin: 16px 0 24px; color: var(--muted); }
.empty p:last-child { margin-bottom: 0; }
.form { display: grid; gap: 20px; }
.field { display: grid; gap: 9px; font-size: 14px; font-weight: 600; }
.field input, .field textarea { border: 1px solid #d6d0c7; border-radius: 13px; background: white; padding: 13px 14px; width: 100%; min-height: 48px; font-size: 16px; font-weight: 400; color: var(--text); }
.field textarea { resize: vertical; min-height: 100px; }
.customer-form { display: grid; gap: 20px; }
.form-part { display: grid; gap: 20px; min-width: 0; margin: 0; padding: 0; border: 0; }
.form-section { display: grid; gap: 20px; min-width: 0; }
.form-section > h2 + .field-help { margin-top: -10px; }
.form-section .detail-row:first-of-type { margin-top: 0; }
.form-steps { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
.form-steps.deal-steps { grid-template-columns: repeat(3,minmax(0,1fr)); }
.form-steps button { border: 0; border-radius: 16px; background: transparent; display: grid; justify-items: center; gap: 8px; padding: 10px 2px; min-height: 70px; font-size: 12px; font-weight: 600; }
.form-steps button span { display: grid; place-items: center; width: 26px; height: 26px; background: var(--secondary); border-radius: 50%; }
.form-steps button[aria-current] { background: white; color: var(--accent-text); }
.form-steps button[aria-current] span { background: var(--accent-text); color: white; }
.form-steps button:disabled { cursor: default; color: var(--muted); }
.field { min-width: 0; }
.field select { border: 1px solid #d6d0c7; border-radius: 13px; padding: 13px 8px; min-height: 48px; width: 100%; min-width: 0; background: white; color: var(--text); font-size: 16px; }
.field input { min-width: 0; }
.field input[type=date] { display: block; min-height: 48px; -webkit-appearance: none; appearance: none; }
.field input[type=file] { font-size: 13px; padding: 10px; }
.field input::file-selector-button { border: 0; border-radius: 8px; padding: 10px; margin-right: 8px; background: var(--background); color: var(--text); }
.field :is(input,textarea,select):focus { outline: none; border-color: var(--muted); }
.field-help { font-size: 13px; line-height: 1.5; font-weight: 400; color: var(--muted); }
.field-error { font-size: 13px; line-height: 1.4; font-weight: 400; }
.field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; align-items: end; }
@supports (grid-template-rows: subgrid) {
  @media (min-width: 376px) {
    .field-grid { row-gap: 9px; }
    .field-grid > .field { grid-row: span 2; grid-template-rows: subgrid; align-self: stretch; }
    .field-grid:has(.field-error) > .field { grid-row: span 3; }
  }
}
.optional-fields { border-top: 1px solid var(--line); padding-top: 6px; }
.optional-fields summary { min-height: 44px; display: list-item; align-content: center; font-weight: 600; font-size: 14px; cursor: pointer; }
.optional-fields[open] .field { margin-top: 16px; }
.text-button { min-height: 44px; background: transparent; border: 0; padding: 8px 0; font-size: 14px; text-align: left; font-weight: 600; }
.danger, .error-text { color: #a92727; }
.difference-text { color: #805b10; }
.file-list { list-style: none; padding: 0; margin: 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.file-list li { padding: 8px 0; }
.document-list { margin: 12px 0; }
.document-list li { border-top: 1px solid var(--line); padding-top: 12px; }
.document-actions { display: flex; flex-wrap: wrap; gap: 0 16px; }
.document-actions a { display: inline-flex; min-height: 44px; align-items: center; color: var(--accent-text); font-weight: 600; }
.form-actions { display: grid; gap: 12px; }
.form-errors { border: 1px solid #a92727; background: #fff1ee; color: #a92727; border-radius: 16px; padding: 16px; font-size: 15px; line-height: 1.5; }
[aria-invalid=true] { border-color: #a92727 !important; }
.calculation { margin: 18px 0; }
.calculation > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.calculation dt { font-size: 14px; color: var(--muted); line-height: 1.4; }
.calculation dd { margin: 0; font-size: 16px; font-weight: 650; text-align: right; white-space: nowrap; }
.calculation .total dt, .calculation .total dd { font-size: 19px; color: var(--text); font-weight: 700; }
.calculation.price-preview { margin: 0; }
.price-preview > .total { padding-top: 0; flex-wrap: wrap; gap: 8px 16px; }
.schedule-editor { display: grid; gap: 16px; }
.schedule-bulk { display: grid; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
#schedule-edit[open] + #schedule-preview, #schedule-resolution:empty, #schedule-preview:empty { display: none; }
#schedule-edit .schedule-editor { margin-top: 16px; }
#schedule-edit .schedule-editor .field { margin-top: 0; }
#schedule-preview .payment-schedule { margin-top: 0; }
.schedule-resolution { display: grid; gap: 12px; padding: 16px; border-radius: 16px; background: var(--background); }
.schedule-edit-row { display: grid; grid-template-columns: 18px minmax(0,1.2fr) minmax(0,1fr); align-items: start; gap: 8px; }
.schedule-edit-row .field { font-size: 11px; }
.schedule-edit-row input { padding: 12px 6px; font-size: 16px; }
.payment-number { font-size: 12px; color: var(--muted); padding-top: 38px; }
.payment-schedule { padding: 0; list-style-position: inside; margin-bottom: 0; }
.payment-schedule li { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.payment-schedule time { margin-left: 6px; }
.payment-schedule strong { float: right; }
@media (max-width: 375px) {
  .field-grid { grid-template-columns: minmax(0,1fr); }
  .schedule-edit-row { grid-template-columns: 14px minmax(0,1fr); }
  .schedule-edit-row .field:last-child { grid-column: 2; }
  .payment-number { align-self: start; padding-top: 32px; }
  .calculation > div { flex-wrap: wrap; gap: 6px; }
  .calculation dd { margin-left: auto; }
}
.steps { padding-left: 23px; margin-bottom: 0; color: var(--muted); line-height: 1.55; }
.steps li + li { margin-top: 14px; }
.setting-row { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border: 0; padding-bottom: 0; }
.setting-row span:last-child { margin-left: auto; color: var(--muted); font-size: 14px; }
.no-results { padding: 30px 12px; text-align: center; color: var(--muted); }
.noscript { position: fixed; z-index: 20; inset: 0; padding: 40px; background: var(--background); }
@media (hover: hover) and (pointer: fine) {
  .button:hover, .section-card:hover, .person-card:hover { opacity: .8; }
  .nav-link:hover { background: var(--secondary); }
}
@media (min-width: 760px) {
  .page { padding-top: 90px; }
  h1 { font-size: 42px; margin-bottom: 28px; }
  .topbar-inner { height: 60px; }
  .brand { display: block; position: absolute; left: 20px; color: var(--accent); letter-spacing: -1px; font-size: 20px; font-weight: 750; pointer-events: auto; }
  #back:not([hidden]) ~ .brand { display: none; }
  .section-grid { grid-template-columns: 1fr 1fr; }
  .section-card { align-items: flex-start; flex-wrap: wrap; }
  .section-card .section-copy { flex-basis: calc(100% - 70px); }
  .section-card > .chevron { display: none; }
  .nav-link { font-size: 12px; }
}
@media (max-width: 350px) {
  .page { padding-left: 14px; padding-right: 14px; }
  .card { padding: 20px; }
  .bottom-nav { width: calc(100% - 16px); padding: 3px; }
  .nav-link { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  h1 { transform: none !important; }
  .button, .section-card, .person-card, .icon-button { transition: none; }
}

.auth-page { max-width: 460px; margin: 0 auto; max-height: 100dvh; overflow-y: auto; padding: max(48px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); }
.auth-brand { color: var(--accent); font-size: 44px; font-weight: 760; line-height: 1; letter-spacing: -2px; }
.auth-tagline { color: var(--muted); font-size: 14px; margin: 8px 0 32px; }
.auth-page h1 { margin-bottom: 24px; }
