/* ===========================================================================
   The Guild - Event Portal
   Charcoal, black and gold.
   =========================================================================== */

:root {
    --black:        #08080a;
    --ink:          #0d0d10;
    --panel:        #131317;
    --panel-2:      #17171c;
    --raised:       #1c1c22;
    --line:         rgba(200, 164, 92, 0.20);
    --line-soft:    rgba(255, 255, 255, 0.07);

    --gold:         #c8a45c;
    --gold-light:   #e6cf98;
    --gold-deep:    #8f7334;
    --gold-glow:    rgba(200, 164, 92, 0.30);

    --text:         #ece9e3;
    --text-soft:    #b6b1a7;
    --text-muted:   #858077;

    --green:        #7fae7a;
    --amber:        #d6a94e;
    --blue:         #7d9bc1;
    --red:          #c97a6d;

    --serif:  'Cormorant Garamond', 'Times New Roman', Times, serif;
    --sans:   'Jost', 'Helvetica Neue', Helvetica, Arial, sans-serif;

    --radius:  2px;
    --shadow:  0 24px 60px rgba(0, 0, 0, 0.55);
}

*, *::before, *::after { box-sizing: border-box; }

html { height: 100%; background: #08080a; }
body { min-height: 100%; }

body {
    margin: 0;
    background:
        radial-gradient(1200px 600px at 50% -10%, rgba(200, 164, 92, 0.07), transparent 60%),
        linear-gradient(180deg, var(--black) 0%, #0b0b0e 40%, var(--black) 100%);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--sans);
    font-weight: 300;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4 {
    font-family: var(--serif);
    font-weight: 400;
    letter-spacing: 0.02em;
    margin: 0 0 0.4em;
    color: #f6f3ec;
}

h1 { font-size: 2.6rem; line-height: 1.15; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.35rem; }

a { color: var(--gold); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--gold-light); }

p { margin: 0 0 1rem; }

code {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.85em;
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 6px;
    border-radius: var(--radius);
    color: var(--gold-light);
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.wrap {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 40px 24px 72px;
    flex: 1 0 auto;
}
.wrap.wide { max-width: 1360px; }

.topbar {
    border-bottom: 1px solid var(--line);
    background: rgba(8, 8, 10, 0.92);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-inner {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 24px;
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand { display: flex; align-items: center; gap: 14px; color: inherit; }
.brand:hover { color: inherit; }
.brand-mark {
    width: 42px; height: 42px;
    display: grid; place-items: center;
    border: 1px solid var(--gold);
    color: var(--gold);
    font-family: var(--serif);
    font-size: 22px;
    letter-spacing: 0;
    background: linear-gradient(160deg, rgba(200,164,92,0.16), transparent);
}
.brand-mark.big { width: 64px; height: 64px; font-size: 32px; margin: 0 auto 18px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
    font-family: var(--serif);
    font-size: 1.35rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #f6f3ec;
}
.brand-sub {
    font-size: 0.63rem;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--gold);
    margin-top: 3px;
}

/* The back link takes the place of a navigation bar. */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
    font-size: 0.66rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 6px 0;
}
.back-link:hover { color: var(--gold); }
.back-arrow { font-size: 1rem; line-height: 1; transition: transform 0.2s ease; }
.back-link:hover .back-arrow { transform: translateX(-4px); }

/* Signed-in-as line at the foot of the dashboard. */
.account-line {
    text-align: center;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 28px;
}

.foot {
    flex-shrink: 0;
    border-top: 1px solid var(--line-soft);
    background: rgba(8, 8, 10, 0.6);
}
.foot-inner {
    max-width: 1360px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    font-size: 0.66rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Page headings
   -------------------------------------------------------------------------- */
.page-head { margin-bottom: 36px; }
.page-head h1 { margin-bottom: 8px; }

.eyebrow {
    font-size: 0.66rem;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 12px;
}
.lede { color: var(--text-soft); max-width: 68ch; font-size: 1.02rem; }
.muted { color: var(--text-muted); font-size: 0.9rem; }

.rule {
    height: 1px;
    background: linear-gradient(90deg, var(--gold), transparent);
    border: 0;
    margin: 28px 0;
    opacity: 0.5;
}
.rule-center {
    width: 70px; height: 1px; background: var(--gold);
    margin: 18px auto; opacity: 0.8;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--sans);
    font-size: 0.74rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 14px 30px;
    border: 1px solid var(--gold);
    border-radius: var(--radius);
    background: transparent;
    color: var(--gold);
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    text-align: center;
}
.btn:hover { background: rgba(200, 164, 92, 0.12); color: var(--gold-light); }

.btn-gold {
    background: linear-gradient(160deg, var(--gold-light), var(--gold) 55%, var(--gold-deep));
    color: #16130c;
    font-weight: 500;
    border-color: transparent;
}
.btn-gold:hover {
    color: #16130c;
    box-shadow: 0 8px 26px var(--gold-glow);
    background: linear-gradient(160deg, #f0dcae, var(--gold-light) 55%, var(--gold));
}

.btn-ghost { border-color: var(--line-soft); color: var(--text-soft); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); background: transparent; }

.btn-danger { border-color: rgba(201, 122, 109, 0.5); color: var(--red); }
.btn-danger:hover { background: rgba(201, 122, 109, 0.12); color: #e0958a; }

.btn-sm { padding: 9px 18px; font-size: 0.66rem; letter-spacing: 0.16em; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn-row.end { justify-content: flex-end; }
.btn-row.between { justify-content: space-between; }

/* --------------------------------------------------------------------------
   Panels & cards
   -------------------------------------------------------------------------- */
.panel {
    background: linear-gradient(170deg, var(--panel-2), var(--panel));
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 26px;
    position: relative;
}
.panel.gold-edge { border-color: var(--line); }
.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 20px;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line-soft);
}
.panel-head h2, .panel-head h3 { margin: 0; }

/* Big dashboard choices */
.choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    /* The dashboard is these two cards and nothing else, so they sit low
       enough on the page to land under the eye rather than at the very top. */
    margin: 60px 0 40px;
}
.choice {
    display: block;
    position: relative;
    padding: 78px 40px;
    text-align: center;
    color: var(--text);
    background: linear-gradient(165deg, #1a1a20, #101014);
    border: 1px solid var(--line);
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.choice::after {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(200, 164, 92, 0.18);
    pointer-events: none;
    transition: inset 0.35s ease, border-color 0.35s ease;
}
.choice:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(200, 164, 92, 0.12);
    color: var(--text);
}
.choice:hover::after { inset: 12px; border-color: rgba(200, 164, 92, 0.45); }
.choice-icon {
    width: 76px; height: 76px;
    margin: 0 auto 26px;
    display: grid; place-items: center;
    border: 1px solid var(--gold);
    border-radius: 50%;
    color: var(--gold);
}
.choice-icon svg { width: 32px; height: 32px; stroke: currentColor; fill: none; stroke-width: 1.2; }
.choice h2 {
    font-size: 2.4rem;
    margin: 0;
    letter-spacing: 0.04em;
}

/* Stats */
.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1px;
    background: var(--line-soft);
    border: 1px solid var(--line-soft);
    margin-bottom: 40px;
}
.stat {
    background: var(--ink);
    padding: 24px 26px;
    text-align: center;
}
.stat .n {
    font-family: var(--serif);
    font-size: 2.4rem;
    line-height: 1;
    color: var(--gold);
    display: block;
    margin-bottom: 8px;
}
.stat .k {
    font-size: 0.62rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.stack { display: flex; flex-direction: column; gap: 20px; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; align-items: end; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field.span-2 { grid-column: 1 / -1; }

.label, .field > .label {
    font-size: 0.66rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-soft);
}
.label em { font-style: normal; color: var(--text-muted); letter-spacing: 0.1em; text-transform: none; }
.req { color: var(--gold); margin-left: 4px; }
.hint { font-size: 0.8rem; color: var(--text-muted); letter-spacing: 0; text-transform: none; }

input[type=text], input[type=email], input[type=tel], input[type=number],
input[type=password], input[type=date], input[type=time], input[type=search],
select, textarea {
    width: 100%;
    background: #0a0a0d;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--sans);
    font-size: 0.98rem;
    font-weight: 300;
    padding: 13px 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
textarea { min-height: 130px; resize: vertical; line-height: 1.65; }

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(200, 164, 92, 0.13);
    background: #0c0c10;
}
input::placeholder, textarea::placeholder { color: #5c5850; }

select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
    background-position: calc(100% - 20px) calc(1.25em), calc(100% - 15px) calc(1.25em);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 40px;
}
select option { background: #0f0f13; color: var(--text); }

input[type=date], input[type=time] { color-scheme: dark; }

.field.has-error input, .field.has-error select, .field.has-error textarea {
    border-color: rgba(201, 122, 109, 0.75);
}
.error-text { color: var(--red); font-size: 0.82rem; }

/* Radio pills */
.radio-row { display: flex; gap: 12px; flex-wrap: wrap; }
.radio-pill { position: relative; }
.radio-pill input { position: absolute; opacity: 0; pointer-events: none; }
.radio-pill span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    padding: 11px 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-soft);
    cursor: pointer;
    transition: all 0.2s ease;
    background: #0a0a0d;
}
.radio-pill span:hover { border-color: rgba(200, 164, 92, 0.5); color: var(--gold-light); }
.radio-pill input:checked + span {
    border-color: var(--gold);
    background: rgba(200, 164, 92, 0.14);
    color: var(--gold-light);
}
.radio-pill input:focus-visible + span { box-shadow: 0 0 0 3px rgba(200, 164, 92, 0.2); }

/* Checkbox */
.check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--gold); width: 16px; height: 16px; }
.check .label { text-transform: none; letter-spacing: 0.02em; font-size: 0.92rem; color: var(--text); }

/* --------------------------------------------------------------------------
   Flash messages
   -------------------------------------------------------------------------- */
.flash {
    padding: 14px 18px;
    border-left: 2px solid var(--gold);
    background: rgba(200, 164, 92, 0.08);
    color: var(--text);
    margin-bottom: 20px;
    font-size: 0.92rem;
}
/* The short code shown with an error, matching an entry in the log file. */
.ref {
    display: inline-block;
    margin-left: 8px;
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}

.flash-success { border-left-color: var(--green); background: rgba(127, 174, 122, 0.10); }
.flash-error   { border-left-color: var(--red);   background: rgba(201, 122, 109, 0.10); }
.flash-info    { border-left-color: var(--blue);  background: rgba(125, 155, 193, 0.10); }
.flash a { text-decoration: underline; }

/* --------------------------------------------------------------------------
   Pills / tables
   -------------------------------------------------------------------------- */
.pill {
    display: inline-block;
    padding: 5px 13px;
    border-radius: 99px;
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    border: 1px solid currentColor;
    white-space: nowrap;
}
.pill-grey  { color: #8d8880; }
.pill-blue  { color: var(--blue); }
.pill-amber { color: var(--amber); }
.pill-green { color: var(--green); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); }
table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    min-width: 860px;
}
table.data thead th {
    text-align: left;
    font-weight: 400;
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    padding: 16px 18px;
    background: #0f0f13;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
table.data tbody td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: middle;
    color: var(--text-soft);
}
table.data tbody tr { transition: background 0.2s ease; }
table.data tbody tr:hover { background: rgba(200, 164, 92, 0.045); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data .primary { color: var(--text); font-size: 1rem; }
table.data .sub { display: block; font-size: 0.76rem; color: var(--text-muted); margin-top: 3px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

.empty {
    text-align: center;
    padding: 70px 24px;
    color: var(--text-muted);
}
.empty h3 { color: var(--text-soft); }

/* --------------------------------------------------------------------------
   Manage screen: search bar + date tabs
   Sized for comfortable reading rather than density.
   -------------------------------------------------------------------------- */
.findbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
}
.findbar input[type=search] {
    flex: 1 1 320px;
    min-width: 240px;
    font-size: 1.05rem;
    padding: 15px 18px;
}
.findbar .btn { padding: 15px 26px; font-size: 0.72rem; }
.findbar .btn-gold { margin-left: auto; }

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
}
.tab {
    padding: 13px 30px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    color: var(--text-soft);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.tab:hover { border-color: var(--gold); color: var(--gold); }
.tab.on {
    border-color: var(--gold);
    color: #16130c;
    background: linear-gradient(160deg, var(--gold-light), var(--gold) 55%, var(--gold-deep));
    font-weight: 500;
}
.tab.on:hover { color: #16130c; }

/* Roomy table: fewer columns, bigger type, generous rows. */
table.data.roomy {
    font-size: 1.06rem;
    min-width: 640px;
}
table.data.roomy thead th {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    padding: 18px 20px;
}
table.data.roomy tbody td { padding: 22px 20px; }
table.data.roomy .primary { font-size: 1.14rem; }
table.data.roomy .sub { font-size: 0.9rem; margin-top: 6px; }
table.data.roomy .pill { font-size: 0.72rem; padding: 7px 16px; }
table.data.roomy .btn { padding: 12px 28px; font-size: 0.72rem; }

/* Progress */
.progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    width: 120px;
    overflow: hidden;
}
.progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--gold-deep), var(--gold-light));
}

/* --------------------------------------------------------------------------
   Definition lists (event summary)
   -------------------------------------------------------------------------- */
.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px 32px; }
.dl > div { min-width: 0; }
.dl dt {
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.dl dd { margin: 0; color: var(--text); font-size: 1.02rem; word-wrap: break-word; }
.dl dd.long { font-size: 0.96rem; color: var(--text-soft); white-space: pre-wrap; line-height: 1.7; }

.ordered-list { counter-reset: item; list-style: none; margin: 0; padding: 0; }
.ordered-list li {
    counter-increment: item;
    padding: 12px 0 12px 46px;
    border-bottom: 1px solid var(--line-soft);
    position: relative;
    color: var(--text);
}
.ordered-list li::before {
    content: counter(item);
    position: absolute;
    left: 0;
    top: 12px;
    width: 28px; height: 28px;
    display: grid; place-items: center;
    border: 1px solid var(--line);
    color: var(--gold);
    font-family: var(--serif);
    font-size: 0.9rem;
}
.ordered-list li:last-child { border-bottom: 0; }

.mini-card {
    border: 1px solid var(--line-soft);
    padding: 18px 20px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.015);
}
.mini-card h4 { margin: 0 0 4px; font-size: 1.15rem; }
.mini-card .meta { font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.mini-card p { margin: 0 0 6px; color: var(--text-soft); font-size: 0.92rem; white-space: pre-wrap; }

/* Copyable link box */
.linkbox {
    display: flex;
    gap: 10px;
    align-items: center;
    background: #0a0a0d;
    border: 1px solid var(--line-soft);
    padding: 12px 14px;
}
.linkbox input {
    border: 0;
    background: transparent;
    padding: 0;
    font-size: 0.84rem;
    color: var(--gold-light);
    font-family: 'SFMono-Regular', Consolas, monospace;
}
.linkbox input:focus { box-shadow: none; }

/* --------------------------------------------------------------------------
   Pop-up explanation (dialog)
   Large, plain and calm - it exists to reassure, not to alarm.
   -------------------------------------------------------------------------- */
dialog.modal {
    width: min(640px, calc(100vw - 32px));
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(170deg, var(--panel-2), var(--panel));
    color: var(--text);
    box-shadow: var(--shadow);
}
dialog.modal::backdrop { background: rgba(4, 4, 6, 0.74); }

.modal-inner { padding: 38px 42px 34px; }
.modal h2 {
    margin: 0 0 20px;
    font-size: 1.9rem;
    letter-spacing: 0.03em;
    color: var(--gold);
    text-transform: none;
}
.modal p, .modal li {
    font-size: 1.04rem;
    line-height: 1.75;
    color: var(--text-soft);
}
.modal p { margin: 0 0 16px; }
.modal strong { color: var(--text); font-weight: 400; }
.modal-lead { color: var(--text); margin-top: 24px; }
.modal ol { margin: 0 0 18px; padding-left: 1.4em; }
.modal li { margin-bottom: 10px; }
.modal .linkbox { margin: 22px 0 24px; }
.modal-actions { gap: 12px; }
.modal-actions .btn { padding: 14px 26px; font-size: 0.72rem; }

@media (max-width: 560px) {
    .modal-inner { padding: 28px 22px 24px; }
    .modal h2 { font-size: 1.55rem; }
    .modal-actions .btn { width: 100%; }
    .modal-actions form { margin-left: 0 !important; width: 100%; }
}

/* --------------------------------------------------------------------------
   Auth pages
   -------------------------------------------------------------------------- */
body.auth-page { justify-content: center; }
body.auth-page .wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
}
body.auth-page .flash { width: 100%; max-width: 440px; }
.auth-card {
    width: 100%;
    max-width: 440px;
    background: linear-gradient(170deg, #16161b, #0f0f13);
    border: 1px solid var(--line);
    padding: 48px 44px;
    box-shadow: var(--shadow);
    position: relative;
}
.auth-card::before {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(200, 164, 92, 0.14);
    pointer-events: none;
}
.install-card { max-width: 560px; }
.auth-brand { text-align: center; margin-bottom: 32px; }
.auth-brand h1 {
    font-size: 2.1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin: 0 0 6px;
}
.auth-brand .eyebrow { margin: 0; }
.install-steps {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    columns: 2;
}
.install-steps li::before { content: '\2713'; color: var(--green); margin-right: 8px; }

/* --------------------------------------------------------------------------
   Public questionnaire
   -------------------------------------------------------------------------- */
.q-hero {
    text-align: center;
    padding: 56px 24px 40px;
    border-bottom: 1px solid var(--line);
    background: radial-gradient(700px 300px at 50% 0%, rgba(200, 164, 92, 0.10), transparent 70%);
}
.q-hero .brand-mark { margin: 0 auto 20px; }
.q-hero h1 { font-size: 2.9rem; margin-bottom: 6px; }
.q-hero .lede { margin: 0 auto; }

.q-layout { display: grid; grid-template-columns: 250px 1fr; gap: 40px; align-items: start; }
/* Grid children default to min-width:auto, which lets wide content (the
   scrolling section nav) stretch the whole page. */
.q-layout > * { min-width: 0; }

.q-nav { position: sticky; top: 96px; }
.q-nav ol { list-style: none; margin: 0; padding: 0; counter-reset: qstep; }
.q-nav li { counter-increment: qstep; }
.q-nav button {
    width: 100%;
    text-align: left;
    background: none;
    border: 0;
    border-left: 1px solid var(--line-soft);
    color: var(--text-muted);
    padding: 12px 16px 12px 44px;
    font-family: var(--sans);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.q-nav button::before {
    content: counter(qstep);
    position: absolute;
    left: 14px;
    font-family: var(--serif);
    font-size: 0.85rem;
    color: var(--text-muted);
}
.q-nav button:hover { color: var(--gold-light); }
.q-nav li.active button {
    color: var(--gold);
    border-left-color: var(--gold);
    background: linear-gradient(90deg, rgba(200, 164, 92, 0.10), transparent);
}
.q-nav li.active button::before { color: var(--gold); }
.q-nav li.done button::before { content: '\2713'; color: var(--green); }

.q-section { display: none; }
.q-section.active { display: block; animation: fade 0.35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.q-section-head { margin-bottom: 28px; }
.q-section-head h2 { margin-bottom: 6px; }

.q-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--line-soft);
}

.save-state {
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color 0.3s ease;
}
.save-state.saving { color: var(--amber); }
.save-state.saved  { color: var(--green); }
.save-state.failed { color: var(--red); }

.conditional { display: none; }
.conditional.show { display: flex; animation: fade 0.3s ease; }

/* Repeatable rows */
.repeat-item {
    border: 1px solid var(--line-soft);
    padding: 22px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.015);
    position: relative;
}
.repeat-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.repeat-head .n {
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
}
.remove-btn {
    background: none;
    border: 0;
    color: var(--text-muted);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 4px 6px;
}
.remove-btn:hover { color: var(--red); }

/* Sortable speech order */
.sortable { list-style: none; margin: 0 0 8px; padding: 0; }
.sortable li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    margin-bottom: 8px;
    background: #0f0f13;
    border: 1px solid var(--line-soft);
    cursor: grab;
    transition: border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}
.sortable li:hover { border-color: rgba(200, 164, 92, 0.45); }
.sortable li.dragging { opacity: 0.4; border-style: dashed; }
.sortable li.over { border-color: var(--gold); background: rgba(200, 164, 92, 0.07); }
.sortable .grip { color: var(--gold); letter-spacing: 2px; line-height: 1; user-select: none; }
.sortable .pos {
    font-family: var(--serif);
    font-size: 1.1rem;
    color: var(--gold);
    width: 26px;
    text-align: center;
}
.sortable .who { flex: 1; color: var(--text); }
.sortable .who small { display: block; color: var(--text-muted); font-size: 0.76rem; }
.sortable .move { display: flex; gap: 4px; }
.sortable .move button {
    background: none;
    border: 1px solid var(--line-soft);
    color: var(--text-soft);
    width: 28px; height: 28px;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s ease;
}
.sortable .move button:hover { border-color: var(--gold); color: var(--gold); }

.done-card { text-align: center; max-width: 620px; margin: 0 auto; }
.done-tick {
    width: 74px; height: 74px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    display: grid; place-items: center;
    margin: 0 auto 24px;
    color: var(--gold);
    font-size: 30px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .q-layout { grid-template-columns: 1fr; }
    .q-nav { position: static; margin-bottom: 24px; }
    .q-nav ol { display: flex; overflow-x: auto; gap: 4px; }
    .q-nav button { white-space: nowrap; border-left: 0; border-bottom: 1px solid var(--line-soft); padding: 10px 14px 10px 34px; }
    .q-nav button::before { left: 10px; }
    .q-nav li.active button { border-left: 0; border-bottom-color: var(--gold); }
}

@media (max-width: 760px) {
    h1 { font-size: 2rem; }
    .topbar-inner { height: 68px; padding: 14px 18px; }
    .brand-mark { width: 36px; height: 36px; font-size: 19px; }
    .brand-name { font-size: 1.1rem; }
    .wrap { padding: 28px 18px 56px; }
    .panel { padding: 22px 18px; }
    .auth-card { padding: 36px 26px; }
    .choice { padding: 40px 24px; }
    .install-steps { columns: 1; }
}

/* --------------------------------------------------------------------------
   Print - the toastmaster's running sheet
   -------------------------------------------------------------------------- */
@media print {
    body { background: #fff; color: #111; display: block; }
    .topbar, .foot, .btn, .btn-row, .no-print, .findbar, .tabs { display: none !important; }
    .wrap { max-width: none; padding: 0; }
    .panel {
        background: none;
        border: 0;
        border-top: 1px solid #999;
        padding: 12px 0;
        margin: 0 0 12px;
        page-break-inside: avoid;
    }
    h1, h2, h3, h4, .dl dd, .ordered-list li, .mini-card p { color: #111; }
    .eyebrow, .dl dt, .panel-head { color: #555; }
    a { color: #111; text-decoration: none; }
    .mini-card { border-color: #ccc; }
}
