/* Keener 13 request line */
:root {
    --primary: #0b5cad;
    --primary-dark: #084a8c;
    --secondary: #5c6670;
    --danger: #b3261e;
    --bg: #f3f5f8;
    --card: #fff;
    --text: #1f2933;
    --muted: #5c6670;
    --border: #d5dae0;
    --radius: 6px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.55;
}

img.center { display: block; max-width: 100%; height: auto; margin: 0 auto; }

.container {
    width: 94%;
    max-width: 820px;
    margin: 1rem auto;
    padding: 1rem 1.25rem 1.5rem;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
}
.container.wide { max-width: 1100px; }

h1 { margin: .75rem 0; font-size: 1.6rem; color: var(--primary); }
h2 { margin: 0 0 .6rem; font-size: 1.2rem; color: var(--primary); }
h2 small { font-weight: normal; color: var(--muted); }
section { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
a { color: var(--primary); }

.topnav {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem;
    padding-bottom: .6rem; border-bottom: 1px solid var(--border); font-weight: 600;
}
.topnav .links a { margin-left: .9rem; font-weight: normal; }
.topnav .links a:first-child { margin-left: 0; }

.message { padding: .85rem 1rem; margin: 1rem 0; border: 1px solid transparent; border-radius: var(--radius); }
.message.info    { color: #0c4a5e; background: #dff1f7; border-color: #b9dfeb; }
.message.success { color: #14532d; background: #dcf5e3; border-color: #b4e2c1; }
.message.error   { color: #7a1c1c; background: #fbe1e1; border-color: #f2bcbc; }
.message.limit   { color: #5a4300; background: #fff4d1; border-color: #f0dc9a; }
.message.limit strong:first-child { display: block; margin-bottom: .25rem; font-size: 1.1rem; }

.note { color: var(--muted); font-size: .92rem; }
.text-center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Forms */
.stack { max-width: 640px; }
.stack.narrow { max-width: 380px; margin: 0 auto; }
.stack.narrow-left { max-width: 380px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.row.three { grid-template-columns: 1.4fr 1fr 1fr; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: .3rem; font-weight: 600; }
.form-group label small { font-weight: normal; color: var(--muted); }
.form-group small { color: var(--muted); }

input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], select, textarea {
    width: 100%;
    padding: .6rem .7rem;
    border: 1px solid #aab2bb;
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    font: inherit;
}
input:focus, select:focus, textarea:focus, .button:focus-visible { outline: 3px solid #9cc7f2; outline-offset: 1px; }
input.code { max-width: 11rem; font-size: 1.5rem; letter-spacing: .25em; text-align: center; }

.check { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.check input { width: 1.15rem; height: 1.15rem; }

.button {
    display: inline-block;
    padding: .65rem 1.3rem;
    border: 0;
    border-radius: var(--radius);
    background: var(--primary);
    color: #fff;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.button:hover { background: var(--primary-dark); }
.button.secondary { background: var(--secondary); }
.button.secondary:hover { background: #454d55; }
.button.danger { background: var(--danger); }
.button.danger:hover { background: #8c1d18; }
.button.small { padding: .4rem .9rem; font-size: .95rem; }
.stack > .button { width: 100%; }
.linklike { border: 0; background: none; color: var(--primary); font: inherit; text-decoration: underline; cursor: pointer; }
form.inline { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: 1rem 0; }

.search { display: flex; gap: .5rem; }
.search input { flex: 1; }
.letters { line-height: 2.2; }
.letters a { display: inline-block; min-width: 1.9rem; padding: 0 .3rem; border: 1px solid var(--border); border-radius: 4px; text-align: center; text-decoration: none; }
.letters a:hover, .letters a.on { background: var(--primary); color: #fff; }

/* Tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .6rem .7rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { background: #e9edf2; white-space: nowrap; }
.table tbody tr:hover { background: #f5f8fb; }
.table td.action { width: 1%; text-align: right; }

.footer-nav { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); text-align: center; }

/* Two-step set-up */
.steps li { margin-bottom: .75rem; }
.qr { margin: .75rem 0 .5rem; min-height: 0; }
.qr svg { display: block; background: #fff; }
.key { display: inline-block; padding: .4rem .6rem; background: #eef1f5; border-radius: 4px; font-size: 1.05rem; word-break: break-all; }

/* Control room */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin: 1rem 0 .5rem; }
.stats div { padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: #f7f9fb; text-align: center; }
.stats strong { display: block; font-size: 2rem; line-height: 1.1; color: var(--primary); }
.stats span { color: var(--muted); }
textarea.post { font-family: inherit; line-height: 1.5; resize: vertical; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.25rem; margin: 1rem 0; }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; }
.tag { display: inline-block; padding: .05rem .5rem; border-radius: 999px; background: #e3e8ee; font-size: .85rem; }
.tag.bad { background: #fbe1e1; color: #7a1c1c; }

@media (max-width: 600px) {
    .row, .row.three { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr 1fr; }
    .search { flex-direction: column; }
    .container { padding: .85rem .9rem 1.25rem; }
    .table th, .table td { padding: .5rem .45rem; }
}
