/*
 * base.css — app-level bridges on top of nocturne.css.
 * Nocturne (loaded first) already sets the dark palette, Inter, the
 * component classes (.btn, .seg, .card, .table, .dialog, .input …) and the
 * :focus-visible ring. This file keeps only the guards the app still needs
 * and a few element defaults Nocturne doesn't cover.
 */

/* Components below (and Nocturne) set explicit `display`, which would
   otherwise defeat the `hidden` attribute. Restore it, the normalize.css way. */
[hidden] { display: none !important; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

html, body {
    margin: 0;
    padding: 0;
    /* A single overlong token (raw pasted URL) must never scroll the page. */
    overflow-x: hidden;
    width: 100%;
}

body {
    background: var(--color-bg);
    color: var(--color-text);
    -webkit-tap-highlight-color: transparent;
}

a { color: var(--color-accent-300); text-decoration: none; }
a:hover { color: var(--color-accent-200); }

/* Native controls follow the dark ground (date-picker icon, scrollbars). */
:root { color-scheme: dark; }

/* Larger tap targets for the touch build without disturbing Nocturne's
   compact desktop sizing. */
@media (pointer: coarse) {
    .btn { min-height: 40px; }
}

.hint {
    font-size: 12px;
    color: var(--color-neutral-500);
    margin: 0;
}

.form-error {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: #d9575a;
}

/* Utility: a Nocturne faded rule as a standalone element. */
.rule {
    height: 1px;
    border: 0;
    background: linear-gradient(to right,
        transparent, var(--color-divider) 48px,
        var(--color-divider) calc(100% - 48px), transparent);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
