:root {
    color-scheme: light;
    --bg: #e7eee9;
    --ink: #17211c;
    --muted: #5c675f;
    --line: #d3ddd6;
    --card: #ffffff;
    --accent: #14624a;
    --accent-ink: #f3faf6;
    --danger: #8d2f2f;
    --ok: #e3f2e6;
    --err: #f8e6e3;
    --shadow: 0 12px 32px rgba(23, 33, 28, 0.06);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background:
        radial-gradient(900px 280px at 0% -10%, #d7ebe0, transparent 55%),
        var(--bg);
    color: var(--ink);
    font: 16px/1.5 "Segoe UI", sans-serif;
}

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

h1, h2, h3 {
    font-family: Georgia, "Palatino Linotype", serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

h1 { font-size: 2rem; margin: 0 0 1rem; }
h2 { font-size: 1.35rem; margin: 2rem 0 0.8rem; }
h3 { font-size: 1.05rem; margin: 1.4rem 0 0.6rem; }

.bar {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 2;
}

.top, main, .foot {
    width: min(1040px, calc(100% - 2rem));
    margin-inline: auto;
}

.top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 0;
}

.top nav, .foot { display: flex; gap: 0.35rem; flex-wrap: wrap; align-items: center; }

.top nav a {
    color: var(--ink);
    text-decoration: none;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
}

.top nav a:hover { background: #e5f1ea; }

.brand {
    color: var(--ink);
    text-decoration: none;
    font-family: Georgia, serif;
    font-size: 1.35rem;
}

main { padding: 1.6rem 0 2rem; }

.foot {
    display: flex;
    justify-content: space-between;
    padding: 1.2rem 0 2rem;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

.eyebrow {
    margin: 0 0 0.3rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
}

.lede { font-size: 1.05rem; max-width: 40rem; }

.hero { padding: 0.4rem 0 0.2rem; }

.cards, .stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.9rem;
    padding: 0;
    list-style: none;
}

.card, .panel, .stats li, .stats a, form.stack {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1rem 1.15rem;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
}

.card:hover { border-color: #b7d0c4; }

.card .meta, .hint, .empty, .muted { color: var(--muted); }
.card strong { font-size: 1.05rem; }

.stack, .panel { display: grid; gap: 0.85rem; }
.stack { margin: 0 0 1.2rem; }
.narrow { max-width: 32rem; }

label { display: grid; gap: 0.35rem; font-size: 0.92rem; font-weight: 600; }

input, select, textarea, button { font: inherit; color: inherit; }

input, select, textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid #c5d2c9;
    border-radius: 10px;
    background: #fbfcfb;
    font-weight: 400;
}

input:focus, select:focus, textarea:focus {
    outline: 3px solid #d5ebdf;
    border-color: var(--accent);
}

button, .button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: fit-content;
    border: 0;
    border-radius: 10px;
    padding: 0.65rem 1rem;
    background: var(--accent);
    color: var(--accent-ink);
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
}

button:hover, .button:hover { filter: brightness(1.08); }

button.secondary, .button.secondary, button.text {
    background: #fff;
    color: var(--accent);
    border: 1px solid var(--line);
}

button.danger { background: var(--danger); color: #fff; }

button.text { border: 0; padding-inline: 0; background: transparent; }

.check { grid-template-columns: auto 1fr; align-items: center; font-weight: 400; }
.check input { width: auto; }

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.8rem; }

fieldset {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfcfb;
    margin: 0;
    padding: 0.9rem 1rem 1rem;
}

legend { font-weight: 600; padding: 0 0.3rem; }

.plans { display: grid; gap: 0.55rem; }

.plan {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    align-items: center;
    padding: 0.7rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font-weight: 400;
}

.plan:has(input:checked) { border-color: var(--accent); background: #f3faf6; }

.plan input { width: auto; }
.plan b { display: block; }
.plan em { color: var(--muted); font-style: normal; }

.flash { padding: 0.75rem 0.9rem; border-radius: 12px; margin-bottom: 1rem; }
.flash-ok { background: var(--ok); }
.flash-error { background: var(--err); }

.key, .hash {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    letter-spacing: 0.03em;
}

.key {
    display: inline-block;
    padding: 0.35rem 0.55rem;
    border-radius: 8px;
    background: #f3f7f4;
    border: 1px solid var(--line);
}

.hash { font-size: 0.75rem; word-break: break-all; font-weight: 400; }

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

th, td {
    text-align: left;
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

tr:last-child td { border-bottom: 0; }
th { font-size: 0.78rem; color: var(--muted); font-weight: 600; background: #f6faf7; }

.plain { list-style: none; padding: 0; margin: 0; }
.plain li, .inline { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; }

.stats strong { font-family: Georgia, serif; font-size: 2rem; line-height: 1; }
.stats a { color: inherit; }

.logout { margin-top: 2rem; }

@media (max-width: 640px) {
    h1 { font-size: 1.6rem; }
    .top { align-items: flex-start; flex-direction: column; }
}
