/* Categoria: fundamentos. tokens; composição e estados deste módulo. */
/* Tokens compartilhados pela aplicação e pelo catálogo visual. */
:root {
    color-scheme: light;
    --forest: #243b30;
    --deep: #182e26;
    --moss: #385847;
    --olive: #65775b;
    --sand: #f5f2e9;
    --cream: #fcfaf5;
    --ink: #25342b;
    --muted: #596452;
    --gold: #d6b576;
    --rust: #925535;
    --line: #c7cebf;
    --line-subtle: #d9ddd7;
    --white: #fff;
    --surface-hover: #243b3010;
    --surface-sage: #ebece3;
    --surface-notice: #e9ebdf;
    --gold-hover: #e5c68d;
    --info-border: #52768b;
    --info-surface: #e5edf1;
    --info-foreground: #2b526a;
    --control-border: #879187;
    --focus-on-light: #385847;
    --focus-on-dark: #e5c68d;
    --toggle-accent: var(--forest);
    --action-primary-bg: var(--forest);
    --action-primary-fg: var(--white);
    --action-primary-hover: var(--moss);
    --action-view-bg: var(--info-foreground);
    --action-view-fg: var(--white);
    --action-view-hover: #23465b;
    --action-view-inverse-fg: #bed9e8;
    --action-view-inverse-border: #98bccc;
    --action-view-inverse-hover: #294451;
    --action-neutral-bg: transparent;
    --action-neutral-fg: #4f5d52;
    --action-neutral-border: #66765e;
    --action-neutral-hover: #e6e9e0;
    --action-secondary-bg: var(--action-neutral-bg);
    --action-secondary-fg: var(--action-neutral-fg);
    --action-secondary-border: var(--action-neutral-border);
    --action-secondary-hover: var(--action-neutral-hover);
    --action-danger-bg: #913b37;
    --action-danger-fg: var(--white);
    --action-danger-hover: #762d2a;
    --text-xs: 12px;
    --text-sm: 14px;
    --text-base: 16px;
    --text-lg: 18px;
    --text-xl: 20px;
    --text-2xl: 24px;
    --text-3xl: 32px;
    --font-display: Georgia, Cambria, "Times New Roman", serif;
    --font-interface: "Segoe UI", Aptos, Roboto, system-ui, sans-serif;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-12: 48px;
    --space-16: 64px;
    --space-24: 96px;
    --touch-target-size: 44px;
    --control-height: 36px;
    --button-min-size: 36px;
    --icon-button-size: 32px;
    --icon-size: 16px;
    --layout-wide: 96rem;
    --layout-form: 56rem;
    --editor-min-height: 7rem;
    --surface-highlight: #fff2ac;
    --button-padding: 4px 10px;
    --control-padding: 6px 10px;
    --focus-width: 3px;
    --focus-offset: 2px;
    --border-width: 1px;
    --border-emphasis-width: 3px;
    --radius-pill: 999px;
    --line-height-normal: 1.35;
    --line-height-relaxed: 1.55;
    --button-radius: 2px;
    --radius: 4px;
    --motion-fast: 160ms;
    --motion-press: 80ms;
    --motion-lift: -1px;
    --motion-dialog-offset: 4px;
    --ease-standard: cubic-bezier(.2, .7, .2, 1);
}

[data-theme="dark"] {
    --surface-hover: #ffffff14;
    --line-subtle: #4b594d;
    --toggle-accent: var(--gold);
    --action-primary-bg: var(--gold);
    --action-primary-fg: var(--deep);
    --action-primary-hover: var(--gold-hover);
    --action-view-bg: #294451;
    --action-view-fg: #bed9e8;
    --action-view-hover: #35596a;
    --action-view-inverse-fg: #bed9e8;
    --action-view-inverse-border: #98bccc;
    --action-view-inverse-hover: #35596a;
    --action-neutral-bg: #344838;
    --action-neutral-fg: #e0e7d9;
    --action-neutral-border: #97aa8e;
    --action-neutral-hover: #405846;
    --action-danger-bg: #4c302d;
    --action-danger-fg: #f2b8b0;
    --action-danger-hover: #583733;
}

/* Área confortável para toque; desktop preserva a densidade dos painéis. */
@media (pointer: coarse) {
    :root {
        --control-height: var(--touch-target-size);
        --button-min-size: var(--touch-target-size);
        --icon-button-size: var(--touch-target-size);
    }
}
