/*
    The look every guide shares — font, font sizes, header, tables, call to action and
    footer — so the guides read as one series (doc/specs/guides-on-the-signed-in-home-screen.md).
    A guide styles only what is its own, inline. The palette repeats src/styles.scss, since
    the guides load none of the app, and follows the device's colour mode.
*/
:root {
    color-scheme: light;
    --bg: #f7f8fa; --surface: #ffffff; --surface-2: #f2f4f7;
    --border: #e2e5ea; --border-soft: #eceff3; --field-border: #d3d8e0;
    --text: #12161d; --text-dim: #5b6472; --text-mute: #707682;
    --accent: #1a8654; --accent-hover: #17824f; --accent-ink: #ffffff;
    --loan: #3b6fd6; --loan-bg: #eaf0fc; --loan-border: #c3d5f5;
    --warn-bg: #fdf6e8; --warn-border: #f0dba8; --warn-text: #7a5310;
    --font-sans: system-ui, -apple-system, 'Segoe UI', Inter, Roboto, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
    --radius: 11px; --radius-sm: 7px; --bar-height: 74px;
}
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --bg: #0c0e12; --surface: #12151b; --surface-2: #171b23;
        --border: #242a35; --border-soft: #1c222c; --field-border: #2f3745;
        --text: #e8ecf2; --text-dim: #a2acbd; --text-mute: #747f93;
        --accent: #5ee2a0; --accent-hover: #7cebb4; --accent-ink: #07100c;
        --loan: #7ba3f0; --loan-bg: #141c2b; --loan-border: #2f4a7a;
        --warn-bg: #1c1608; --warn-border: #3a2f10; --warn-text: #e0c586;
    }
}

* { box-sizing: border-box; }
body {
    margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--loan); }

.bar {
    display: flex; align-items: center; gap: 14px; height: var(--bar-height); padding: 0 22px;
    border-bottom: 1px solid var(--border); background: var(--surface);
}
.brand { font-family: var(--font-mono); font-weight: 600; letter-spacing: -0.02em; font-size: 15px; color: var(--text); text-decoration: none; }
.brand span { color: var(--accent); }
.kicker { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--text-mute); }

.try {
    display: inline-flex; align-items: center; text-decoration: none; cursor: pointer;
    font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase;
    border-radius: 6px; padding: 7px 14px;
    color: var(--accent-ink); background: var(--accent); border: 1px solid var(--accent);
}
.try:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.bar .try { margin-left: auto; }

main { flex-grow: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 48px 16px 56px; }
h1 { margin: 0 0 16px; font-size: 32px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
h2 { margin: 44px 0 12px; font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
h3 { margin: 26px 0 8px; font-size: 16px; font-weight: 600; }
p, li, dd, dt { font-size: 15px; line-height: 1.65; color: var(--text-dim); }
p { margin: 0 0 12px; }
strong { color: var(--text); font-weight: 600; }
.published { margin: -8px 0 16px; font-size: 13.5px; color: var(--text-mute); }
.lede { font-size: 16.5px; }
.stand { font-size: 13.5px; color: var(--text-mute); margin-top: 28px; }

.table { overflow-x: auto; margin: 14px 0 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { padding: 9px 12px; text-align: right; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
th { font-weight: 600; color: var(--text-mute); font-size: 12px; background: var(--surface-2); }
th:first-child, td:first-child { text-align: left; }
td { color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
td:first-child { white-space: normal; min-width: 200px; }
tr:last-child td { border-bottom: 0; }
.note { font-size: 13px; color: var(--text-mute); }

.after-call { margin-top: 14px; }
.call {
    margin: 18px 0 0; padding: 22px 20px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
    display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
}
.call p { margin: 0; }
.advice {
    margin: 28px 0 0; padding: 14px 18px; border-radius: var(--radius-sm);
    background: var(--warn-bg); border: 1px solid var(--warn-border);
}
.advice p { margin: 0; color: var(--warn-text); font-size: 13.5px; }

footer { display: flex; justify-content: center; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface); }
footer nav { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; justify-content: center; }
footer a { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; color: var(--text-mute); text-decoration: none; }
footer a:hover { color: var(--text); text-decoration: underline; }
footer .support-link { display: inline-flex; align-items: center; gap: 4px; }
footer .support-cup { font-size: 36px; line-height: 1; transform: translateY(-4px); }
/* As in the app's header bar and legal footer, dark mode lays the background photograph behind both. */
@media (prefers-color-scheme: dark) {
    .bar, footer { background: var(--bg) url('/assets/images/background.jpg') center / cover no-repeat; }
}

@media (max-width: 560px) {
    .bar { padding: 0 16px; }
    .kicker { display: none; }
    h1 { font-size: 26px; }
}
