/* Same look as BaseWebsite (colors and fonts from rtsai.com). Funnel Display
   is served from fonts/ (SIL Open Font License, fonts/FunnelDisplay-LICENSE.txt). */
@font-face {
    font-family: "Funnel Display Variable";
    font-style: normal;
    font-display: swap;
    font-weight: 300 800;
    src: url(../fonts/funnel-display-latin-ext-wght-normal.woff2) format("woff2-variations");
    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: "Funnel Display Variable";
    font-style: normal;
    font-display: swap;
    font-weight: 300 800;
    src: url(../fonts/funnel-display-latin-wght-normal.woff2) format("woff2-variations");
    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;
}

:root {
    --blue: #1d58f4;
    --blue-dark: #1747cd;
    --navy: #0a225e;
    --tint: #f1f2f6;
    --text: #313131;
    --muted: #5f6573;
    --white: #ffffff;
    --border: #dfe2ea;
    --ok: #1d7a46;
    --ok-bg: #e5f4ec;
    --error: #b42318;
    --error-bg: #fdecea;

    --font-heading: "Funnel Display Variable", "Segoe UI", system-ui, sans-serif;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    color: var(--text);
    background: var(--tint);
}

h1, h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--navy);
    margin: 0 0 .4em;
}
h1 { font-size: 1.8rem; }
h2 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
code { font-family: var(--font-mono); font-size: .9em; }
.muted { color: var(--muted); }

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Buttons */
.button {
    display: inline-block;
    padding: 10px 22px;
    border: 2px solid var(--blue);
    border-radius: 50px;
    background: var(--blue);
    color: var(--white);
    font: inherit;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.button:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.button:disabled { opacity: .6; cursor: default; }
.button.full { display: block; width: 100%; margin-top: 14px; }
.button-small { padding: 5px 16px; font-size: .9rem; }
.button-light { background: var(--white); border-color: var(--white); color: var(--blue); }
.button-light:hover { background: var(--tint); border-color: var(--tint); }
.button-outline { background: transparent; color: var(--blue); }
.button-outline:hover { background: var(--tint); border-color: var(--blue); }

/* Login */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
}
.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--white);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 20px 50px rgba(10, 34, 94, .35);
}
.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.login-brand h1 { margin: 0; font-size: 1.45rem; }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
    color: var(--text);
}
input:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }

.message { padding: 10px 12px; border-radius: 8px; font-size: .95rem; }
.message.error { background: var(--error-bg); color: var(--error); }
.message.info { background: var(--tint); color: var(--navy); }

/* Signed in */
.app-header { background: var(--navy); color: var(--white); }
.app-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    flex-wrap: wrap;
}
.app-header .login-brand { margin: 0; font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem; }
/* The logomark is dark; give it a white tile on the navy bar. */
.app-header .login-brand img { background: var(--white); border-radius: 8px; padding: 3px; }
.app-user { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.app-main { padding-top: 36px; padding-bottom: 48px; }
.test-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 24px;
    align-items: start;
}
.test-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
}
.result { margin-top: 18px; }
.result-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .9rem;
    color: var(--muted);
    margin-bottom: 10px;
}
.pill {
    padding: 2px 10px;
    border-radius: 50px;
    font-weight: 700;
    font-size: .8rem;
}
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.error { background: var(--error-bg); color: var(--error); }
pre {
    margin: 0;
    padding: 12px;
    max-height: 320px;
    overflow: auto;
    background: var(--tint);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: .82rem;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 600px) {
    .test-grid { grid-template-columns: 1fr; }
    .login-card { padding: 24px; }
}
