/* Generated by php bin/build-css. Edit www/assets/styles/ instead. */
@layer tokens, base, components, layout, pages;
@layer tokens {
  :root {
    color-scheme: light;
    /* Roles: --primary (ink) = controls, links, standard buttons; --create (red) = the one main action on a screen; --brand = logo only. */
    --brand: #eb4d34;
    --wash: #f1f4f8;
    --wash-strong: #dde3ea;
    --background: #f5f6f8;
    --foreground: #172136;
    --card: #ffffff;
    --muted: #f0f2f5;
    --muted-foreground: #566174;
    --primary: #172136;
    --primary-hover: #2a3550;
    --primary-foreground: #ffffff;
    --create: #d61a00;
    --create-hover: #b81600;
    --create-foreground: #ffffff;
    --accent: #eceff4;
    --accent-foreground: #172136;
    --border: #e1e5eb;
    --input: #7f8a9d;
    --ring: #172136;
    --destructive: #a3123a;
    --destructive-background: #fdeef1;
    --success: #137547;
    --success-background: #edf8f1;
    --warning: #935100;
    --warning-background: #fff7e9;
    --status-paid: #137547;
    --status-draft: #4d5769;
    --status-unpaid: #935100;
    --status-overdue: #a3123a;
    --status-future: #0a6a8c;
    --chart-1: #172136;
    --chart-2: #7f8a9d;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-media: 20px;
    --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --text-xs: 13px;
    --text-sm: 14px;
    --text-md: 15px;
    --text-base: 16px;
    --text-lg: 18px;
    --text-xl: 20px;
    --text-2xl: 24px;
    --text-3xl: 30px;
    --text-4xl: 40px;
    --text-display: clamp(40px, 5.4vw, 68px);
    --page-width: 1380px;
    --site-width: 1200px;
    --control-height: 44px;
    --panel-padding: 24px;
    --gap: 20px;
    --section-gap: 24px;
  }
}
@layer base {
  @font-face {
    font-family: Inter;
    src: url('vendor/InterVariable.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
  }
  *, *::before, *::after {
    box-sizing: border-box;
  }
  html {
    -webkit-text-size-adjust: 100%;
    scrollbar-gutter: stable;
  }
  html:has(dialog:modal) {
    overflow: hidden;
  }
  body {
    margin: 0;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    background: var(--background);
    color: var(--foreground);
    font: 400 var(--text-base)/1.6 var(--font);
    -webkit-font-smoothing: antialiased;
  }
  button, input, select, textarea {
    font: inherit;
    color: inherit;
  }
  input, select, textarea {
    font-size: var(--text-base);
  }
  button, summary {
    cursor: pointer;
  }
  button {
    background: none;
  }
  button:disabled {
    cursor: not-allowed;
  }
  a {
    color: inherit;
    text-decoration: none;
  }
  img {
    max-width: 100%;
    height: auto;
  }
  svg {
    max-width: 100%;
  }
  h1, h2, h3, h4, p {
    margin: 0;
  }
  h1 {
    font-size: var(--text-3xl);
    font-weight: 650;
    line-height: 1.25;
    letter-spacing: -.02em;
  }
  h2 {
    font-size: var(--text-xl);
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -.01em;
  }
  h3 {
    font-size: var(--text-lg);
    font-weight: 600;
    line-height: 1.4;
  }
  strong, b {
    font-weight: 600;
  }
  small, .small {
    font-size: var(--text-sm);
  }
  fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
  }
  legend {
    padding: 0;
  }
  summary {
    list-style: none;
  }
  summary::-webkit-details-marker {
    display: none;
  }
  ul, ol {
    margin: 0;
    padding-left: 20px;
  }
  code {
    padding: 2px 5px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--muted);
    font: var(--text-xs)/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
    overflow-wrap: anywhere;
  }
  [hidden] {
    display: none !important;
  }
  :focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 3px;
  }
  ::selection {
    background: var(--accent);
  }
  .sr-only, .upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
  .muted, .hint {
    color: var(--muted-foreground);
  }
  .hint {
    display: block;
    font-size: var(--text-sm);
    line-height: 1.5;
  }
  .number, .right {
    text-align: right;
    font-variant-numeric: tabular-nums;
  }
  .full-width {
    width: 100%;
  }
  .icon {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    vertical-align: -3px;
  }
  .destructive-text {
    color: var(--destructive);
  }
  input:where(:not([type=checkbox], [type=radio], [type=submit], [type=hidden], [type=file], [type=color])), select, textarea {
    width: 100%;
    min-width: 0;
    height: var(--control-height);
    padding: 0 12px;
    border: 1px solid var(--input);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--foreground);
    line-height: 1.4;
  }
  textarea {
    height: auto;
    min-height: 120px;
    padding: 10px 12px;
    resize: vertical;
  }
  select {
    appearance: none;
    padding-right: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2371717a' stroke-width='1.5'%3E%3Cpath d='m5 6 3 3 3-3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 16px;
    background-position: right 8px center;
  }
  input::placeholder, textarea::placeholder {
    color: var(--muted-foreground);
    opacity: .8;
  }
  input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: -1px;
    border-color: var(--ring);
  }
  input:disabled, select:disabled, textarea:disabled {
    opacity: .55;
    cursor: not-allowed;
  }
  input[readonly] {
    background: var(--muted);
  }
  input[type=checkbox], input[type=radio] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--primary);
    flex-shrink: 0;
  }
  input[type=color] {
    width: 100%;
    height: var(--control-height);
    padding: 3px;
    border: 1px solid var(--input);
    border-radius: var(--radius);
    background: var(--card);
  }
  input[aria-invalid=true], select[aria-invalid=true], textarea[aria-invalid=true] {
    border-color: var(--destructive);
  }
  label, legend {
    font-size: var(--text-sm);
    font-weight: 500;
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: .01ms !important;
      transition-duration: .01ms !important;
      scroll-behavior: auto !important;
    }
  }
}
@layer components {
  /* Button: one primitive, explicit variants and sizes. */
  .button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: var(--control-height);
    padding: 0 16px;
    border: 1px solid var(--input);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--foreground);
    font-size: var(--text-md);
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .12s, border-color .12s;
  }
  .button:hover {
    background: var(--muted);
  }
  .button[data-variant=primary] {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--primary-foreground);
  }
  .button[data-variant=primary]:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
  }
  .button[data-variant=create] {
    background: var(--create);
    border-color: var(--create);
    color: var(--create-foreground);
  }
  .button[data-variant=create]:hover {
    background: var(--create-hover);
    border-color: var(--create-hover);
  }
  .button[data-variant=outline] {
    border-color: var(--border);
  }
  .button[data-variant=outline]:hover {
    border-color: var(--foreground);
    background: var(--card);
  }
  .button[data-variant=secondary] {
    background: var(--muted);
    border-color: transparent;
  }
  .button[data-variant=ghost] {
    background: transparent;
    border-color: transparent;
  }
  .button[data-variant=ghost]:hover {
    background: var(--muted);
  }
  .button[data-variant=destructive] {
    color: var(--destructive);
    border-color: color-mix(in srgb, var(--destructive) 25%, var(--border));
    background: var(--card);
  }
  .button[data-variant=destructive]:hover {
    background: var(--destructive-background);
  }
  .button[data-size=sm] {
    min-height: 36px;
    padding-inline: 12px;
    font-size: var(--text-sm);
  }
  .button[data-size=lg] {
    min-height: 48px;
    padding-inline: 20px;
  }
  .button[data-size=icon] {
    width: var(--control-height);
    min-width: var(--control-height);
    padding: 0;
  }
  .button[data-size=icon-sm] {
    width: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
  }
  .button:disabled, .button[aria-disabled=true] {
    opacity: .5;
    pointer-events: none;
  }
  form[aria-busy=true] .form-actions, form[data-submitting=true] .invoice-action-buttons {
    pointer-events: none;
    opacity: .6;
  }
  .text-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--primary);
    font-size: inherit;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: var(--input);
    text-underline-offset: 3px;
    cursor: pointer;
  }
  .text-link:hover {
    text-decoration-color: currentColor;
  }
  /* Fields and groups. */
  .field, .form-fields {
    display: grid;
    gap: 6px;
    min-width: 0;
    align-content: start;
  }
  /* Auto-rendered forms flow into columns on wide cards; long and grouped controls span the row. */
  .form-fields {
    grid-template-columns: repeat(auto-fill,minmax(min(100%,260px),1fr));
    gap: 20px;
  }
  .form-fields>:is(fieldset,.field:has(textarea,.checkbox-label,.upload-control,.switch-control)) {
    grid-column: 1/-1;
  }
  .field-grid {
    display: grid;
    gap: 20px;
    min-width: 0;
  }
  .field-grid.two {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .field-grid.three {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
  .field-description {
    display: block;
    color: var(--muted-foreground);
    font-size: var(--text-sm);
    line-height: 1.5;
  }
  .field-error, .error {
    color: var(--destructive);
    font-size: var(--text-sm);
  }
  .field[data-disabled=true] {
    opacity: .6;
  }
  .field>label.required::after {
    content: ' *';
    color: var(--destructive);
  }
  .dialog-actions-spacer {
    flex: 1;
  }
  .form-actions, .dialog-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 20px;
  }
  .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-block: 4px;
    font-size: var(--text-base);
    font-weight: 400;
    line-height: 1.5;
    cursor: pointer;
  }
  .checkbox-label>input {
    margin-top: 3px;
  }
  .checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(min(100%,240px),1fr));
    gap: 4px 16px;
  }
  .inline-options {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 20px;
  }
  .choice-group, .segmented {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--muted);
  }
  .choice-item {
    position: relative;
    cursor: pointer;
  }
  .choice-item input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
  }
  .choice-item>span, .segmented button {
    display: block;
    min-height: 36px;
    padding: 7px 14px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--muted-foreground);
    font-size: var(--text-sm);
    font-weight: 500;
    white-space: nowrap;
  }
  .choice-item input:checked+span, .segmented button.active {
    background: var(--primary);
    color: var(--primary-foreground);
  }
  .choice-item input:focus-visible+span {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
  }
  .switch-control {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: var(--text-sm);
    font-weight: 400;
    cursor: pointer;
  }
  .switch-control input {
    appearance: none;
    position: relative;
    width: 40px;
    height: 24px;
    border: 1px solid transparent;
    border-radius: 99px;
    background: var(--input);
    transition: background-color .12s;
  }
  .switch-control input::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--card);
    transition: transform .12s;
  }
  .switch-control input:checked {
    background: var(--primary);
  }
  .switch-control input:checked::before {
    transform: translateX(16px);
  }
  .upload-control {
    position: relative;
    display: grid;
    gap: 10px;
  }
  .upload-dropzone {
    display: grid;
    place-items: center;
    gap: 5px;
    padding: 18px 12px;
    border: 1px dashed var(--input);
    border-radius: var(--radius);
    background: var(--background);
    text-align: center;
    cursor: pointer;
  }
  .upload-dropzone span {
    color: var(--muted-foreground);
    font-size: var(--text-xs);
    font-weight: 400;
  }
  .upload-control:focus-within .upload-dropzone, .upload-control[data-dragging=true] .upload-dropzone {
    border-color: var(--primary);
    background: var(--accent);
    outline: 2px solid var(--ring);
    outline-offset: 2px;
  }
  .upload-control img {
    max-height: 80px;
    max-width: 100%;
    object-fit: contain;
    justify-self: center;
  }
  /* Card, badges, feedback. */
  .dialog-description {
    margin-top: 4px;
    color: var(--muted-foreground);
    font-size: var(--text-sm);
  }
  .card {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
  }
  /* Explicit header/body sections do not depend on child-position margin overrides. */
  .form-section {
    min-width: 0;
    overflow: hidden;
  }
  .form-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 68px;
    padding: 12px var(--panel-padding);
    border-bottom: 1px solid var(--border);
    background: var(--card);
  }
  .form-section-heading {
    min-width: 0;
  }
  .form-section-heading h2 {
    font-size: var(--text-lg);
  }
  .form-section-heading p {
    margin-top: 2px;
    color: var(--muted-foreground);
    font-size: var(--text-sm);
  }
  .form-section-action {
    flex-shrink: 0;
  }
  .form-section-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: var(--panel-padding);
  }
  .form-section-body>form {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .form-section-body>form>.form-actions {
    padding-top: 0;
  }
  .form-section-body[data-flush] {
    gap: 0;
    padding: 0;
  }
  details.form-section:not([open]) > .form-section-header {
    border-bottom-color: transparent;
  }
  details.form-section > summary::after {
    content: '+';
    color: var(--muted-foreground);
    font-size: var(--text-lg);
  }
  details.form-section[open] > summary::after {
    content: '−';
  }
  @media(max-width:600px) {
    .form-section { --panel-padding: 20px; }
    .form-section-header { gap: 16px; }
  }
  .form-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: var(--panel-padding);
  }
  .section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
  }
  .badge, .count-badge {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 4px 9px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--muted);
    color: var(--muted-foreground);
    font-size: var(--text-xs);
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
  }
  .badge {
    gap: 7px;
    padding: 4px 10px 4px 6px;
    border-color: transparent;
    border-radius: 6px;
    color: var(--status-color,var(--muted-foreground));
    background: color-mix(in srgb,var(--status-color,var(--muted-foreground)) 12%,white);
    font-size: var(--text-sm);
    font-weight: 600;
  }
  /* Every status in the app maps to one of five tones here; templates only set data-status. */
  :is([data-status=paid],[data-status=ready],[data-status=active],[data-status=done],[data-status=finalized],[data-status=accepted]) {
    --status-color: var(--status-paid);
  }
  :is([data-status=draft],[data-status=cancelled],[data-status=refunded],[data-status=revoked],[data-status=expired]) {
    --status-color: var(--status-draft);
  }
  :is([data-status=unpaid],[data-status=pending],[data-status=queued],[data-status=running],[data-status=sending],[data-status=refund_pending],[data-status=trial]) {
    --status-color: var(--status-unpaid);
  }
  :is([data-status=overdue],[data-status=failed]) {
    --status-color: var(--status-overdue);
  }
  :is([data-status=future],[data-status=open]) {
    --status-color: var(--status-future);
  }
  .legend-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
  }
  .badge>i {
    display: inline-block;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    background: var(--status-color,var(--muted-foreground)) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/11px no-repeat;
  }
  .legend-dot.issued {
    background: var(--chart-1);
  }
  .legend-dot.expense {
    background: var(--chart-2);
  }
  .alert {
    --tone: var(--primary);
    --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E");
    position: relative;
    padding: 12px 16px 12px 46px;
    border: 1px solid color-mix(in srgb,var(--tone) 30%,white);
    border-radius: var(--radius);
    background: color-mix(in srgb,var(--tone) 7%,white);
    color: var(--foreground);
    font-size: var(--text-md);
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
  .alert::before {
    content: '';
    position: absolute;
    top: 13px;
    left: 16px;
    width: 20px;
    height: 20px;
    background: var(--tone);
    mask: var(--alert-icon) center/contain no-repeat;
  }
  .alert:has(>[data-dismiss]) {
    padding-right: 52px;
  }
  .alert>[data-dismiss] {
    position: absolute;
    top: 5px;
    right: 6px;
    color: var(--muted-foreground);
  }
  .alert>p+p, .alert>div>p {
    margin-top: 4px;
  }
  .alert+.form-fields {
    margin-top: 16px;
  }
  .form-section-body>form>.alert+.form-fields {
    margin-top: 0;
  }
  .alert.success {
    --tone: var(--success);
    --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
  }
  .alert.danger, .alert.error {
    --tone: var(--destructive);
    --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/svg%3E");
  }
  .alert.warning {
    --tone: var(--warning);
    --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E");
  }
  .list-card .alert {
    margin: 12px 16px 0;
  }
  .separator {
    height: 1px;
    width: 100%;
    margin-block: 6px;
    background: var(--border);
  }
  .empty-state {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 48px 20px;
    color: var(--muted-foreground);
    text-align: center;
  }
  .empty-state>.icon {
    width: 30px;
    height: 30px;
    margin-bottom: 4px;
  }
  .empty-state h3 {
    color: var(--foreground);
  }
  .empty-state p {
    max-width: 420px;
  }
  .empty-inline {
    padding: 24px;
    text-align: center;
    color: var(--muted-foreground);
    font-size: var(--text-md);
  }
  /* Toasts sit in the top layer (popover) so they also show above open dialogs. */
  .toast-stack {
    position: fixed;
    inset: 88px max(20px,calc((100vw - var(--page-width))/2)) auto auto;
    display: grid;
    gap: 8px;
    width: min(420px,calc(100vw - 32px));
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
    pointer-events: none;
  }
  .toast-stack:not(:popover-open) {
    display: none;
  }
  .toast {
    pointer-events: auto;
  }
  @media(max-width:600px) {
    .toast-stack { inset: 76px 16px auto auto; }
  }
  /* All overlays use the browser top layer. No page-specific stacking offsets. */
  .dialog {
    width: min(560px,calc(100vw - 32px));
    max-width: none;
    max-height: min(90svh,920px);
    margin: auto;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
    color: var(--foreground);
    overflow: hidden;
  }
  .dialog[open] {
    display: flex;
    flex-direction: column;
  }
  .dialog::backdrop {
    background: #18181b66;
  }
  .dialog[data-size=sm] {
    width: min(420px,calc(100vw - 32px));
  }
  .dialog[data-size=lg] {
    width: min(760px,calc(100vw - 32px));
  }
  .dialog[data-size=xl] {
    width: min(1040px,calc(100vw - 32px));
  }
  .dialog-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }
  .dialog-heading h2 {
    font-size: var(--text-xl);
  }
  .dialog-content {
    min-height: 0;
    overflow: auto;
    padding: 24px;
    overscroll-behavior: contain;
  }
  .dialog-content>p {
    margin-bottom: 16px;
  }
  .dialog-content .dialog-actions {
    margin-top: 8px;
  }
  .popover {
    display: inline-flex;
    min-width: 0;
  }
  .popover-panel {
    position: fixed;
    inset: auto;
    margin: 0;
    min-width: 190px;
    max-width: calc(100vw - 16px);
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--foreground);
    overflow: auto;
    overscroll-behavior: contain;
  }
  [popover]:not(:popover-open) {
    display: none;
  }
  .popover-panel>a, .popover-panel>button, .popover-panel .menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: var(--control-height);
    padding: 9px 12px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    font-size: var(--text-md);
    text-align: left;
  }
  .popover-panel>a:hover, .popover-panel>button:hover, .popover-panel .menu-item:hover {
    background: var(--muted);
  }
  .popover-panel .form-actions {
    padding-top: 8px;
  }
  .popover-panel>.destructive-text {
    color: var(--destructive);
  }
  .tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding-bottom: 3px;
    border-bottom: 1px solid var(--border);
  }
  .tabs a {
    padding: 10px 14px;
    border-radius: var(--radius);
    color: var(--muted-foreground);
    font-size: var(--text-sm);
    font-weight: 500;
  }
  .tabs a:hover {
    background: var(--muted);
    color: var(--foreground);
  }
  .tabs a[aria-current=page] {
    color: var(--primary-foreground);
    background: var(--primary);
    font-weight: 600;
  }
  .form-details {
    padding-top: 16px;
    border-top: 1px solid var(--border);
  }
  .form-details summary {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-sm);
    font-weight: 500;
  }
  .form-details summary::after {
    content: '+';
    margin-left: auto;
    color: var(--muted-foreground);
  }
  .form-details[open]>summary::after {
    content: '−';
  }
  .form-details[open]>summary {
    margin-bottom: 18px;
  }
  /* Table, filtering and pagination. */
  .table-scroll {
    position: relative;
    width: 100%;
    overflow-x: auto;
  }
  .data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    white-space: nowrap;
    font-size: var(--text-md);
  }
  .data-table th {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--card);
    color: var(--foreground);
    font-size: var(--text-sm);
    font-weight: 600;
  }
  .data-table th a:hover {
    color: var(--primary);
  }
  .data-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
  }
  .data-table :is(th,td):first-child {
    padding-left: var(--panel-padding);
  }
  .data-table :is(th,td):last-child {
    padding-right: var(--panel-padding);
  }
  .data-table tr:last-child td {
    border-bottom: 0;
  }
  .data-table tbody tr:not(.empty-row):hover {
    background: color-mix(in srgb,var(--muted) 45%,white);
  }
  .data-table td small {
    display: block;
    margin-top: 3px;
    color: var(--muted-foreground);
    font-size: var(--text-xs);
  }
  .data-table td .table-link {
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--wash-strong);
    text-underline-offset: 3px;
  }
  .data-table td .table-link:hover {
    text-decoration-color: currentColor;
  }
  .data-table td>a:hover {
    color: var(--primary);
  }
  .data-table .actions-cell {
    width: 48px;
  }
  .search-input {
    position: relative;
    display: flex;
    align-items: center;
  }
  .search-input .icon {
    position: absolute;
    left: 13px;
    color: var(--muted-foreground);
    pointer-events: none;
  }
  .search-input input {
    width: 100%;
    max-width: none;
    padding-left: 38px;
  }
  .bulk-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--muted-foreground);
    font-size: var(--text-sm);
  }
  .bulk-toolbar .button {
    color: var(--primary);
  }
  .bulk-toolbar > span {
    order: 1;
    margin-left: auto;
  }
  /* Bulk actions read as unavailable until a row is ticked; the server still rejects an empty selection. */
  form:not(:has([data-row-select]:checked)) .bulk-toolbar .button {
    color: var(--muted-foreground);
    pointer-events: none;
  }
  form:not(:has([data-row-select]:checked)) .bulk-toolbar > span {
    visibility: hidden;
  }
  .pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-top: 1px solid var(--border);
    color: var(--muted-foreground);
    font-size: var(--text-sm);
  }
  .pagination form {
    margin-left: auto;
  }
  .pagination>div, .pagination label {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .pagination select {
    width: 70px;
  }
  .pagination-pages {
    flex-wrap: wrap;
    gap: 4px;
  }
  .pagination-page {
    display: grid;
    place-items: center;
    min-width: 36px;
    min-height: 36px;
    padding-inline: 6px;
    border-radius: var(--radius);
    color: var(--primary);
    font-weight: 600;
  }
  .pagination-page:hover {
    background: var(--muted);
  }
  .pagination-page[aria-current=page] {
    background: var(--primary);
    color: var(--primary-foreground);
  }
  .pagination-gap {
    min-width: 24px;
    text-align: center;
  }
  /* An amount, its status badge and a count; the shared building block of status overviews. */
  .status-total {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 8px;
    min-width: 0;
    padding: 12px 8px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    text-align: center;
  }
  .status-total:hover {
    background: var(--muted);
  }
  .status-total[aria-current=true] {
    border-color: var(--status-color,var(--primary));
    background: var(--card);
  }
  .status-total strong {
    font-size: var(--text-lg);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .status-total small {
    color: var(--muted-foreground);
    font-size: var(--text-xs);
  }
  .info-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 6px 12px;
    border: 1px solid var(--wash-strong);
    border-radius: var(--radius);
    background: var(--wash);
    color: var(--foreground);
    font-size: var(--text-sm);
  }
  .info-chip a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
  }
  /* Document actions as icon tiles with a label underneath. */
  .action-tiles {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
  }
  .action-tiles .button {
    border-color: var(--border);
    background: var(--card);
  }
  .action-tiles .button:hover {
    border-color: var(--foreground);
  }
  .action-tiles .destructive-text {
    color: var(--destructive);
  }
  .row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 2px;
  }
  .row-actions .button {
    color: var(--muted-foreground);
  }
  .row-actions .button:hover {
    color: var(--foreground);
  }
  .row-actions .destructive-text:hover {
    color: var(--destructive);
  }
  /* Czech date field and its calendar. */
  input[data-date] {
    padding-right: 40px;
    background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23486575' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4M16 2v4'/%3E%3Crect width='18' height='18' x='3' y='4' rx='2'/%3E%3Cpath d='M3 10h18'/%3E%3C/svg%3E") right 12px center/18px no-repeat;
  }
  .date-picker {
    width: 312px;
    padding: 12px;
  }
  .date-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
  }
  .date-picker-head strong {
    display: block;
    font-weight: 600;
  }
  .date-picker-head strong::first-letter {
    text-transform: uppercase;
  }
  .date-picker-grid {
    display: grid;
    grid-template-columns: repeat(7,minmax(0,1fr));
    gap: 2px;
  }
  .date-picker-grid span {
    padding-block: 4px;
    color: var(--muted-foreground);
    font-size: var(--text-xs);
    text-align: center;
  }
  .date-picker-grid button {
    min-height: 36px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--foreground);
    font-size: var(--text-md);
    font-variant-numeric: tabular-nums;
    cursor: pointer;
  }
  .date-picker-grid button:hover {
    background: var(--muted);
  }
  .date-picker-grid button[data-outside] {
    color: var(--muted-foreground);
  }
  .date-picker-grid button[aria-current=date] {
    border-color: var(--primary);
    font-weight: 600;
  }
  .date-picker-grid button[aria-pressed=true] {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--primary-foreground);
  }
  .date-picker-foot {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
  }
  .row-action-gap {
    width: 36px;
  }
  .data-table .actions-cell:has(.row-actions) {
    width: auto;
  }
  .data-table th.actions-cell {
    text-align: right;
  }
  @media(max-width:600px) {
    .field-grid.two, .field-grid.three {
      grid-template-columns: 1fr;
    }
    .form-card {
      --panel-padding: 20px;
    }
    .dialog {
      max-height: 94svh;
    }
    .dialog-heading, .dialog-content {
      padding: 20px;
    }
    .pagination {
      flex-wrap: wrap;
    }
    .data-table th,.data-table td {
      padding-inline: 12px;
    }
  }
  .filter-popover {
    display: grid;
    gap: 12px;
    width: 290px;
    padding: 16px;
  }
  .filter-popover label {
    display: grid;
    gap: 6px;
  }
  .filter-popover input,.filter-popover select {
    width: 100%;
    max-width: none;
  }
  .amount-range {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(min(100%,280px),1fr));
    gap: var(--gap);
  }
  .link-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: var(--panel-padding);
  }
  a.link-card:hover {
    border-color: var(--primary);
  }
  .link-card-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-bottom: 4px;
    border-radius: var(--radius);
    background: var(--wash);
    color: var(--foreground);
  }
  .link-card-icon>.icon {
    width: 20px;
    height: 20px;
  }
  .link-card h3 {
    font-size: var(--text-lg);
  }
  .link-card p {
    color: var(--muted-foreground);
    font-size: var(--text-sm);
  }
  .link-card-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 8px;
    color: var(--primary);
    font-size: var(--text-sm);
    font-weight: 500;
  }
  .party-details {
    display: grid;
    gap: 12px;
  }
  .party-details>div {
    display: grid;
    grid-template-columns: minmax(80px,.4fr) minmax(0,1fr);
    gap: 16px;
    font-size: var(--text-md);
  }
  .party-details dt {
    color: var(--muted-foreground);
  }
  .party-details dd {
    margin: 0;
    overflow-wrap: anywhere;
  }
}
@layer layout {
  .topbar {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 76px;
    padding: 10px max(24px,calc((100vw - var(--page-width))/2));
    border-bottom: 1px solid var(--border);
    background: var(--card);
  }
  .brand {
    display: inline-flex;
    flex-shrink: 0;
  }
  .brand img {
    display: block;
    width: 152px;
    height: auto;
  }
  .module-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
  }
  .module-nav a {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    padding: 6px 10px;
    border-radius: var(--radius);
    color: var(--foreground);
    font-size: var(--text-base);
    font-weight: 500;
    white-space: nowrap;
  }
  .module-nav a .icon {
    color: var(--muted-foreground);
  }
  .module-nav a[aria-current=page] .icon {
    color: inherit;
  }
  .module-nav a:hover {
    background: var(--muted);
    color: var(--foreground);
  }
  .module-nav a[aria-current=page] {
    background: var(--accent);
    color: var(--accent-foreground);
    font-weight: 600;
  }
  .topbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
  }
  .company-short {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .avatar {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--muted);
    color: var(--muted-foreground);
    font-size: var(--text-xs);
    font-weight: 600;
  }
  .company-panel {
    width: 285px;
  }
  .company-panel form {
    padding: 8px;
  }
  .menu-heading {
    display: grid;
    gap: 3px;
    padding: 10px 8px;
    border-bottom: 1px solid var(--border);
    font-size: var(--text-md);
  }
  .menu-heading small {
    color: var(--muted-foreground);
    font-size: var(--text-xs);
    overflow-wrap: anywhere;
  }
  .notification-panel {
    width: 320px;
    padding: 16px;
  }
  .notification-panel h2 {
    margin-bottom: 12px;
  }
  .notification-panel > a.notification {
    display: grid;
    align-items: start;
    gap: 2px;
    padding: 10px 8px;
    border-top: 1px solid var(--border);
    border-radius: 0;
    font-size: var(--text-sm);
  }
  .notification-panel > a.notification:hover {
    background: var(--muted);
  }
  .notification p {
    color: var(--muted-foreground);
  }
  .notification time {
    color: var(--muted-foreground);
    font-size: var(--text-xs);
  }
  .notification-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--create);
  }
  .app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--section-gap);
    width: min(100%,calc(var(--page-width) + 48px));
    margin-inline: auto;
    padding: 32px 24px 60px;
  }
  #snippet--flashes:empty {
    display: none;
  }
  .app-main:focus,.site-main:focus {
    outline: none;
  }
  .skip-link {
    position: fixed;
    top: -70px;
    left: 16px;
    z-index: 2;
    padding: 8px 12px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--border);
  }
  .skip-link:focus {
    top: 10px;
  }
  .footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 24px;
    padding: 18px max(24px,calc((100vw - var(--page-width))/2));
    border-top: 1px solid var(--border);
    color: var(--muted-foreground);
    font-size: var(--text-xs);
  }
  /* Keep footer text clear of the fixed support button on app pages. */
  .app-main ~ .footer {
    padding-right: max(calc(var(--control-height) + 40px), calc((100vw - var(--page-width))/2));
  }
  .footer>div {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
  }
  .footer-brand {
    color: var(--foreground);
    font-weight: 600;
  }
  /* Public site: one content width, header, footer. */
  .site {
    background: var(--card);
  }
  .site-container {
    width: min(100%, calc(var(--site-width) + 48px));
    margin-inline: auto;
    padding-inline: 24px;
  }
  .site-header {
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 1px solid var(--border);
    background: var(--card);
  }
  .site-header-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    min-height: 72px;
  }
  .site-logo {
    display: inline-flex;
    flex-shrink: 0;
  }
  .site-logo img {
    display: block;
    width: 175px;
    height: auto;
  }
  .site-nav {
    display: flex;
    gap: 4px;
  }
  .site-nav a, .site-menu a {
    display: flex;
    align-items: center;
    min-height: var(--control-height);
    padding-inline: 12px;
    border-radius: var(--radius);
    font-size: var(--text-md);
    font-weight: 500;
  }
  .site-nav a:hover, .site-menu a:hover {
    background: var(--muted);
  }
  .site-nav a[aria-current=page], .site-menu a[aria-current=page] {
    background: var(--accent);
    color: var(--accent-foreground);
  }
  .site-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
  }
  .site-actions .popover {
    display: none;
  }
  .site-menu nav {
    display: grid;
    gap: 2px;
    min-width: 220px;
  }
  .site-main {
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  .site-footer {
    border-top: 1px solid var(--border);
    color: var(--muted-foreground);
    font-size: var(--text-md);
  }
  .site-footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, minmax(0, 1fr));
    gap: 32px;
    padding-top: 56px;
  }
  .site-footer-about img {
    display: block;
    width: 150px;
    height: auto;
  }
  .site-footer-about p {
    max-width: 300px;
    margin-top: 16px;
  }
  .site-footer nav {
    display: grid;
    align-content: start;
  }
  .site-footer nav a {
    padding-block: 4px;
  }
  .site-footer h2 {
    margin-bottom: 10px;
    color: var(--foreground);
    font-size: var(--text-sm);
    font-weight: 650;
  }
  .site-footer a:hover {
    color: var(--foreground);
    text-decoration: underline;
  }
  .site-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-top: 48px;
    padding-block: 20px 32px;
    border-top: 1px solid var(--border);
    font-size: var(--text-sm);
  }
  .site-footer-bottom a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  @media(max-width:1040px) {
    .site-nav, .site-signin {
      display: none;
    }
    .site-actions .popover {
      display: block;
    }
    .site-footer-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
  @media(max-width:640px) {
    .site-container {
      padding-inline: 16px;
    }
    .site-header-inner {
      gap: 12px;
      min-height: 64px;
    }
    .site-logo img {
      width: 140px;
    }
    .site-footer-grid {
      grid-template-columns: 1fr;
    }
  }
  .footer a:hover {
    color: var(--foreground);
  }
  .page-header {
    display: grid;
    gap: 8px;
  }
  .page-back {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 4px;
    padding-block: 4px;
    color: var(--muted-foreground);
    font-size: var(--text-sm);
    font-weight: 500;
  }
  .page-back:hover {
    color: var(--foreground);
  }
  .page-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px 20px;
  }
  .page-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
  }
  .page-header-text p {
    margin-top: 5px;
    color: var(--muted-foreground);
    font-size: var(--text-md);
  }
  .page-header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }
  .page-header-actions:empty {
    display: none;
  }
  .eyebrow {
    display: block;
    color: var(--muted-foreground);
    font-size: var(--text-xs);
    font-weight: 600;
    margin-bottom: 7px;
  }
  .editor-layout {
    display: grid;
    grid-template-columns: minmax(0,1fr) 380px;
    gap: var(--gap);
    align-items: start;
  }
  .editor-main,.editor-aside,.detail-layout>aside {
    display: grid;
    gap: var(--gap);
    min-width: 0;
  }
  .detail-layout {
    display: grid;
    grid-template-columns: minmax(0,1fr) 380px;
    gap: var(--gap);
    align-items: start;
  }
  .contact-layout {
    display: grid;
    grid-template-columns: minmax(320px,.8fr) minmax(0,1.2fr);
    gap: var(--gap);
    align-items: start;
  }
  .settings-layout {
    display: grid;
    grid-template-columns: 240px minmax(0,1fr);
    gap: var(--section-gap);
    align-items: start;
  }
  .settings-nav {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .settings-nav-group {
    display: grid;
    gap: 4px;
  }
  .settings-nav-group h3 {
    margin: 0 12px 6px;
    color: var(--muted-foreground);
    font-size: var(--text-xs);
    font-weight: 600;
  }
  .settings-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: var(--muted-foreground);
    font-size: var(--text-sm);
    font-weight: 500;
  }
  .settings-nav a:hover {
    background: var(--accent);
    color: var(--accent-foreground);
  }
  .settings-nav a[aria-current=page] {
    background: var(--accent);
    color: var(--accent-foreground);
    font-weight: 600;
  }
  .settings-panel {
    display: grid;
    align-content: start;
    gap: var(--gap);
    min-width: 0;
  }
  .settings-panel>form {
    display: grid;
    gap: var(--gap);
  }
  .settings-panel>form>.form-actions {
    padding-top: 0;
  }
  .settings-panel-title {
    font-size: var(--text-xl);
  }
  .inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 16px;
  }
  .inline-form>.field {
    flex: 1 1 220px;
  }
  .preview-box {
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--muted);
    font-size: var(--text-sm);
  }
  .preview-box output {
    font-size: var(--text-xl);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }
  .merge-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }
  .totp-qr {
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }
  .recovery-codes {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 8px;
    width: 100%;
  }
  /* The company name gives way before the navigation can run under the actions. */
  @media(max-width:1280px) {
    .company-short {
      display: none;
    }
  }
  @media(max-width:1100px) {
    .topbar {
      flex-wrap: wrap;
      padding: 10px 16px;
      gap: 8px;
    }
    .module-nav {
      order: 3;
      width: 100%;
      overflow-x: auto;
    }
    .module-nav a {
      flex: 1;
      justify-content: center;
    }
    .topbar-actions {
      margin-left: auto;
    }
    .editor-layout,.detail-layout,.contact-layout {
      grid-template-columns: 1fr;
    }
    .editor-aside {
      grid-template-columns: repeat(2,minmax(0,1fr));
    }
    .brand-upload-card {
      grid-column: 1/-1;
    }
    .settings-layout {
      grid-template-columns: 1fr;
    }
    .settings-nav {
      position: static;
      flex-direction: row;
      gap: 16px;
      overflow-x: auto;
      padding-bottom: 4px;
      border-bottom: 1px solid var(--border);
    }
    .settings-nav-group {
      display: flex;
      flex-shrink: 0;
      gap: 4px;
    }
    .settings-nav-group h3 {
      display: none;
    }
    .settings-nav a {
      white-space: nowrap;
    }
  }
  @media(max-width:600px) {
    .app-main {
      --section-gap: 20px;
      padding: 20px 14px 48px;
    }
    .page-header-actions {
      width: 100%;
    }
    .editor-aside {
      grid-template-columns: 1fr;
    }
    .company-short {
      display: none;
    }
    .topbar-actions>.button>span {
      display: none;
    }
  }
}
@layer pages {
  .stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
    gap: var(--gap);
  }
  .stat-card {
    display: grid;
    gap: 14px;
    padding: var(--panel-padding);
  }
  .stat-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted-foreground);
    font-size: var(--text-sm);
  }
  .stat-card>strong {
    font-size: var(--text-2xl);
    font-weight: 600;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
  }
  .chart-container {
    height: 245px;
  }
  .chart-legend {
    display: flex;
    gap: 20px;
    color: var(--muted-foreground);
    font-size: var(--text-xs);
  }
  .chart-legend a {
    display: flex;
    align-items: center;
    gap: 7px;
  }
  .status-ring {
    display: grid;
    place-items: center;
    background: conic-gradient(var(--status-paid) 0 calc(var(--paid,0) * .1%),var(--status-draft) 0 calc(var(--draft,0) * .1%),var(--status-unpaid) 0 calc(var(--unpaid,0) * .1%),var(--status-overdue) 0 calc(var(--overdue,0) * .1%),var(--status-future) 0 calc(var(--future,0) * .1%),var(--muted) 0);
    width: 130px;
    height: 130px;
    margin: 0 auto;
    border-radius: 50%;
  }
  .status-ring>div {
    display: grid;
    justify-items: center;
    align-content: center;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: var(--card);
  }
  .status-ring strong {
    font-size: var(--text-2xl);
  }
  .status-ring span {
    font-size: var(--text-xs);
    color: var(--muted-foreground);
  }
  /* Invoice editor and document views. */
  .number-field {
    display: grid;
    gap: 7px;
    align-content: start;
  }
  .optional-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: var(--text-xs);
  }
  .due-term {
    display: grid;
    gap: 7px;
  }
  .bank-details {
    display: grid;
    gap: 3px;
    margin-top: 6px;
    font-size: var(--text-xs);
  }
  .parties-card {
    display: grid;
    grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr);
    align-items: start;
    gap: 24px;
  }
  .supplier-block {
    padding-right: 24px;
    border-right: 1px solid var(--border);
  }
  .parties-card h3 {
    margin-bottom: 10px;
    color: var(--muted-foreground);
    font-size: var(--text-sm);
    font-weight: 600;
  }
  .supplier-block>p {
    margin-top: 6px;
    color: var(--muted-foreground);
    font-size: var(--text-sm);
  }
  .supplier-ids {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    font-size: var(--text-xs);
  }
  .supplier-inline-fields {
    display: grid;
    gap: 8px;
    margin-block: 18px;
  }
  .supplier-inline-fields .field {
    grid-template-columns: 72px minmax(0,1fr);
    align-items: center;
    gap: 6px;
  }
  .supplier-inline-fields input {
    height: var(--control-height);
    background: var(--card);
    border-color: var(--input);
    padding-inline: 10px;
  }
  .supplier-inline-fields input:hover,.supplier-inline-fields input:focus-visible {
    border-color: var(--input);
    background: var(--card);
  }
  .supplier-inline-fields label {
    color: var(--muted-foreground);
    font-size: var(--text-sm);
  }
  .items-footer {
    display: grid;
    gap: 20px;
    padding: var(--panel-padding);
  }
  .items-editor {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
    font-size: var(--text-sm);
  }
  .items-editor th {
    padding: 10px 7px;
    border-bottom: 1px solid var(--border);
    background: var(--card);
    color: var(--foreground);
    font-size: var(--text-sm);
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
  }
  .items-editor td {
    padding: 12px 7px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
  }
  .items-editor th:first-child,.items-editor td:first-child {
    padding-left: var(--panel-padding);
    width: 30%;
  }
  .items-editor th:last-child,.items-editor td:last-child {
    padding-right: var(--panel-padding);
  }
  
  .items-editor th:nth-child(2) {
    width: 140px;
  }
  .items-editor th:nth-child(3) {
    width: 80px;
  }
  .items-editor th:nth-child(4) {
    width: 104px;
  }
  /* Saved items open from "Vybrat z uložených"; the browser's own list arrow is redundant. */
  .items-editor input[list]::-webkit-calendar-picker-indicator {
    display: none !important;
  }
  .items-editor th:nth-child(5) {
    width: 120px;
  }
  .items-editor .item-total {
    padding-top: 23px;
    font-size: var(--text-sm);
    font-weight: 500;
    white-space: nowrap;
  }
  .quantity-stepper {
    display: flex;
    align-items: center;
    border: 1px solid var(--input);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .quantity-stepper input {
    width: 62px;
    height: 42px;
    padding: 0 3px;
    border: 0;
    text-align: center;
  }
  .quantity-stepper button {
    flex-shrink: 0;
    width: 32px;
    min-height: 42px;
    padding: 0;
    border: 0;
    color: var(--muted-foreground);
  }
  .quantity-stepper button:hover {
    background: var(--muted);
  }
  .row-actions .button[data-size=icon] {
    min-width: 40px;
    width: 40px;
  }
  .items-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    font-size: var(--text-xs);
  }
  .invoice-editor.enhanced .discount-fallback {
    display: none;
  }
  .recurrence-fields {
    display: grid;
    gap: 24px;
  }
  .recurrence-ending {
    width: min(100%, 360px);
  }
  .recurrence-options {
    display: grid;
    gap: 12px;
  }
  .recurrence-preview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--muted);
  }
  .recurrence-preview > div {
    display: grid;
    align-content: start;
    gap: 6px;
    min-width: 0;
  }
  .recurrence-preview dt {
    color: var(--muted-foreground);
    font-size: var(--text-sm);
  }
  .recurrence-preview dd {
    margin: 0;
    min-height: 26px;
    font-size: var(--text-base);
    font-weight: 500;
    overflow-wrap: anywhere;
  }
  .recurrence-card:has([name=recurring]:not(:checked)) > .form-section-body {
    display: none;
  }
  .recurrence-card:has([name=recurring]:not(:checked)) > .form-section-header {
    border-bottom-color: transparent;
  }
  .total-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted-foreground);
    font-size: var(--text-sm);
  }
  .total-line strong {
    color: var(--foreground);
  }
  .grand-total {
    display: grid;
    gap: 4px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: var(--text-sm);
  }
  .grand-total strong {
    font-size: var(--text-2xl);
    font-weight: 600;
    letter-spacing: -.02em;
  }
  .invoice-action-bar {
    position: sticky;
    bottom: 12px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
  }
  .invoice-action-bar>div:first-child {
    display: grid;
    gap: 3px;
    font-size: var(--text-xs);
  }
  .invoice-action-bar strong {
    font-size: var(--text-xl);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
  }
  .invoice-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .saved-item-list {
    display: grid;
    max-height: 50svh;
    overflow: auto;
    margin-top: 14px;
  }
  .saved-item-choice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 8px;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: var(--card);
    text-align: left;
    font-size: var(--text-sm);
  }
  .saved-item-choice:hover {
    background: var(--muted);
  }
  .saved-item-choice small {
    display: block;
    margin-top: 3px;
    color: var(--muted-foreground);
    font-size: var(--text-xs);
  }
  .saved-item-choice strong {
    white-space: nowrap;
  }
  .invoice-preview iframe {
    display: block;
    width: 100%;
    min-height: 1100px;
    border: 0;
    border-radius: var(--radius-lg);
    background: white;
  }
  .detail-amount {
    font-size: var(--text-2xl);
    letter-spacing: -.02em;
  }
  .history-event {
    position: relative;
    display: grid;
    gap: 3px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: var(--text-xs);
  }
  .history-event time {
    color: var(--muted-foreground);
    font-size: var(--text-xs);
  }
  .history-event:last-child {
    border-bottom: 0;
  }
  /* Shared party search, only one visible selection control. */
  .party-search {
    position: relative;
    min-width: 0;
  }
  .party-search>label {
    display: block;
    margin: 10px 0 7px;
  }
  .party-search-input {
    position: relative;
  }
  .party-search-input input {
    padding-right: 34px;
  }
  .party-search>.hint {
    margin: 8px 0;
    font-size: var(--text-xs);
  }
  .party-search>[data-party-manual] {
    font-size: var(--text-xs);
  }
  .party-fields {
    margin-top: 18px;
  }
  .party-results {
    position: fixed;
    inset: auto;
    max-height: 280px;
    margin: 0;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    overflow: auto;
  }
  .party-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 10px 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: var(--card);
    text-align: left;
  }
  .party-result:hover,.party-result[aria-selected=true] {
    background: var(--accent);
    color: var(--accent-foreground);
    border-color: var(--primary);
  }
  .party-result strong {
    display: block;
    font-size: var(--text-sm);
  }
  .party-result small {
    display: block;
    margin-top: 3px;
    color: var(--muted-foreground);
    font-size: var(--text-xs);
  }
  .party-source {
    padding: 3px 5px;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--muted-foreground);
    font-size: var(--text-xs);
  }
  .search-spinner {
    position: absolute;
    top: calc(50% - 6px);
    right: 12px;
    width: 12px;
    height: 12px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .7s linear infinite;
  }
  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }
  /* Expense, exports and EET. */
  .expense-items {
    display: grid;
    gap: 16px;
  }
  .expense-item {
    display: grid;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
  }
  .expense-item>.button {
    justify-self: end;
  }
  .danger-zone {
    padding-top: 16px;
    border-top: 1px solid var(--border);
    color: var(--destructive);
  }
  .danger-zone[open]>summary {
    margin-bottom: 16px;
  }
  .tax-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
    gap: 16px;
  }
  .tax-summary>div {
    display: grid;
    gap: 6px;
    padding: 16px;
    border-radius: var(--radius);
    background: var(--background);
  }
  .tax-summary>div>span {
    color: var(--muted-foreground);
    font-size: var(--text-sm);
  }
  .tax-summary strong {
    font-size: var(--text-2xl);
  }
  .eet-progress {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 12px;
    padding: 0;
    margin: 22px 0;
    list-style: none;
  }
  .eet-progress li {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted-foreground);
    font-size: var(--text-xs);
  }
  .eet-progress li>span {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 1px solid var(--border);
    border-radius: 50%;
  }
  .eet-progress .current {
    color: var(--primary);
  }
  .eet-progress .current>span {
    border-color: var(--primary);
    background: var(--accent);
  }
  .eet-progress .complete>span {
    color: var(--success);
    background: var(--success-background);
  }
  .eet-test-status {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--muted);
    font-size: var(--text-sm);
  }
  .eet-test-status.success {
    color: var(--success);
    background: var(--success-background);
  }
  .eet-test-status.danger {
    color: var(--destructive);
    background: var(--destructive-background);
  }
  .eet-test-status[aria-busy=true]::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 8px;
    border: 2px solid var(--input);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .7s linear infinite;
  }
  /* Public pages, billing, support and administration. */
  .pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
    gap: var(--gap);
  }
  .checkout>form {
    display: grid;
    gap: var(--gap);
  }
  .payment-details {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 24px;
  }
  .payment-details>dl {
    flex: 1 1 300px;
  }
  .payment-qr {
    display: grid;
    justify-items: center;
    gap: 6px;
    margin: 0;
    color: var(--muted-foreground);
    font-size: var(--text-sm);
  }
  .payment-qr img {
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }
  .pricing-card.featured {
    border-color: var(--primary);
  }
  .pricing-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 26px;
  }
  .pricing-card h2 {
    font-size: var(--text-3xl);
    letter-spacing: -.02em;
  }
  .pricing-card h2 small {
    display: block;
    margin-top: 5px;
    color: var(--muted-foreground);
    font-size: var(--text-sm);
    font-weight: 400;
    letter-spacing: 0;
  }
  .pricing-card ul {
    display: grid;
    gap: 10px;
    padding: 0;
    list-style: none;
    font-size: var(--text-sm);
  }
  .pricing-card li {
    display: flex;
    align-items: center;
    gap: 7px;
  }
  .pricing-card li>.icon {
    color: var(--success);
  }
  .plan-choice {
    position: relative;
    cursor: pointer;
  }
  .plan-choice:has(input:checked) {
    border-color: var(--primary);
    outline: 1px solid var(--primary);
  }
  .plan-choice>input {
    position: absolute;
    top: var(--panel-padding);
    right: var(--panel-padding);
    width: 20px;
    height: 20px;
  }
  .plan-choice .eyebrow {
    margin: 0;
  }
  .support-layout {
    display: grid;
    grid-template-columns: 300px minmax(0,1fr);
    gap: var(--gap);
    align-items: start;
  }
  .support-sidebar {
    display: grid;
    gap: 4px;
    padding: 16px 12px;
  }
  .support-sidebar h2 {
    padding: 0 10px 8px;
    font-size: var(--text-base);
  }
  .support-sidebar > p {
    padding: 0 10px;
  }
  .support-sidebar > a {
    display: grid;
    gap: 6px;
    padding: 10px;
    border-radius: var(--radius);
  }
  .support-sidebar > a strong {
    font-weight: 600;
    overflow-wrap: anywhere;
  }
  .support-sidebar > a:hover {
    background: var(--muted);
  }
  .support-sidebar > a[aria-current=page] {
    background: var(--accent);
  }
  .support-sidebar-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .support-sidebar small {
    color: var(--muted-foreground);
    font-size: var(--text-xs);
  }
  .support-main {
    overflow: hidden;
  }
  .support-thread-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px var(--panel-padding);
    border-bottom: 1px solid var(--border);
  }
  .support-thread-head h2 {
    font-size: var(--text-lg);
    overflow-wrap: anywhere;
  }
  .support-thread-head small {
    color: var(--muted-foreground);
    font-size: var(--text-sm);
  }
  .support-thread-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }
  .messages {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 240px;
    max-height: 60svh;
    padding: 20px var(--panel-padding);
    overflow: auto;
  }
  .message {
    display: grid;
    gap: 4px;
    align-self: flex-start;
    max-width: 80%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--muted);
    font-size: var(--text-md);
  }
  .message.mine {
    align-self: flex-end;
    border-color: color-mix(in srgb,var(--primary) 25%,white);
    background: var(--accent);
  }
  .message-author {
    color: var(--primary);
    font-size: var(--text-sm);
    font-weight: 600;
  }
  .message p {
    white-space: pre-line;
    overflow-wrap: anywhere;
  }
  .message time {
    color: var(--muted-foreground);
    font-size: var(--text-xs);
  }
  .message-form {
    display: grid;
    gap: 10px;
    padding: 16px var(--panel-padding);
    border-top: 1px solid var(--border);
  }
  .message-form textarea {
    min-height: 88px;
  }
  .message-form-actions {
    display: flex;
    justify-content: flex-end;
  }
  .support-new {
    display: grid;
    grid-template-columns: minmax(0,1fr) 280px;
    gap: 24px 32px;
    padding: var(--panel-padding);
  }
  .support-new > header {
    grid-column: 1 / -1;
  }
  .support-new > header h2 {
    font-size: var(--text-xl);
  }
  .support-new > header p {
    margin-top: 4px;
    color: var(--muted-foreground);
  }
  .support-request-form {
    display: grid;
    gap: 16px;
  }
  .support-guides {
    display: grid;
    align-self: start;
    align-content: start;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--accent);
  }
  .support-guides h3 {
    font-size: var(--text-base);
  }
  .chat-button {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: grid;
    place-items: center;
    width: var(--control-height);
    height: var(--control-height);
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--card);
    color: var(--primary);
  }
  .chat-dialog {
    width: min(380px,calc(100vw - 28px));
  }
  .chat-dialog .dialog-content {
    padding: 0;
  }
  .chat-dialog iframe {
    width: 100%;
    height: min(600px,75svh);
    border: 0;
  }
  .support-widget {
    --panel-padding: 16px;
    min-height: 100svh;
    background: var(--card);
  }
  .support-widget .alert {
    margin: 12px 16px 0;
  }
  .support-widget .messages {
    height: 220px;
    min-height: 140px;
  }
  .support-widget .message-form textarea {
    min-height: 64px;
  }
  .support-widget .support-new {
    grid-template-columns: 1fr;
  }
  .support-widget-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    font-size: var(--text-sm);
  }
  .support-widget-foot a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--primary);
    font-weight: 600;
  }
  .support-widget-foot a:only-child {
    margin-left: auto;
  }
  @media(max-width:1100px) {
    .parties-card {
      grid-template-columns: 1fr;
    }
    .supplier-block {
      padding: 0 0 20px;
      border-right: 0;
      border-bottom: 1px solid var(--border);
    }
  }
  @media(max-width:850px) {
    .stat-card {
      padding: 18px;
    }
    .stat-card>strong {
      font-size: var(--text-2xl);
    }
  }
  @media(max-width:600px) {
    .stat-grid {
      grid-template-columns: 1fr;
      gap: 12px;
    }
    .stat-card {
      gap: 10px;
    }
    .stat-card>strong {
      font-size: var(--text-2xl);
    }
    .chart-card .form-section-header {
      align-items: start;
      flex-wrap: wrap;
    }
    .invoice-action-bar {
      bottom: 8px;
      padding: 12px;
    }
    .invoice-action-buttons {
      width: 100%;
      display: grid;
      grid-template-columns: 1fr 1fr;
    }
    .invoice-action-buttons>.button {
      width: 100%;
    }
    .recurrence-preview {
      grid-template-columns: 1fr;
    }
    .items-card .form-section-header {
      flex-wrap: wrap;
    }
    .eet-progress {
      gap: 8px;
    }
    .eet-progress li {
      font-size: var(--text-xs);
    }
    .tax-summary {
      grid-template-columns: 1fr;
    }
    .support-layout, .support-new {
      grid-template-columns: 1fr;
    }
    .message {
      max-width: 92%;
    }
  }
  .api-docs .settings-nav a {
    gap: 8px;
  }
  .api-docs h3 {
    font-size: var(--text-base);
  }
  .api-docs .form-section-body {
    gap: 16px;
  }
  .api-docs .form-section-body p {
    margin: 0;
  }
  .http-method {
    flex-shrink: 0;
    min-width: 56px;
    padding: 1px 6px;
    border: 1px solid currentColor;
    border-radius: 4px;
    color: var(--status-future);
    font: 600 var(--text-xs)/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
    text-align: center;
  }
  .http-method[data-method=get] { color: var(--status-paid); }
  .http-method[data-method=patch] { color: var(--status-unpaid); }
  .http-method[data-method=delete] { color: var(--destructive); }
  .api-endpoint {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }
  .api-endpoint code {
    font-size: var(--text-sm);
  }
  .api-scope {
    white-space: nowrap;
  }
  .api-required {
    color: var(--destructive);
    font-size: var(--text-xs);
    white-space: nowrap;
  }
  .api-type {
    color: var(--muted-foreground);
    font: var(--text-xs)/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
    white-space: nowrap;
  }
  .api-docs .data-table {
    white-space: normal;
  }
  .api-docs .data-table td {
    vertical-align: top;
  }
  .api-docs .data-table :is(th,td):not(:last-child) {
    white-space: nowrap;
  }
  .api-docs .data-table td:last-child {
    min-width: 260px;
  }
  .api-list, .api-steps {
    display: grid;
    gap: 10px;
    line-height: 1.75;
  }
  .api-steps > li {
    display: grid;
    gap: 8px;
  }
  .api-pad {
    padding: var(--panel-padding);
  }
  .code-block {
    margin: 0;
    padding: 14px 16px;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--muted);
    font: var(--text-sm)/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
    white-space: pre;
  }
  .code-block code {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    overflow-wrap: normal;
  }
  .api-list :not(pre) > code, .api-steps :not(pre) > code, .api-docs td code {
    white-space: nowrap;
  }
  @media(max-width:600px) {
    .api-docs .data-table thead {
      display: none;
    }
    .api-docs .data-table :is(tbody,tr,td) {
      display: block;
    }
    .api-docs .data-table tr {
      padding: 12px var(--panel-padding);
      border-bottom: 1px solid var(--border);
    }
    .api-docs .data-table td {
      min-width: 0;
      padding: 2px 0;
      border: 0;
    }
    .api-docs .data-table td.number {
      text-align: left;
    }
  }
  @media(min-width:1101px) {
    .api-docs .settings-nav {
      max-height: calc(100vh - 120px);
      overflow-y: auto;
    }
  }
  
  /* Lists: header search, instant filters and the status overview above the table. */
  .list-search {
    display: flex;
    justify-content: flex-end;
  }
  .list-filters {
    display: grid;
    gap: 16px;
  }
  .header-search {
    width: 320px;
    max-width: 100%;
  }
  .filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 12px;
    padding-top: 10px;
  }
  /* The label sits on the field's top border, as on FakturaOnline. */
  .filter-field {
    position: relative;
    flex: 1 1 220px;
    max-width: 420px;
  }
  .filter-field > span {
    position: absolute;
    top: -10px;
    left: 10px;
    padding-inline: 4px;
    background: linear-gradient(var(--background) 50%,var(--card) 50%);
    color: var(--muted-foreground);
    font-size: var(--text-sm);
    line-height: 20px;
    pointer-events: none;
  }
  .filter-field select {
    font-weight: 600;
  }
  .filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
  }
  .filter-actions .popover > .button {
    border-style: dashed;
  }
  .page-title h1 {
    font-size: var(--text-2xl);
  }
  /* The toggle is the first child of <details> but sits under the overview as a divider. */
  .status-overview {
    position: relative;
    padding-bottom: 52px;
  }
  .status-overview > summary {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    color: var(--primary);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
  }
  .status-overview > summary::before, .status-overview > summary::after {
    content: '';
    flex: 1;
    height: 1px;
    margin-inline: 12px;
    background: var(--border);
  }
  .status-overview[open] > summary .icon {
    transform: rotate(180deg);
  }
  .status-overview[open] .if-closed, .status-overview:not([open]) .if-open {
    display: none;
  }
  .status-overview-body {
    display: grid;
    grid-template-columns: minmax(260px,1.4fr) repeat(5,minmax(0,1fr));
    align-items: center;
    gap: 8px;
    padding-top: 12px;
  }
  .status-overview-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
  }
  
  .status-overview-total > div:first-child {
    display: grid;
    gap: 2px;
  }
  .status-overview-total span, .status-overview-total small {
    color: var(--muted-foreground);
    font-size: var(--text-sm);
  }
  .status-overview-total strong {
    font-size: var(--text-lg);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .status-overview-total .status-ring {
    width: 92px;
    height: 92px;
    margin: 0;
  }
  .status-overview-total .status-ring > div {
    width: 64px;
    height: 64px;
  }
  /* Help center: search, categories, guides. */
  .help-page {
    display: grid;
    gap: 32px;
  }
  .help-search {
    display: flex;
    gap: 8px;
    width: min(620px,100%);
    margin-top: 28px;
  }
  .help-search .search-input {
    flex: 1;
  }
  .help-featured {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 16px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--wash);
  }
  .help-featured-item, .help-result {
    display: grid;
    gap: 6px;
    color: var(--foreground);
  }
  .help-featured-item strong, .help-result strong {
    color: var(--foreground);
    text-decoration-color: var(--input);
    font-size: var(--text-lg);
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  .help-featured-item span, .help-result > span:last-child {
    color: var(--muted-foreground);
    line-height: 1.6;
  }
  .help-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(300px,1fr));
    gap: 20px;
  }
  .help-category {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: var(--panel-padding);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
  }
  .help-category h2 {
    font-size: var(--text-xl);
  }
  .help-category h2 a:hover {
    color: var(--primary);
  }
  .help-category > p {
    color: var(--muted-foreground);
  }
  .help-category-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--wash);
    color: var(--foreground);
  }
  .help-links {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .help-links a {
    text-decoration: underline;
    text-decoration-color: var(--input);
    text-underline-offset: 3px;
  }
  .help-links a:hover {
    color: var(--primary);
  }
  .help-results {
    display: grid;
    gap: 12px;
  }
  .help-results > h2 {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .help-result {
    padding: 18px var(--panel-padding);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
  }
  .help-result:hover {
    border-color: var(--primary);
  }
  .help-heading {
    display: flex;
    align-items: center;
    gap: 16px;
  }
  .help-heading p {
    color: var(--muted-foreground);
  }
  .breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    color: var(--muted-foreground);
    font-size: var(--text-sm);
  }
  .breadcrumbs a {
    color: var(--primary);
    font-weight: 600;
  }
  .breadcrumbs .icon {
    width: 14px;
    height: 14px;
  }
  .help-article-layout {
    display: grid;
    grid-template-columns: minmax(0,1fr) 300px;
    align-items: start;
    gap: 24px;
  }
  .help-article {
    display: grid;
    gap: 24px;
    padding: 32px 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
  }
  .help-article h1 {
    font-size: var(--text-3xl);
  }
  .help-lead {
    color: var(--muted-foreground);
    font-size: var(--text-lg);
    line-height: 1.6;
  }
  .help-article section {
    display: grid;
    gap: 12px;
  }
  .help-article h2 {
    font-size: var(--text-xl);
  }
  .help-article p, .help-article li {
    line-height: 1.7;
  }
  .help-steps {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
  }
  .help-steps li {
    position: relative;
    padding-left: 40px;
    counter-increment: step;
  }
  .help-steps li::before {
    content: counter(step);
    position: absolute;
    top: 0;
    left: 0;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--foreground);
    color: var(--primary-foreground);
    font-size: var(--text-sm);
    font-weight: 700;
  }
  .help-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 20px;
  }
  .help-related {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 12px;
    padding: var(--panel-padding);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
  }
  .help-related h2 {
    font-size: var(--text-lg);
  }
  .help-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: var(--panel-padding);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
  }
  .help-contact p {
    color: var(--muted-foreground);
  }
  @media(max-width:980px) {
    .help-article-layout { grid-template-columns: 1fr; }
    .help-related { position: static; }
  }
  @media(max-width:700px) {
    .help-featured { grid-template-columns: 1fr; }
    .help-article { padding: 24px 20px; }
    .help-search { flex-direction: column; }
  }
  /* Invoice detail: downloads in the side column. */
  .download-list {
    display: grid;
    gap: 8px;
  }
  .download-list .button {
    justify-content: flex-start;
    white-space: normal;
    text-align: left;
  }
  /* Dashboard: chart, one overview card, articles, events and help. */
  .chart-card .form-section-header {
    flex-wrap: wrap;
  }
  .chart-card .form-section-action {
    flex-shrink: 1;
    min-width: 0;
  }
  .chart-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
  }
  /* Balance and expenses share the first row; the five invoice statuses get the full width below. */
  .overview-card {
    display: grid;
    grid-template-columns: minmax(0,2.5fr) minmax(0,5fr) minmax(0,2.5fr);
  }
  .overview-card .status-total strong {
    font-size: var(--text-md);
  }
  .overview-group {
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 18px 12px;
  }
  .overview-group + .overview-group {
    border-left: 1px solid var(--border);
  }
  .overview-group header {
    display: grid;
    justify-items: center;
    gap: 2px;
    align-content: start;
    min-height: 44px;
    text-align: center;
  }
  .overview-group h2 {
    font-size: var(--text-base);
  }
  .overview-group header p {
    color: var(--muted-foreground);
    font-size: var(--text-xs);
  }
  .overview-items {
    display: grid;
    grid-auto-columns: minmax(0,1fr);
    grid-auto-flow: column;
    gap: 4px;
  }
  .dashboard-section {
    display: grid;
    gap: 16px;
  }
  .dashboard-section > .section-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 24px;
    margin: 0;
  }
  .dashboard-section > .section-heading .tabs {
    border-bottom: 0;
    padding: 0;
  }
  .event-list {
    border-top: 1px solid var(--border);
  }
  .event-row {
    display: grid;
    grid-template-columns: 150px minmax(0,1fr);
    gap: 16px;
    padding-block: 10px;
    border-bottom: 1px solid var(--border);
    font-size: var(--text-sm);
  }
  .event-row time {
    color: var(--muted-foreground);
    font-variant-numeric: tabular-nums;
  }
  .help-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: var(--panel-padding);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--accent);
  }
  .help-banner > div {
    display: grid;
    gap: 10px;
  }
  .help-banner h2 {
    font-size: var(--text-lg);
  }
  .help-banner p {
    color: var(--muted-foreground);
  }
  .help-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .help-mark {
    color: var(--primary);
  }
  .help-mark .icon {
    width: 72px;
    height: 72px;
    stroke-width: 1.25;
  }
  @media(max-width:1320px) {
    .overview-card { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .overview-group.is-wide { grid-column: 1 / -1; grid-row: 2; border-top: 1px solid var(--border); border-left: 0; }
  }
  @media(max-width:1100px) {
    .status-overview-body { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .status-overview-total { grid-column: 1 / -1; }
    .overview-card { grid-template-columns: 1fr; }
    .overview-group + .overview-group { border-left: 0; border-top: 1px solid var(--border); }
    .overview-group.is-wide { grid-row: auto; }
  }
  @media(max-width:700px) {
    .status-overview-body { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .overview-items { grid-auto-flow: row; grid-template-columns: repeat(2,minmax(0,1fr)); }
    .filter-actions { margin-left: 0; }
    .list-filters .page-header-actions, .header-search { width: 100%; }
    .event-row { grid-template-columns: 1fr; gap: 2px; }
    .help-mark { display: none; }
    .chart-actions { justify-content: flex-start; }
  }
  /* Public site pages: bands, home, pricing, sign-in and legal texts. */
  .page-band {
    padding-block: 64px 56px;
    background: var(--wash);
  }
  .page-band h1 {
    font-size: 48px;
    line-height: 1.05;
    font-weight: 750;
    letter-spacing: -.035em;
  }
  .page-band p {
    max-width: 640px;
    margin-top: 16px;
    color: var(--muted-foreground);
    font-size: 19px;
  }
  .page-content {
    padding-block: 48px 88px;
  }
  .page-content > .page-header + * {
    margin-top: 32px;
  }
  .square-list {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .square-list li {
    display: flex;
    align-items: baseline;
    gap: 10px;
  }
  .square-list li::before {
    content: "";
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--input);
    transform: translateY(-3px);
  }
  .hero {
    padding-block: 72px 96px;
    background: var(--card);
  }
  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1.05fr);
    gap: 72px;
    align-items: center;
  }
  .hero h1 {
    font-size: var(--text-display);
    font-variation-settings: "opsz" 32;
    line-height: 1.02;
    font-weight: 720;
    letter-spacing: -.04em;
    text-wrap: balance;
  }
  .hero-lead {
    max-width: 520px;
    margin-top: 24px;
    color: var(--muted-foreground);
    font-size: 20px;
    line-height: 1.5;
  }
  .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
  }
  .hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
    font-size: var(--text-md);
    font-weight: 500;
  }
  .hero-facts li {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .hero-facts .icon {
    color: var(--success);
  }
  .hero-media {
    position: relative;
  }
  .hero-media > img, .audience-grid img, .cta-card > img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    background: var(--muted);
  }
  .hero-media > img {
    aspect-ratio: 5 / 4;
    border-radius: var(--radius-media);
  }
  .hero-paid {
    position: absolute;
    left: -40px;
    bottom: 40px;
    display: grid;
    gap: 4px;
    min-width: 300px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
    font-size: var(--text-md);
  }
  .hero-paid div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }
  .hero-paid > span {
    color: var(--muted-foreground);
  }
  .hero-paid b {
    margin-top: 6px;
    font-size: var(--text-2xl);
    font-weight: 700;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
  }
  .section, .showcase {
    padding-block: 96px;
  }
  .showcase {
    background: var(--background);
  }
  .section h2, .showcase h2, .rules-band h2, .cta-card h2 {
    max-width: 760px;
    font-size: 40px;
    font-variation-settings: "opsz" 32;
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -.035em;
    text-wrap: balance;
  }
  .section-intro {
    max-width: 640px;
    margin-top: 16px;
    color: var(--muted-foreground);
    font-size: 19px;
    line-height: 1.5;
  }
  .showcase-frame, .feature-shot {
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--wash-strong);
    border-radius: 16px;
    background: var(--card);
  }
  .showcase-frame {
    margin-top: 48px;
  }
  .showcase-frame img, .feature-shot img {
    display: block;
    width: 100%;
    height: auto;
  }
  .audience-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 32px;
    margin-top: 48px;
  }
  .audience-grid img {
    aspect-ratio: 4 / 3;
    border-radius: 16px;
  }
  .audience-grid h3 {
    margin-top: 22px;
    font-size: var(--text-2xl);
    font-weight: 680;
    letter-spacing: -.025em;
  }
  .audience-grid p {
    margin-top: 8px;
    color: var(--muted-foreground);
    font-size: 17px;
    line-height: 1.55;
  }
  .feature-rows {
    display: grid;
    gap: 88px;
    margin-top: 64px;
  }
  .feature-row {
    display: grid;
    grid-template-columns: minmax(0,5fr) minmax(0,7fr);
    gap: 72px;
    align-items: center;
  }
  .feature-row:nth-child(even) {
    grid-template-columns: minmax(0,7fr) minmax(0,5fr);
  }
  .feature-row:nth-child(even) > figure {
    order: -1;
  }
  .feature-row h3 {
    font-size: 30px;
    font-variation-settings: "opsz" 32;
    line-height: 1.15;
    font-weight: 690;
    letter-spacing: -.03em;
    text-wrap: balance;
  }
  .feature-row p {
    margin-top: 14px;
    color: var(--muted-foreground);
    font-size: 18px;
    line-height: 1.55;
  }
  .feature-shot-paper {
    padding: 28px 28px 0;
    background: var(--background);
  }
  .feature-shot-paper img {
    border: 1px solid var(--wash-strong);
    border-bottom: 0;
  }
  .rules-band {
    padding-block: 88px;
    background: var(--foreground);
    color: #fff;
  }
  .rules-grid {
    display: grid;
    grid-template-columns: repeat(5,minmax(0,1fr));
    gap: 28px;
    margin: 48px 0 0;
    padding: 0;
    list-style: none;
  }
  .rules-grid li {
    padding-top: 18px;
    border-top: 1px solid rgb(255 255 255 / .28);
    font-size: 17px;
    line-height: 1.45;
  }
  .price-teaser {
    display: grid;
    grid-template-columns: minmax(0,5fr) minmax(0,7fr);
    gap: 72px;
    align-items: center;
  }
  .price-teaser .text-link {
    margin-top: 20px;
  }
  .price-teaser-plans {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 20px;
  }
  .price-teaser-plan {
    display: grid;
    gap: 28px;
    padding: 28px;
    border: 1px solid var(--wash-strong);
    border-radius: 16px;
    background: var(--card);
  }
  .price-teaser-plan:hover {
    border-color: var(--foreground);
  }
  .price-teaser-plan strong {
    font-size: var(--text-xl);
  }
  .price-teaser-plan span {
    color: var(--muted-foreground);
  }
  .price-teaser-plan b {
    display: block;
    color: var(--foreground);
    font-size: 36px;
    font-weight: 720;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
  }
  .faq-grid {
    display: grid;
    grid-template-columns: minmax(0,5fr) minmax(0,7fr);
    gap: 72px;
    align-items: start;
  }
  .faq {
    border-top: 1px solid var(--wash-strong);
  }
  .faq details {
    border-bottom: 1px solid var(--wash-strong);
  }
  .faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 68px;
    padding-block: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
  }
  .faq summary::-webkit-details-marker {
    display: none;
  }
  .faq summary .icon {
    flex-shrink: 0;
    color: var(--muted-foreground);
    transition: transform .15s;
  }
  .faq details[open] summary .icon {
    transform: rotate(45deg);
  }
  .faq p {
    max-width: 62ch;
    padding-bottom: 22px;
    color: var(--muted-foreground);
    font-size: 17px;
    line-height: 1.55;
  }
  .error-page {
    background: var(--background);
  }
  .cta-band {
    padding-block: 0 96px;
  }
  .cta-card {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    overflow: hidden;
    border-radius: var(--radius-media);
    background: var(--foreground);
    color: #fff;
  }
  .cta-card > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 64px;
  }
  .cta-card p {
    max-width: 440px;
    margin-top: 16px;
    color: #c3cad6;
    font-size: 18px;
    line-height: 1.5;
  }
  .cta-card .button {
    margin-top: 32px;
  }
  .cta-card > img {
    height: 100%;
    min-height: 380px;
    object-position: 50% 78%;
  }
  .plan-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    align-items: start;
    gap: 24px;
    padding-block: 56px 24px;
  }
  .plan {
    display: grid;
    gap: 20px;
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
  }
  .plan.plan-featured {
    padding: 31px;
    border: 2px solid var(--foreground);
  }
  .plan h2, .plan-all h2 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.015em;
  }
  .plan-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: var(--muted-foreground);
  }
  .plan-price strong {
    color: var(--foreground);
    font-size: 46px;
    line-height: 1;
    font-weight: 750;
    letter-spacing: -.035em;
    font-variant-numeric: tabular-nums;
  }
  .plan > .button {
    width: 100%;
  }
  .check-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 20px 0 0;
    border-top: 1px solid var(--border);
    list-style: none;
    font-size: var(--text-md);
  }
  .check-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
  }
  .check-list .icon, .compare-yes .icon {
    margin-top: 3px;
    color: var(--primary);
  }
  .plan-all {
    padding-top: 32px;
  }
  .plan-all ul {
    display: grid;
    gap: 14px;
    margin-top: 20px;
    font-size: var(--text-md);
  }
  .plan-compare {
    padding-block: 48px 96px;
  }
  .plan-compare h2 {
    font-size: var(--text-3xl);
    font-weight: 720;
    letter-spacing: -.025em;
  }
  .compare-box {
    margin-top: 24px;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
  }
  .compare-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: var(--text-md);
  }
  .compare-table :is(th,td) {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    text-align: left;
  }
  .compare-table thead th {
    background: var(--muted);
    font-size: var(--text-sm);
    font-weight: 650;
  }
  .compare-table tbody th {
    font-weight: 500;
  }
  .compare-table tbody tr:last-child > * {
    border-bottom: 0;
  }
  .compare-table .compare-cell {
    width: 140px;
    text-align: center;
    color: var(--muted-foreground);
  }
  .auth-page {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 64px 16px;
    background: var(--background);
  }
  .auth-page > div {
    width: 100%;
    max-width: 440px;
  }
  .auth-split {
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    place-items: stretch;
    padding: 0;
    background: var(--card);
  }
  .auth-split > div:first-child {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-inline: auto;
    padding: 72px 24px;
  }
  .auth-split .auth-card {
    padding: 0;
    border: 0;
  }
  .auth-split > .auth-photo {
    position: relative;
    max-width: none;
    min-height: 720px;
    background: var(--muted);
  }
  .auth-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .auth-card {
    display: grid;
    gap: 24px;
    width: 100%;
    max-width: 440px;
    padding: 40px;
    border: 1px solid var(--wash-strong);
    border-radius: var(--radius-lg);
    background: var(--card);
  }
  .auth-card h1 {
    font-size: var(--text-3xl);
    line-height: 1.15;
    font-weight: 750;
    letter-spacing: -.03em;
  }
  .auth-sub {
    margin-top: 8px;
    color: var(--muted-foreground);
  }
  .auth-card .form-actions > .button {
    flex: 1;
    min-height: 48px;
    border-color: var(--create);
    background: var(--create);
    color: var(--create-foreground);
    font-size: var(--text-base);
  }
  .auth-card .form-actions > .button:hover {
    border-color: var(--create-hover);
    background: var(--create-hover);
  }
  .auth-links {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--muted-foreground);
    text-align: center;
  }
  .auth-links a, .auth-note a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  .auth-note {
    margin-top: 20px;
    color: var(--muted-foreground);
    font-size: var(--text-sm);
    text-align: center;
  }
  .error-card {
    justify-items: start;
  }
  .google-button {
    gap: 12px;
    width: 100%;
    min-height: 48px;
    font-size: var(--text-base);
  }
  .auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted-foreground);
    font-size: var(--text-sm);
  }
  .auth-divider::before, .auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
  }
  .auth-consent {
    color: var(--muted-foreground);
    font-size: var(--text-sm);
  }
  .auth-consent a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  .focused-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
    min-width: 0;
    font-size: var(--text-sm);
  }
  .focused-actions span {
    overflow: hidden;
    color: var(--muted-foreground);
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .onboarding {
    flex: 1;
    display: grid;
    align-content: start;
    justify-items: center;
    gap: 28px;
    padding: 40px 16px 72px;
    background: var(--background);
  }
  .onboarding > * {
    width: 100%;
    max-width: 680px;
  }
  .onboarding-card {
    display: grid;
    gap: 24px;
    padding: 40px;
    border: 1px solid var(--wash-strong);
    border-radius: var(--radius-lg);
    background: var(--card);
  }
  .onboarding-card h1 {
    font-size: var(--text-3xl);
    line-height: 1.15;
    font-weight: 750;
    letter-spacing: -.03em;
  }
  .onboarding-card form {
    display: grid;
    gap: 20px;
  }
  .onboarding-card .span-2 {
    grid-column: 1 / -1;
  }
  .onboarding-card .form-actions {
    padding-top: 20px;
    border-top: 1px solid var(--border);
  }
  .onboarding-account {
    grid-template-columns: minmax(0,2fr) minmax(0,1fr);
  }
  .onboarding-actions {
    justify-content: space-between;
    align-items: center;
  }
  .onboarding-actions > span {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }
  .stepper {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .stepper li {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--muted-foreground);
    font-weight: 500;
  }
  .stepper li::after {
    content: "";
    flex: 1;
    min-width: 12px;
    height: 2px;
    background: var(--wash-strong);
  }
  .stepper li:last-child::after {
    display: none;
  }
  .step-number {
    display: grid;
    place-items: center;
    flex: none;
    width: 32px;
    height: 32px;
    border: 1px solid var(--input);
    border-radius: 50%;
    background: var(--card);
    font-size: var(--text-sm);
  }
  .stepper :is([data-state=current],[data-state=done]) {
    color: var(--foreground);
    font-weight: 600;
  }
  .stepper :is([data-state=current],[data-state=done]) .step-number {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--primary-foreground);
  }
  .stepper [data-state=done]::after {
    background: var(--primary);
  }
  .stepper-compact {
    display: none;
    gap: 8px;
  }
  .stepper-compact > span {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 6px;
  }
  .stepper-compact i {
    height: 4px;
    border-radius: 2px;
    background: var(--wash-strong);
  }
  .stepper-compact i[data-state=done] {
    background: var(--primary);
  }
  .onboarding-done {
    justify-items: center;
    text-align: center;
  }
  .done-mark {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--success-background);
    color: var(--success);
  }
  .done-mark .icon {
    width: 32px;
    height: 32px;
  }
  .onboarding-summary {
    display: grid;
    grid-template-columns: 160px minmax(0,1fr);
    width: 100%;
    margin: 0;
    padding: 4px 20px;
    border-radius: var(--radius);
    background: var(--muted);
    text-align: left;
  }
  .onboarding-summary :is(dt,dd) {
    margin: 0;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    overflow-wrap: anywhere;
  }
  .onboarding-summary dt {
    color: var(--muted-foreground);
  }
  .onboarding-summary :is(dt,dd):nth-last-child(-n+2) {
    border-bottom: 0;
  }
  .onboarding-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
  .error-card img {
    display: block;
  }
  .error-code {
    color: var(--brand);
    font-size: 56px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -.03em;
  }
  .legal-article {
    display: grid;
    gap: 32px;
    max-width: 760px;
  }
  .legal-article section {
    display: grid;
    gap: 12px;
  }
  .legal-article h2 {
    font-size: var(--text-xl);
  }
  .legal-article p, .legal-article li {
    line-height: 1.7;
  }
  .legal-article ul {
    display: grid;
    gap: 8px;
  }
  @media(max-width:1040px) {
    .hero-grid, .feature-row, .price-teaser, .faq-grid, .cta-card, .auth-split {
      grid-template-columns: minmax(0,1fr);
    }
    .hero-grid {
      gap: 48px;
    }
    .hero-paid {
      left: 16px;
      bottom: 16px;
    }
    .feature-rows {
      gap: 64px;
    }
    .feature-row, .price-teaser, .faq-grid {
      gap: 28px;
    }
    .feature-row:nth-child(even) {
      grid-template-columns: minmax(0,1fr);
    }
    .feature-row:nth-child(even) > figure {
      order: 0;
    }
    .rules-grid {
      grid-template-columns: repeat(2,minmax(0,1fr));
    }
    .cta-card > img {
      min-height: 0;
      aspect-ratio: 3 / 2;
    }
    .auth-photo {
      display: none;
    }
    .plan-grid {
      grid-template-columns: repeat(2,minmax(0,1fr));
    }
    .plan-all {
      grid-column: 1 / -1;
    }
  }
  @media(max-width:640px) {
    .page-band {
      padding-block: 40px;
    }
    .page-band h1 {
      font-size: 36px;
    }
    .hero {
      padding-block: 40px 64px;
    }
    .hero-lead, .page-band p {
      font-size: 17px;
    }
    .hero-actions .button {
      flex: 1 1 100%;
    }
    .hero-paid {
      left: 12px;
      right: auto;
      bottom: 12px;
      min-width: 0;
      padding: 10px 12px;
      font-size: var(--text-sm);
    }
    .hero-paid > span {
      display: none;
    }
    .hero-paid b {
      margin-top: 2px;
      font-size: var(--text-lg);
    }
    .section, .showcase {
      padding-block: 64px;
    }
    .section h2, .showcase h2, .rules-band h2, .cta-card h2 {
      font-size: 30px;
    }
    .audience-grid, .rules-grid, .price-teaser-plans, .plan-grid {
      grid-template-columns: minmax(0,1fr);
    }
    .rules-band {
      padding-block: 64px;
    }
    .rules-grid {
      gap: 0;
    }
    .rules-grid li {
      padding-block: 16px;
    }
    .feature-row h3 {
      font-size: 24px;
    }
    .feature-shot-paper {
      padding: 16px 16px 0;
    }
    .cta-band {
      padding-block: 0 64px;
    }
    .cta-card > div {
      padding: 36px 24px;
    }
    .auth-split > div:first-child {
      padding: 40px 16px;
    }
    .auth-card {
      padding: 28px 20px;
    }
    .onboarding {
      gap: 20px;
      padding: 20px 16px 48px;
    }
    .onboarding-card {
      padding: 24px 20px;
    }
    .onboarding-card .field-grid.two, .onboarding-account {
      grid-template-columns: minmax(0,1fr);
    }
    .stepper {
      display: none;
    }
    .stepper-compact {
      display: grid;
    }
    .onboarding-summary {
      grid-template-columns: minmax(0,1fr);
    }
    .onboarding-summary dt {
      padding-bottom: 0;
      border-bottom: 0;
    }
    .focused-actions span {
      display: none;
    }
    .compare-table {
      min-width: 0;
    }
    .compare-table :is(th,td) {
      padding: 12px 10px;
    }
    .compare-table .compare-cell {
      width: 72px;
    }
  }
}
