/* The theme every page paints with: the colours, corners and shadows of the site, named once.
   phppot-style.css, login.css and user-registration.css import it, so a page linking one of them
   holds it; a stylesheet asks for a colour by its variable and never writes it out.
   See .architecture/login-hub/theme.md. */
:root {
    /* Grounds and ink */
    --mc-bg: #f3f6f4;
    --mc-surface: #ffffff;
    --mc-sunk: #f6f9f7;
    --mc-ink: #14231e;
    --mc-muted: #56665f;
    --mc-line: #e1e8e4;
    --mc-field-line: #8a9a93;
    --mc-disabled: #9aa5a0;

    /* The brand: the top bar, the band under it, whatever is pressed */
    --mc-top: #123329;
    --mc-top-2: #1b4538;
    --mc-brand: #1d5c47;
    --mc-brand-hover: #174b3a;
    --mc-on-brand: #ffffff;
    --mc-on-brand-soft: #cfe5db;
    --mc-tint: #e2f0e8;
    --mc-tint-ink: #17503d;
    --mc-brand-bright: #3ddc84;

    /* What a state reads in: its ink, its ground, its edge */
    --mc-ok: #1d7a3a;
    --mc-ok-bg: #e1f3e9;
    --mc-ok-line: #b8e0c9;
    --mc-warn: #7d4c00;
    --mc-warn-bg: #fff4dc;
    --mc-warn-line: #f0d494;
    --mc-danger: #a33a32;
    --mc-danger-hover: #7d2620;
    --mc-danger-ink: #b23a1d;
    --mc-danger-bg: #fbe4e1;
    --mc-danger-line: #efbdb7;
    --mc-info-ink: #0b3d74;
    --mc-info-bg: #e6eef8;
    --mc-info-line: #bccbe2;
    --mc-neutral-bg: #edf0ee;
    --mc-alert-dot: #e53935;

    /* A payment the bank confirmed: the mint panel, its darker disc, the white check drawn on it */
    --mc-paid-bg: #64f5c2;
    --mc-paid-disc: #4fd8a8;
    --mc-paid-ink: #0e3f2e;
    --mc-paid-check: #ffffff;

    /* The bars and lines of a chart; a pie keeps colours of its own (usage-charts.css) */
    --mc-series-1: #2b6fc0;
    --mc-series-2: #d4572e;
    --mc-series-3: #1a9b6a;
    --mc-series-4: #e5a31a;

    /* Corners: a card, a field or a button, a state's pill */
    --mc-radius-card: 16px;
    --mc-radius-control: 10px;
    --mc-radius-pill: 999px;

    --mc-shadow: 0 1px 2px rgba(20, 30, 25, 0.06), 0 8px 24px -14px rgba(20, 30, 25, 0.22);
    --mc-shadow-popover: 0 6px 20px rgba(20, 30, 25, 0.18);

    /* The band of the brand colour behind a page's heading and its tabs, as wide as the window
       whatever the width of the column holding them. An outset paints outside the box without
       widening the page, and clips nothing a tab opens under the bar. */
    --mc-band: conic-gradient(var(--mc-brand) 0 0) fill 0 / 0 / 0 100vmax;
}

/* The keyboard's focus is ringed in the brand colour on a light ground, in white on a dark one. */
:focus-visible {
    outline: 2px solid var(--mc-brand);
    outline-offset: 2px;
}

body > header :focus-visible {
    outline-color: var(--mc-on-brand);
}

/* The word mark, miCondomin.io (class/BrandName.php): its *mi* in the brand's bright green. */
.brand-mi {
    color: var(--mc-brand-bright);
}

/* The ES | EN switch (class/LocaleSwitch.php): two short links, the language read in bold. */
.locale-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    letter-spacing: 0.04em;
}

.locale-switch a {
    padding: 2px 4px;
    border-radius: var(--mc-radius-control);
    color: inherit;
    text-decoration: none;
    opacity: 0.75;
}

.locale-switch a:hover {
    opacity: 1;
    text-decoration: underline;
}

.locale-switch a.is-current {
    font-weight: 700;
    opacity: 1;
}

.locale-switch-bar {
    opacity: 0.4;
}

/* Over an account form (login, sign-up, the emailed code): in the window's top right corner, on
   the green band those pages paint. */
.locale-switch-corner {
    position: absolute;
    top: 12px;
    right: 16px;
    z-index: 5;
    color: var(--mc-on-brand);
}
