/*
 * Shared styling for loqli.com. Hand-written, no build step: the pages here have
 * to keep working for years with nothing to upgrade, because Google Play re-checks
 * the privacy policy URL for as long as the app is listed.
 */

:root {
    color-scheme: light;
    --paper: #f6f8f5;
    --card: #ffffff;
    --ink: #1c2320;
    --muted: #5d6762;
    --rule: #dde3dd;
    --accent: #6a3f7a;
    --accent-soft: #f0e9f3;
    --flag: #2f6b4f;
    --flag-soft: #e7f1eb;
    --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
    --sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --paper: #141816;
        --card: #1b211e;
        --ink: #e4e9e5;
        --muted: #9aa49e;
        --rule: #2b332e;
        --accent: #c9a6d8;
        --accent-soft: #2a2130;
        --flag: #7fc3a2;
        --flag-soft: #1b2b23;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.65;
    -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; }

.wrap {
    max-width: 44rem;
    margin: 0 auto;
    padding-inline: 20px;
    padding-block: 56px 72px;
}

/* ---- masthead ---- */

header.page { border-bottom: 2px solid var(--ink); padding-bottom: 22px; }

.eyebrow {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 10px;
}

h1 {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(2rem, 6vw, 2.75rem);
    line-height: 1.12;
    letter-spacing: -0.015em;
    text-wrap: balance;
    margin: 0;
}

.standfirst {
    font-family: var(--serif);
    font-size: 1.2rem;
    line-height: 1.5;
    color: var(--muted);
    margin: 16px 0 0;
    text-wrap: pretty;
}

.dates {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--muted);
    margin: 14px 0 0;
}

/* ---- sections ---- */

section { margin-top: 44px; }
section > * + * { margin-top: 14px; }

h2 {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.4rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
    text-wrap: balance;
    margin: 0;
}

.num {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--accent);
    display: block;
    margin-bottom: 6px;
}

p { margin: 0; }
a { color: var(--accent); }
a:focus-visible, .button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

ul { margin: 0; padding-left: 1.15rem; }
li { margin-top: 8px; }
li::marker { color: var(--muted); }

code, .host {
    font-family: var(--mono);
    font-size: 0.86em;
    background: var(--accent-soft);
    padding: 0.1em 0.35em;
    border-radius: 3px;
}

/* ---- panels ---- */

.summary {
    background: var(--card);
    border: 1px solid var(--rule);
    border-left: 3px solid var(--accent);
    border-radius: 4px;
    padding: 22px 24px;
    margin-top: 36px;
}
.summary h2 { font-size: 1.15rem; }
.summary ul { margin-top: 12px; }

.flag {
    background: var(--flag-soft);
    border: 1px solid var(--flag);
    border-radius: 4px;
    padding: 20px 22px;
}
.flag .label {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--flag);
    display: block;
    margin-bottom: 8px;
}
.flag p + p { margin-top: 12px; }

/*
 * An unfilled placeholder. Deliberately loud: if one of these ever reaches the
 * live site it should be impossible to miss.
 */
.fill {
    font-family: var(--mono);
    font-size: 0.85em;
    background: repeating-linear-gradient(-45deg,
        var(--accent-soft), var(--accent-soft) 6px, transparent 6px, transparent 12px);
    border: 1px dashed var(--accent);
    border-radius: 3px;
    padding: 0.08em 0.4em;
    color: var(--ink);
    white-space: nowrap;
}

/* ---- tables ---- */

.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; min-width: 30rem; }
th, td {
    text-align: left;
    padding: 10px 14px 10px 0;
    border-bottom: 1px solid var(--rule);
    vertical-align: top;
}
th {
    font-family: var(--mono);
    font-weight: 500;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}
td:first-child {
    font-family: var(--mono);
    font-size: 0.85rem;
    white-space: nowrap;
    padding-right: 20px;
}

/* ---- home page ---- */

.lede { font-size: 1.05rem; }

.button {
    display: inline-block;
    font-family: var(--sans);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    color: var(--paper);
    background: var(--accent);
    border-radius: 4px;
    padding: 11px 20px;
}
.button:hover { filter: brightness(1.1); }

.steps { counter-reset: step; list-style: none; padding-left: 0; }
.steps li {
    counter-increment: step;
    position: relative;
    padding-left: 2.4rem;
    margin-top: 18px;
}
.steps li::before {
    content: counter(step, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 0.1em;
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--accent);
}

/* ---- footer ---- */

footer.page {
    margin-top: 56px;
    padding-top: 20px;
    border-top: 1px solid var(--rule);
    font-size: 0.85rem;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

@media (max-width: 480px) {
    .wrap { padding-block: 36px 48px; }
    .summary, .flag { padding: 18px 16px; }
}
