/* E# brand: red #821517 (the E), navy #323F50 (the #). The header stays light in dark mode too,
   because the colour logo's navy disappears on a dark background. */
:root {
    --brand-red: #821517;
    --brand-red-hover: #6a1113;
    --brand-navy: #323f50;
    --bg: #f4f5f7;
    --surface: #ffffff;
    --text: #1a2230;
    --muted: #5a6474;
    --border: #dde1e7;
    --accent: var(--brand-red);
    --accent-hover: var(--brand-red-hover);
    --accent-text: #ffffff;
    --link: #2b5d9b;
    --notice: #fff6d6;
    --notice-border: #e3c35a;
    --code-bg: #f0f2f5;
    --shadow: 0 1px 2px rgba(20, 30, 45, 0.06), 0 4px 16px rgba(20, 30, 45, 0.06);
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #12161c;
        --surface: #1b2129;
        --text: #e6e9ee;
        --muted: #9ba5b3;
        --border: #2d3540;
        --accent: #c0262b;
        --accent-hover: #d6383d;
        --link: #7fb0ec;
        --notice: #3a3219;
        --notice-border: #8a7430;
        --code-bg: #10141a;
        --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--link); }

/* ── Header ─────────────────────────────────────────────────────────────────────────────────── */
.bar {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 12px 24px;
    background: #ffffff;
    color: #1a2230;
    border-bottom: 3px solid var(--brand-red);
}

.bar__brand { display: flex; line-height: 0; }
.bar__brand img { height: 30px; width: auto; }

.bar__instance {
    flex: 1;
    min-width: 0;
    padding-left: 16px;
    border-left: 1px solid #dde1e7;
    color: var(--brand-navy);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bar__site {
    color: var(--brand-navy);
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}
.bar__site:hover { color: var(--brand-red); }

/* ── Content ────────────────────────────────────────────────────────────────────────────────── */
main {
    flex: 1;
    width: 100%;
    max-width: 880px;
    margin: 0 auto;
    padding: 40px 16px 56px;
}

h1 { font-size: 30px; line-height: 1.2; margin: 0 0 10px; color: var(--text); }
h2 { font-size: 19px; margin: 0 0 10px; }
h3 { font-size: 16px; margin: 20px 0 6px; }

.hero { margin-bottom: 28px; }
.lead { font-size: 18px; color: var(--muted); margin: 0; max-width: 62ch; }
.muted { color: var(--muted); }

.card, .panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 24px;
    margin-top: 20px;
}

.card--quiet { box-shadow: none; }
.card--quiet p { color: var(--muted); }

.panel { max-width: 560px; margin: 24px auto 0; padding: 32px; }
.panel h1 { font-size: 26px; }

/* ── Product cards ──────────────────────────────────────────────────────────────────────────── */
.apps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.app {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 3px solid var(--brand-navy);
    border-radius: 12px;
    box-shadow: var(--shadow);
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.15s, transform 0.15s;
}

.app:hover, .app:focus-visible { border-top-color: var(--brand-red); transform: translateY(-2px); }

.app__icon { display: block; line-height: 0; margin-bottom: 8px; }
.app__icon img { width: 48px; height: 48px; border-radius: 10px; }
.app__name { font-size: 22px; font-weight: 700; }
.app__desc { color: var(--muted); flex: 1; }
.app__open { margin-top: 12px; color: var(--accent); font-weight: 600; }

/* ── Controls ───────────────────────────────────────────────────────────────────────────────── */
.button, button.button {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--accent);
    color: var(--accent-text);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.button:hover { background: var(--accent-hover); }
.button:disabled { opacity: 0.5; cursor: not-allowed; }

.button--ghost {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.6);
    color: #ffffff;
}
.button--ghost:hover { background: rgba(255, 255, 255, 0.12); }

button.link {
    background: none;
    border: 0;
    padding: 0;
    color: var(--link);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.notice {
    background: var(--notice);
    border: 1px solid var(--notice-border);
    border-radius: 8px;
    padding: 10px 14px;
}

.warning { color: #b3261e; }

/* The Copy button sits above the block, not on it: the claude mcp add lines are wider than the card. */
.copy { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.copy pre {
    align-self: stretch;
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    margin: 0;
    overflow-x: auto;
    white-space: pre;
    font: 13px/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace;
}

.copy button {
    order: -1;
    padding: 4px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }

.signout { margin-top: 4px; }

/* ── Footer ─────────────────────────────────────────────────────────────────────────────────── */
.foot {
    background: var(--brand-navy);
    color: #d5dbe4;
    font-size: 14px;
}

.foot__inner {
    max-width: 880px;
    margin: 0 auto;
    padding: 28px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
}

.foot__brand { display: flex; align-items: center; gap: 16px; }
.foot__brand img { background: #ffffff; border-radius: 10px; padding: 4px; }
.foot__tagline { margin: 0; font-style: italic; }

.foot__contact { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.foot__contact p { margin: 0; }
.foot a { color: #ffffff; }

@media (max-width: 560px) {
    .bar { padding: 10px 16px; gap: 12px; }
    .bar__instance { padding-left: 12px; font-size: 14px; }
    h1 { font-size: 25px; }
    .panel { padding: 24px; }
}
