/* GT America — the BetMGM corporate typeface.
   Standard Regular carries the interface text; Condensed Bold and Black carry
   the headings, which the brand sets in tight uppercase. */

@font-face {
    font-family: "GT America";
    src: url("fonts/gt-america-lcgv-standard-regular-webfont.woff2") format("woff2"),
         url("fonts/gt-america-lcgv-standard-regular-webfont.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "GT America";
    src: url("fonts/gt-america-lcgv-standard-regular-italic-webfont.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "GT America Condensed";
    src: url("fonts/gt-america-lcgv-condensed-bold-webfont.woff2") format("woff2"),
         url("fonts/gt-america-lcgv-condensed-bold-webfont.woff") format("woff");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "GT America Condensed";
    src: url("fonts/gt-america-lcgv-condensed-black-webfont.woff2") format("woff2");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "GT America Compressed";
    src: url("fonts/gt-america-lcgv-compressed-bold-webfont.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "GT America Expanded";
    src: url("fonts/gt-america-lcgv-expanded-black-webfont.woff2") format("woff2");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* BetMGM Blog SEO Tools — shared design system.
   Tokens first, components second. Every tool consumes this file; nothing
   defines its own colors, radii or spacing. */

:root {
    --ink: #111111;
    --ink-soft: #3a3a37;

    /* BetMGM gold. It is a decorative colour: bright enough to carry surfaces
       and marks, too light to carry text on white. Hence --accent-text, a
       darkened variant that clears WCAG AA on light backgrounds, and black
       text on top of gold fills — the way the brand itself sets buttons. */
    --accent: #bda871;
    --accent-hover: #a8925c;
    --accent-text: #7a6535;
    /* Gold as a graphic mark: the lightest darkening of the brand gold that
       still clears 3:1 against both light surfaces. */
    --accent-graphic: #a38b4c;
    --accent-ink: #111111;
    --accent-soft: #f7f3e9;

    --muted: #5a616c;
    --line: #e4e7ec;
    --bg: #f5f6f8;
    --surface: #ffffff;
    --ok: #067647;
    --ok-bg: #ecfdf3;
    --ok-line: #abefc6;
    --warn: #b54708;
    --warn-bg: #fffaeb;
    --err: #b42318;
    --err-bg: #fef3f2;
    --err-line: #fecdca;

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --space: 8px;

    /* Reading scale. This is a tool people work in for a long time, so it is
       set for comfort rather than for fitting everything above the fold. */
    --text-xs: 13px;
    --text-sm: 15px;
    --text-base: 17px;
    --text-lg: 19px;
    --leading: 1.65;
    --shadow-sm: 0 1px 2px rgba(29, 29, 27, .06);
    --shadow: 0 4px 16px rgba(29, 29, 27, .08);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .45);

    --font: "GT America", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "GT America Condensed", "GT America", system-ui, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Consolas, monospace;

    --content-width: 1280px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: var(--text-base);
    line-height: var(--leading);
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1;
    letter-spacing: .01em;
    margin: 0 0 14px;
}
h1 { font-size: 40px; }
h2 { font-size: 26px; }
h3 { font-size: 21px; }
p { margin: 0 0 16px; }
a { color: var(--ink); text-underline-offset: 2px; }
a:hover { color: var(--accent-text); }

/* ---------- App shell ---------- */

.app-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 0 28px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

/* ---------- Brand lockup ---------- */

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    color: var(--ink);
    text-decoration: none;
    min-width: 0;
}

.brand-mark {
    height: 34px;
    width: auto;
    display: block;
    flex: none;
}

.brand-name {
    display: flex;
    align-items: baseline;
    gap: 9px;
    padding-left: 16px;
    border-left: 1px solid var(--line);
    min-width: 0;
}

.brand-product {
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .02em;
    font-size: 20px;
    line-height: 1;
    white-space: nowrap;
}

.brand-tool {
    font-size: var(--text-base);
    color: var(--muted);
    line-height: 1;
    white-space: nowrap;
}
.brand-tool::before { content: "— "; }

/* Used by the sign-in card, which has room for the signature. */
.powered-by-label {
    font-size: var(--text-xs);
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.app-nav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
.app-nav a {
    color: var(--muted);
    text-decoration: none;
    padding: 20px 14px;
    border-bottom: 2px solid transparent;
    font-size: var(--text-sm);
}
.app-nav a:hover { color: var(--ink); }
.app-nav a.is-active { color: var(--ink); border-bottom-color: var(--accent); font-weight: 700; }

.app-user { display: flex; align-items: center; gap: 14px; font-size: var(--text-sm); color: var(--muted); }
.app-user > .theme-switch { margin-right: 4px; }
.app-username { white-space: nowrap; }

.app-main { max-width: var(--content-width); margin: 36px auto 64px; padding: 0 28px; }
.page-head { margin-bottom: 28px; }
.page-head p { color: var(--muted); margin: 0; letter-spacing: .01em; }

/* ---------- Footer ---------- */

/* Pushes the footer to the bottom on short pages without pinning it there.
   The explicit width matters: as a flex item, auto margins would otherwise
   shrink the main column to its content instead of filling the page. */
body { display: flex; flex-direction: column; min-height: 100vh; }
.app-main { flex: 1 0 auto; width: 100%; }

.app-footer {
    flex: none;
    border-top: 1px solid var(--line);
    background: var(--surface);
    padding: 26px 28px;
}

.app-footer-inner {
    max-width: var(--content-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-brand { display: block; color: var(--ink); flex: none; }
.footer-brand svg { height: 24px; width: auto; display: block; }
.footer-brand:hover { color: var(--accent-text); }

.footer-note {
    margin: 0;
    color: var(--muted);
    font-size: var(--text-sm);
}
.footer-sep { padding: 0 6px; opacity: .5; }

/* The sign-in screen is a full-bleed layout of its own. */
body.auth { display: grid; min-height: 100vh; }

/* ---------- Surfaces ---------- */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 30px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}
.card > h2 { margin-top: 0; }
.stat { font-family: var(--font-display); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }

/* ---------- Tool cards on the landing page ---------- */

.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }

.tool-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    text-decoration: none;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.tool-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--accent); color: var(--ink); }
.tool-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.tool-card .tool-icon {
    width: 64px; height: 64px;
    display: grid; place-items: center;
    border-radius: var(--radius-sm);
    background: var(--ink);
    color: var(--accent);
}
.tool-card .tool-icon svg { width: 34px; height: 34px; stroke-width: 1.4; }
.tool-card h3 { margin: 0; padding-right: 72px; }
.tool-card .badge.tenant { position: absolute; top: 20px; right: 20px; }
.tool-card p { color: var(--muted); font-size: var(--text-sm); line-height: 1.6; margin: 0; flex: 1; }
.tool-card .tool-go { font-size: var(--text-sm); font-weight: 700; color: var(--accent-text); font-family: var(--font-display); text-transform: uppercase; letter-spacing: .04em; }

/* An announced tool. Everything that says "this opens" is taken away — no
   lift, no accent, a dashed edge — because the tile is a promise, not a door.
   Built from tokens that already exist, so it is right in both palettes
   without defining a single colour twice. Measured against --surface and
   --bg: 6.25:1 and 5.78:1 in light, 6.18:1 and 6.76:1 in dark. */
.tool-card.is-announced { cursor: default; box-shadow: none; border-style: dashed; }
.tool-card.is-announced:hover { transform: none; box-shadow: none; border-color: var(--line); }
.tool-card.is-announced .tool-icon { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.tool-card.is-announced h3,
.tool-card.is-announced .tool-go { color: var(--muted); }

/* ---------- Controls ---------- */

.btn:not(.fix-btn) {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--ink); color: #fff; border: 1px solid var(--ink);
    border-radius: var(--radius-sm); padding: 11px 20px;
    font: inherit; font-size: var(--text-sm); font-weight: 600;
    cursor: pointer; text-decoration: none;
    transition: background .14s ease, border-color .14s ease;
}
.btn:hover { background: var(--ink-soft); border-color: var(--ink-soft); color: #fff; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.btn.accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { background: var(--bg); color: var(--ink); }
.btn.danger { background: var(--err); border-color: var(--err); }
.btn.small { padding: 7px 14px; font-size: var(--text-xs); }
.btn.block { width: 100%; }

label { display: block; font-weight: 600; font-size: var(--text-sm); margin: 18px 0 7px; }

input[type=text], input[type=password], input[type=search], input[type=url],
input[type=number], input[type=email], input[type=date], select, textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: var(--text-base);
    background: var(--surface);
    color: var(--ink);
}
/* Keeps a date field the same height as the select next to it. */
input[type=date] { min-height: 44px; }

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(189, 168, 113, .28);
}
textarea { min-height: 150px; font-family: var(--font-mono); font-size: var(--text-sm); line-height: 1.6; }

.hint { color: var(--muted); font-size: var(--text-sm); margin-top: 7px; }
form.inline { display: inline; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filterbar { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 16px; }
.filterbar > div { min-width: 160px; }
.filterbar label { margin-top: 0; }

/* ---------- Data ---------- */

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 700; font-size: var(--text-xs); font-family: var(--font-display); text-transform: uppercase; letter-spacing: .05em; }
.table-scroll { overflow-x: auto; }

code { background: #f2f4f7; border-radius: 4px; padding: 2px 6px; font-size: var(--text-sm); font-family: var(--font-mono); }
.stat { font-size: 34px; font-weight: 700; letter-spacing: -.02em; }

.badge { display: inline-block; border-radius: 999px; padding: 4px 12px; font-size: var(--text-xs); font-weight: 600; white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.err { background: var(--err-bg); color: var(--err); }
.badge.muted { background: #f2f4f7; color: var(--muted); }
.badge.tenant { background: var(--accent); color: var(--accent-ink); font-weight: 700; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .04em; }

.flash { border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 20px; white-space: pre-line; font-size: var(--text-sm); }
.flash.success { background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok-line); }
.flash.error { background: var(--err-bg); color: var(--err); border: 1px solid var(--err-line); }

/* ---------- Sign-in screen ---------- */

body.auth {
    position: relative;
    display: grid;
    place-items: center;
    background: #0d0d0c;
    padding: 24px;
    overflow: hidden;
}

/* The brand chevrons, blown up and dimmed, carry the identity without
   competing with the form. */
body.auth::before {
    content: "";
    position: absolute;
    right: -8vw;
    bottom: -18vh;
    width: 70vw;
    height: 120vh;
    background: url("fitsol-icon-cc.svg") no-repeat center / contain;
    opacity: .06;
    filter: invert(72%) sepia(24%) saturate(560%) hue-rotate(2deg) brightness(94%);
    pointer-events: none;
}

body.auth::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(45rem 32rem at 12% 4%, rgba(189, 168, 113, .34), transparent 62%),
        radial-gradient(38rem 30rem at 96% 96%, rgba(189, 168, 113, .20), transparent 58%);
    pointer-events: none;
}

.auth-shell { position: relative; z-index: 1; }

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 34px 34px 32px;
    border-top: 4px solid var(--accent);
}
.auth-card .auth-brand { margin-bottom: 26px; }
.auth-card .auth-brand img { height: 36px; width: auto; display: block; }

.auth-signature {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
}
.auth-signature svg { height: 21px; width: auto; display: block; color: var(--ink); }
.auth-signature .powered-by-label { font-size: var(--text-xs); letter-spacing: .08em; text-transform: uppercase; }
.auth-card h1 { font-size: 36px; margin-bottom: 8px; }
.auth-card .auth-sub { color: var(--muted); font-size: var(--text-base); margin-bottom: 26px; }
.auth-card label:first-of-type { margin-top: 0; }
.auth-card .btn { margin-top: 22px; padding: 11px 16px; }
.auth-foot { text-align: center; margin-top: 22px; font-size: 12px; color: rgba(255, 255, 255, .5); letter-spacing: .06em; text-transform: uppercase; font-family: var(--font-display); }


/* Dark theme.
   Three declarations on purpose: the media query serves visitors on the
   default "system" setting, and the [data-theme] rules let an explicit choice
   win in both directions. Never define a color only inside one of them.

   Gold is lightened here: on black it carries text and marks comfortably,
   which is exactly how the brand uses it. */

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --ink: #f4f3f0;
        --ink-soft: #dcdad4;
        --accent: #cdb886;
        --accent-hover: #dcc99c;
        --accent-text: #d8c48f;
        --accent-graphic: #cdb886;
        --accent-ink: #111111;
        --accent-soft: rgba(189, 168, 113, .16);
        --muted: #9c9a93;
        --line: #2c2b28;
        --bg: #101010;
        --surface: #1a1a19;
        --ok: #6ee7a8;
        --ok-bg: rgba(6, 118, 71, .16);
        --ok-line: rgba(110, 231, 168, .3);
        --warn: #fbbf6b;
        --warn-bg: rgba(181, 71, 8, .18);
        --err: #fca5a0;
        --err-bg: rgba(180, 35, 24, .18);
        --err-line: rgba(252, 165, 160, .3);
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
        --shadow: 0 4px 16px rgba(0, 0, 0, .5);
    }

    :root:not([data-theme="light"]) .btn:not(.fix-btn) { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
    :root:not([data-theme="light"]) .btn:not(.fix-btn):hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
    :root:not([data-theme="light"]) .btn.secondary { background: transparent; color: var(--ink); border-color: var(--line); font-weight: 500; }
    :root:not([data-theme="light"]) .btn.secondary:hover { background: rgba(255, 255, 255, .06); color: var(--ink); }
    :root:not([data-theme="light"]) .tool-card .tool-icon { background: rgba(189, 168, 113, .14); color: var(--accent); }
    :root:not([data-theme="light"]) .tool-card:hover { border-color: var(--accent); }
    :root:not([data-theme="light"]) code { background: rgba(255, 255, 255, .07); }
    :root:not([data-theme="light"]) .badge.muted { background: rgba(255, 255, 255, .07); color: var(--muted); }
    :root:not([data-theme="light"]) .badge.tenant { background: var(--accent); color: var(--accent-ink); }
    :root:not([data-theme="light"]) body.auth { background: #080807; }
    :root:not([data-theme="light"]) .auth-card { border: 1px solid var(--line); }
    :root:not([data-theme="light"]) .app-header { background: #141413; }
}

:root[data-theme="dark"] {
        --ink: #f4f3f0;
    --ink-soft: #dcdad4;
    --accent: #cdb886;
    --accent-hover: #dcc99c;
    --accent-text: #d8c48f;
    --accent-graphic: #cdb886;
    --accent-ink: #111111;
    --accent-soft: rgba(189, 168, 113, .16);
    --muted: #9c9a93;
    --line: #2c2b28;
    --bg: #101010;
    --surface: #1a1a19;
    --ok: #6ee7a8;
    --ok-bg: rgba(6, 118, 71, .16);
    --ok-line: rgba(110, 231, 168, .3);
    --warn: #fbbf6b;
    --warn-bg: rgba(181, 71, 8, .18);
    --err: #fca5a0;
    --err-bg: rgba(180, 35, 24, .18);
    --err-line: rgba(252, 165, 160, .3);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 4px 16px rgba(0, 0, 0, .5);
}

:root[data-theme="dark"] .btn:not(.fix-btn) { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
:root[data-theme="dark"] .btn:not(.fix-btn):hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
:root[data-theme="dark"] .btn.secondary { background: transparent; color: var(--ink); border-color: var(--line); font-weight: 500; }
:root[data-theme="dark"] .btn.secondary:hover { background: rgba(255, 255, 255, .06); color: var(--ink); }
:root[data-theme="dark"] .tool-card .tool-icon { background: rgba(189, 168, 113, .14); color: var(--accent); }
:root[data-theme="dark"] .tool-card:hover { border-color: var(--accent); }
:root[data-theme="dark"] code { background: rgba(255, 255, 255, .07); }
:root[data-theme="dark"] .badge.muted { background: rgba(255, 255, 255, .07); color: var(--muted); }
:root[data-theme="dark"] .badge.tenant { background: var(--accent); color: var(--accent-ink); }
:root[data-theme="dark"] body.auth { background: #080807; }
:root[data-theme="dark"] .auth-card { border: 1px solid var(--line); }
:root[data-theme="dark"] .app-header { background: #141413; }

/* ---------- Theme switch ---------- */

.theme-switch {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface);
}
.theme-switch button {
    display: grid;
    place-items: center;
    width: 34px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}
.theme-switch button svg { width: 17px; height: 17px; }
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-text); }
.theme-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ---------- User management ---------- */

.table-head {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.table-head h2 { margin: 0; }

/*
   The access matrix grows a column per restricted tool. On a narrow screen it
   scrolls inside its own box rather than pushing the page sideways.
*/
.table-scroll { overflow-x: auto; }
.users-table { min-width: 720px; }
.users-table .hint { margin-top: 3px; }

/*
   The flex container is a div inside the cell, never the cell itself. Setting
   display:flex on a <td> takes it out of the table: the browser wraps it in an
   anonymous cell, and the border then stops where the buttons stop instead of
   running the width of the column — which is exactly the notch in the row
   separator this used to have.

   width:1% together with nowrap is the old trick for "as wide as its content":
   the table gives this column what the buttons need and hands the rest to the
   name column.
*/
.row-actions {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}
.row-actions-inner {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

/*
   Outlined rather than filled: a solid red button on every single row reads as
   a warning about the whole page and stops meaning anything. The colour marks
   which button is the destructive one; the confirmation dialog does the
   stopping.
*/
.row-actions-inner .btn.danger {
    background: transparent;
    border-color: var(--err-line);
    color: var(--err);
}
.row-actions-inner .btn.danger:hover {
    background: var(--err-bg);
    border-color: var(--err);
}

/*
   Three states, all three visible at once. A dropdown would hide "full access"
   one click away from "no access", which is exactly the kind of slip this
   whole feature exists to prevent.
*/
.access-group {
    margin: 18px 0 0;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}
.access-group legend {
    padding: 0 8px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--accent-text);
}
.access-option {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 0;
    padding: 9px 0;
    font-weight: 400;
    cursor: pointer;
}
.access-option input { margin-top: 3px; flex: none; accent-color: var(--accent-graphic); }
.access-option > span { display: block; }
.access-option strong { display: block; font-size: var(--text-base); font-weight: 600; }
.access-option .hint { margin-top: 2px; }
.access-option input:disabled { cursor: not-allowed; }
.access-option input:disabled ~ span { opacity: .6; }

/*
   Shown once, right after it is created. Monospaced and full width so that a
   double-click selects the whole link and nothing is lost in the middle.
*/
.invitation-card { border-color: var(--accent); }

/*
   Says what happened to the message. The link stays visible in every case, so
   this is information rather than an alternative — a mail Mailgun accepted can
   still be eaten by a spam filter.
*/
.mail-status {
    margin: 0 0 14px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    line-height: 1.6;
    background: var(--accent-soft);
}
.mail-status.ok { background: var(--ok-bg); }
.mail-status.ok strong { color: var(--ok); }
.mail-status.failed { background: var(--err-bg); }
.mail-status.failed strong { color: var(--err); }
.invitation-link {
    width: 100%;
    margin-top: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: var(--text-sm);
    background: var(--accent-soft);
}

/* ---------- Activity report ---------- */

.activity-table { min-width: 760px; }
.activity-table th, .activity-table td { padding: 9px 12px; }
.nowrap { white-space: nowrap; }

/*
   Badge, sentence and address on one line. A hundred rows of three stacked
   lines each is a page nobody scrolls to the end of.
*/
.event-cell-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 5px 10px;
}
.event-cell-inner .badge { flex: none; }
.event-summary { font-size: var(--text-sm); }
.event-cell-inner .hint { margin-top: 0; }

/* Actions sit at the far end of the filter row, wherever it wraps. */
.filter-actions { display: flex; gap: 8px; align-items: flex-end; margin-left: auto; min-width: 0; }

/*
   One bar per day. Plain divs: a charting library for a row of rectangles
   would be a megabyte to answer a question a ruler answers.
*/
.daybars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 90px;
    margin: 18px 0 0;
    padding: 0 2px;
    border-bottom: 1px solid var(--line);
}
/*
   Capped, so that a single day reads as one bar rather than as a filled banner
   across the card. With many days they shrink to fit; with few, the chart is
   simply narrower — which is the honest signal that there is little history.
*/
.daybar {
    flex: 1 1 0;
    min-width: 3px;
    max-width: 40px;
    height: 100%;
    display: flex;
    align-items: flex-end;
}
.daybar-fill {
    width: 100%;
    min-height: 2px;
    border-radius: 2px 2px 0 0;
    background: var(--accent-graphic);
}
.daybar:hover .daybar-fill { background: var(--accent-text); }

/* ---------- Read-only state ---------- */

/*
   Shown at the top of a tool a user may look at but not change. It states the
   situation once, in place, so nobody hunts for a button that was never
   rendered.
*/
.readonly-banner {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: baseline;
    margin: 0 0 24px;
    padding: 14px 18px;
    border: 1px solid var(--warn);
    border-radius: var(--radius-sm);
    background: var(--warn-bg);
    color: var(--ink);
    font-size: var(--text-sm);
    line-height: 1.6;
}
.readonly-banner strong { color: var(--warn); font-weight: 700; }

/*
   Items stay readable and their content still opens; only the affordance that
   would suggest picking them is taken away.
*/
body.is-readonly .feed-item { cursor: default; }
body.is-readonly .feed-item:hover { border-color: var(--line); }

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
    .app-username { display: none; }
}

@media (max-width: 720px) {
    .app-header { padding: 0 16px; gap: 12px; }
    .app-main { padding: 0 16px; margin-top: 20px; }
    .card { padding: 16px; }
    .brand-tool { display: none; }
    .brand-name { padding-left: 12px; }
    .brand-product { font-size: 15px; }
}
