/* Help guides. Colours, header and footer match support.html. */
:root {
    --bg: #0d1117; --card: #161c24; --card-hover: #1b222c; --text: #e6edf3; --muted: #9aa4b2;
    --accent: #50bc90; --accent-dim: rgba(80, 188, 144, 0.12);
    --border: rgba(255, 255, 255, 0.08); --glow: rgba(3, 101, 134, 0.36);
    --shot-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
@media (prefers-color-scheme: light) {
    :root {
        --bg: #f7f8fa; --card: #ffffff; --card-hover: #f2f5f7; --text: #17202a; --muted: #5b6672;
        --accent: #13806b; --accent-dim: rgba(19, 128, 107, 0.10);
        --border: rgba(0, 0, 0, 0.08); --glow: rgba(3, 101, 134, 0.14);
        --shot-shadow: 0 10px 28px rgba(15, 30, 45, 0.12);
    }
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg); color: var(--text); line-height: 1.65;
}
a { color: var(--accent); }
code { background: rgba(128, 128, 128, 0.15); border-radius: 4px; padding: 1px 6px; font-size: 0.9em; }
.container { max-width: 880px; margin: 0 auto; padding: 0 24px; }

header { padding: 24px 0; border-bottom: 1px solid var(--border); }
header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.45rem; }
.brand .dot { width: 14px; height: 14px; border-radius: 50%; background: linear-gradient(135deg, #036586, #50bc90); }
.brand a { color: var(--text); text-decoration: none; }
header nav a { color: var(--muted); text-decoration: none; font-weight: 500; margin-left: 20px; font-size: 0.95rem; }
header nav a:hover { color: var(--text); }

/* ---- Article ---- */
.article { max-width: 720px; padding-top: 36px; }
.crumbs { display: flex; gap: 8px; color: var(--muted); font-size: 0.9rem; margin-bottom: 14px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.article h1 { font-size: clamp(2rem, 5vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.lede { color: var(--muted); font-size: 1.12rem; margin-top: 12px; }
.article h2 { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.01em; margin: 48px 0 10px; line-height: 1.3; }
.article h3 { font-size: 1.08rem; font-weight: 700; margin: 28px 0 6px; }
.article p, .article li { margin-top: 12px; }
.article ul, .article ol { padding-left: 24px; }
.article li::marker { color: var(--muted); }
.article li > p:first-child { margin-top: 0; }
.article strong { font-weight: 650; }

.toc {
    margin-top: 28px; padding: 16px 20px; border-radius: 14px;
    background: var(--card); border: 1px solid var(--border);
}
.toc p { margin: 0; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.toc ul { list-style: none; padding: 0; margin-top: 6px; columns: 2 240px; column-gap: 24px; }
.toc li { margin-top: 4px; break-inside: avoid; }
.toc a { text-decoration: none; font-weight: 500; }
.toc a:hover { text-decoration: underline; }

/* Numbered steps: a green counter in a circle, like the badges in the pictures. */
ol.steps { list-style: none; padding-left: 0; counter-reset: step; }
ol.steps > li { counter-increment: step; position: relative; padding-left: 44px; margin-top: 22px; }
ol.steps > li::before {
    content: counter(step); position: absolute; left: 0; top: 0;
    width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
    background: var(--accent-dim); color: var(--accent); font-weight: 800; font-size: 0.9rem;
}

/* Screenshots: a slice of the iPhone screen, at phone size. */
figure.shot { margin: 18px 0 8px; }
figure.shot img {
    display: block; width: 100%; max-width: 360px; height: auto;
    border-radius: 18px; border: 1px solid var(--border); box-shadow: var(--shot-shadow);
    background: var(--card);
}
figure.shot figcaption { color: var(--muted); font-size: 0.88rem; margin-top: 10px; max-width: 420px; }
ol.steps figure.shot { margin-left: 0; }

/* A worked-out formula for the top of the balances guide. */
.formula {
    display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; margin: 22px 0 6px;
}
.formula .term {
    flex: 1 1 112px; padding: 14px 16px; border-radius: 14px;
    background: var(--card); border: 1px solid var(--border);
}
.formula .term b { display: block; font-size: 1rem; }
.formula .term span { display: block; color: var(--muted); font-size: 0.86rem; line-height: 1.45; margin-top: 4px; }
.formula .term.result { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-dim); }
.formula .op { display: grid; place-items: center; font-size: 1.5rem; font-weight: 800; color: var(--muted); }
@media (max-width: 560px) { .formula { flex-direction: column; } .formula .term { flex-basis: auto; } .formula .op { padding: 0; line-height: 1; } }

aside.note {
    margin: 20px 0; padding: 14px 18px; border-radius: 14px;
    background: var(--accent-dim); border-left: 4px solid var(--accent);
}
aside.note p { margin-top: 6px; }
aside.note p:first-child { margin-top: 0; }

.related { margin-top: 48px; }
.related h2 { margin-top: 0; }
.related ul { list-style: none; padding: 0; }

/* ---- Hub ---- */
.guides { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 14px; }
.guide {
    display: block; background: var(--card); border: 1px solid var(--border); border-radius: 16px;
    padding: 18px 20px; text-decoration: none; color: var(--text);
    transition: border-color .15s, background .15s, transform .15s;
}
.guide:hover { border-color: var(--accent); background: var(--card-hover); transform: translateY(-2px); }
.guide-title { display: block; font-weight: 700; }
.guide-sub { display: block; color: var(--muted); font-size: 0.9rem; line-height: 1.45; margin-top: 4px; }

.contact {
    margin: 56px 0 24px; padding: 28px; border-radius: 18px; text-align: center;
    background: var(--card); border: 1px solid var(--accent);
    box-shadow: 0 0 0 6px var(--accent-dim);
}
.contact h2 { font-size: 1.3rem; font-weight: 800; margin: 0; }
.contact p { color: var(--muted); margin: 8px auto 18px; max-width: 520px; }
.contact p.small { margin: 16px auto 0; font-size: 0.9rem; }
.button {
    display: inline-block; background: var(--accent); color: #fff; text-decoration: none;
    font-weight: 700; padding: 12px 26px; border-radius: 12px;
}
footer { border-top: 1px solid var(--border); padding: 28px 0 48px; text-align: center; color: var(--muted); font-size: 0.9rem; margin-top: 40px; }
footer a { color: var(--accent); text-decoration: none; margin: 0 10px; }
@media (max-width: 560px) {
    header nav a { margin-left: 14px; } .brand { font-size: 1.2rem; }
    ol.steps > li { padding-left: 38px; }
    footer a { display: inline-block; margin: 4px 8px; }
}

/* {1} in a caption: the same green badge the screenshots carry. */
.num {
    display: inline-grid; place-items: center; width: 1.35em; height: 1.35em; border-radius: 50%;
    background: #30d159; color: #fff; font-weight: 800; font-size: 0.82em; margin-right: 3px;
    vertical-align: 0.05em;
}
