/* Wedflow Accounts. One stylesheet, no scripts.
   Neutral greys with ink buttons; Wedflow's orange and its yellow-orange-pink gradient are
   the accents. Light and dark are each designed, not inverted. The theme is decided before
   the first paint: by the system setting, or by the person's saved choice, which the server
   writes onto <html data-theme>. Nothing is switched by script, so there is no flash. */

@font-face {
    font-family: "Inter";
    src: url("fonts/Inter-Variable.ttf") format("truetype");
    font-weight: 100 900;
    font-display: swap;
}

:root {
    color-scheme: light;
    --bg: #f6f6f7; --paper: #ffffff; --wash: #f4f4f5; --field: #ffffff; --track: #ececef;
    --text: #18181b; --text-2: #3f3f46; --muted: #6b6b76;
    --line: #e7e7ea; --line-2: #d4d4d8;
    --btn: #18181b; --btn-fg: #ffffff;
    --link: #c2410c; --focus: #f97316; --accent: #ea580c;
    --ok: #166534; --ok-bg: #dcfce7; --alert: #b3261e; --alert-bg: #fdecea;
    --tab: #ffffff; --tab-shadow: 0 1px 2px rgba(0, 0, 0, 0.10);
    --gradient: linear-gradient(90deg, #facc15, #fb923c 40%, #f97316 60%, #ec4899);
    --r: 10px;
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0c0c0e; --paper: #18181b; --wash: #27272a; --field: #0c0c0e; --track: #0c0c0e;
    --text: #fafafa; --text-2: #d4d4d8; --muted: #a1a1aa;
    --line: #2a2a2e; --line-2: #3f3f46;
    --btn: #fafafa; --btn-fg: #18181b;
    --link: #fdba74; --focus: #fb923c; --accent: #fb923c;
    --ok: #86efac; --ok-bg: #14321f; --alert: #ffb4ab; --alert-bg: #3a1614;
    --tab: #2e2e33; --tab-shadow: none;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #0c0c0e; --paper: #18181b; --wash: #27272a; --field: #0c0c0e; --track: #0c0c0e;
        --text: #fafafa; --text-2: #d4d4d8; --muted: #a1a1aa;
        --line: #2a2a2e; --line-2: #3f3f46;
        --btn: #fafafa; --btn-fg: #18181b;
        --link: #fdba74; --focus: #fb923c; --accent: #fb923c;
        --ok: #86efac; --ok-bg: #14321f; --alert: #ffb4ab; --alert-bg: #3a1614;
        --tab: #2e2e33; --tab-shadow: none;
    }
    :root:not([data-theme="light"]) .logo.l { display: none; }
    :root:not([data-theme="light"]) .logo.d { display: block; }
}
:root[data-theme="dark"] .logo.l { display: none; }
:root[data-theme="dark"] .logo.d { display: block; }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
body {
    display: flex; flex-direction: column; min-height: 100vh; margin: 0;
    color: var(--text); background: var(--bg);
    font: 15px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}
body::before { content: ""; display: block; height: 3px; background: var(--gradient); }
/* Links are the text colour with an orange underline: the orange reads as a clean line
   rather than tinting the letters, which looked muddy on dark. */
a { color: var(--text); text-decoration-line: underline; text-decoration-color: var(--accent);
    text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
/* Pointing at a text link (or tabbing to it) turns it into Wedflow's gradient button: a dark
   pill inside an orange-to-pink ring. The ring and padding are always there, invisible and
   cancelled by a negative margin, so nothing around the link moves when the pill appears. */
main a:not(.button):not(.choice) {
    position: relative; margin: 0 -6px; padding: 2px 4px; border: 2px solid transparent; border-radius: 999px;
    -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
main a:not(.button):not(.choice):hover, main a:not(.button):not(.choice):focus-visible {
    z-index: 1; color: #ffffff; text-decoration-color: transparent; outline: 0;
    background: linear-gradient(#111827, #111827) padding-box,
        linear-gradient(90deg, #fb923c, #f97316 50%, #ec4899) border-box;
    box-shadow: 0 6px 16px -6px rgba(249, 115, 22, 0.55);
}
p { margin: 0 0 12px; }
h1 { margin: 0 0 10px; font-size: 26px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
h2 { margin: 30px 0 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
ul { list-style: none; margin: 0; padding: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
img { max-width: 100%; height: auto; }
.muted { color: var(--muted); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.brand, nav a, .choice, .button, a.button:hover { text-decoration: none; }
a.button:hover, .choice:hover { color: var(--text); }
a.primary:hover { color: var(--btn-fg); }

/* ---------- header ---------- */
.top { display: flex; align-items: center; gap: 12px; padding: 22px 24px 10px; }
.entrance .top { justify-content: center; padding-top: 34px; }
.authed .top { flex-wrap: wrap; width: 100%; max-width: 720px; margin: 0 auto; padding: 22px 0 4px; }
.brand { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 500; }
/* The wordmark file has space under its letters: its baseline is 23.6% of the height up
   from the bottom. Pulling the image down by that much sits "Account" on the same line
   the letters stand on. */
.brand img { display: block; height: 30px; width: auto; margin-bottom: -7.1px; }
.entrance .brand img { height: 34px; margin-bottom: -8px; }
.brand span { padding-left: 10px; border-left: 1px solid var(--line-2); line-height: 1.2; }
.logo.d { display: none; }

nav { display: flex; order: 3; flex: 1 0 100%; gap: 2px; margin-top: 10px; padding: 4px;
    border: 1px solid var(--line); border-radius: 12px; background: var(--track); }
nav a { display: flex; flex: 1; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px;
    border-radius: 9px; text-decoration: none; white-space: nowrap; font-size: 14px; font-weight: 500; color: var(--muted); }
nav a[aria-current="page"] { color: var(--text); background: var(--tab); box-shadow: var(--tab-shadow); }
nav a[aria-current="page"] .i { color: var(--accent); }
.signout { margin: 0 0 0 auto; }
.signout button { width: auto; min-height: 36px; margin: 0; padding: 6px 12px; font-size: 14px; font-weight: 500;
    color: var(--muted); background: transparent; border-color: var(--line); }

/* ---------- the card ---------- */
main { width: 100%; margin: 14px auto 28px; padding: 32px; background: var(--paper);
    border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03); }
main.narrow { max-width: 440px; }
main.wide { max-width: 720px; }
.for { margin-bottom: 6px; font-size: 14px; color: var(--muted); }
.for strong { color: var(--text); font-weight: 600; }
.lead { color: var(--text-2); }
.foot { margin: 22px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- forms ---------- */
label { display: block; margin: 16px 0 6px; font-size: 14px; font-weight: 500; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="tel"], input:not([type]) {
    width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; color: var(--text);
    background: var(--field); border: 1px solid var(--line-2); border-radius: var(--r);
}
input::placeholder { color: var(--muted); opacity: 0.7; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
button, .button {
    display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 46px;
    margin: 12px 0 0; padding: 10px 18px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
    color: var(--text); background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r);
}
button:hover, .button:hover { border-color: var(--muted); }
/* The main action: plain ink. */
button[type="submit"], .button.primary, .primary {
    margin-top: 18px; color: var(--btn-fg); background: var(--btn); border: 1px solid var(--btn);
}
button[type="submit"]:hover, .primary:hover { opacity: 0.92; }
.signout button[type="submit"], .theme button[type="submit"], button.plain[type="submit"] {
    color: var(--muted); background: transparent; border: 1px solid var(--line); margin-top: 0;
}
button[form="mfa_login"] { color: var(--text); background: var(--paper); border: 1px solid var(--line-2); }
form.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
main > form > button.plain { width: auto; min-height: 40px; color: var(--text); border-color: var(--line-2); }
form.foot button { width: auto; min-height: 30px; padding: 2px 10px; font-size: 14px; }
.helptext, .helptext li { font-size: 13px; color: var(--muted); }
span.helptext { display: block; margin: 12px 0 0; }
span.helptext a { font-size: 13.5px; }
.helptext ul { list-style: disc; padding-left: 18px; }
.errorlist, .messages { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--r); font-size: 14px; }
.errorlist { color: var(--alert); background: var(--alert-bg); }
.messages { color: var(--text-2); background: var(--wash); }
.notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px;
    padding: 12px 14px; background: var(--wash); border-radius: var(--r); }
.notice .button { width: auto; min-height: 36px; margin: 0; padding: 6px 14px; }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0 4px; font-size: 13px; color: var(--muted); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- pieces ---------- */
.i { flex: none; }
.ico { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 38px; height: 38px;
    border-radius: 10px; color: var(--text); background: var(--wash); }
.m { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.m strong { font-weight: 600; }
.m .muted { font-size: 14px; overflow-wrap: anywhere; }
.choice { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 14px; text-decoration: none;
    color: var(--text); background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r); }
.choice:hover { border-color: var(--accent); }
.choice > .i { color: var(--muted); }
.who { display: flex; align-items: center; gap: 16px; }
.who h1, .who p { margin: 0; }
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 56px; height: 56px;
    border-radius: 50%; font-weight: 600; font-size: 18px; color: var(--text);
    border: 2px solid transparent; background: linear-gradient(var(--wash), var(--wash)) padding-box, var(--gradient) border-box; }
.methods li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.methods li > a { flex: none; font-size: 14px; font-weight: 500; }
.badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--ok); background: var(--ok-bg); }
.activity li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.activity .when { color: var(--muted); white-space: nowrap; }
.methods li:last-child, .activity li:last-child { padding-bottom: 0; }
table { width: 100%; border-collapse: collapse; }
td, th { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); font-size: 14px; }

/* ---------- footer: appearance ---------- */
.theme { display: flex; align-items: center; justify-content: center; gap: 8px; margin: auto 0 0; padding: 8px 16px 28px;
    font-size: 13px; color: var(--muted); }
.theme div { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--track); }
.theme button[type="submit"] { width: auto; min-height: 30px; padding: 3px 10px; border: 0; border-radius: 7px; font-size: 13px; font-weight: 500; }
.theme button[aria-pressed="true"] { color: var(--text); background: var(--tab); box-shadow: var(--tab-shadow); }

@media (max-width: 600px) {
    h1 { font-size: 24px; }
    main { width: auto; margin: 10px 14px 24px; padding: 24px 18px; }
    main.narrow, main.wide { max-width: none; }
    .entrance .top { padding-top: 26px; }
    .authed .top { padding: 16px 14px 2px; }
    nav a { padding: 8px 6px; font-size: 13px; }
    nav .i { display: none; }
    .ico { width: 34px; height: 34px; }
}
@media (prefers-reduced-motion: no-preference) {
    button, .button, .choice, nav a { transition: border-color 0.15s, opacity 0.15s; }
}
