/*
 * anex.sh - shared design tokens and primitives (landing + dashboard).
 *
 * Warm "desert paper" light UI: umber ink on pale sand, hairline rules,
 * one sunset-red spice accent reserved for actions and live state. Every
 * figure (tokens, rows, cents) is set in the mono face - this is a metering
 * product, numbers are the material.
 */

/*
 * The two faces, served from our own origin.
 *
 * Fetching them from Google's CDN put two more round trips in front of the
 * first paint - the stylesheet, then the font it names - and handed every
 * visitor's IP address to a third party, which is not something a site
 * without a consent banner should be doing. The files are the same ones
 * Google serves, cut to the latin and latin-ext ranges we actually set type
 * in, under the licences in /static/fonts.
 *
 * Only the weights the stylesheets ask for are here: 400 and 600 of the mono
 * face, and the whole 400-900 range of Archivo in one variable file. Setting
 * mono text at 500 would silently round to one of the two present, so add the
 * file if you ever want that weight rather than assuming it arrives.
 *
 * font-display: swap keeps text readable in the fallback face while the real
 * one arrives, so a slow font never blanks the page. A font file is never
 * edited in place - a new version arrives under a new name - which is why
 * /static/fonts is cached as immutable (see app.py).
 */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 100%;
  font-display: swap;
  src: url(/static/fonts/archivo-400-900-latin-ext.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: 400 900;
  font-stretch: 100%;
  font-display: swap;
  src: url(/static/fonts/archivo-400-900-latin.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;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/fonts/ibm-plex-mono-400-latin-ext.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: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/fonts/ibm-plex-mono-400-latin.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;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/static/fonts/ibm-plex-mono-600-latin-ext.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: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/static/fonts/ibm-plex-mono-600-latin.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;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --paper: #fefcf8;
    --card: #ffffff;
    --ink: #2c211a;
    --body: #514336;
    --muted: #7b6c5a;
    --line: #e8ddc9;
    --spice: #c14a24;
    --spice-deep: #96351a;
    --spice-soft: #f8e5d6;
    --ok: #3d7a34;
    --ok-soft: #eaf1de;
    --warn: #93690e;
    --warn-soft: #f7eed4;
    --info: #3f5e8f;
    --info-soft: #e8edf5;
    --display: "Archivo", system-ui, sans-serif;
    --text: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

body {
    font-family: var(--text);
    background: var(--paper);
    color: var(--body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: var(--display);
    color: var(--ink);
    line-height: 1.15;
    font-weight: 700;
}

a { color: var(--spice-deep); }
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--spice);
    outline-offset: 2px;
}

code, .mono { font-family: var(--mono); }

/* ── Wordmark ───────────────────────────────────────────────────────────── */
.wordmark {
    font-family: var(--display);
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-decoration: none;
}
.wordmark .tld { color: var(--spice); }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
    display: inline-block;
    font-family: var(--text);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--spice); color: #fff; }
.btn-primary:hover { background: var(--spice-deep); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { border-color: var(--muted); }
/* Destructive actions (remove member, delete account/organization). */
.btn-danger { background: transparent; color: #b42318; border-color: #f0a99f; }
.btn-danger:hover { background: #b42318; color: #fff; border-color: #b42318; }
.btn:disabled { opacity: 0.5; cursor: default; }

/* A destructive-zone card + its confirmation dialog. */
.card.danger { border-color: #f0c8c2; }
.card.danger h3 { color: #b42318; }
.danger-confirm { display: block; margin-top: 14px; font-size: 13px; color: var(--muted); }
.danger-confirm input { display: block; margin-top: 6px; width: 100%; }
.notice-banner {
    background: #fff6ed; border: 1px solid #f6c99a; color: #7a3d00;
    padding: 12px 16px; border-radius: 8px; margin: 0 0 16px;
    display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
.notice-banner button { background: none; border: none; cursor: pointer; font-size: 18px; color: inherit; }

/* ── Status pills ───────────────────────────────────────────────────────── */
.pill {
    display: inline-block;
    font-family: var(--mono);
    font-size: 11.5px;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--line);
    color: var(--body);
    white-space: nowrap;
}
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-info { background: var(--info-soft); color: var(--info); }
.pill-spice { background: var(--spice-soft); color: var(--spice-deep); }
.pill-bad { background: #f9e2dd; color: #a02020; }

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 24px;
}

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