/* JitGuru shared visual identity.
 *
 * Consolidated from the six static mockups, which each carried their own copy
 * of this. Guild/registry theme: Lora for headings, IBM Plex Sans for body,
 * IBM Plex Mono for data and codes; paper/ink/brass-seal/slate palette.
 */

:root {
  --paper: #EDEFE8;
  --card: #FBFAF5;
  --ink: #1E2A26;
  --ink-soft: #4A554E;
  --seal: #9C6B2E;
  --seal-light: #E8DCC8;
  --slate: #3D5A52;
  --slate-light: #DCE5E1;
  --line: #D3D3C6;
  --danger: #8B3A2F;
  --danger-light: #F1DCD9;
  --success: #3D6B4A;
  --success-light: #DCE9DE;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'IBM Plex Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.shell { max-width: 1180px; margin: 0 auto; padding: 36px 32px 80px; }
.shell-narrow { max-width: 760px; margin: 0 auto; padding: 40px 24px 100px; }
.shell-mid { max-width: 1080px; margin: 0 auto; padding: 36px 32px 90px; }

/* ---------- persona bar (prototype affordance) ---------- */

.persona-bar {
  background: var(--ink);
  color: var(--paper);
  font-size: 12.5px;
  padding: 9px 0;
}
.persona-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 32px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.persona-inner .label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--seal-light);
}
.persona-inner form { display: inline; }
.persona-btn {
  font-family: 'IBM Plex Sans', sans-serif;
  background: transparent; color: var(--paper);
  border: 1px solid #4A554E; border-radius: 20px;
  padding: 4px 12px; font-size: 12px; cursor: pointer;
}
.persona-btn:hover { border-color: var(--seal-light); }
.persona-btn.active { background: var(--seal); border-color: var(--seal); }
.persona-inner .spacer { flex: 1; }
.persona-inner a { color: var(--slate-light); text-decoration: none; }
.persona-inner a:hover { color: #fff; }

/* ---------- top nav ---------- */

.nav {
  max-width: 1180px; margin: 0 auto; padding: 22px 32px;
  display: flex; justify-content: space-between; align-items: center;
}
.nav .wordmark { font-family: 'Lora', serif; font-weight: 600; font-size: 19px; text-decoration: none; }
.nav .wordmark span { color: var(--seal); }
.nav-links { display: flex; gap: 24px; font-size: 14px; color: var(--ink-soft); align-items: center; flex-wrap: wrap; }
/* A brass rule wipes in under the label on hover. The colour shift alone was
 * too quiet to read as "this is clickable". */
.nav-links a {
  text-decoration: none;
  position: relative;
  padding: 3px 1px;
  transition: color 0.15s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1.5px;
  background: var(--seal);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.18s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.current { color: var(--seal); font-weight: 600; }
.nav-links a.current::after { transform: scaleX(1); }

/* Nav-bar button (Sign out). A class rather than inline styles, so the hover
 * rule can actually win — an inline border-color outranks any class selector. */
.nav-btn {
  font-family: 'IBM Plex Sans', sans-serif;
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.nav-btn:hover {
  color: var(--ink);
  border-color: var(--seal);
  background: var(--seal-light);
}

/* Visible keyboard focus everywhere, since hover alone leaves keyboard users
 * with no affordance. */
a:focus-visible,
button:focus-visible,
.pill-choice:focus-within,
.tag-choice:focus-within,
.template-card:focus-within {
  outline: 2px solid var(--seal);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- school context switcher ---------- */
/* Built on <details> so it opens without JavaScript. */

.school-switch { position: relative; }
.school-switch summary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--card); font-size: 13px; cursor: pointer;
  list-style: none; transition: border-color 0.15s ease, background 0.15s ease;
}
.school-switch summary::-webkit-details-marker { display: none; }
.school-switch summary:hover { border-color: var(--seal); background: var(--seal-light); }
.school-switch[open] summary { border-color: var(--seal); background: var(--seal-light); }
.school-switch .switch-name { font-weight: 600; }
.school-switch .chev { color: var(--ink-soft); font-size: 10px; }
.school-switch[open] .chev { transform: rotate(180deg); display: inline-block; }

.seal-dot {
  width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--seal);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Lora', serif; font-size: 10px; font-weight: 600;
  color: var(--seal); flex-shrink: 0;
}

.switch-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40;
  min-width: 290px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px; box-shadow: 0 8px 24px rgba(30, 42, 38, 0.13);
}
.switch-group-label {
  font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-soft); padding: 6px 10px 8px;
}
.switch-note {
  font-size: 12.5px; color: var(--ink-soft); line-height: 1.55;
  padding: 0 10px 10px;
}
.switch-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  font-family: 'IBM Plex Sans', sans-serif; font-size: 13.5px; text-align: left;
  padding: 9px 10px; border: none; border-radius: 6px; background: transparent;
  color: var(--ink); cursor: pointer; text-decoration: none;
  transition: background 0.12s ease;
}
.switch-item:hover { background: var(--slate-light); }
.switch-item.current { background: var(--seal-light); color: var(--seal); font-weight: 600; }
.switch-item.current .seal-dot { border-color: var(--seal); }
.switch-item.create {
  border-top: 1px dashed var(--line); border-radius: 0 0 6px 6px;
  margin-top: 6px; padding-top: 12px; color: var(--seal); font-weight: 600;
}

/* ---------- sample-school strip ---------- */

.sample-strip {
  background: var(--seal-light);
  border-top: 1px solid var(--seal);
  border-bottom: 1px solid var(--seal);
}
.sample-inner {
  max-width: 1180px; margin: 0 auto; padding: 12px 32px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.sample-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--seal);
  flex-shrink: 0;
}
.sample-text { font-size: 13.5px; color: var(--seal); flex: 1; min-width: 240px; line-height: 1.5; }
.sample-text strong { color: var(--ink); }

/* ---------- masthead ---------- */

.masthead {
  display: flex; justify-content: space-between; align-items: flex-end;
  border-bottom: 2px solid var(--ink); padding-bottom: 18px; margin-bottom: 28px;
  gap: 20px; flex-wrap: wrap;
}
.masthead-left .eyebrow, .masthead .eyebrow {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--seal); margin-bottom: 6px;
}
.masthead h1 { font-family: 'Lora', serif; font-weight: 600; font-size: 28px; margin: 0; letter-spacing: -0.01em; }
.masthead .sub { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.masthead-right {
  font-family: 'IBM Plex Mono', monospace; font-size: 12px;
  color: var(--ink-soft); text-align: right; line-height: 1.6;
}

/* ---------- messages ---------- */

.msg-list { list-style: none; margin: 0 0 22px; padding: 0; }
.msg {
  border-radius: 8px; padding: 12px 16px; font-size: 13.5px; margin-bottom: 8px;
  border: 1px solid var(--line); background: var(--card);
}
.msg.success { background: var(--success-light); border-color: var(--success); color: var(--success); }
.msg.error { background: var(--danger-light); border-color: var(--danger); color: var(--danger); }
.msg.warning { background: var(--seal-light); border-color: var(--seal); color: var(--seal); }

/* ---------- buttons ---------- */

.btn {
  font-family: 'IBM Plex Sans', sans-serif; font-weight: 600; font-size: 14.5px;
  padding: 13px 26px; border-radius: 8px; cursor: pointer; border: none;
  text-decoration: none; display: inline-block; text-align: center;
}
.btn { transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
.btn-primary { background: var(--seal); color: #fff; }
.btn-primary:hover { background: #82581F; }
.btn-secondary { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-secondary:hover { border-color: var(--slate); background: var(--slate-light); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn-danger:hover { background: var(--danger-light); }
.btn-sm { font-size: 13.5px; padding: 10px 20px; }
.btn-ghost {
  font-family: 'IBM Plex Sans', sans-serif; font-weight: 500; font-size: 12.5px;
  padding: 8px 16px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  text-align: center; text-decoration: none; display: inline-block;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.btn-ghost:hover { border-color: var(--slate); background: var(--slate-light); }
/* Disabled controls must not appear interactive. */
.btn:disabled:hover, .btn[disabled]:hover,
button:disabled:hover { background: inherit; border-color: var(--line); }
.btn-row { display: flex; gap: 12px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.fine-print { font-size: 12px; color: var(--ink-soft); line-height: 1.6; }
button:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- forms ---------- */

label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.field { margin-bottom: 18px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .row-2, .row-3 { grid-template-columns: 1fr; } }

input[type="text"], input[type="number"], input[type="date"], input[type="password"],
input[type="email"], input[type="file"], select, textarea {
  width: 100%; font-family: 'IBM Plex Sans', sans-serif; font-size: 14.5px;
  color: var(--ink); background: #fff; border: 1px solid var(--line);
  border-radius: 6px; padding: 10px 12px; transition: border-color 0.15s;
}
textarea { resize: vertical; min-height: 80px; font-family: inherit; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--slate); box-shadow: 0 0 0 3px var(--slate-light);
}
.errorlist {
  list-style: none; margin: 6px 0 0; padding: 0;
  font-size: 12.5px; color: var(--danger);
}
.help-text { font-size: 12px; color: var(--ink-soft); margin-top: 5px; line-height: 1.5; }

/* pill / tag choosers — CSS-only, driven by :checked so they work without JS */
.pill-group, .tag-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.pill-choice, .tag-choice {
  position: relative; border: 1px solid var(--line); background: #fff;
  border-radius: 20px; padding: 8px 16px; font-size: 13.5px; cursor: pointer;
  user-select: none; transition: all 0.15s; display: inline-flex; align-items: center;
}
.pill-choice input, .tag-choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.pill-choice:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.tag-choice { border-color: var(--seal); color: var(--seal); font-size: 13px; padding: 6px 14px; }
.tag-choice:has(input:checked) { background: var(--seal); color: #fff; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.toggle-row .toggle-text { max-width: 440px; }
.toggle-row .toggle-text strong { display: block; font-size: 14px; margin-bottom: 2px; }
.toggle-row .toggle-text span { font-size: 12.5px; color: var(--ink-soft); }
.switch { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-track {
  position: absolute; inset: 0; background: var(--line); border-radius: 24px;
  cursor: pointer; transition: background 0.15s;
}
.switch-track::before {
  content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform 0.15s;
}
.switch input:checked + .switch-track { background: var(--slate); }
.switch input:checked + .switch-track::before { transform: translateX(18px); }

/* ---------- sections / cards ---------- */

.section-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 30px; margin-bottom: 22px; position: relative;
}
.section-num {
  position: absolute; top: -14px; left: 26px; background: var(--ink); color: var(--paper);
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; padding: 3px 10px;
  border-radius: 20px; letter-spacing: 0.05em;
}
.section-card h2 { font-family: 'Lora', serif; font-size: 18px; font-weight: 600; margin: 6px 0 4px; }
.section-card .hint { font-size: 13px; color: var(--ink-soft); margin: 0 0 20px; line-height: 1.5; }

.section { margin-bottom: 34px; }
.section-label {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--seal); margin-bottom: 6px;
}
.section h2 { font-family: 'Lora', serif; font-size: 19px; font-weight: 600; margin: 0 0 4px; }
.section .hint { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 18px; line-height: 1.5; max-width: 640px; }

.divider { border: none; border-top: 1px dashed var(--line); margin: 20px 0; }
.divider-line { border: none; border-top: 1px solid var(--line); margin: 32px 0; }

/* ---------- seals / avatars / tags ---------- */

.seal-mark {
  width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--seal);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Lora', serif; font-weight: 600; color: var(--seal); font-size: 15px;
  flex-shrink: 0;
}
.seal-mark.lg { width: 52px; height: 52px; font-size: 16px; margin-bottom: 18px; }
.avatar {
  width: 48px; height: 48px; border-radius: 50%; background: var(--slate); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Lora', serif; font-weight: 600; font-size: 16px; flex-shrink: 0;
}
.avatar.sm { width: 30px; height: 30px; font-size: 13px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tag {
  font-size: 11.5px; padding: 4px 10px; border-radius: 20px;
  background: var(--slate-light); color: var(--slate); font-weight: 500;
}
.tag.seal-tag { background: var(--seal-light); color: var(--seal); }
.tag.lg { font-size: 12px; padding: 5px 12px; }
.badge {
  font-size: 10.5px; font-weight: 600; padding: 3px 9px; border-radius: 20px;
  background: var(--slate-light); color: var(--slate); white-space: nowrap;
}
.badge.verified { background: var(--success-light); color: var(--success); }
.badge.pending { background: var(--seal-light); color: var(--seal); }
.badge.muted { background: var(--paper); color: var(--ink-soft); }
.badge.danger { background: var(--danger-light); color: var(--danger); }

/* ---------- list layout with filter rail ---------- */

.search-bar { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.search-bar input { flex: 1; min-width: 220px; font-size: 15px; padding: 13px 16px; }
.sort-select { font-size: 13.5px; padding: 12px 14px; width: auto; color: var(--ink-soft); }

.layout { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } }

.filters { position: sticky; top: 24px; }
.filter-group { margin-bottom: 24px; }
.filter-group h3 {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--ink-soft); margin: 0 0 12px; font-weight: 600;
}
.filter-chip {
  display: flex; align-items: center; gap: 8px; font-size: 13.5px;
  padding: 6px 0; cursor: pointer; user-select: none;
}
.filter-chip input { accent-color: var(--slate); width: 15px; height: 15px; }
.range-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); }
.range-row input[type="range"] { flex: 1; accent-color: var(--seal); padding: 0; }
.clear-link { font-size: 12.5px; color: var(--seal); text-decoration: underline; }

.results-count { font-size: 13.5px; color: var(--ink-soft); margin-bottom: 16px; }
.results-count strong { color: var(--ink); }

/* ---------- record cards (postings, judges) ---------- */

.record-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; margin-bottom: 14px; display: flex; gap: 18px;
  align-items: flex-start; transition: border-color 0.15s;
}
.record-card:hover { border-color: var(--slate); }
.record-body { flex: 1; min-width: 0; }
.record-title {
  font-family: 'Lora', serif; font-size: 17px; font-weight: 600; margin: 0 0 4px;
  text-decoration: none; display: block;
}
.record-title:hover { color: var(--seal); }
.record-sub { font-size: 13px; color: var(--ink-soft); margin: 0 0 12px; }
.record-name-row { display: flex; align-items: center; gap: 10px; margin-bottom: 3px; flex-wrap: wrap; }
.record-bio { font-size: 13px; color: var(--ink-soft); margin: 0 0 12px; max-width: 520px; }
.record-meta { display: flex; gap: 22px; font-size: 12.5px; color: var(--ink-soft); flex-wrap: wrap; }
.record-meta .m strong {
  display: block; color: var(--ink); font-family: 'IBM Plex Mono', monospace;
  font-size: 13.5px; font-weight: 600;
}
.record-action {
  flex-shrink: 0; align-self: center; display: flex; flex-direction: column; gap: 8px;
}
@media (max-width: 620px) {
  .record-card { flex-direction: column; }
  .record-action { align-self: stretch; width: 100%; }
}

.plan-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--seal-light); border: 1px solid var(--seal); border-radius: 8px;
  padding: 12px 18px; margin-bottom: 22px; font-size: 13px; color: var(--seal);
  flex-wrap: wrap;
}

.empty-state {
  background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 40px 30px; text-align: center; color: var(--ink-soft); font-size: 14px;
}
.empty-state h3 { font-family: 'Lora', serif; color: var(--ink); margin: 0 0 8px; font-size: 18px; }

/* ---------- preview card (create-posting live preview) ---------- */

.preview-col { position: sticky; top: 32px; }
.preview-label {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 10px;
}
.preview-card {
  background: var(--card); border: 1px solid var(--ink); border-radius: var(--radius);
  padding: 30px; position: relative; overflow: hidden;
}
.preview-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: repeating-linear-gradient(90deg, var(--seal), var(--seal) 8px, transparent 8px, transparent 16px);
}
.preview-title { font-family: 'Lora', serif; font-size: 22px; font-weight: 600; margin: 0 0 4px; line-height: 1.3; }
.preview-sub { font-size: 13px; color: var(--ink-soft); margin: 0 0 18px; }
.preview-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px 10px;
  border-top: 1px dashed var(--line); padding-top: 16px;
}
.preview-stat .k {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-soft); margin-bottom: 3px;
}
.preview-stat .v { font-size: 14.5px; font-weight: 600; font-family: 'IBM Plex Mono', monospace; }
.preview-note {
  margin-top: 18px; font-size: 12px; color: var(--ink-soft); line-height: 1.6;
  font-style: italic; font-family: 'Lora', serif;
}
.empty-hint { color: #B5B0A0; font-style: normal; }

.form-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 900px) {
  .form-layout { grid-template-columns: 1fr; }
  .preview-col { order: -1; position: static; }
}

/* ---------- stat grid ---------- */

.stat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 28px;
}
@media (max-width: 620px) { .stat-grid { grid-template-columns: 1fr 1fr; } }
.stat-cell { background: var(--card); padding: 16px 18px; }
.stat-cell .k {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-soft); margin-bottom: 4px;
}
.stat-cell .v { font-size: 15px; font-weight: 600; font-family: 'IBM Plex Mono', monospace; }

/* ---------- data table ---------- */

.data-table {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--card); width: 100%;
}
.table-scroll { overflow-x: auto; }
.data-table table { width: 100%; border-collapse: collapse; }
.data-table th {
  background: #fff; border-bottom: 1px solid var(--line); text-align: left;
  padding: 12px 16px; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--ink-soft); font-weight: 600; white-space: nowrap;
}
/* Signals that a header carries a title= explanation on hover. The dotted rule
 * is the conventional cue, but at --line it was too faint at 11px to invite the
 * hover, so it uses the body ink tone instead. */
.data-table th[title] {
  cursor: help;
  text-decoration: underline dotted var(--ink-soft);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.data-table th[title]:hover { color: var(--ink); text-decoration-color: var(--seal); }
.data-table td { border-bottom: 1px solid var(--line); padding: 12px 16px; font-size: 13.5px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table td.name { font-weight: 600; }
.data-table td.muted { color: var(--slate); font-size: 12.5px; }
.judge-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px;
  background: var(--slate-light); color: var(--slate); padding: 5px 10px; border-radius: 20px;
}
.add-row-btn {
  font-size: 13px; color: var(--seal); padding: 12px 16px; cursor: pointer;
  font-weight: 500; background: none; border: none; text-align: left; width: 100%;
}
.remove-btn { color: var(--ink-soft); cursor: pointer; text-align: center; font-size: 16px; background: none; border: none; }

/* ---------- rubric template picker ---------- */

.template-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 26px; }
@media (max-width: 820px) { .template-grid { grid-template-columns: 1fr; } }
.template-card {
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 18px; cursor: pointer; transition: border-color 0.15s;
  display: block; position: relative;
}
.template-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.template-card:has(input:checked) { border-color: var(--seal); box-shadow: 0 0 0 3px var(--seal-light); }
.template-card .t-name { font-family: 'Lora', serif; font-size: 15.5px; font-weight: 600; margin: 0 0 4px; }
.template-card .t-desc { font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; margin: 0 0 14px; min-height: 52px; }
.template-card .t-mini { border-top: 1px dashed var(--line); padding-top: 12px; }

.mini-binary { display: flex; gap: 6px; }
.mini-pill { font-size: 11px; padding: 4px 10px; border-radius: 20px; background: var(--slate-light); color: var(--slate); font-weight: 500; }
.mini-pill.on { background: var(--success-light); color: var(--success); }
.mini-scale { display: flex; gap: 4px; }
.mini-seg { flex: 1; text-align: center; font-size: 10px; padding: 5px 2px; background: var(--slate-light); color: var(--slate); border-radius: 5px; font-weight: 500; }
.mini-seg.on { background: var(--seal); color: #fff; }
.mini-single-point { font-size: 11px; color: var(--ink-soft); }
.mini-single-point .row { display: flex; gap: 4px; }
.mini-single-point .c1, .mini-single-point .c3 { flex: 1; background: var(--paper); border-radius: 4px; padding: 4px 6px; color: #B5B0A0; }
.mini-single-point .c2 { flex: 1.3; background: var(--seal-light); border-radius: 4px; padding: 4px 6px; color: var(--seal); font-weight: 500; text-align: center; }

/* ---------- outcome entry (judge side) ---------- */

.outcome-panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px; margin-bottom: 22px;
}
/* Django 4.0+ renders RadioSelect as nested <div>s (it used to be <ul><li>),
 * so these target the div structure: .choice-row > div (the widget wrapper)
 * > div (one per choice) > label. */
.choice-row, .scale-row { margin-bottom: 16px; }
.choice-row > div, .scale-row > div {
  display: flex; gap: 12px; width: 100%; flex-wrap: wrap;
}
.choice-row > div > div { flex: 1; min-width: 130px; }
.scale-row > div > div { flex: 1; min-width: 110px; }

.choice-row label, .scale-row label {
  display: block; text-align: center; border: 1.5px solid var(--line);
  border-radius: 8px; font-weight: 600; color: var(--ink-soft);
  cursor: pointer; margin: 0; transition: all 0.15s;
}
.choice-row label { padding: 16px; font-size: 14px; }
.scale-row label { padding: 14px 8px; font-size: 13px; }

.choice-row > div > div:has(input:checked) label {
  border-color: var(--success); background: var(--success-light); color: var(--success);
}
.scale-row > div > div:has(input:checked) label {
  border-color: var(--seal); background: var(--seal-light); color: var(--seal);
}
.choice-row input, .scale-row input {
  position: absolute; opacity: 0; width: 0; height: 0;
}

.sp-table { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 16px; }
.sp-row { display: grid; grid-template-columns: 1fr 1.3fr 1fr; border-top: 1px solid var(--line); }
.sp-row:first-child { border-top: none; }
.sp-cell { padding: 12px 14px; font-size: 12.5px; line-height: 1.5; }
.sp-head {
  background: #fff; font-weight: 600; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--ink-soft); padding: 10px 14px;
}
.sp-cell.concerns { color: var(--danger); background: var(--danger-light); }
.sp-cell.criteria { color: var(--seal); background: var(--seal-light); font-weight: 500; }
.sp-cell.advanced { color: var(--success); background: var(--success-light); }
.sp-cell textarea { min-height: 60px; font-size: 12.5px; background: rgba(255,255,255,0.7); }
@media (max-width: 700px) { .sp-row { grid-template-columns: 1fr; } }

/* ---------- Codex ---------- */

.codex-sheet {
  background: var(--card); border: 1px solid var(--ink); border-radius: var(--radius);
  padding: 44px 46px; position: relative; overflow: hidden;
}
.codex-sheet::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: repeating-linear-gradient(90deg, var(--seal), var(--seal) 8px, transparent 8px, transparent 16px);
}
@media (max-width: 620px) { .codex-sheet { padding: 30px 24px; } }
.codex-eyebrow {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--seal); margin-bottom: 10px;
}
.codex-sheet h1 { font-family: 'Lora', serif; font-size: 28px; font-weight: 600; margin: 0 0 6px; line-height: 1.3; }
.codex-outcome {
  display: inline-block; font-family: 'Lora', serif; font-size: 20px; font-weight: 600;
  padding: 10px 22px; border-radius: 8px; margin: 22px 0;
  background: var(--success-light); color: var(--success); border: 1px solid var(--success);
}
.codex-outcome.attempted { background: var(--seal-light); color: var(--seal); border-color: var(--seal); }
.codex-narrative {
  font-family: 'Lora', serif; font-size: 16.5px; line-height: 1.75; color: var(--ink);
  border-left: 3px solid var(--seal-light); padding-left: 20px; margin: 0 0 26px;
}
.codex-footer {
  border-top: 1px dashed var(--line); padding-top: 18px; font-size: 12.5px;
  color: var(--ink-soft); line-height: 1.7;
}
.codex-footer strong { color: var(--ink); }

/* ---------- Attestation ---------- */

.att-header {
  background: var(--ink); color: var(--paper); border-radius: var(--radius);
  padding: 32px 34px; margin-bottom: 26px;
}
.att-header h1 { font-family: 'Lora', serif; font-size: 26px; font-weight: 600; margin: 0 0 8px; }
.att-header p { font-size: 14px; color: #C7CFC9; margin: 0; line-height: 1.6; }
.att-headline { display: flex; gap: 40px; margin-top: 24px; flex-wrap: wrap; }
.att-headline .n { font-family: 'IBM Plex Mono', monospace; font-size: 30px; font-weight: 600; }
.att-headline .k {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--seal-light); margin-bottom: 4px;
}
.bar-row { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.bar-label { font-size: 13.5px; width: 190px; flex-shrink: 0; }
.bar-track { flex: 1; height: 22px; background: var(--slate-light); border-radius: 4px; overflow: hidden; min-width: 80px; }
.bar-fill { height: 100%; background: var(--slate); }
.bar-value { font-family: 'IBM Plex Mono', monospace; font-size: 13px; width: 96px; text-align: right; flex-shrink: 0; }
@media (max-width: 620px) { .bar-label { width: 110px; } }
.footnote {
  font-size: 12.5px; color: var(--ink-soft); line-height: 1.7; font-style: italic;
  border-top: 1px solid var(--line); padding-top: 16px; margin-top: 30px;
}

/* ---------- landing ---------- */

.hero { max-width: 780px; margin: 0 auto; padding: 60px 32px 50px; text-align: center; }
.hero .eyebrow {
  font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--seal); margin-bottom: 16px;
}
.hero h1 {
  font-family: 'Lora', serif; font-weight: 600; font-size: 42px; line-height: 1.25;
  margin: 0 0 18px; letter-spacing: -0.01em;
}
@media (max-width: 620px) { .hero h1 { font-size: 32px; } }
.hero p.lede { font-size: 17px; color: var(--ink-soft); line-height: 1.65; margin: 0 auto 32px; max-width: 560px; }
.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hr-full { border: none; border-top: 1px solid var(--line); max-width: 1180px; margin: 0 auto; }

.benefits { max-width: 1080px; margin: 0 auto; padding: 60px 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 860px) { .benefits { grid-template-columns: 1fr; } }
.benefit-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; display: flex; flex-direction: column;
}
.benefit-card .tag-label {
  font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--seal); margin-bottom: 12px;
}
.benefit-card h2 { font-family: 'Lora', serif; font-size: 21px; font-weight: 600; margin: 0 0 6px; }
.benefit-card .sub { font-size: 13px; color: var(--ink-soft); margin: 0 0 20px; line-height: 1.5; }
.benefit-list { list-style: none; margin: 0 0 24px; padding: 0; flex: 1; }
.benefit-list li { font-size: 14px; line-height: 1.6; padding-left: 20px; position: relative; margin-bottom: 12px; }
.benefit-list li::before { content: "—"; position: absolute; left: 0; color: var(--seal); }
.benefit-card .btn { width: 100%; }

.platform-band { background: var(--ink); color: var(--paper); padding: 60px 32px; }
.platform-inner { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .platform-inner { grid-template-columns: 1fr; } }
.platform-inner h2 { font-family: 'Lora', serif; font-size: 26px; font-weight: 600; margin: 0 0 14px; }
.platform-inner p { font-size: 15px; line-height: 1.7; color: #C7CFC9; margin: 0 0 22px; }
.platform-list { list-style: none; margin: 0; padding: 0; }
.platform-list li { font-size: 14.5px; line-height: 1.8; padding-left: 22px; position: relative; margin-bottom: 4px; }
.platform-list li::before { content: "—"; position: absolute; left: 0; color: var(--seal-light); }

footer.site-footer {
  max-width: 1180px; margin: 0 auto; padding: 30px 32px 50px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12.5px; color: var(--ink-soft); gap: 16px; flex-wrap: wrap;
}

/* ---------- misc ---------- */

.verify-banner {
  display: flex; align-items: flex-start; gap: 12px; background: var(--success-light);
  border: 1px solid var(--success); border-radius: 8px; padding: 14px 16px; margin-bottom: 24px;
}
.verify-banner .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); margin-top: 5px; flex-shrink: 0; }
.verify-banner .vtext strong { display: block; font-size: 13.5px; color: var(--success); margin-bottom: 2px; }
.verify-banner .vtext span { font-size: 12.5px; color: var(--ink-soft); }
.verify-banner.pending { background: var(--seal-light); border-color: var(--seal); }
.verify-banner.pending .dot { background: var(--seal); }
.verify-banner.pending .vtext strong { color: var(--seal); }

.claim-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px;
  margin-bottom: 10px; background: #fff;
}
.claim-label strong { display: block; font-size: 14px; }
.claim-label span { font-size: 12px; color: var(--ink-soft); }

.apply-card {
  background: var(--card); border: 1px solid var(--ink); border-radius: var(--radius); padding: 30px;
}
.apply-card h2 { font-family: 'Lora', serif; font-size: 20px; font-weight: 600; margin: 0 0 6px; }
.apply-card .apply-sub { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 24px; line-height: 1.6; }

.invite-strip {
  display: flex; align-items: center; gap: 12px; background: var(--card);
  border: 1px solid var(--line); border-radius: 20px; padding: 8px 18px 8px 8px;
  margin-bottom: 28px; width: fit-content;
}
.invite-strip .text { font-size: 13px; color: var(--ink-soft); }
.invite-strip .text strong { color: var(--ink); font-weight: 600; }

.block { margin-bottom: 30px; }
.block h2 { font-family: 'Lora', serif; font-size: 17px; font-weight: 600; margin: 0 0 10px; }
.block p { font-size: 14.5px; line-height: 1.65; margin: 0; }
.block p.muted { color: var(--ink-soft); }

.inline-form { display: inline; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.mono { font-family: 'IBM Plex Mono', monospace; }
.nowrap { white-space: nowrap; }

/* ---------- auth pages ---------- */

.auth-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 36px; max-width: 480px;
}
.auth-card .eyebrow {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--seal); margin-bottom: 8px;
}
.auth-title { font-family: 'Lora', serif; font-size: 26px; font-weight: 600; margin: 0 0 8px; }
.auth-lede { font-size: 14px; color: var(--ink-soft); line-height: 1.6; margin: 0 0 22px; }
@media (max-width: 560px) { .auth-card { padding: 26px 22px; } }

/* ---------- profile control ---------- */

.profile-menu { position: relative; }
.profile-menu summary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--card); font-size: 13px; cursor: pointer; list-style: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.profile-menu summary::-webkit-details-marker { display: none; }
.profile-menu summary:hover { border-color: var(--seal); background: var(--seal-light); }
.profile-menu[open] summary { border-color: var(--seal); background: var(--seal-light); }
.profile-name .last { font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; }
.profile-name .first { color: var(--ink-soft); }
.profile-menu .switch-menu { min-width: 200px; }

/* ---------- settings ---------- */

.settings-layout { display: grid; grid-template-columns: 210px 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .settings-layout { grid-template-columns: 1fr; } }
.settings-nav { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 2px; }
.settings-nav-item {
  display: block; padding: 10px 14px; border-radius: 8px; font-size: 14px;
  text-decoration: none; color: var(--ink-soft); transition: background 0.12s ease;
}
.settings-nav-item:hover { background: var(--slate-light); color: var(--ink); }
.settings-nav-item.current { background: var(--seal-light); color: var(--seal); font-weight: 600; }

/* Messages render outside the page shell so pages that replace {% block body %}
 * still show them. This gives them the shell's horizontal alignment. */
.msg-band { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.msg-band .msg-list { margin: 18px 0 0; }

/* ---------- section menu (user administration) ---------- */

.section-menu {
  display: flex; gap: 4px; margin-bottom: 22px;
  border-bottom: 1px solid var(--line); padding-bottom: 0;
}
.section-menu-item {
  padding: 9px 16px; font-size: 13.5px; text-decoration: none;
  color: var(--ink-soft); border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.section-menu-item:hover { color: var(--ink); border-bottom-color: var(--line); }
.section-menu-item.current {
  color: var(--seal); font-weight: 600; border-bottom-color: var(--seal);
}
/* Not merely styled grey — it is a <span>, so there is nothing to activate. */
.section-menu-item.disabled {
  color: #B5B0A0; cursor: not-allowed;
}

/* ---------- pagination ---------- */

.pagination {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 22px; flex-wrap: wrap;
}
.page-link {
  font-size: 13px; padding: 7px 14px; border: 1px solid var(--line);
  border-radius: 20px; text-decoration: none; color: var(--ink);
  background: var(--card); transition: border-color 0.15s ease, background 0.15s ease;
}
.page-link:hover { border-color: var(--seal); background: var(--seal-light); }
.page-status {
  font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; color: var(--ink-soft);
}
