/* Tokeny marki Master of Mailing: kolory, typografia, odstępy, promienie.
 * Ładowany bezpośrednio we wszystkich layoutach (strona, panel, admin, błędy),
 * bo panel i admin nie korzystają z Tailwinda. Maile mają kolory inline. */

@font-face {
    font-family: "Archivo";
    font-style: normal;
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-display: swap;
    src: url("../fonts/archivo-latin-ext-O3lGmGG.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Archivo";
    font-style: normal;
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-display: swap;
    src: url("../fonts/archivo-latin-UnA7qWy.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* Srebrna paleta Nyxia */
    --silver-100: #dce1e5;
    --silver-200: #c1ced7;
    /* Ramka pól formularza: kontrast ok. 3,5:1 na bieli (wymóg 3:1 dla granic kontrolek); srebrne --line-2 zostaje dla separatorów. */
    --field-line: #7c8c98;
    --silver-300: #a6bac9;
    --silver-400: #8fa2b3;
    --silver-500: #7c8c98;

    /* Ink i Primary: ciemne odcienie dają kontrast pod tekst */
    --ink: #1b2730;
    --ink-2: #26343f;
    --primary: #4c6071;

    /* Mosiądz w panelach tylko w kropce znaku i znaczniku DKIM; szerszą rolę ma na stronie publicznej (--site-*) */
    --brass: #a87a1e;
    --brass-light: #e3b94f;

    /* Strona publiczna: kierunek zielony (Las, Szmaragd, Limonka, Papier). Panele mają te same barwy w themes.css. */
    --site-forest: #0c2b23;
    --site-green: #14a06f;
    --site-green-dark: #0b7a52;
    --site-lime: #c6f432;
    --site-mint: #e4f4ec;
    --site-line: #dce3dc;
    --site-cta: var(--site-green-dark);
    --site-cta-hover: #096744;
    --site-on-cta: #ffffff;
    --site-text-muted: #4e5e57;
    --site-bg-warm: #f3f6f2;
    --site-hover: #e9efe9;
    --site-font-head: "Bricolage Grotesque", Archivo, system-ui, sans-serif;
    --site-font-body: Inter, Archivo, system-ui, sans-serif;

    --success: #2e7d6b;
    --danger: #b3382c;

    --surface: #ffffff;
    --surface-muted: #f1f4f6;
    --text: var(--ink);
    --text-muted: #4c6071;

    --font-sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --wdth-heading: 125%;
    --wdth-text: 100%;

    /* Skala typograficzna */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.75rem;
    --text-5xl: 3.75rem;

    /* Odstępy: baza 4 px */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4.5rem;
    --space-9: 6rem;
    --section-y: 6rem;

    /* Skala panelu (klient i admin): pisana w px, bo panel używa stałych rozmiarów.
     * Rozmiary tekstu: 10/11/12/13/14/15/16/18/20/22; bez połówek (12.5, 13.5 itp.).
     * Odstępy gap/margin: 4/6/8/10/12/16/20/24/32; bez 3/5/7/9/11/14/18/22/26. */
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --lh-tight: 1.2;
    --lh-body: 1.5;
    --lh-loose: 1.6;
    --control-h: 39px;
    --panel-max: 1100px;

    --radius-0: 0;
    --radius-1: 2px;
    --radius-2: 4px;
}

@media (max-width: 767px) {
    :root {
        --section-y: 4.5rem;
    }
}

html {
    font-family: var(--font-sans);
    font-stretch: var(--wdth-text);
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .font-display {
    font-stretch: var(--wdth-heading);
    letter-spacing: -0.01em;
}

input[type="file"] {
    max-width: 100%;
    font-size: 13px;
    color: var(--primary);
}

input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 9px 16px;
    border: 1px solid var(--line, #dce1e5);
    border-radius: 4px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
    background: var(--bg, #eef1f3);
}

/* Komunikaty: tło + ikona dla sukcesu, błędu, ostrzeżenia i informacji.
   Kolory statusów są stałe (nie zależą od motywu), bo kolor niesie znaczenie. */
:root {
    --msg-success-bg: #e3f0ec; --msg-success-line: #bfdcd4; --msg-success-fg: #1f5e4f;
    --msg-danger-bg: #fbeae7; --msg-danger-line: #f0c5be; --msg-danger-fg: #8f2a20;
    --msg-warning-bg: #fbf3dc; --msg-warning-line: #ebd79a; --msg-warning-fg: #6b4a0b;
    --msg-info-bg: #e8eef3; --msg-info-line: #c3d1dc; --msg-info-fg: #26343f;
}

.msg,
.flash,
.alert-ok,
.alert-err {
    --_bg: var(--msg-success-bg); --_line: var(--msg-success-line); --_fg: var(--msg-success-fg);
    --_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='M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z'/%3E%3Cpath d='M8 12l3 3 5-6'/%3E%3C/svg%3E");
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 16px;
    padding: 11px 14px;
    border: 1px solid var(--_line);
    border-radius: 4px;
    background: var(--_bg);
    color: var(--_fg);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

.msg::before,
.flash::before,
.alert-ok::before,
.alert-err::before {
    content: "";
    flex: none;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    background: currentColor;
    -webkit-mask: var(--_icon) center / contain no-repeat;
    mask: var(--_icon) center / contain no-repeat;
}

.msg a,
.flash a {
    color: inherit;
    text-decoration: underline;
}

.msg-danger,
.flash.danger,
.alert-err {
    --_bg: var(--msg-danger-bg); --_line: var(--msg-danger-line); --_fg: var(--msg-danger-fg);
    --_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='M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z'/%3E%3Cpath d='M12 8v5M12 16h.01'/%3E%3C/svg%3E");
}

.msg-warning,
.flash.warning {
    --_bg: var(--msg-warning-bg); --_line: var(--msg-warning-line); --_fg: var(--msg-warning-fg);
    --_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='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E");
}

.msg-info,
.flash.info {
    --_bg: var(--msg-info-bg); --_line: var(--msg-info-line); --_fg: var(--msg-info-fg);
    --_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='M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z'/%3E%3Cpath d='M12 16v-5M12 8h.01'/%3E%3C/svg%3E");
}
