:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #21352f;
  background: #fff;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
  --green: #187052;
  --line: #dce4df;
  --muted: #5b6862;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--green); text-underline-offset: 4px; }
a:hover { color: #104b38; }
button, input, select { font: inherit; letter-spacing: 0; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #a96026; outline-offset: 3px; }
.site-header { min-height: 88px; padding: 18px 5%; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; flex-shrink: 0; }
.brand img { display: block; width: 142px; height: 48px; }
nav { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px 24px; }
nav a, .text-button { font-size: 14px; font-weight: 600; }
.profile-nav-link { display: inline-flex; align-items: center; gap: 6px; }
.profile-nav-link svg { width: 18px; height: 18px; flex: none; }
nav form { margin: 0; }
.text-button { border: 0; padding: 0; background: none; color: var(--green); cursor: pointer; }
main { width: min(100% - 48px, 1000px); margin: 0 auto; flex: 1; padding-bottom: 64px; }
.page-heading { padding: 40px 0 28px; }
.eyebrow { color: var(--green); text-transform: uppercase; font-size: 12px; font-weight: 700; margin: 0 0 8px; }
h1 { font-size: 36px; line-height: 1.2; margin: 0; font-weight: 650; overflow-wrap: anywhere; }
h2 { font-size: 20px; line-height: 1.3; font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.lede { color: var(--muted); margin: 12px 0 0; font-size: 17px; overflow-wrap: anywhere; }
.onboarding-form { border-top: 1px solid var(--line); }
.form-section { border: 0; padding: 24px 0; margin: 0; min-width: 0; border-bottom: 1px solid var(--line); }
.form-section legend { float: left; width: 29%; padding: 4px 20px 0 0; font-weight: 600; font-size: 18px; }
.step { display: block; color: #8c6137; font-size: 12px; margin-bottom: 6px; }
.section-fields { margin-left: 29%; }
.field { margin-bottom: 18px; min-width: 0; }
.field:last-child { margin-bottom: 0; }
.field-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-bottom: 18px; }
.field-pair:last-child { margin-bottom: 0; }
.field-pair .field { margin-bottom: 0; }
label { display: block; margin-bottom: 7px; font-weight: 600; font-size: 14px; }
input:not([type=hidden]), select { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid #aebdb4; background: white; border-radius: 4px; color: #21352f; min-width: 0; }
select { text-overflow: ellipsis; padding-right: 28px; }
.field-error input, .field-error select { border-color: #a23131; }
.field-errors, .form-errors { color: #962b2b; font-size: 14px; }
.field-help { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.field-errors ul, .form-errors ul { list-style: none; margin: 6px 0 0; padding: 0; }
.form-errors { margin: 18px 0; padding: 12px 16px; border-left: 3px solid #a23131; background: #fff4f2; }
.form-errors p { margin: 0; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 24px; padding: 24px 0 0; }
.form-actions p { font-size: 14px; color: var(--muted); margin: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 11px 20px; border: 1px solid var(--green); border-radius: 4px; background: var(--green); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; text-align: center; }
.button:hover { color: #fff; background: #11533d; border-color: #11533d; }
.compact, .login-form { max-width: 540px; margin-inline: auto; }
.login-form > .button { margin-top: 24px; }
.secondary-action { font-size: 14px; margin-top: 24px; color: var(--muted); }
.heading-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.heading-row .button { flex-shrink: 0; }
.organization-list { border-top: 1px solid var(--line); }
.organization-row { display: grid; grid-template-columns: minmax(0, 1fr) 80px 90px; gap: 20px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: #21352f; }
.organization-row:hover { background: #f3f8f5; }
.organization-row p { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.currency { font-size: 14px; color: var(--muted); }
.open-label { color: var(--green); font-size: 14px; text-align: right; }
.empty-state { padding: 36px 0; }
.empty-state a { display: inline-block; margin-top: 12px; }
.back-link { display: inline-block; font-size: 14px; margin-bottom: 28px; }
.organization-summary { border-top: 1px solid var(--line); padding-top: 24px; }
.books-section { padding-bottom: 32px; }
.workspace-title { padding-bottom: 12px; }
.book-title { font-size: 28px; }
.entry-form { max-width: 650px; padding-top: 24px; }
.entry-form textarea, .journal-editor textarea { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; font: inherit; padding: 10px; border: 1px solid #aebdb4; border-radius: 4px; }
.journal-editor { padding-top: 24px; }
.journal-header { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.journal-line { border: 0; border-top: 1px solid var(--line); padding: 16px 0; margin: 0 0 16px; display: grid; grid-template-columns: minmax(160px, 2fr) minmax(100px, 1fr) minmax(100px, 1fr) minmax(120px, 2fr) auto; gap: 12px; min-width: 0; }
.journal-line legend { color: var(--muted); padding: 0 8px 0 0; font-size: 13px; }
.check-field { display: flex; align-items: center; gap: 8px; padding: 12px 0; }
.check-field input[type=checkbox] { width: 18px; height: 18px; min-height: 18px; flex-shrink: 0; }
.check-field label { margin: 0; }
.journal-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.journal-filter label { margin: 0; }
.journal-filter select { width: 110px; }
.journal-list-filter { align-items: end; gap: 12px; }
.journal-list-filter > div { display: grid; gap: 5px; min-width: 0; }
.journal-list-filter input, .journal-list-filter select { width: 170px; max-width: 100%; }
.journal-list-filter label { font-size: 13px; }
.journal-date { white-space: nowrap; }
.loan-balances { display: flex; flex-wrap: wrap; gap: 24px; padding: 16px 0; border-block: 1px solid #dce5e0; }
.loan-balances dt { font-size: 13px; color: #58665f; }
.loan-balances dd { margin: 6px 0 0; font-size: 20px; }
.journal-movement { margin: 20px 0; padding: 16px 0; border-block: 1px solid #dce5e0; }
.journal-movement-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.journal-movement-row h3 { font-size: 18px; margin: 0 0 5px; }
.journal-movement-row p { margin: 0; overflow-wrap: anywhere; }
.journal-movement-row strong { font-size: 24px; white-space: nowrap; }
.journal-movement-row strong span { font-size: 14px; }
.journal-counterpart, .journal-recorded-date { font-size: 14px; margin: 8px 0 0; }
.journal-counterpart span, .journal-recorded-date { color: #58665f; }
.journal-accounting-details { margin: 20px 0; }
.journal-accounting-details summary { cursor: pointer; padding: 12px 0; font-weight: 600; }
.journal-date-hierarchy { display: flex; flex-wrap: wrap; gap: 16px; padding: 12px 0; border-top: 1px solid #e5e7eb; }
.journal-status { display: inline-block; padding: 3px 7px; border-radius: 4px; font-size: 12px; white-space: nowrap; }
.journal-status-reviewed { color: #176345; background: #e7f4ec; }
.journal-status-pending { color: #864800; background: #fff1d7; }
.journal-status-auto { color: #4b5563; background: #edf0f3; }
.books-table .amount { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 760px) { .journal-line, .journal-header { grid-template-columns: minmax(0, 1fr); } }
.books-row { display: flex; justify-content: space-between; gap: 24px; padding: 16px 0; border-top: 1px solid var(--line); }
.books-row a { overflow-wrap: anywhere; min-width: 0; }
.books-row span { color: var(--muted); }
.books-tabs { display: flex; justify-content: flex-start; flex-wrap: wrap; gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.books-tabs a { padding: 12px 0; border-bottom: 3px solid transparent; font-size: 14px; }
.books-tabs a[aria-current] { border-color: var(--green); color: #21352f; font-weight: 600; }
.books-form .field { margin-top: 20px; }
.books-table-wrap { overflow-x: auto; }
.books-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.books-table th, .books-table td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
dl { margin-top: 20px; }
dl:not(.prtls-user-profile__fields) > div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; border-bottom: 1px solid var(--line); padding: 16px 0; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
.messages { margin-top: 24px; padding: 12px 18px; border-left: 3px solid var(--green); background: #edf7f0; }
.messages p { margin: 0; }
.site-footer { padding: 20px 5%; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 24px; color: var(--muted); font-size: 13px; }
.privacy-page { max-width: 760px; margin-inline: auto; }
.privacy-page .page-heading { padding-bottom: 18px; }
.privacy-page .privacy-intro { font-size: 18px; line-height: 1.6; margin: 0 0 12px; }
.privacy-page .privacy-updated { color: var(--muted); font-size: 14px; margin: 0 0 28px; }
.privacy-page section { border-top: 1px solid var(--line); padding: 22px 0; }
.privacy-page section h2 { margin-bottom: 10px; }
.privacy-page section p { margin: 0 0 12px; }
.privacy-page section p:last-child { margin-bottom: 0; }
.privacy-page a { overflow-wrap: anywhere; }
.welcome-heading { padding: 64px 0 56px; }
.welcome-heading h1 { font-size: 48px; }
.welcome-lede { font-size: 26px; line-height: 1.35; margin: 20px 0 14px; }
.welcome-copy { color: var(--muted); margin: 0; font-size: 17px; line-height: 1.7; }
.welcome-actions { display: flex; align-items: center; gap: 24px; margin-top: 28px; }
.welcome-assurance { color: var(--muted); font-size: 14px; margin: 20px 0 0; }
.welcome-workspace { padding: 28px 0; border-top: 1px solid var(--line); }
.welcome-trust { padding: 28px 0 32px; border-top: 1px solid var(--line); }
.trust-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; margin-top: 24px; }
.trust-grid h3 { font-size: 16px; line-height: 1.4; margin: 0 0 10px; overflow-wrap: anywhere; }
.trust-grid p { color: var(--muted); font-size: 14px; margin: 0; overflow-wrap: anywhere; }
.workspace-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.workspace-heading h2 { font-size: 18px; }
.workspace-heading span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.welcome-workspace img { display: block; width: 100%; height: auto; }
@media (max-width: 640px) {
  .site-header { padding: 16px 20px; align-items: flex-start; gap: 16px; }
  .brand img { width: 106px; height: 36px; }
  nav { gap: 8px 16px; }
  main { width: calc(100% - 40px); padding-bottom: 40px; }
  .page-heading { padding-top: 28px; }
  h1 { font-size: 30px; }
  .form-section legend { float: none; width: auto; padding: 20px 0 0; }
  .form-section { padding: 16px 0 24px; }
  .step { display: inline; margin-right: 10px; }
  .section-fields { margin-left: 0; }
  .field-pair { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .heading-row { align-items: flex-start; flex-direction: column; gap: 18px; }
  .organization-row { grid-template-columns: minmax(0, 1fr) 46px; gap: 12px; }
  .open-label { display: none; }
  dl:not(.prtls-user-profile__fields) > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .form-actions { align-items: flex-start; flex-direction: column; }
  .form-actions .button { width: 100%; }
  .welcome-heading { padding: 36px 0; }
  .welcome-heading h1 { font-size: 38px; }
  .welcome-lede { font-size: 24px; }
  .trust-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .workspace-heading { flex-direction: column; gap: 8px; }
}
.books-tabs .books-admin-link { margin-left: auto; }
.workspace-heading .form-actions { padding-top: 0; }
.bookkeeping-workspace .site-header { min-height: 56px; padding: 8px 24px; gap: 16px; }
.bookkeeping-workspace .brand img { width: 100px; height: 34px; }
.bookkeeping-workspace main { width: min(100% - 48px, 1400px); }
.bookkeeping-workspace .site-footer { padding-block: 12px; }
.book-context { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; padding: 16px 0 8px; }
.book-context h1 { font-size: 20px; min-width: 0; }
.book-context .back-link { margin: 0; font-size: 13px; }
.book-currency { color: var(--muted); font-size: 12px; }
.bookkeeping-workspace .books-tabs { gap: 12px 24px; margin-bottom: 20px; }
.workspace-upload-form { padding: 16px 0; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.workspace-upload-form input[type="file"] { max-width: 100%; }
.workspace-start { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 0 32px; }
.workspace-start p, .workspace-empty { color: var(--muted); margin: 8px 0 0; }
.workspace-start .button { flex: none; }
.business-flow { max-width: 620px; margin-inline: auto; }
.business-flow.page-heading { padding-bottom: 20px; }
.business-flow.page-heading p:last-child { color: var(--muted); margin: 12px 0 0; }
.business-preview-note { padding: 12px 16px; border-left: 3px solid var(--green); background: #f3f8f5; font-size: 14px; }
.business-form { border-top: 1px solid var(--line); padding-top: 24px; }
.business-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin: 24px 0 0; }
.business-summary { margin: 0; border-top: 1px solid var(--line); }
.business-summary > div { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.business-summary dt { color: var(--muted); }
.business-summary dd { margin: 0; text-align: right; font-weight: 600; }
.workspace-home-section { padding: 24px 0; border-top: 1px solid var(--line); }
.workspace-home-section h2 { margin-bottom: 12px; }
.workspace-home-section .books-row:first-of-type { border-top: 0; }
.workspace-config a { display: inline-flex; align-items: center; min-height: 44px; }
.workspace-home-section .workspace-heading { margin-bottom: 12px; }
.workspace-home-section .workspace-heading a { display: inline-flex; align-items: center; min-height: 44px; }
.workspace-preferences-summary { margin-block: 0 24px; }
.workspace-preferences-summary dt { font-size: 14px; font-weight: 600; }
.workspace-preferences-summary dd { margin-top: 6px; }
.workspace-intro { margin: 8px 0 0; color: var(--muted); }
.workspace-section-heading { margin-bottom: 16px; }
.workspace-section-heading h2 { font-size: 22px; }
.workspace-work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.workspace-work-area { min-width: 0; padding-top: 20px; border-top: 1px solid var(--line); }
.workspace-work-area h3, .workspace-setup h3 { margin: 0; font-size: 17px; line-height: 1.35; }
.workspace-work-area .workspace-heading { margin-bottom: 12px; align-items: flex-start; }
.workspace-work-area .workspace-heading p, .workspace-setup p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.workspace-work-area .workspace-heading a { flex: none; min-height: 44px; display: inline-flex; align-items: center; font-size: 14px; }
.workspace-work-area .books-row { padding: 12px 0; }
.workspace-area-description { margin: 16px 0; color: var(--muted); font-size: 14px; }
.workspace-area-action { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 600; }
.workspace-secondary { margin-top: 40px; padding: 20px 0; border-top: 1px solid var(--line); }
.workspace-secondary h2 { font-size: 17px; }
.workspace-secondary p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.workspace-setup { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.workspace-setup-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 16px 0; }
.workspace-setup-row + .workspace-setup-row { border-top: 1px solid var(--line); }
.workspace-setup-row a { flex: none; display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 600; }
.workspace-business-name { padding: 0 0 12px; }
@media (max-width: 640px) {
  .workspace-start { align-items: stretch; flex-direction: column; gap: 16px; }
  .workspace-start .button { width: 100%; }
  .workspace-title { padding-bottom: 12px; }
  .workspace-work-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .workspace-secondary { margin-top: 32px; }
  .workspace-setup-row { align-items: flex-start; flex-direction: column; gap: 4px; }
}
@media (max-width: 600px) {
  .bookkeeping-workspace .site-header { padding: 8px 16px; align-items: flex-start; }
  .bookkeeping-workspace .site-header nav { gap: 8px 16px; }
  .bookkeeping-workspace main { width: calc(100% - 32px); }
  .bookkeeping-workspace .books-tabs { gap: 8px 16px; }
  .book-context { gap: 8px 12px; }
}

.connection-card { padding-bottom: 24px; }
.connection-card > p { color: var(--muted); font-size: 14px; }
.connection-account { border-top: 1px solid var(--line); }
.connection-map { width: min(100%, 320px); }
.connection-map .button { margin-top: 10px; }
.connection-disconnect { margin-top: 16px; }
@media (max-width: 640px) { .connection-map, .connection-map .button { width: 100%; } }

.account-settings-link { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; color: inherit; }
.account-settings-link:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.account-sync-summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.account-sync-summary p { margin: 0; color: var(--muted); }
.account-settings-form { max-width: 480px; }

.account-page-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.account-settings-heading { margin: 32px 0; }
.account-settings-form .form-field { margin-bottom: 16px; }
.account-settings-form textarea { display: block; box-sizing: border-box; width: 100%; min-height: 100px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; color: inherit; background: white; }
