/* ARLIS Events — UMD colours (Maryland red #E21833, gold #FFD200, black), ARLIS mark. */
:root {
  --umd-red: #E21833;
  --umd-red-dark: #b3122a;
  --umd-gold: #FFD200;
  --umd-black: #000000;
  --ink: #1a1a2e;
  --paper: #ffffff;
  --bg: #f4f5f7;
  --line: #d9dce1;
  --muted: #5b6470;
  --green: #1a7f37;
  --focus: #1f5fbf;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.55; font-size: 16px;
}
a { color: var(--umd-red-dark); }
a:hover { text-decoration: underline; }

/* Header */
.topbar {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: var(--umd-black); color: #fff; padding: 12px 24px;
}
.brand-link { color: #fff; text-decoration: none; display: flex; align-items: center; gap: 14px; }
.brand-link:hover { text-decoration: none; }
.brand-logo { height: 44px; width: auto; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-mark { font-weight: 800; letter-spacing: .14em; font-size: 20px; }
.brand-sub { font-size: 12px; opacity: .85; }
.mainnav { display: flex; gap: 18px; flex: 1; flex-wrap: wrap; justify-content: flex-end; }
.mainnav a { color: #fff; font-weight: 600; font-size: 14px; text-decoration: none; opacity: .92; padding-bottom: 2px; }
.mainnav a:hover, .mainnav a.active { opacity: 1; border-bottom: 2px solid var(--umd-gold); }
.userbox { display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; }
.userbox .uname { font-weight: 700; }
.userbox .logout { color: var(--umd-gold); font-weight: 600; margin-top: 2px; }
.redbar { height: 6px; background: var(--umd-red); }
.goldbar { height: 4px; background: var(--umd-gold); }

/* Layout */
.container { max-width: 980px; margin: 0 auto; padding: 28px 20px 60px; }
.container.narrow { max-width: 760px; }
.container.wide { max-width: 1240px; }
h1 { color: var(--umd-black); font-size: 30px; margin: 0 0 8px; line-height: 1.2; }
h2 { color: var(--umd-red-dark); font-size: 21px; margin: 26px 0 10px; }
h3 { font-size: 16px; margin: 18px 0 6px; }
.lead { font-size: 17px; color: var(--muted); max-width: 70ch; margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 8px; }

/* Cards */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; box-shadow: var(--shadow); margin: 0 0 16px; }
.card h2:first-child { margin-top: 0; }
.event-list { display: grid; gap: 14px; }
.event-card { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; }
.event-card .when { font-weight: 700; color: var(--umd-red-dark); min-width: 180px; }
.event-card .what { flex: 1 1 320px; }
.event-card .what h2 { margin: 0 0 4px; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--muted); vertical-align: middle; }
.badge.open { background: #e6f4ea; color: var(--green); border-color: #bfe3c8; }
.badge.closed { background: #fdecef; color: var(--umd-red-dark); border-color: #f5c6cf; }
.badge.draft { background: #fff8d6; color: #7a5b00; border-color: #f1dd88; }

/* Front matter */
.frontmatter { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.frontmatter img { height: 72px; width: auto; }
.frontmatter .meta { color: var(--muted); font-size: 15px; margin: 2px 0 10px; }
.frontmatter p { margin: 0 0 10px; max-width: 72ch; }

/* Forms */
form.reg { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label, .field .q-label { font-weight: 700; }
.field .req { color: var(--umd-red); margin-left: 3px; }
.field .help { color: var(--muted); font-size: 13px; }
.field input[type=text], .field input[type=email], .field textarea, .field select {
  font: inherit; padding: 10px 12px; border: 1px solid #b8bec8; border-radius: 6px; background: #fff; width: 100%;
}
.field textarea { min-height: 110px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 3px solid rgba(31,95,191,.35); border-color: var(--focus); }
.choices { display: grid; gap: 8px; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.choice input { margin-top: 4px; }
.choice .note { color: var(--muted); font-size: 13px; }
.choice .note.cls { color: var(--umd-red-dark); font-weight: 600; }
.other-text { margin-left: 28px; }
.field.error input, .field.error textarea, .field.error select { border-color: var(--umd-red); }
.err { color: var(--umd-red-dark); font-size: 13px; font-weight: 600; }
.errbox { background: #fdecef; border: 1px solid #f5c6cf; color: var(--umd-red-dark); border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; }
.okbox { background: #e6f4ea; border: 1px solid #bfe3c8; color: var(--green); border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Buttons */
.btn { display: inline-block; font: inherit; font-weight: 700; padding: 10px 18px; border-radius: 6px; border: 1px solid var(--umd-red); background: var(--umd-red); color: #fff; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--umd-red-dark); text-decoration: none; }
.btn.secondary { background: #fff; color: var(--ink); border-color: #b8bec8; }
.btn.secondary:hover { background: #f1f2f4; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.danger { background: #fff; color: var(--umd-red-dark); border-color: var(--umd-red); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 6px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
table.list th, table.list td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.list thead th { background: #f1f2f4; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
table.list tbody tr:hover { background: #fafafa; }
table.list td.num, table.list th.num { text-align: right; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 18px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.kpi .v { font-size: 26px; font-weight: 800; }
.kpi .l { color: var(--muted); font-size: 12px; }

/* Confirmation */
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 22px; letter-spacing: .12em; background: #fff8d6; border: 1px solid #f1dd88; padding: 6px 12px; border-radius: 6px; display: inline-block; }

/* Admin question builder */
.builder { display: grid; gap: 12px; }
.qrow { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #fff; display: grid; gap: 8px; }
.qrow .qhead { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.qrow .qhead input[type=text] { flex: 1 1 240px; }
.qrow textarea { width: 100%; min-height: 80px; font: inherit; padding: 8px; border: 1px solid #b8bec8; border-radius: 6px; }
.qrow .qopts { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; }

/* Footer */
.footer { color: var(--muted); font-size: 13px; padding: 20px; border-top: 1px solid var(--line); display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between; max-width: 980px; margin: 20px auto 0; }
.notice { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 26px 28px; max-width: 560px; margin: 40px auto; box-shadow: var(--shadow); }

/* ===== Public registration pages (routes/public.py, templates event/registered/index) — APPENDED SECTION.
   Only additions below this line; nothing above is edited. ===== */
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin: 0 0 2px; font-weight: 700; }
.field .choice { font-weight: 400; cursor: pointer; }
.field .choice input { flex: 0 0 auto; }
.choice .choice-body { display: flex; flex-direction: column; gap: 2px; }
.field .other-text label { font-weight: 400; font-size: 13px; color: var(--muted); display: block; margin-bottom: 4px; }
.field .other-text input[type=text] { font: inherit; padding: 8px 10px; border: 1px solid #b8bec8; border-radius: 6px; background: #fff; width: 100%; }
.req-note { color: var(--muted); font-size: 13px; margin: 0; }
.frontmatter .fm-body { flex: 1 1 320px; min-width: 0; }
.frontmatter .kicker { margin: 0 0 2px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--umd-red-dark); }
.errbox ul { margin: 6px 0 0; padding-left: 20px; }
.errbox a { color: inherit; }
dl.summary { display: grid; grid-template-columns: minmax(140px, 1fr) 2fr; gap: 8px 16px; margin: 16px 0; }
dl.summary dt { font-weight: 700; color: var(--muted); }
dl.summary dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  dl.summary { grid-template-columns: 1fr; gap: 2px; }
  dl.summary dd { margin-bottom: 8px; }
}
.notice h1 { font-size: 24px; }

/* =========================================================================
   Admin area (appended by the admin builder). New rules only; nothing above
   this line is modified here.
   ========================================================================= */
.field input[type=date], .field input[type=number] {
  font: inherit; padding: 10px 12px; border: 1px solid #b8bec8; border-radius: 6px; background: #fff; width: 100%;
}
.field input[type=date]:focus, .field input[type=number]:focus { outline: 3px solid rgba(31,95,191,.35); border-color: var(--focus); }
.field input[readonly] { background: #f1f2f4; color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin: 0 0 16px; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; vertical-align: middle; margin-left: 6px; }
.inline-form select { font: inherit; font-size: 13px; padding: 4px 6px; border: 1px solid #b8bec8; border-radius: 6px; background: #fff; }
.filterbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 0 0 16px; }
.filterbar .field { flex: 1 1 180px; min-width: 160px; }
.filterbar .field.grow { flex: 2 1 260px; }
.filterbar .field label { font-size: 13px; }
.filterbar .actions { margin: 0; }
.warnbox { background: #fff8d6; border: 1px solid #f1dd88; color: #7a5b00; border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; }
table.list td.nowrap, table.list th.nowrap { white-space: nowrap; }
table.list td.small { font-size: 13px; }
.preview dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 12px; }
.preview dt { font-weight: 700; color: var(--muted); }
.preview dd { margin: 0; }
.json-edit { margin-top: 14px; }
.json-edit summary { cursor: pointer; font-weight: 700; color: var(--umd-red-dark); }
.json-area { width: 100%; min-height: 220px; margin-top: 8px; font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 10px 12px; border: 1px solid #b8bec8; border-radius: 6px; background: #fff; }
.json-area:focus { outline: 3px solid rgba(31,95,191,.35); border-color: var(--focus); }
.qrow .qnum { font-weight: 800; color: var(--muted); min-width: 1.8em; }
.qrow .qhead input[type=text] { font: inherit; padding: 8px 10px; border: 1px solid #b8bec8; border-radius: 6px; background: #fff; }
.qrow .qhead input[data-field=key] { flex: 0 1 180px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.qrow .qhead select { font: inherit; padding: 8px 10px; border: 1px solid #b8bec8; border-radius: 6px; background: #fff; }
.qrow .qbtns { display: flex; gap: 6px; margin-left: auto; }
.qrow .qbtns .btn[disabled] { opacity: .4; cursor: default; }
.qrow .qlabel { font-size: 13px; color: var(--muted); font-weight: 600; }
.qrow .row .field input[type=text] { font: inherit; padding: 8px 10px; border: 1px solid #b8bec8; border-radius: 6px; background: #fff; width: 100%; }
.row .field { align-content: start; }


/* ---- (parent) logout button styled as the former link ---- */
.logout-form { margin: 0; }
button.logout { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; cursor: pointer; }
