/* UKBYW theme: the old logo's grey banner up top, a dark slate "garage" below, steel blue from the arrow as the one accent. */
:root {
  --band: #e1e1e1;
  --band-ink: #1a1d21;
  --mat: #1c2128;
  --panel: #242b34;
  --panel-2: #2b333d;
  --line: #36404c;
  --text: #e7eaee;
  --muted: #9aa4b1;
  --steel: #86a4c7;
  --steel-deep: #4f6f95;
  --steel-hover: #5d80a9;
  --steel-tint: rgba(79,111,149,.16);
  --steel-glow: rgba(134,164,199,.25);
  --input: #171b21;
  --mine: #25354a;
  --red: #d9534f;
  --amber: #d6a441;
  --green: #5fae7f;
  --radius: 6px;
  --display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--mat);
  color: var(--text);
  font: 400 17px/1.55 var(--body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--steel); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--steel); outline-offset: 2px; border-radius: 3px; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: .01em; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 .8em; }
code { background: var(--panel-2); padding: .1em .35em; border-radius: 3px; font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.grow { flex: 1 1 200px; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: #fff; color: #000; padding: 8px 12px; }

/* ---------- Header: the logo banner ---------- */
.site-header {
  background: var(--band);
  color: var(--band-ink);
  border-bottom: 4px solid #000;
  box-shadow: 0 1px 0 var(--steel-deep);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 76px; }
.brand { display: block; line-height: 0; padding: 10px 0; }
.brand img { height: 56px; width: auto; }
.top-nav { display: flex; align-items: center; gap: 4px; font-weight: 600; }
.top-nav > a { color: var(--band-ink); text-decoration: none; padding: 8px 10px; border-radius: var(--radius); }
.top-nav > a:hover { background: rgba(0,0,0,.07); color: #000; }
.top-nav .btn { color: #fff; }
.count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: .75rem; line-height: 20px; text-align: center; }

.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: var(--radius); }
.menu > summary::-webkit-details-marker { display: none; }
.site-header .menu > summary:hover { background: rgba(0,0,0,.07); }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20;
  min-width: 200px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
.menu-panel a, .menu-panel button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 4px;
  color: var(--text); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer;
}
.menu-panel a:hover, .menu-panel button:hover { background: var(--line); color: #fff; }
.menu-panel form { margin: 0; }
.show-sm { display: none !important; }

/* ---------- Main ---------- */
main { flex: 1; padding-top: 32px; padding-bottom: 48px; }
.page-title { font-size: 2.3rem; margin-bottom: .3em; }
.section-title { margin-top: 1.4em; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .9rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.panel.empty { text-align: center; padding: 36px 20px; }
.panel h2 { font-size: 1.3rem; }

.notice { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 14px; border-left: 4px solid; background: var(--panel); }
.notice-success { border-color: var(--green); }
.notice-error { border-color: var(--red); }
.notice-info { border-color: var(--steel); }
.notice a { color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--steel-deep); color: #fff; border: 1px solid var(--steel-deep);
  padding: 10px 18px; border-radius: var(--radius); font: 600 1rem var(--body);
  text-decoration: none; cursor: pointer; min-height: 44px;
}
.btn:hover { background: var(--steel-hover); color: #fff; }
.btn-sm { padding: 6px 12px; min-height: 36px; font-size: .92rem; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--panel-2); border-color: var(--muted); }
.btn-danger { background: #8e2f2c; border-color: #8e2f2c; }
.btn-danger:hover { background: #a93a36; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--steel); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.linklike.danger { color: #f08a86; }
.linklike.ok { color: var(--green); }
.inline-form { display: inline; margin: 0; }

/* ---------- Badges & tags ---------- */
.badge, .tag {
  display: inline-block; font: 600 .72rem/1 var(--body); padding: 4px 7px; border-radius: 4px;
  background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); vertical-align: middle;
}
.badge-admin { background: #3b2322; color: #f3a29f; border-color: #6a3432; }
.badge-mod { background: var(--mine); color: var(--steel); border-color: var(--steel-deep); }
.badge-minor { background: #3a3120; color: var(--amber); border-color: #6b5728; }
.tag-pin { color: var(--steel); border-color: var(--steel-deep); }
.tag-lock { color: var(--muted); }
.tag-pending { color: var(--amber); border-color: #6b5728; background: #2f2a1f; }
.tag-urgent { color: #fff; background: var(--red); border-color: var(--red); }
/* All staff share one colour so they stand out as a group. */
.user.role-admin, .user.role-mod { color: #f3a29f; }
.user { font-weight: 600; }
.user-title { display: block; font-size: .8rem; color: var(--muted); font-style: italic; }

/* ---------- Avatars ---------- */
.avatar { border-radius: 50%; object-fit: cover; flex: none; display: inline-block; vertical-align: middle; background: var(--panel-2); }
.avatar-letter {
  display: inline-flex; align-items: center; justify-content: center;
  background: hsl(var(--h) 22% 32%); color: hsl(var(--h) 40% 88%);
  font-family: var(--display); line-height: 1;
}

/* ---------- Hero (guests only) ---------- */
.hero {
  position: relative; padding: 28px 24px 24px; margin-bottom: 28px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel) 0%, var(--mat) 100%);
  overflow: hidden;
}
.hero h1 { font-size: clamp(2.2rem, 7vw, 3.6rem); margin-bottom: .2em; color: #fff; -webkit-text-stroke: 1px #000; text-shadow: 2px 2px 0 #000; }
.hero p { max-width: 60ch; color: var(--text); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }

/* ---------- Board index ---------- */
.category { margin-bottom: 26px; }
.cat-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 8px; padding-left: 2px; }
.cat-head h2 { margin: 0; font-size: 1.55rem; }
.cat-head p { margin: 0; color: var(--muted); font-size: .95rem; }
.board-list, .thread-list { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.board-row, .thread-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 150px 220px; gap: 16px; align-items: center;
  padding: 14px 18px; border-top: 1px solid var(--line);
}
.board-row:first-child, .thread-row:first-child { border-top: 0; }
.board-row h3, .thread-row h3 { margin: 0 0 2px; }
.board-row h3 a, .thread-row h3 a { color: var(--text); text-decoration: none; }
.board-row h3 a:hover, .thread-row h3 a:hover { color: #fff; text-decoration: underline; }
.board-main p { margin: 0; color: var(--muted); font-size: .95rem; }
.board-stats { display: flex; flex-direction: column; font-size: .9rem; color: var(--muted); }
.board-stats strong, .thread-stats strong { color: var(--text); }
.board-last { display: flex; flex-direction: column; font-size: .9rem; min-width: 0; }
.board-last > a { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-row { grid-template-columns: minmax(0, 1fr) 100px 150px; }
.thread-row .muted { margin: 0; font-size: .9rem; }
.thread-row.pinned { background: linear-gradient(90deg, var(--steel-tint), transparent 60%); }
.thread-row.pending { background: rgba(214,164,65,.06); }
.thread-stats { font-size: .9rem; color: var(--muted); }
.thread-last { font-size: .88rem; text-align: right; }
.thread-last a { color: var(--muted); }
.stats-bar { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .92rem; color: var(--muted); }
.stats-bar strong { color: var(--text); }

.board-head, .thread-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.board-head .page-title, .thread-head .page-title { margin: 0; }
.board-head p { margin: 4px 0 0; }
.thread-head .page-title { flex: 1 1 400px; font-size: 2rem; }
.thread-head .page-title .tag { font-size: .8rem; vertical-align: .4em; }
.thread-tools .menu-panel { min-width: 260px; }
.move-form { border-top: 1px solid var(--line); margin-top: 6px !important; padding: 8px 6px 4px; display: grid; gap: 8px; }
.move-form label { font-size: .85rem; color: var(--muted); display: grid; gap: 4px; }
.move-form button { background: var(--line) !important; text-align: center !important; }

/* ---------- Pagination ---------- */
.pages { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0; }
.pages a, .pages span { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius); padding: 0 10px; }
.pages a { background: var(--panel); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.pages a:hover { border-color: var(--steel); }
.pages .current { background: var(--steel-deep); color: #fff; font-weight: 700; }
.pages .gap { color: var(--muted); }

/* ---------- Posts ---------- */
.posts { display: grid; gap: 14px; }
.post { display: grid; grid-template-columns: 170px minmax(0, 1fr); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; scroll-margin-top: 16px; }
.post:target { border-color: var(--steel); box-shadow: 0 0 0 1px var(--steel); }
.post.pending { border-style: dashed; border-color: #6b5728; }
.post-author { background: var(--panel-2); padding: 18px 14px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; border-right: 1px solid var(--line); }
.author-info { display: flex; flex-direction: column; align-items: center; gap: 3px; word-break: break-word; }
.post-content { padding: 14px 20px 12px; display: flex; flex-direction: column; min-width: 0; }
.post-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: .85rem; margin-bottom: 10px; }
.post-meta a { text-decoration: none; }
.post-body { overflow-wrap: anywhere; flex: 1; max-width: 75ch; }
.post-body blockquote, .report-preview {
  margin: .4em 0 .8em; padding: 10px 14px; border-left: 3px solid var(--steel-deep);
  background: rgba(0,0,0,.18); border-radius: 0 var(--radius) var(--radius) 0; color: #cfd5dc;
}
.post-body blockquote cite, .report-preview cite { display: block; font-style: normal; font-weight: 600; font-size: .85rem; color: var(--steel); margin-bottom: 4px; }
.post-body a { overflow-wrap: anywhere; }
.spoiler { background: rgba(0,0,0,.2); border: 1px dashed var(--line); border-radius: var(--radius); padding: 6px 12px; margin: .4em 0; }
.spoiler summary { cursor: pointer; color: var(--amber); font-weight: 600; }
.post-body.quoted { background: rgba(0,0,0,.15); padding: 10px 14px; border-radius: var(--radius); margin: 10px 0; }
.post-actions { display: flex; flex-wrap: wrap; gap: 16px; font-size: .88rem; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.post-actions a { color: var(--muted); text-decoration: none; }
.post-actions a:hover { color: var(--text); text-decoration: underline; }
.post-actions .report-link { margin-left: auto; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 14px; }
.form-compact { gap: 10px; margin-top: 10px; }
.form-panel { max-width: 520px; margin-left: auto; margin-right: auto; }
.form-panel.wide { max-width: 860px; }
label { display: grid; gap: 5px; font-weight: 600; font-size: .95rem; }
label small { font-weight: 400; color: var(--muted); font-size: .85rem; }
input[type=text], input:not([type]), input[type=email], input[type=password], input[type=date], input[type=number], input[type=search], select, textarea {
  width: 100%; background: var(--input); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; font: 400 1rem var(--body); min-height: 44px;
}
input:focus, select:focus, textarea:focus { border-color: var(--steel); outline: none; box-shadow: 0 0 0 3px var(--steel-glow); }
input[type=date] { color-scheme: dark; }
input.num { width: 90px; display: inline-block; margin: 0 6px; }
textarea { resize: vertical; line-height: 1.5; }
textarea.editor { min-height: 140px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--steel-deep); }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.row > label { flex: 1 1 180px; }
.row > .check { flex: 0 1 auto; }
.radios { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.radios legend { font-weight: 600; margin-bottom: 8px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.format-help { font-size: .88rem; color: var(--muted); }
.format-help summary { cursor: pointer; }
.format-help ul { margin: 8px 0 0; padding-left: 20px; }
.checks { list-style: none; padding: 0; margin: 0 0 16px; }
.checks .ok { color: var(--green); }
.checks .bad { color: var(--red); }
.delete-own { margin-top: 18px; text-align: right; }

/* ---------- Profile & settings ---------- */
.profile-card { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; position: relative; }
.profile-card h1 { margin: 0 0 4px; }
.profile-card .user-title { font-size: .95rem; margin-bottom: 4px; }
.profile-card p { margin: 0 0 4px; }
.profile-edit { position: absolute; top: 16px; right: 16px; }
.stats { display: flex; gap: 18px; color: var(--muted); }
.stats strong { color: var(--text); }
.recent-list { list-style: none; margin: 0; padding: 0; }
.recent-list li { padding: 12px 0; border-top: 1px solid var(--line); }
.recent-list li:first-child { border-top: 0; padding-top: 0; }
.recent-list p { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.staff-box { border-color: var(--steel-deep); }
.staff-box form + form { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.settings-grid .panel { margin: 0; }
.avatar-row { display: flex; gap: 16px; align-items: center; }
.danger-zone { border-color: #6a3432; }

/* ---------- Mod & admin ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 600; }
.tabs a.active { color: var(--text); border-color: var(--steel); }
.tabs .count { background: var(--line); }
.queue-item.urgent { border-color: var(--red); }
.queue-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 10px; font-size: .92rem; }
.queue-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 0; }
.report-close { display: flex; flex-wrap: wrap; gap: 8px; }
.report-close input { width: auto; flex: 1 1 180px; min-height: 36px; padding: 6px 10px; }
.report-details { font-size: .95rem; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-cat-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.admin-cat-head h2 { margin: 0; }
.order-btns { display: flex; gap: 4px; margin: 0; }
.order-btns button { width: 36px; height: 36px; border-radius: var(--radius); background: var(--panel-2); color: var(--text); border: 1px solid var(--line); cursor: pointer; font-size: 1rem; }
.order-btns button:disabled { opacity: .3; cursor: default; }
.admin-edit { margin-top: 8px; }
.admin-edit > summary { cursor: pointer; color: var(--steel); font-size: .92rem; font-weight: 600; padding: 4px 0; }
.admin-edit.add { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.admin-boards { list-style: none; margin: 14px 0 0; padding: 0; }
.admin-boards > li { padding: 12px 0; border-top: 1px solid var(--line); }
.admin-board-row { display: flex; gap: 12px; align-items: center; }
.admin-board-row .badge { margin-left: 4px; }
.board-delete { border-top: 1px solid var(--line); padding-top: 10px; }
.search-form { display: flex; flex-wrap: wrap; gap: 10px; }
.search-form input { flex: 1 1 200px; width: auto; }
.search-form select { width: auto; }

/* ---------- Rules & privacy ---------- */
.prose { max-width: 760px; margin-left: auto; margin-right: auto; padding: 28px; }
.prose h2 { margin-top: 1.4em; }
.prose li { margin-bottom: .45em; }
.prose ol, .prose ul { padding-left: 22px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 22px 0 28px; font-size: .9rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 6px; }
.footer-links a { color: var(--text); }

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .hide-sm { display: none !important; }
  .show-sm { display: block !important; }
  .header-inner { min-height: 58px; }
  .brand img { height: 42px; }
  h1, .page-title { font-size: 1.75rem; }
  .thread-head .page-title { font-size: 1.6rem; }
  .panel { padding: 16px; }
  .board-row, .thread-row { grid-template-columns: 1fr; gap: 6px; padding: 14px; }
  .board-stats { flex-direction: row; gap: 14px; }
  .board-last { flex-direction: row; flex-wrap: wrap; gap: 0 8px; color: var(--muted); }
  .board-last > a { max-width: 100%; }
  .thread-row { grid-template-columns: 1fr auto; }
  .thread-main { grid-column: 1 / -1; }
  .thread-last { text-align: right; }
  .thread-last br { display: none; }
  .post { grid-template-columns: 1fr; }
  .post-author { flex-direction: row; text-align: left; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 14px; }
  .post-author .avatar { width: 40px !important; height: 40px !important; font-size: 18px !important; }
  .author-info { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
  .author-info .user-title { display: inline; }
  .post-content { padding: 12px 14px 10px; }
  .profile-edit { position: static; }
  .settings-grid { grid-template-columns: 1fr; }
  .prose { padding: 20px 16px; }
  .table thead { display: none; }
  .table tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .table td { display: block; border: 0; padding: 2px 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .menu[open] .menu-panel { animation: drop .14s ease-out; }
  @keyframes drop { from { opacity: 0; transform: translateY(-4px); } }
}

/* ================= Phase 2: feds, shows, videos ================= */
.top-nav > a.here { background: rgba(0,0,0,.09); }
.sub-nav { display: none; background: #000; }
.sub-nav a { flex: 1; text-align: center; padding: 10px 4px; color: #cfd5dc; text-decoration: none; font-weight: 600; font-size: .95rem; border-bottom: 3px solid transparent; }
.sub-nav a.here { color: #fff; border-color: var(--steel); }

.filter-bar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; margin-bottom: 18px; }
.filter-bar > label:not(.check) { min-width: 220px; }
.my-feds { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 12px 16px; }
.plain { list-style: none; margin: 0; padding: 0; }
.num-year { max-width: 110px; }
.link-fields { border: 0; margin: 0; padding: 0; display: grid; gap: 12px; }
.link-fields legend { font-weight: 600; margin-bottom: 8px; }

/* Fed logos: squared-off, like a fed's patch */
.fed-logo { border-radius: 8px; object-fit: contain; background: var(--band); flex: none; display: inline-block; vertical-align: middle; }
img.fed-logo { background: #000; } /* transparent logos sit on black */
.fed-logo-text {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--band); color: #111; font-family: var(--display); line-height: 1;
  -webkit-text-stroke: 0; letter-spacing: .02em;
}

.fed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.fed-card {
  display: flex; gap: 14px; align-items: center; padding: 14px; text-decoration: none; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.fed-card:hover { border-color: var(--steel); color: var(--text); }
.fed-card.closed { opacity: .7; }
.fed-card-body { display: flex; flex-direction: column; min-width: 0; }
.fed-card-name { font-family: var(--display); font-size: 1.3rem; line-height: 1.15; }
.fed-card-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .88rem; color: var(--muted); margin-top: 4px; }
.next-show { color: var(--steel); font-weight: 600; }

.fed-hero {
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center; margin-bottom: 18px;
  padding: 20px; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(90deg, var(--panel-2), var(--mat));
}
.fed-hero .fed-logo { box-shadow: 0 0 0 3px #000, 0 0 0 4px var(--steel-deep); }
.fed-hero-text { flex: 1 1 260px; }
.fed-hero h1 { font-size: clamp(2rem, 6vw, 3rem); margin-bottom: .1em; color: #fff; text-shadow: 2px 2px 0 #000; }
.fed-where { color: var(--muted); margin-bottom: .4em; }
.fed-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.fed-links a { padding: 4px 10px; border: 1px solid var(--line); border-radius: 20px; font-size: .88rem; text-decoration: none; color: var(--text); }
.fed-links a:hover { border-color: var(--steel); }
.fed-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fed-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.fed-side .panel h2, .fed-main .panel h2 { font-size: 1.25rem; }
.champs { border-color: var(--steel-deep); background: linear-gradient(180deg, var(--steel-tint), var(--panel) 70%); }
.champs li { padding: 8px 0; border-top: 1px solid var(--line); }
.champs li:first-child { border-top: 0; padding-top: 0; }
.belt { display: block; font-size: .8rem; color: var(--amber); font-weight: 600; }
.roster { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 16px; }
.roster li { break-inside: avoid; padding: 5px 0; }
.roster li span { display: block; }
.roster .inactive strong { color: var(--muted); font-weight: 500; }
.team-list li { padding: 4px 0; }
.team-role select { width: auto; min-height: 36px; padding: 4px 8px; }

/* Show dates: a ticket stub */
.date-block {
  display: inline-flex; flex-direction: column; align-items: center; flex: none;
  width: 58px; border-radius: 6px; overflow: hidden; background: var(--band); color: #111; line-height: 1;
  box-shadow: 0 2px 0 #000;
}
.date-block .d-mon { width: 100%; background: var(--steel-deep); color: #fff; font: 600 .72rem/1 var(--body); text-align: center; padding: 4px 0; text-transform: uppercase; }
.date-block .d-day { font: 1.6rem/1 var(--display); padding: 4px 0 1px; }
.date-block .d-dow { font-size: .7rem; font-weight: 600; color: #444; padding-bottom: 5px; }
.date-block.cancelled { opacity: .5; }
.event-list { list-style: none; margin: 0; padding: 0; }
.event-list.panel { padding: 0; overflow: hidden; }
.event-list li + li { border-top: 1px solid var(--line); }
.event-row { display: flex; gap: 14px; align-items: center; padding: 12px 0; color: var(--text); text-decoration: none; }
.event-list.panel .event-row { padding: 12px 16px; }
.event-row:hover strong { text-decoration: underline; }
.event-row strong + .tag, .event-row .tag { margin-left: 4px; }
.event-row .muted { display: block; font-size: .9rem; }
.event-row .fed-logo { margin-left: auto; }
.month-title { font-size: 1.3rem; margin: 22px 0 8px; }
.month:first-of-type .month-title { margin-top: 0; }

.coming-up { margin-bottom: 26px; }
.coming-up .cat-head p a { color: var(--steel); }
.show-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.show-strip a { display: flex; gap: 12px; align-items: center; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; height: 100%; }
.show-strip a:hover { border-color: var(--steel); }
.show-strip strong { display: block; line-height: 1.25; }
.show-strip .muted { display: block; font-size: .88rem; }

.event-head { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.event-head .date-block { width: 72px; }
.event-head .date-block .d-day { font-size: 2rem; }
.event-head h1 { margin-bottom: .2em; }
.event-head p { margin: 0 0 4px; }
.event-fed a { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; text-decoration: none; }
.results-reveal > summary { cursor: pointer; font-family: var(--display); font-size: 1.3rem; color: var(--amber); list-style: none; }
.results-reveal > summary::-webkit-details-marker { display: none; }
.results-reveal > summary::before { content: "▸ "; }
.results-reveal[open] > summary::before { content: "▾ "; }
.results-reveal[open] > summary { margin-bottom: 12px; }

/* Tap-to-play videos */
.embed { position: relative; max-width: 560px; margin: .6em 0; border-radius: var(--radius); overflow: hidden; background: #000; border: 1px solid var(--line); }
.embed-yt { aspect-ratio: 16 / 9; }
.embed-tt { width: 100%; max-width: 330px; aspect-ratio: 9 / 16; background: radial-gradient(circle at 50% 40%, var(--panel-2), #000 75%); }
.embed img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .85; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-play {
  position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; border-radius: 50%;
  background: rgba(0,0,0,.65); border: 3px solid #fff; cursor: pointer;
}
.embed-play span { display: block; width: 0; height: 0; margin-left: 27px; border-style: solid; border-width: 13px 0 13px 22px; border-color: transparent transparent transparent #fff; }
.embed-play:hover { background: var(--steel-deep); }
.embed-label { position: absolute; top: 12px; left: 12px; color: #fff; font-weight: 600; font-size: .85rem; }
.embed-link { position: absolute; bottom: 8px; right: 10px; font-size: .78rem; color: #fff !important; background: rgba(0,0,0,.6); padding: 3px 8px; border-radius: 4px; text-decoration: none; }
.embed.playing .embed-link { display: none; }

@media (max-width: 760px) {
  .sub-nav.show-sm-flex { display: flex; }
  .fed-layout { grid-template-columns: 1fr; }
  .fed-hero { padding: 16px; }
  .fed-hero .fed-logo { width: 80px !important; height: 80px !important; }
  .fed-grid { grid-template-columns: 1fr; }
  .roster { columns: 1; }
  .filter-bar > label:not(.check) { min-width: 0; flex: 1 1 100%; }
  .event-row .fed-logo { display: none; }
}

/* ================= Phase 3: notifications, messages, likes, badges, search ================= */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon-link { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius); color: var(--band-ink); }
.icon-link:hover { background: rgba(0,0,0,.07); color: #000; }
.icon-link svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-link .count { position: absolute; top: 2px; right: 0; min-width: 18px; line-height: 18px; font-size: .68rem; padding: 0 4px; border: 2px solid var(--band); box-sizing: content-box; }

.thread-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.thread-actions form { margin: 0; }
[aria-pressed="true"].btn-ghost { border-color: var(--steel); color: var(--steel); }

/* Likes */
.like-btn { display: inline-flex; align-items: center; gap: 4px; background: none; border: 1px solid var(--line); border-radius: 20px; padding: 2px 10px; color: var(--muted); font: inherit; font-size: .88rem; cursor: pointer; min-height: 30px; }
.like-btn:hover { border-color: #e07a86; color: #e07a86; }
.like-btn.on { color: #fff; background: #9c3643; border-color: #9c3643; }
.like-static { color: var(--muted); font-size: .88rem; }
.post-actions { align-items: center; }

/* Ranks & awarded badges */
.rank { display: inline-block; font: .95rem/1.1 var(--display); letter-spacing: .03em; color: var(--steel); }
.stats .rank { font-size: 1.05rem; }
.awards { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin: 2px 0; }
.profile-card .awards { justify-content: flex-start; margin: 6px 0; }
.award {
  display: inline-block; font: 600 .7rem/1 var(--body); padding: 4px 8px; border-radius: 3px;
  color: var(--c); border: 1px solid var(--c); background: color-mix(in srgb, var(--c) 14%, transparent);
}
.profile-actions { margin-top: 10px; }
.profile-actions form { margin: 0; }
.color-in { width: 64px !important; padding: 4px !important; }

/* Notifications */
.notif-list, .conv-list { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.notif-list li + li, .conv-list li + li { border-top: 1px solid var(--line); }
.notif-list a, .conv-list a { display: flex; gap: 12px; align-items: center; padding: 12px 16px; color: var(--text); text-decoration: none; }
.notif-list a:hover, .conv-list a:hover { background: var(--panel-2); }
.notif-list li.unread, .conv-list li.unread { background: var(--steel-tint); box-shadow: inset 3px 0 0 var(--steel); }
.notif-icon { width: 28px; height: 28px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--panel-2); color: var(--steel); font-weight: 700; }
.notif-like { color: #e07a86; }
.notif-approved { color: var(--green); }
.notif-badge, .notif-fed { color: var(--amber); }
.notif-text { display: flex; flex-direction: column; min-width: 0; }
.panel.notif-list, .panel.conv-list { padding: 0; }

/* Messages */
.conv-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.conv-top { display: flex; justify-content: space-between; gap: 10px; }
.conv-text .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.conv-list li.unread strong { color: #fff; }
.messages { display: grid; gap: 10px; margin-bottom: 16px; }
.msg { max-width: 640px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px 12px 12px 4px; padding: 10px 14px; }
.msg.mine { justify-self: end; background: var(--mine); border-color: var(--steel-deep); border-radius: 12px 12px 4px 12px; }
.msg.reported { box-shadow: 0 0 0 2px var(--red); }
.msg-head { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-bottom: 6px; font-size: .92rem; }
.msg-head .report-link { margin-left: auto; color: var(--muted); }
.msg .post-body { max-width: none; }

/* Search */
.search-extras { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.search-extras .team-list a { display: inline-flex; gap: 6px; align-items: center; }
mark { background: rgba(214,164,65,.35); color: #fff; padding: 0 1px; border-radius: 2px; }
.search-results { padding: 16px 20px; }

@media (max-width: 760px) {
  .icon-link { width: 36px; height: 36px; }
  .top-nav { gap: 0; }
  .msg { max-width: 92%; }
  .awards { justify-content: flex-start; }
}
@media (max-width: 380px) {
  .brand img { height: 34px; }
}

/* Pop-up notice */
.announce { padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--text); width: 100%; max-width: min(92vw, 560px); }
.announce::backdrop { background: rgba(0, 0, 0, .78); }
.announce-inner { position: relative; }
.announce img { display: block; width: 100%; max-height: 72vh; object-fit: contain; background: #000; }
.announce-body { padding: 16px 20px 20px; text-align: center; }
.announce-body h2 { margin: 0 0 6px; }
.announce-body p { margin: 0 0 12px; }
.announce-body p:last-child { margin-bottom: 0; }
.announce-close { position: absolute; top: 8px; right: 8px; z-index: 1; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.announce-close:hover { background: #000; }
.announce-preview { display: block; max-width: 280px; max-height: 280px; border-radius: var(--radius); background: #000; }

/* Formatting buttons above post boxes */
.editor-tools { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 6px; }
.editor-tools button { min-width: 38px; height: 34px; padding: 0 10px; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); font: inherit; font-size: .9rem; cursor: pointer; }
.editor-tools button:hover { border-color: var(--muted); }
.editor-tools .tool-bold { font-weight: 700; }
.editor-tools .tool-italic { font-style: italic; }
.editor-tools .tool-strike { text-decoration: line-through; }
textarea.editor.editor-small { min-height: 80px; }

/* Signatures under posts */
.signature { margin-top: 16px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: .9rem; color: var(--muted); overflow-wrap: anywhere; }
.signature img { display: block; max-width: 100%; max-height: 300px; height: auto; margin-bottom: 6px; }
.signature-preview { display: block; max-width: 100%; max-height: 160px; border-radius: var(--radius); }
.signature a { color: var(--steel); }

/* Picture cropper (profile pictures) */
.cropper { margin: 4px 0 8px; }
.crop-view { position: relative; width: 240px; height: 240px; overflow: hidden; background: #000; border-radius: var(--radius); touch-action: none; cursor: grab; user-select: none; }
.crop-view:active { cursor: grabbing; }
.crop-view img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; }
.crop-circle::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 200px rgba(0, 0, 0, .6); border: 2px solid rgba(255, 255, 255, .7); pointer-events: none; }
.crop-zoom { display: flex; align-items: center; gap: 10px; width: 240px; margin-top: 8px; }
.crop-zoom input { flex: 1; }

/* Pictures from other websites in posts */
.post-img-link { display: inline-block; max-width: 100%; }
.post-img { display: block; max-width: 100%; max-height: 600px; height: auto; border-radius: var(--radius); margin: 6px 0; }
.img-hidden { display: inline-block; padding: 6px 10px; margin: 4px 0; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); font-size: .9rem; }
.signature .post-img { max-height: 300px; }

/* "Online now" list under the forum stats */
.online-list { flex-basis: 100%; margin: 0; }
.online-hidden { font-style: italic; opacity: .75; }

/* Members page */
.stats-link { color: inherit; }
.stats-link:hover { color: var(--text); }
.member-list { list-style: none; padding: 0; }
.member-list li { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.member-list li:last-child { border-bottom: 0; }
.member-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.member-dates { text-align: right; white-space: nowrap; }
@media (max-width: 560px) { .member-dates { display: none; } }

/* Logo preview in Admin > Settings, on the same grey band as the real header */
.logo-preview { display: inline-block; padding: 10px 16px; background: var(--band); border-radius: var(--radius); line-height: 0; }
.logo-preview img { height: 56px; width: auto; max-width: 100%; }

/* Videos */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.video-card .embed { max-width: 100%; margin: 0 0 8px; }
.video-card .embed-tt { max-width: 100%; aspect-ratio: 16 / 9; }
.video-card h3 { margin: 0 0 2px; font-size: 1.02rem; }
.video-card p { margin: 0; }
.video-page .embed { max-width: 900px; }
.video-actions { margin-top: 12px; align-items: center; }
.embed-plain { background: radial-gradient(circle at 50% 40%, var(--panel-2), #000 75%); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.section-head h2 { margin: 0; }

/* Video dates and comments */
.video-date { margin: 18px 0 10px; font-size: 1rem; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.video-date:first-child { margin-top: 0; }
.comments .comment { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.comments .comment:first-of-type { border-top: 0; }
.comment-main { flex: 1; min-width: 0; }
.comment-main .post-body { margin: 4px 0; }
.comment-actions { display: flex; gap: 12px; align-items: center; }
.comment-form { margin-top: 14px; }

/* Fed short names */
.fed-short { margin: -4px 0 4px; font-family: var(--display); font-size: 1.3rem; letter-spacing: .04em; color: var(--steel); }
.fed-short-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px solid var(--line); border-radius: 4px; font-size: .78rem; color: var(--muted); vertical-align: middle; }
input.short-name { max-width: 10em; }

/* ---------- Colour themes ----------
   Picked with the dots in the footer and remembered in a cookie. Each theme only changes the colour settings;
   "steel" is the default at the top of this file. The grey logo banner stays the same in all of them. */
html[data-theme="blood"] {
  --mat: #1c1718; --panel: #272021; --panel-2: #30282a; --line: #46383a; --muted: #b0a2a3;
  --steel: #e8847f; --steel-deep: #a3393a; --steel-hover: #b94647; --steel-tint: rgba(163,57,58,.18); --steel-glow: rgba(232,132,127,.25);
  --input: #161112; --mine: #45262a;
}
html[data-theme="gold"] {
  --mat: #1b1a15; --panel: #25231c; --panel-2: #2e2b22; --line: #453f2e; --muted: #aaa494;
  --steel: #dcb85c; --steel-deep: #7d631f; --steel-hover: #957626; --steel-tint: rgba(220,184,92,.13); --steel-glow: rgba(220,184,92,.25);
  --input: #14130f; --mine: #3d3520;
}
html[data-theme="toxic"] {
  --mat: #161c18; --panel: #1f2822; --panel-2: #27322b; --line: #36463b; --muted: #9bab9f;
  --steel: #7fd494; --steel-deep: #2f7a48; --steel-hover: #399156; --steel-tint: rgba(47,122,72,.2); --steel-glow: rgba(127,212,148,.25);
  --input: #101511; --mine: #1f3d2a;
}
html[data-theme="royal"] {
  --mat: #1a1822; --panel: #24212f; --panel-2: #2c2939; --line: #3f3a51; --muted: #a59fb5;
  --steel: #b9a0e6; --steel-deep: #6a4fa3; --steel-hover: #7d60bd; --steel-tint: rgba(106,79,163,.2); --steel-glow: rgba(185,160,230,.25);
  --input: #13111a; --mine: #332a4d;
}
html[data-theme="midnight"] {
  --mat: #0a0c0f; --panel: #13171c; --panel-2: #1a1f26; --line: #29303a; --muted: #8f99a6;
  --input: #06080a; --mine: #1b2a3d;
}

/* Theme picker in the footer */
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.footer-inner p:last-child { margin-bottom: 0; }
.theme-picker { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.theme-dot { width: 24px; height: 24px; padding: 0; border-radius: 50%; border: 2px solid var(--line); background: var(--dot); cursor: pointer; }
.theme-dot:hover { border-color: var(--muted); }
.theme-dot[aria-pressed="true"] { border-color: #fff; box-shadow: 0 0 0 2px var(--mat), 0 0 0 4px var(--dot); }
/* In the red theme, danger buttons need to look different from normal ones. */
html[data-theme="blood"] .btn-danger { background: #2a1113; border-color: #e8847f; color: #f3a29f; }
html[data-theme="blood"] .btn-danger:hover { background: #3d171a; color: #fff; }

/* Form rows where some boxes have hint text underneath: line the labels and boxes up along the top. */
.row.row-top { align-items: flex-start; }

/* "New" markers for unread boards, threads and posts */
.tag-new { color: #fff; background: var(--steel-deep); border-color: var(--steel-deep); text-decoration: none; }
a.tag-new:hover { background: var(--steel-hover); color: #fff; }
.board-row.unread, .thread-row.unread { box-shadow: inset 3px 0 0 var(--steel); }
.board-row.unread h3 a:not(.tag), .thread-row.unread h3 a:not(.tag) { font-weight: 700; }
.read-bar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin: 0 0 10px; }

/* Reactions */
.react-form { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.like-btn.empty { opacity: .5; }
.like-btn.empty:hover, .like-btn.empty:focus-visible { opacity: 1; }
.like-static > span { margin-right: 8px; }

/* Polls */
.poll h2 { font-size: 1.25rem; }
.poll-options { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.poll-options label { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; }
.poll-options input[type=radio] { width: auto; flex: none; }
.poll-label { flex: 1; min-width: 0; }
.poll-options li.mine .poll-label { font-weight: 700; }
.poll-bar { display: block; height: 8px; margin-top: 4px; background: var(--input); border-radius: 4px; overflow: hidden; }
.poll-bar span { display: block; height: 100%; background: var(--steel-deep); border-radius: 4px; }
.poll-options li.mine .poll-bar span { background: var(--steel); }
.poll-foot { align-items: center; }
.poll-manage { margin-top: 10px; display: flex; gap: 16px; font-size: .88rem; }
.poll-new { margin: 4px 0 8px; }
.poll-new summary { cursor: pointer; color: var(--steel); font-weight: 600; }
.poll-new[open] summary { margin-bottom: 10px; }

/* Posts by members you've blocked */
.blocked-post summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.blocked-post[open] summary { margin-bottom: 8px; }

/* Post preview */
.editor-tools .tool-preview { margin-left: auto; color: var(--steel); }
.preview-box { margin-top: 8px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--panel-2); font-weight: 400; }

/* Staff notes and warnings on profiles */
.note-list li { padding: 8px 10px; margin-bottom: 6px; border-left: 3px solid var(--line); background: var(--panel-2); border-radius: 0 var(--radius) var(--radius) 0; overflow-wrap: anywhere; }
.note-list li.note-warning { border-left-color: var(--amber); }

/* "Claim this fed" box on fed pages nobody owns yet */
.claim-box { border-color: var(--steel-deep); }
.claim-box p { margin-bottom: 8px; }
.claim-box summary { list-style: none; cursor: pointer; display: inline-flex; }
.claim-box summary::-webkit-details-marker { display: none; }
.claim-box details[open] summary { margin-bottom: 10px; }
.icon-preview { width: 64px; height: 64px; border-radius: 12px; background: var(--band); object-fit: contain; flex: none; }
.icon-preview-apple { border-radius: 14px; background: none; }
