/* =============================================================================
   EventOS — Design system
   "Modern minimalist": white surfaces, one sans typeface, a single accent used
   sparingly, generous whitespace, soft shadows, motion that explains rather
   than decorates. Nothing is coloured unless the colour carries meaning.
   ========================================================================== */

/* ---------------------------------------------------------------- tokens -- */
:root {
    color-scheme: light;

    /* Surfaces — the page is a light grey so white cards read as raised. */
    --paper:        #f7f8f9;
    --paper-sunk:   #f1f3f5;
    --paper-deep:   #e8ebee;
    --card:         #ffffff;
    --ink-surface:  #101317;
    --ink-surface-2:#191d23;

    /* Text */
    --ink:          #101317;
    --ink-2:        #4b5361;
    --ink-3:        #79818e;
    --ink-invert:   #ffffff;
    --ink-invert-2: #a4acb8;

    /* Lines — hairlines, barely there. */
    --rule:         #e6e9ec;
    --rule-strong:  #cfd4da;
    --rule-invert:  rgba(255, 255, 255, .14);

    /* Brand. One accent. `--accent` is the interactive colour and meets
       contrast on white; `--accent-soft` is for washes only, never text. */
    --accent:       #0f766e;
    --accent-deep:  #0b5c56;
    --accent-wash:  #eef7f6;

    /* Legacy aliases — older rules still name the previous accent. */
    --brass:        var(--accent);
    --brass-deep:   var(--accent);
    --brass-wash:   var(--accent-wash);

    /* Chart palette — validated with scripts/validate_palette.js against the
       white chart surface: lightness band, chroma floor, adjacent-pair CVD
       separation, normal-vision floor, contrast. Do not hand-edit; re-run the
       validator if these change. */
    --series-1:     #2a78d6;
    --series-2:     #eb6834;
    --series-3:     #1baf7a;
    --series-4:     #eda100;
    --series-1-wash:#eaf2fc;
    --grid:         #eceff2;

    /* Status — reserved. Never reused as a chart series. */
    --ok:           #0b7a48;
    --ok-wash:      #e8f6ee;
    --warn:         #8a5a00;
    --warn-wash:    #fdf3e2;
    --danger:       #b3261e;
    --danger-wash:  #fdecea;
    --info:         #1a5fb4;
    --info-wash:    #eaf1fb;
    --neutral-wash: #f1f3f5;

    /* Type — one family, no serif display face. */
    --font-display: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --font-sans:    'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --font-mono:    ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;

    /* Space & shape */
    --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
    --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 72px; --sp-9: 104px;
    --radius:    8px;
    --radius-lg: 14px;
    --radius-pill: 999px;
    --shadow-sm: 0 1px 2px rgba(16, 19, 23, .06);
    --shadow:    0 1px 3px rgba(16, 19, 23, .07), 0 6px 16px -6px rgba(16, 19, 23, .10);
    --shadow-lg: 0 8px 24px -8px rgba(16, 19, 23, .14), 0 24px 56px -24px rgba(16, 19, 23, .20);
    --wrap:      1160px;
    --wrap-narrow: 720px;

    /* Motion — one curve, three durations. */
    --ease:      cubic-bezier(.2, .7, .3, 1);
    --dur-fast:  .14s;
    --dur:       .22s;
    --dur-slow:  .42s;
}

/* ------------------------------------------------------------ dark mode -- */
/*
   Admin only, and stamped on <html> by the server so there is no white flash.
   The dark chart series are their own steps for the dark surface, validated
   as a set against it — not an automatic inversion of the light ones.
*/
[data-theme="dark"] {
    color-scheme: dark;

    --paper:        #101216;
    --paper-sunk:   #14171c;
    --paper-deep:   #1b1f26;
    --card:         #17191f;
    --ink-surface:  #0b0d10;
    --ink-surface-2:#14171c;

    --ink:          #eceef1;
    --ink-2:        #a8b0bb;
    --ink-3:        #7d8593;
    --ink-invert:   #ffffff;
    --ink-invert-2: #a4acb8;

    --rule:         #242830;
    --rule-strong:  #363c47;
    --rule-invert:  rgba(255, 255, 255, .13);

    --accent:       #2dd4bf;
    --accent-deep:  #5eead4;
    --accent-wash:  #10231f;

    --series-1:     #3987e5;
    --series-2:     #d95926;
    --series-3:     #199e70;
    --series-4:     #c98500;
    --series-1-wash:#16202e;
    --grid:         #242830;

    --ok:           #3fbe7f;
    --ok-wash:      #12241a;
    --warn:         #d8a53f;
    --warn-wash:    #241d10;
    --danger:       #e8695f;
    --danger-wash:  #2a1614;
    --info:         #6ba5e8;
    --info-wash:    #131e2c;
    --neutral-wash: #1c2027;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow:    0 1px 3px rgba(0, 0, 0, .5), 0 6px 16px -6px rgba(0, 0, 0, .6);
    --shadow-lg: 0 8px 24px -8px rgba(0, 0, 0, .65), 0 24px 56px -24px rgba(0, 0, 0, .8);
}

/* ----------------------------------------------------------------- reset -- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    letter-spacing: -.006em;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'kern' 1, 'liga' 1;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a {
    color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color var(--dur-fast) var(--ease);
}
a:hover { color: var(--accent-deep); }
hr { border: 0; border-top: 1px solid var(--rule); margin: var(--sp-6) 0; }

::selection { background: var(--ink); color: #ffffff; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius);
}

/* Motion is an explanation, not decoration — so it goes away entirely for
   anyone who has asked their system for less of it. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ------------------------------------------------------------ typography -- */
h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -.022em;
    margin: 0 0 var(--sp-3);
    color: var(--ink);
    text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.35rem + 2.4vw, 3.1rem); letter-spacing: -.032em; }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.3vw, 2.05rem); letter-spacing: -.026em; }
h3 { font-size: clamp(1.15rem, 1.05rem + .5vw, 1.4rem); }
h4 { font-size: 1.05rem; }
h5 { font-size: .95rem; }

p { margin: 0 0 var(--sp-4); }
p:last-child { margin-bottom: 0; }

.lead {
    font-size: 1.08rem;
    line-height: 1.7;
    color: var(--ink-2);
}

/* Letterspaced small-caps label — the connective tissue of the whole design */
.eyebrow {
    font-family: var(--font-sans);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 var(--sp-3);
    display: block;
}
.eyebrow--plain,
.eyebrow--brass { color: var(--accent); }

.serif  { font-family: var(--font-display); }
.mono   { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted  { color: var(--ink-3); }
.dim    { color: var(--ink-2); }
.tnum   { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

.prose { max-width: 68ch; }
.prose p { margin-bottom: var(--sp-4); }
.prose ul, .prose ol { margin: 0 0 var(--sp-4); padding-left: 1.15em; }
.prose li { margin-bottom: var(--sp-2); }
.prose h3 { margin-top: var(--sp-6); }

/* --------------------------------------------------------------- layout -- */
.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--sp-5);
}
.wrap--narrow { max-width: var(--wrap-narrow); }

.section { padding-block: var(--sp-8); }
.section--tight { padding-block: var(--sp-7); }
.section--sunk { background: var(--paper-sunk); }
.section--ink  { background: var(--ink-surface); color: var(--ink-invert); }
.section--ink h1, .section--ink h2, .section--ink h3 { color: var(--ink-invert); }
.section--ink .eyebrow { color: var(--ink-invert-2); }
.section--ink .eyebrow::after { background: var(--rule-invert); }

.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-sidebar { grid-template-columns: minmax(0, 1fr) 320px; gap: var(--sp-7); }

.stack > * + * { margin-top: var(--sp-4); }
.stack-sm > * + * { margin-top: var(--sp-2); }
.stack-lg > * + * { margin-top: var(--sp-6); }

.row { display: flex; align-items: center; gap: var(--sp-3); }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.row--top { align-items: flex-start; }
.spacer { flex: 1; }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--sp-5);
    margin-bottom: var(--sp-6);
    flex-wrap: wrap;
}
.section-head p { margin: var(--sp-2) 0 0; color: var(--ink-2); max-width: 58ch; }

/* --------------------------------------------------------------- rules --- */
.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }
.rule--strong { background: var(--rule-strong); }
.rule--brass { height: 2px; background: var(--brass); width: 54px; }

/* -------------------------------------------------------------- buttons -- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: 11px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: var(--ink-surface);
    color: var(--ink-invert);
    font-size: .875rem;
    font-weight: 500;
    letter-spacing: .01em;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease),
                color var(--dur-fast) var(--ease),
                border-color var(--dur-fast) var(--ease),
                box-shadow var(--dur) var(--ease),
                transform var(--dur-fast) var(--ease);
    white-space: nowrap;
}
.btn:hover {
    background: #232830;
    color: var(--ink-invert);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}
.btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); }
.btn[disabled], .btn.is-disabled {
    opacity: .45;
    pointer-events: none;
}

.btn--ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--rule-strong);
}
.btn--ghost:hover {
    background: var(--paper-sunk);
    color: var(--ink);
    border-color: var(--rule-strong);
    box-shadow: none;
    transform: none;
}

.btn--accent, .btn--brass { background: var(--accent); color: #fff; }
.btn--accent:hover, .btn--brass:hover { background: var(--accent-deep); color: #fff; }

.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #8f1d17; color: #fff; }

.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: #fff; color: var(--ink); }

/* A ghost button that reads as destructive without shouting. */
.btn--danger-ghost {
    background: transparent;
    color: var(--danger);
    border-color: color-mix(in srgb, var(--danger) 35%, transparent);
}
.btn--danger-ghost:hover { background: var(--danger-wash); color: var(--danger); border-color: var(--danger); }

.btn--sm { padding: 7px 13px; font-size: .8125rem; border-radius: 6px; }
.btn--lg { padding: 14px 26px; font-size: .95rem; }
.btn--block { width: 100%; }

.btn-link {
    background: none;
    border: 0;
    padding: 0;
    color: var(--brass-deep);
    font-size: .875rem;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.btn-link:hover { color: var(--ink); }

/* Arrow link — used for "read more" affordances */
.arrow-link {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: .875rem;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--rule-strong);
    padding-bottom: 2px;
    transition: border-color .16s ease, gap .16s ease;
}
.arrow-link:hover { border-color: var(--brass); gap: 10px; color: var(--ink); }
.arrow-link::after { content: '→'; font-size: 1em; line-height: 1; }

/* --------------------------------------------------------------- badges -- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 100px;
    font-size: .688rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    background: var(--neutral-wash);
    color: var(--ink-2);
    white-space: nowrap;
    line-height: 1.5;
}
.badge::before {
    content: '';
    width: 5px; height: 5px;
    border-radius: 50%;
    background: currentColor;
    flex: none;
}
.badge--ok      { background: var(--ok-wash);     color: var(--ok); }
.badge--warn    { background: var(--warn-wash);   color: var(--warn); }
.badge--danger  { background: var(--danger-wash); color: var(--danger); }
.badge--info    { background: var(--info-wash);   color: var(--info); }
.badge--plain::before { display: none; }
.badge--lg { padding: 5px 12px; font-size: .75rem; }

/* ---------------------------------------------------------------- cards -- */
.card {
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    padding: var(--sp-5);
}
.card--flush { padding: 0; overflow: hidden; }
.card--lift {
    transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.card--lift:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
    border-color: var(--rule-strong);
}
.card--sunk { background: var(--paper-sunk); border-color: var(--rule); }
.card--outline { background: transparent; }

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    padding: var(--sp-4) var(--sp-5);
    border-bottom: 1px solid var(--rule);
}
.card-head h3, .card-head h4 { margin: 0; }
.card-body { padding: var(--sp-5); }
.card-foot {
    padding: var(--sp-4) var(--sp-5);
    border-top: 1px solid var(--rule);
    background: var(--paper-sunk);
}

/* ---------------------------------------------------------------- forms -- */
.field { margin-bottom: var(--sp-5); }
.field:last-child { margin-bottom: 0; }

.label {
    display: block;
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--ink);
    margin-bottom: 6px;
}
.label .req { color: var(--danger); margin-left: 2px; }
.label .opt { color: var(--ink-3); font-weight: 400; margin-left: 6px; letter-spacing: 0; }

.help {
    font-size: .8125rem;
    color: var(--ink-3);
    margin-top: 6px;
    line-height: 1.5;
}

.input, .select, .textarea {
    width: 100%;
    padding: 11px 14px;
    background: var(--card);
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius);
    font-size: .9375rem;
    line-height: 1.5;
    color: var(--ink);
    transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
    appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-3); opacity: .8; }
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] {
    border-color: var(--danger);
    background: var(--danger-wash);
}
.textarea { min-height: 120px; resize: vertical; }
.select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236d757e' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    padding-right: 36px;
}
.input:disabled, .select:disabled, .textarea:disabled {
    background: var(--paper-sunk);
    color: var(--ink-3);
    cursor: not-allowed;
}

.field-error {
    display: block;
    font-size: .8125rem;
    color: var(--danger);
    margin-top: 6px;
    font-weight: 500;
}

.choice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 13px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    cursor: pointer;
    background: var(--card);
    transition: border-color .15s ease, background .15s ease;
    font-size: .9375rem;
}
.choice:hover { border-color: var(--rule-strong); background: var(--paper-sunk); }
.choice input { margin: 4px 0 0; accent-color: var(--ink); flex: none; }
.choice-list { display: grid; gap: var(--sp-2); }
.choice-list--inline { grid-auto-flow: column; grid-auto-columns: max-content; }

.input-group { display: flex; gap: var(--sp-2); }
.input-group .input { flex: 1; }

fieldset { border: 0; padding: 0; margin: 0 0 var(--sp-6); }
legend { padding: 0; }

/* --------------------------------------------------------------- tables -- */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--rule);
    border-radius: var(--radius-lg);
    background: var(--card);
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}
.table th {
    text-align: left;
    font-size: .688rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-3);
    padding: 12px var(--sp-4);
    border-bottom: 1px solid var(--rule-strong);
    background: var(--paper-sunk);
    white-space: nowrap;
}
.table td {
    padding: 13px var(--sp-4);
    border-bottom: 1px solid var(--rule);
    vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fcfaf6; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .shrink { width: 1%; white-space: nowrap; }
.table a { color: var(--ink); text-decoration: none; font-weight: 500; }
.table a:hover { color: var(--brass-deep); text-decoration: underline; }

/* --------------------------------------------------------------- alerts -- */
.alert {
    display: flex;
    gap: var(--sp-3);
    padding: 13px var(--sp-4);
    border-radius: var(--radius);
    border: 1px solid;
    font-size: .9rem;
    line-height: 1.55;
    margin-bottom: var(--sp-4);
}
.alert strong { display: block; margin-bottom: 2px; }
.alert--ok     { background: var(--ok-wash);     border-color: #bfdccd; color: #10583a; }
.alert--info   { background: var(--info-wash);   border-color: #c2d5e6; color: #17507d; }
.alert--warn   { background: var(--warn-wash);   border-color: #e4d2a5; color: #6f4e0c; }
.alert--danger { background: var(--danger-wash); border-color: #eec3c9; color: #85182a; }
.alert-icon { flex: none; font-size: 1.1em; line-height: 1.4; }

/* ------------------------------------------------------------ empty state */
.empty {
    text-align: center;
    padding: var(--sp-8) var(--sp-5);
    color: var(--ink-3);
}
.empty-mark {
    width: 44px; height: 44px;
    margin: 0 auto var(--sp-4);
    border: 1px solid var(--rule-strong);
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--brass);
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-style: italic;
}
.empty h3 { font-size: 1.15rem; margin-bottom: var(--sp-2); }
.empty p { max-width: 42ch; margin-inline: auto; font-size: .9rem; }

/* ----------------------------------------------------------- pagination -- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    margin-top: var(--sp-6);
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    font-size: .8125rem;
    font-variant-numeric: tabular-nums;
    text-decoration: none;
    color: var(--ink-2);
    background: var(--card);
}
.pagination a:hover { border-color: var(--ink-3); color: var(--ink); }
.pagination .is-current { background: var(--ink-surface); border-color: var(--ink-surface); color: var(--ink-invert); font-weight: 600; }
.pagination .is-gap { border: 0; background: none; }

/* ------------------------------------------------------------- progress -- */
.meter {
    height: 6px;
    background: var(--paper-deep);
    border-radius: 100px;
    overflow: hidden;
}
.meter > span {
    display: block;
    height: 100%;
    background: var(--ink-surface);
    border-radius: 100px;
    transition: width .4s ease;
}
.meter--brass > span { background: var(--brass); }
.meter--ok > span    { background: var(--ok); }
.meter--warn > span  { background: var(--warn); }
.meter--danger > span{ background: var(--danger); }

/* ----------------------------------------------------------------- misc -- */
.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 999;
    background: var(--ink-surface); color: var(--ink-invert);
    padding: 10px 18px; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

.avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--paper-deep);
    color: var(--ink-2);
    display: grid;
    place-items: center;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .04em;
    flex: none;
}
.avatar--lg { width: 56px; height: 56px; font-size: 1rem; }
.avatar--ink { background: var(--ink-surface); color: var(--ink-invert); }

/* Definition list rendered as aligned key/value rows. Used on both sides. */
.kv { display: grid; gap: var(--sp-3); font-size: .875rem; }
.kv > div {
    display: flex;
    justify-content: space-between;
    gap: var(--sp-4);
    padding-bottom: var(--sp-3);
    border-bottom: 1px solid var(--rule);
}
.kv > div:last-child { border-bottom: 0; padding-bottom: 0; }
.kv dt { color: var(--ink-3); flex: none; }
.kv dd { margin: 0; text-align: right; font-weight: 500; }

.chip-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border: 1px solid var(--rule-strong);
    border-radius: 100px;
    font-size: .8125rem;
    color: var(--ink-2);
    text-decoration: none;
    background: var(--card);
    transition: all .15s ease;
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip.is-active { background: var(--ink-surface); border-color: var(--ink-surface); color: var(--ink-invert); }

.divider-dot { color: var(--rule-strong); }

@media (max-width: 900px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-sidebar { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
    .section { padding-block: var(--sp-7); }
    .wrap { padding-inline: var(--sp-4); }
}

@media print {
    .no-print { display: none !important; }
    body { background: #fff; }
    .card { border-color: #ccc; break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ================================================================ motion == */
/*
   Two effects only, both cheap and both meaningful: content rises as it
   enters, and interactive surfaces respond to the pointer. Anything more
   would be decoration, and decoration on a page people visit weekly wears
   out fast. Everything here is disabled by the reduced-motion block above.
*/

@keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

@keyframes fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.rise    { animation: rise var(--dur-slow) var(--ease) both; }
.rise-1  { animation: rise var(--dur-slow) var(--ease) .06s both; }
.rise-2  { animation: rise var(--dur-slow) var(--ease) .12s both; }
.rise-3  { animation: rise var(--dur-slow) var(--ease) .18s both; }

/*
   Sections reveal as they scroll into view. `js-reveal` is added by the
   script only when JavaScript is running, so with JS off nothing is ever
   left invisible.
*/
.js-reveal [data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.js-reveal [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

/* Staggered children, for grids of cards. */
.js-reveal [data-reveal] > * { transition-delay: 0ms; }
.js-reveal [data-reveal].is-visible > *:nth-child(2) { transition-delay: 60ms; }
.js-reveal [data-reveal].is-visible > *:nth-child(3) { transition-delay: 120ms; }
.js-reveal [data-reveal].is-visible > *:nth-child(4) { transition-delay: 180ms; }
