:root {
  --navy: #1a2744;
  --navy-2: #243556;
  --steel: #4a5d78;
  --amber: #e08a1e;
  --amber-2: #c56f0d;
  --cream: #f3efe6;
  --paper: #fffcf6;
  --ink: #141b28;
  --muted: #5c6b82;
  --line: #d9d2c4;
  --danger: #b42318;
  --ok: #2c6b3c;
  --shadow: 0 10px 30px rgba(26, 39, 68, 0.08);
  --radius: 14px;
  --max: 1100px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Arial Narrow", "Franklin Gothic Medium", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--amber-2); }
.brand-bar {
  height: 5px;
  background: linear-gradient(90deg, var(--navy) 0 34%, #f4f1ea 34% 66%, var(--amber) 66% 100%);
}
.header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner, .footer-inner, .wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 62px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.logo:hover { color: var(--amber); }
.logo svg { width: 34px; height: 34px; }
.nav { display: flex; gap: 14px; flex: 1; }
.nav a { color: #dbe4f3; font-weight: 600; font-size: 0.95rem; }
.nav a.active, .nav a:hover { color: var(--amber); }
.header-actions { display: flex; gap: 10px; align-items: center; }
.chip {
  background: var(--navy-2);
  border: 1px solid #3a4d70;
  color: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.82rem;
  cursor: pointer;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.95rem;
}
.btn-amber { background: var(--amber); color: #1a1408; }
.btn-amber:hover { background: var(--amber-2); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-ghost { background: transparent; color: inherit; border: 1px solid var(--line); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-small { padding: 6px 10px; font-size: 0.82rem; }
main { flex: 1; padding: 22px 0 80px; }
.hero {
  background: var(--navy);
  color: #fff;
  padding: 28px 0 32px;
  margin-top: -22px;
  margin-bottom: 22px;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 8px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.hero p { margin: 0; color: #c9d4e8; max-width: 46rem; }
.grid { display: grid; gap: 16px; }
.cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.cover {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: #e7e1d4;
  display: block;
}
.cover-ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, #ece6d8 0%, #ddd4c2 100%);
  color: var(--steel);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cover-ph img {
  width: 40px;
  height: 40px;
  opacity: 0.9;
}
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.muted { color: var(--muted); font-size: 0.9rem; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  background: #ece6d8;
  color: var(--navy);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.badge-amber { background: #f6e2c2; color: #7a4a00; }
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.input, select.input, textarea.input {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}
.input-otp { letter-spacing: 0.4em; font-size: 1.4rem; text-align: center; }
label { font-weight: 600; display: block; margin: 10px 0 4px; }
.form-card { max-width: 560px; margin: 0 auto; padding: 22px; }
.disclaimer {
  background: #fff7e6;
  border: 1px solid #efd7a5;
  color: #5c430c;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.88rem;
}
.footer {
  background: var(--navy);
  color: #c9d4e8;
  padding: 22px 0 90px;
  font-size: 0.88rem;
}
.footer a { color: #f0d09a; text-decoration: underline; text-underline-offset: 3px; }
.footer-grid { display: grid; gap: 10px; }
.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.legal-links a {
  display: inline-flex;
  align-items: center;
  background: var(--amber);
  color: #1a1408 !important;
  text-decoration: none !important;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #c56f0d;
}
.legal-links a:hover,
.legal-links a:focus {
  background: #fff;
  color: var(--navy) !important;
}
.prose .legal-links a {
  color: #1a1408 !important;
}
.legal-banner {
  background: #fff3d6;
  border: 2px solid var(--amber);
  color: #3d2a08;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 18px;
  font-size: 0.95rem;
  line-height: 1.45;
}
.legal-banner a {
  color: var(--amber-2);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-ack {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  column-gap: 10px;
  align-items: start;
  background: #fff7e6;
  border: 1px solid #efd7a5;
  border-radius: 10px;
  padding: 12px;
  margin: 12px 0;
  font-weight: 600;
  line-height: 1.45;
}
.legal-ack:not(:has(> input)) {
  display: block;
}
.legal-ack input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.2rem 0 0;
  flex-shrink: 0;
}
.legal-ack span { min-width: 0; }
.legal-ack a {
  display: inline;
  text-decoration: underline;
  font-weight: 800;
  white-space: nowrap;
}
.designer-credit {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.designer-credit-main {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.5;
  color: rgba(201, 212, 232, 0.55);
}
.designer-credit-main a {
  color: rgba(240, 208, 154, 0.95);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.designer-credit-main a:hover,
.designer-credit-main a:focus {
  color: var(--amber);
  border-bottom-color: rgba(224, 138, 30, 0.55);
}
.designer-credit-sep { margin: 0 0.35rem; opacity: 0.5; }
.designer-credit-tag {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(201, 212, 232, 0.4);
}
@media (max-width: 575px) {
  .designer-credit-sep { display: none; }
  .designer-credit-tag { display: block; margin-top: 0.2rem; }
}
.messages { list-style: none; padding: 0 16px; max-width: var(--max); margin: 12px auto 0; }
.messages li { padding: 10px 12px; border-radius: 10px; margin-bottom: 8px; }
.messages .success { background: #e5f4ea; }
.messages .error { background: #fde8e6; }
.messages .info { background: #eef3fb; }
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  z-index: 30;
}
.bottom-nav a {
  flex: 1;
  text-align: center;
  padding: 10px 4px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--steel);
}
.bottom-nav a.active { color: var(--amber-2); }
.thread { display: flex; flex-direction: column; gap: 8px; min-height: 50vh; }
.bubble {
  max-width: 80%;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
}
.bubble.mine { margin-left: auto; background: #1a2744; color: #fff; border-color: #1a2744; }
.bubble.system { margin: 0 auto; background: #fff7e6; font-size: 0.86rem; text-align: center; max-width: 90%; }
.photo-row { display: flex; gap: 8px; overflow-x: auto; }
.photo-row img { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; }
.area-form { display: none; }
.area-form.open { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 16px 14px; background: var(--navy-2); }
.area-form .input { max-width: 140px; }
.split { display: grid; gap: 18px; }
@media (min-width: 860px) {
  .split-2 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
  .nav, .header-actions .hide-sm { display: none; }
  .bottom-nav { display: flex; }
  .footer { padding-bottom: 100px; }
}
.prose { max-width: 760px; }
.prose h1, .prose h2 { font-family: var(--display); text-transform: uppercase; }
.prose h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 0.4rem; }
.prose h2 { margin-top: 1.6rem; color: var(--navy); }
.prose p, .prose li { line-height: 1.55; }
.prose a {
  color: var(--amber-2);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prose a:hover { color: var(--navy); }
.prose .toc {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 0 0 20px;
}
.prose .toc a { margin-right: 10px; }
.prose .version { font-weight: 700; color: var(--steel); }
.unread {
  background: var(--amber);
  color: #1a1408;
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 0.7rem;
}
altcha-widget { display: block; margin: 8px 0; }
.mod-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
  padding: 10px 12px;
  background: #3b1212;
  color: #f6d5d5;
  border-radius: 10px;
}
.mod-bar strong { margin-right: 6px; }
.mod-bar form { display: inline; }
.report-form {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  max-width: 420px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 28px 0 12px;
}
.section-head h2 { margin: 0; }
.profile-hub section { margin-bottom: 8px; }
.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--amber);
  background: var(--navy);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}
.avatar-sm { width: 44px; height: 44px; border-width: 2px; font-size: 0.9rem; }
.avatar-lg { width: 128px; height: 128px; font-size: 2rem; }
.avatar-placeholder { text-transform: uppercase; }
.avatar-field { display: flex; align-items: center; gap: 14px; margin: 8px 0; }
.profile-head { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.hauler-id { display: flex; align-items: center; gap: 10px; }
#id_hitch_types {
  list-style: none;
  padding: 0;
  margin: 6px 0 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
}
#id_hitch_types label {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
#id_hitch_types input { width: auto; }
