/* KISLHC 2026 delegate portal.
   Utility site, not a brochure: the job is to let a delegate find a talk and download it on a phone,
   often on a poor connection. Colour comes from the conference logo - the green does the work, the
   red stays out of it. Tokens first so the dark theme is a palette swap, not a second stylesheet. */

:root {
    --ground:      #f4f7f5;
    --panel:       #ffffff;
    --ink:         #16202b;
    --ink-soft:    #55645d;
    --line:        #e0e7e2;
    --brand:       #129647;
    --brand-dark:  #0f7d3b;
    --brand-tint:  #eef7f1;
    --bad:         #b3261e;
    --good:        #0f7d3b;
    --radius:      10px;
    --shadow:      0 1px 2px rgba(16, 32, 43, .06), 0 8px 24px rgba(16, 32, 43, .04);
}

@media (prefers-color-scheme: dark) {
    :root {
        --ground:     #10161c;
        --panel:      #171f27;
        --ink:        #e8eeea;
        --ink-soft:   #9baba3;
        --line:       #26313a;
        --brand:      #3cc172;
        --brand-dark: #34ac65;
        --brand-tint: #16281f;
        --shadow:     none;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-text-size-adjust: 100%;
}

a { color: var(--brand-dark); }
@media (prefers-color-scheme: dark) { a { color: var(--brand); } }

/* --- masthead ------------------------------------------------------------------------- */
.masthead {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 14px 20px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand img { display: block; }
.brand b { display: block; font-size: 16px; letter-spacing: -.01em; }
.brand small { display: block; color: var(--ink-soft); font-size: 13px; }
.who { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--ink-soft); }

/* --- page --------------------------------------------------------------------------- */
.wrap { max-width: 860px; margin: 0 auto; padding: 26px 18px 56px; }

.hero { margin: 8px 0 26px; }
.hero.tight { margin-bottom: 18px; }
.hero h1 {
    margin: 0 0 8px;
    font-size: clamp(26px, 5vw, 34px);
    line-height: 1.2;
    letter-spacing: -.02em;
    text-wrap: balance;
}
.lede { margin: 0; color: var(--ink-soft); max-width: 62ch; }

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px 22px 26px;
    margin-bottom: 22px;
}
.card.narrow { max-width: 460px; }
.card h2 { margin: 0 0 6px; font-size: 19px; letter-spacing: -.01em; }
.muted { color: var(--ink-soft); margin: 0 0 16px; }
.fine { font-size: 13px; color: var(--ink-soft); margin: 16px 0 0; }
.opt { color: var(--ink-soft); font-weight: 400; font-size: 12px; }

/* --- forms -------------------------------------------------------------------------- */
.stack { display: flex; flex-direction: column; gap: 6px; }
.stack label { font-size: 13px; font-weight: 600; margin-top: 10px; }
.stack input, .stack textarea {
    font: inherit;
    color: var(--ink);
    background: var(--ground);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 13px;
    width: 100%;
}
.stack input:focus, .stack textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(18, 150, 71, .16);
}
.code-input { font-size: 26px; letter-spacing: 10px; text-align: center; font-variant-numeric: tabular-nums; }

button, .btn {
    display: inline-block;
    margin-top: 18px;
    background: var(--brand);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 13px 22px;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
button:hover, .btn:hover { background: var(--brand-dark); }
button:focus-visible, .btn:focus-visible, a:focus-visible {
    outline: 3px solid var(--brand); outline-offset: 2px;
}
.btn { margin-top: 0; padding: 10px 18px; }
button.link {
    margin: 0; padding: 4px 8px; background: var(--brand-tint); color: var(--brand-dark);
    font-size: 13px; font-weight: 600;
}
form.inline { display: inline; }

.flash { padding: 12px 14px; border-radius: 8px; margin: 0 0 18px; font-size: 14px; }
.flash.bad  { background: #fdecea; color: var(--bad); }
.flash.good { background: var(--brand-tint); color: var(--good); }
@media (prefers-color-scheme: dark) { .flash.bad { background: #3a1a18; color: #ff9a92; } }

/* --- the file list ------------------------------------------------------------------ */
.filter { margin: 0 0 14px; }
.filter input {
    width: 100%; font: inherit; padding: 12px 14px;
    border: 1px solid var(--line); border-radius: 8px;
    background: var(--panel); color: var(--ink);
}

.files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.files li {
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
}
.files h3 { margin: 0 0 2px; font-size: 16px; line-height: 1.35; }
.files .by { margin: 0; font-size: 14px; color: var(--brand-dark); font-weight: 600; }
.files .meta { margin: 2px 0 0; font-size: 13px; color: var(--ink-soft); }
.file-get { display: flex; align-items: center; gap: 12px; flex: none; }
.file-get .type {
    font-size: 11px; font-weight: 700; letter-spacing: .06em;
    background: var(--brand-tint); color: var(--brand-dark);
    padding: 4px 7px; border-radius: 4px;
}
.file-get .size { font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.empty { text-align: left; }

/* --- admin tables ------------------------------------------------------------------- */
.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
.grid th {
    text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
    color: var(--ink-soft); border-bottom: 1px solid var(--line); padding: 8px 10px 8px 0;
}
.grid td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.grid .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.grid .wrapcell { max-width: 280px; }
.hidden-row td { opacity: .5; }

/* --- footer ------------------------------------------------------------------------- */
.foot {
    max-width: 860px; margin: 0 auto; padding: 0 18px 48px;
    color: var(--ink-soft); font-size: 13px;
}
.foot p { margin: 0 0 6px; max-width: 62ch; }

@media (max-width: 560px) {
    .files li { flex-direction: column; align-items: flex-start; gap: 12px; }
    .file-get { width: 100%; justify-content: space-between; }
    .grid { display: block; overflow-x: auto; white-space: nowrap; }
}
