/*
 * TimCleaner public site — the only stylesheet (T-009).
 *
 * No framework, no preprocessor, no CDN, no build step: these pages are served by the API server and
 * have to keep working on a host that only ever serves this one file. Colours come from custom
 * properties so light and dark are the only two places a colour is written down.
 *
 * Mobile first. The documents are long and mostly text, so the reading measure and the line height
 * do most of the work and the layout is one column until there is room for two.
 */

:root {
    --bg: #f4f5f7;
    --surface: #ffffff;
    --surface-alt: #fafbfc;
    --border: #d9dde3;
    --text: #1c2024;
    --muted: #5f6873;
    --accent: #1f5fbf;
    --accent-text: #ffffff;
    --accent-soft: #e7eefa;
    --radius: 8px;
    --gap: 16px;
    --measure: 42rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #14171a;
        --surface: #1c2024;
        --surface-alt: #22262b;
        --border: #333940;
        --text: #e6e9ed;
        --muted: #9aa4af;
        --accent: #6fa8ff;
        --accent-text: #10161f;
        --accent-soft: #1e2b3d;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a { color: var(--accent); }

/* --- chrome ---------------------------------------------------------------------------------- */

.top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    padding: 12px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.top .brand { font-weight: 700; font-size: 17px; text-decoration: none; color: var(--text); }
.top .langs { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px; }

.top .langs a {
    padding: 4px 9px;
    border-radius: var(--radius);
    font-size: 14px;
    text-decoration: none;
    color: var(--muted);
}

.top .langs a:hover { background: var(--surface-alt); color: var(--text); }

/* The language the reader is currently in. Set with th:attr, so the attribute is absent rather than
   empty when it does not apply. */
.top .langs a[aria-current] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

main { padding: var(--gap); max-width: var(--measure); margin: 0 auto; }

.foot {
    padding: var(--gap);
    max-width: var(--measure);
    margin: 0 auto;
    border-top: 1px solid var(--border);
    font-size: 14px;
}

.foot p { margin: 6px 0; }

/* --- landing --------------------------------------------------------------------------------- */

.hero { padding: 24px 0 8px; }

h1 { font-size: 30px; line-height: 1.2; margin: 0 0 10px; }
h2 { font-size: 19px; margin: 32px 0 8px; }

.tagline { font-size: 19px; font-weight: 600; margin: 0 0 12px; }
.lead { color: var(--muted); margin: 0 0 16px; }

.soon { color: var(--muted); font-weight: 600; }

ul { padding-left: 20px; }
li { margin-bottom: 6px; }

.features li { margin-bottom: 10px; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--gap);
    margin-top: 32px;
}

.card p { margin: 0 0 10px; }
.card p:last-child { margin-bottom: 0; }

/* --- buttons --------------------------------------------------------------------------------- */

.button {
    display: inline-block;
    padding: 11px 20px;
    font-weight: 600;
    text-decoration: none;
    color: var(--accent-text);
    background: var(--accent);
    border-radius: var(--radius);
}

/* --- documents ------------------------------------------------------------------------------- */

.doc h2 { border-top: 1px solid var(--border); padding-top: 20px; }
.doc section:first-of-type h2 { border-top: 0; padding-top: 0; }

.muted { color: var(--muted); }
.small { font-size: 13px; }

/* --- support (T-038) ------------------------------------------------------------------------- */

/* The FAQ is one section of ten question/answer pairs. `h3` rather than `h2`: the questions are
   subordinate to the section heading, and only `h2` carries the rule that separates sections. */
.faq h3 { font-size: 16px; margin: 22px 0 4px; }
.faq p { margin: 0; }

@media (min-width: 640px) {
    .top { padding: 14px 24px; }
    main { padding: 24px; }
    .foot { padding: 24px; }
    h1 { font-size: 36px; }
}
