/* Writer's Unlock cloud.
 *
 * The deck itself is a plain page of text on a dark field.  This site should
 * feel like it belongs to that: paper, ink, one accent, nothing that moves.
 */
:root {
    --bg: #faf9f6;
    --panel: #fff;
    --ink: #222;
    --muted: #6f6d68;
    --rule: #e2e0da;
    --accent: #1e5a96;
    --warm: #b08a28;
    --bad: #b00020;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #17181a;
        --panel: #1f2023;
        --ink: #e8e6e1;
        --muted: #9a978f;
        --rule: #33353a;
        --accent: #6aa9dd;
        --warm: #d8b055;
    }
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.6 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
main { max-width: 46rem; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
a { color: var(--accent); }

header {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap;
    max-width: 46rem; margin: 0 auto; padding: 1.25rem 1.25rem 0;
}
.brand { font-weight: 700; font-size: 1.1rem; text-decoration: none; color: var(--ink); }
nav a { margin-left: 1rem; font-size: .92rem; }

footer {
    border-top: 1px solid var(--rule);
    max-width: 46rem; margin: 2rem auto 0; padding: 1.25rem;
    font-size: .88rem; color: var(--muted);
}
footer p { margin: .3rem 0; }

h1 { font-size: 1.7rem; line-height: 1.25; margin: 0 0 .5rem; }
h2 { font-size: 1.15rem; margin: 2rem 0 .6rem; }
.muted { color: var(--muted); }
.lede { font-size: 1.05rem; color: var(--muted); margin-top: 0; }

.panel {
    background: var(--panel); border: 1px solid var(--rule);
    border-radius: 8px; padding: 1.1rem 1.25rem; margin: 1rem 0;
}
.error { color: var(--bad); border-left: 3px solid var(--bad); padding-left: .7rem; }
.ok { color: var(--accent); }

/* A form that lives inside a table cell: the admin role and suspend controls,
   which must sit on the row they act on rather than below it. */
form.inline { display: inline-flex; gap: .35rem; align-items: center; margin: 0; }
form.inline select { padding: .2rem .3rem; }
form.inline button { padding: .25rem .6rem; font-size: .85em; }

label { display: block; margin: .8rem 0 .25rem; font-size: .9rem; color: var(--muted); }
input[type=text], input[type=email], input[type=password], textarea, select {
    width: 100%; padding: .5rem .6rem; font: inherit;
    background: var(--bg); color: var(--ink);
    border: 1px solid var(--rule); border-radius: 5px;
}
input[type=checkbox] { margin-right: .4rem; }
button, .button {
    display: inline-block; margin-top: 1rem; padding: .55rem 1.1rem;
    font: inherit; cursor: pointer; text-decoration: none;
    background: var(--accent); color: #fff;
    border: 0; border-radius: 5px;
}
button.secondary, .button.secondary {
    background: transparent; color: var(--accent);
    border: 1px solid var(--rule);
}
button:disabled { opacity: .5; cursor: not-allowed; }

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .35rem .5rem; border-bottom: 1px solid var(--rule); }
th { color: var(--muted); font-weight: 600; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; }

/* the licence key, which people copy by hand */
.key {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.05rem; letter-spacing: .04em; word-break: break-all;
    background: var(--bg); border: 1px dashed var(--rule);
    border-radius: 6px; padding: .8rem; margin: .8rem 0;
}

/* --- statistics ---------------------------------------------------------- */
.figures { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; margin: 1.2rem 0; }
.figure .n { font-size: 1.8rem; font-weight: 700; color: var(--accent); line-height: 1.1; }
.figure .l { font-size: .82rem; color: var(--muted); }

.badge {
    display: inline-block; vertical-align: middle;
    font-size: .72rem; font-weight: 700; letter-spacing: .06em;
    color: var(--warm); border: 1px solid var(--warm);
    border-radius: 999px; padding: .1rem .5rem; margin-left: .5rem;
}

/* the heatmap: a grid of days, oldest top-left, one column per week */
.heat {
    display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 10px);
    gap: 2px; overflow-x: auto; padding-bottom: .4rem;
}
.heat i { width: 10px; height: 10px; border-radius: 2px; background: var(--rule); }
.heat i[data-l="1"] { background: #b0cde4; }
.heat i[data-l="2"] { background: #6ca5d1; }
.heat i[data-l="3"] { background: #2c76b4; }
.heat i[data-l="4"] { background: #104a84; }

.card-embed { max-width: 100%; border: 1px solid var(--rule); border-radius: 6px; }
