:root {
  --ink: #f7fbff;
  --muted: #b7c2c9;
  --panel: #24282b;
  --panel-2: #1d2529;
  --line: rgba(255, 255, 255, .1);
  --purple: #078ee9;
  --purple-bright: #45b8ff;
  --purple-dark: #045f9d;
  --green: #4ade80;
  --red: #fb7185;
  --black: #15191b;
  --shadow: 0 24px 80px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--black);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  height: 74px;
  padding: 0 clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 12, 17, .88);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .14em;
}

.brand-mark {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--purple-bright), var(--purple-dark));
  clip-path: polygon(50% 0, 95% 24%, 86% 77%, 50% 100%, 14% 77%, 5% 24%);
  filter: drop-shadow(0 0 14px rgba(139, 92, 246, .45));
}
.brand-mark > span {
  width: 17px;
  height: 18px;
  display: block;
  background: white;
  clip-path: polygon(0 0, 33% 19%, 50% 8%, 67% 19%, 100% 0, 84% 64%, 50% 100%, 16% 64%);
}
.brand-small { font-size: 15px; }
.brand-small .brand-mark { width: 27px; height: 27px; }

.header-actions, .hero-buttons, .editor-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.button {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary {
  background: linear-gradient(135deg, var(--purple), #6d3bd1);
  box-shadow: 0 10px 28px rgba(91, 33, 182, .3);
}
.button-primary:hover { background: linear-gradient(135deg, #9b72f8, #7849d9); }
.button-ghost { background: rgba(255,255,255,.025); border-color: var(--line); }
.button-ghost:hover { border-color: rgba(167, 139, 250, .5); }
.button-danger { background: #be123c; }
.button-large { min-height: 48px; padding: 0 23px; }
.button-full { width: 100%; }

.hero {
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr);
  align-items: center;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 70px clamp(22px, 8vw, 128px) 120px;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    radial-gradient(circle at 75% 45%, rgba(109, 40, 217, .17), transparent 37%);
  background-size: 72px 72px, 72px 72px, auto;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 150px;
  background: linear-gradient(transparent, var(--black));
  z-index: -1;
}
.hero-content { max-width: 680px; z-index: 2; }
.eyebrow {
  color: var(--purple-bright);
  font-size: 11px;
  letter-spacing: .2em;
  font-weight: 900;
  margin: 0 0 16px;
}
.eyebrow span {
  display: inline-block;
  width: 22px;
  height: 2px;
  margin-right: 8px;
  vertical-align: middle;
  background: var(--purple);
}
.hero h1, .auth-copy h1 {
  margin: 0;
  font-size: clamp(52px, 7vw, 94px);
  line-height: .92;
  letter-spacing: -.065em;
}
.hero h1 em, .auth-copy h1 em {
  color: transparent;
  font-style: normal;
  -webkit-text-stroke: 1px var(--purple-bright);
  text-shadow: 0 0 38px rgba(139, 92, 246, .16);
}
.hero-copy {
  max-width: 570px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
  margin: 28px 0 32px;
}
.hero-glow {
  width: 340px;
  height: 340px;
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: .13;
  z-index: -1;
}
.hero-glow-one { left: -120px; top: 80px; background: #8b5cf6; }
.hero-glow-two { right: -120px; bottom: 0; background: #4f46e5; }

.wolf-orbit {
  width: min(37vw, 470px);
  aspect-ratio: 1;
  margin-left: auto;
  position: relative;
  display: grid;
  place-items: center;
}
.orbit {
  position: absolute;
  border: 1px solid rgba(167,139,250,.23);
  border-radius: 50%;
}
.orbit::before, .orbit::after {
  content: "";
  width: 6px;
  height: 6px;
  position: absolute;
  border-radius: 50%;
  background: var(--purple-bright);
  box-shadow: 0 0 18px var(--purple);
}
.orbit-one { inset: 3%; animation: rotate 20s linear infinite; }
.orbit-one::before { top: 10%; left: 15%; }
.orbit-one::after { bottom: 8%; right: 17%; }
.orbit-two { inset: 16%; border-style: dashed; animation: rotate-reverse 28s linear infinite; }
.orbit-two::before { top: 48%; left: -3px; }
.orbit-two::after { top: 20%; right: 6%; }
.wolf-glyph {
  width: 48%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(167,139,250,.15), rgba(91,33,182,.04));
  border: 1px solid rgba(167,139,250,.25);
  clip-path: polygon(50% 0, 95% 24%, 86% 77%, 50% 100%, 14% 77%, 5% 24%);
  filter: drop-shadow(0 0 55px rgba(139,92,246,.25));
}
.wolf-glyph span {
  width: 55%;
  height: 58%;
  background: linear-gradient(#c4b5fd, #7c3aed);
  clip-path: polygon(0 0, 32% 18%, 50% 7%, 68% 18%, 100% 0, 85% 62%, 50% 100%, 15% 62%);
}
@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes rotate-reverse { to { transform: rotate(-360deg); } }

.page-width { width: min(1180px, calc(100% - 44px)); margin-inline: auto; }
.quick-links {
  margin-top: -64px;
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.feature-card {
  min-height: 245px;
  padding: 30px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  position: relative;
  cursor: pointer;
  transition: background .2s ease;
}
.feature-card:last-child { border-right: 0; }
.feature-card:hover { background: linear-gradient(145deg, rgba(139,92,246,.12), transparent); }
.feature-number { color: #6f6979; font-size: 11px; font-weight: 800; letter-spacing: .15em; }
.feature-icon {
  width: 46px;
  height: 46px;
  margin: 26px 0 18px;
  border: 1px solid rgba(167,139,250,.25);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--purple-bright);
  font-size: 23px;
  background: rgba(139,92,246,.06);
}
.feature-card strong { display: block; margin-bottom: 9px; font-size: 19px; }
.feature-card small { max-width: 270px; display: block; color: var(--muted); font-size: 13px; line-height: 1.6; }
.feature-arrow { position: absolute; top: 30px; right: 30px; color: var(--purple-bright); font-size: 22px; }

.patch-section { padding: 110px 0 130px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 38px; }
.section-heading h2 { margin: 0; font-size: clamp(31px, 4vw, 48px); letter-spacing: -.045em; }
.search-field {
  width: min(330px, 100%);
  height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
}
.search-field:focus-within { border-color: rgba(167,139,250,.55); }
.search-field input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search-field input::placeholder { color: #706b79; }

.patch-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.patch-card {
  min-height: 230px;
  padding: 30px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  text-align: left;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease;
}
.patch-card::before {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  right: -70px;
  top: -70px;
  background: var(--purple-dark);
  border-radius: 50%;
  filter: blur(48px);
  opacity: .24;
}
.patch-card:hover { transform: translateY(-3px); border-color: rgba(167,139,250,.4); }
.patch-meta, .patch-detail-meta { color: var(--purple-bright); font-size: 11px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.patch-card h3 { margin: 20px 0 10px; font-size: 24px; }
.patch-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.patch-card .feature-arrow { top: auto; bottom: 26px; }
.empty-state {
  grid-column: 1 / -1;
  min-height: 190px;
  padding: 30px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--panel);
  border: 1px dashed var(--line);
  border-radius: 9px;
  text-align: center;
}
.loading-state { animation: pulse 1.3s ease infinite; }
@keyframes pulse { 50% { opacity: .45; } }

.site-footer {
  min-height: 120px;
  padding: 30px clamp(22px, 5vw, 72px);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 30px;
  color: var(--muted);
  font-size: 13px;
}
.site-footer p { margin-right: auto; }
.site-footer > a:last-child:hover { color: var(--purple-bright); }

.modal {
  width: min(640px, calc(100% - 28px));
  max-height: calc(100vh - 30px);
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
}
.modal::backdrop, .confirm-dialog::backdrop { background: rgba(3,2,6,.8); backdrop-filter: blur(8px); }
.modal-panel {
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid rgba(167,139,250,.22);
  border-radius: 12px;
  background: #17151d;
  box-shadow: var(--shadow);
  position: relative;
}
.modal-panel h2 { margin: 0 0 10px; font-size: 35px; letter-spacing: -.04em; }
.modal-intro { margin: 0 0 27px; color: var(--muted); line-height: 1.6; font-size: 14px; }
.modal-close {
  width: 36px;
  height: 36px;
  position: absolute;
  right: 18px;
  top: 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
}
.form-stack { display: grid; gap: 18px; }
.form-stack label { display: grid; gap: 8px; color: #d7d3df; font-size: 12px; font-weight: 750; }
.form-stack label small { color: var(--muted); font-weight: 500; }
.form-stack input, .form-stack textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
  background: #0f0e13;
  color: var(--ink);
  padding: 13px 14px;
  resize: vertical;
  font-size: 14px;
  font-weight: 450;
}
.form-stack input:focus, .form-stack textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(139,92,246,.1); }
.form-stack input::placeholder, .form-stack textarea::placeholder { color: #5f5a67; }
.form-message { min-height: 18px; margin: -4px 0; color: var(--red); font-size: 13px; }
.form-message.success { color: var(--green); }
.patch-detail { max-height: calc(100vh - 30px); overflow-y: auto; }
.patch-detail h3 { margin: 28px 0 12px; }
.patch-detail-summary { color: var(--muted); line-height: 1.7; white-space: pre-wrap; }
.fix-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.fix-list li { padding: 12px 14px 12px 38px; background: #0f0e13; border: 1px solid var(--line); border-radius: 7px; position: relative; line-height: 1.5; }
.fix-list li::before { content: "✓"; position: absolute; left: 14px; color: var(--green); }
.signature { margin: 30px 0 0; text-align: right; color: var(--purple-bright); font-style: italic; }

/* Login */
.auth-page {
  background:
    radial-gradient(circle at 20% 30%, rgba(91,33,182,.24), transparent 32%),
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    var(--black);
  background-size: auto, 70px 70px, 70px 70px, auto;
}
.auth-brand { position: absolute; z-index: 2; left: clamp(24px, 5vw, 72px); top: 28px; }
.auth-shell { min-height: 100vh; padding: 100px clamp(24px, 8vw, 130px) 60px; display: grid; grid-template-columns: 1fr minmax(360px, 480px); gap: 80px; align-items: center; }
.auth-copy { max-width: 630px; }
.auth-copy h1 { font-size: clamp(52px, 6vw, 86px); }
.auth-copy > p:last-child { max-width: 520px; color: var(--muted); line-height: 1.7; }
.auth-card { padding: clamp(30px, 5vw, 48px); background: rgba(23,21,29,.94); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); }
.auth-card-icon { width: 48px; height: 48px; display: grid; place-items: center; float: right; border-radius: 12px; color: var(--purple-bright); background: rgba(139,92,246,.1); border: 1px solid rgba(167,139,250,.2); font-size: 24px; }
.auth-card h2 { margin: 0 0 28px; font-size: 31px; }
.password-field { display: flex; position: relative; }
.password-field button { position: absolute; right: 8px; top: 7px; bottom: 7px; border: 0; background: transparent; color: var(--purple-bright); cursor: pointer; font-size: 11px; font-weight: 800; }
.password-field input { padding-right: 80px; }
.back-link { display: block; margin-top: 25px; text-align: center; color: var(--muted); font-size: 12px; }
.back-link:hover { color: var(--purple-bright); }

/* Dashboard */
.dashboard-page { display: flex; background: #100f14; }
.dashboard-sidebar {
  width: 245px;
  min-height: 100vh;
  padding: 28px 18px;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  background: #0b0a0e;
  border-right: 1px solid var(--line);
}
.dashboard-sidebar .brand { padding: 0 10px; }
.sidebar-label { margin: 50px 12px 12px; color: #5e5968; font-size: 9px; letter-spacing: .18em; font-weight: 900; }
.dashboard-nav { display: grid; gap: 5px; }
.dashboard-nav button {
  min-height: 45px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #8d8797;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.dashboard-nav button:hover, .dashboard-nav button.active { background: rgba(139,92,246,.11); color: var(--ink); border-color: rgba(139,92,246,.13); }
.dashboard-nav button.active span { color: var(--purple-bright); }
.dashboard-nav b { min-width: 21px; margin-left: auto; padding: 3px 6px; border-radius: 10px; text-align: center; color: white; background: var(--purple-dark); font-size: 9px; }
.sidebar-bottom { margin-top: auto; padding: 15px 10px 0; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.sidebar-bottom a, .sidebar-bottom button { padding: 0; border: 0; background: transparent; color: #716c79; font-size: 11px; text-align: left; cursor: pointer; }
.sidebar-bottom a:hover, .sidebar-bottom button:hover { color: var(--purple-bright); }
.dashboard-main { min-width: 0; width: calc(100% - 245px); margin-left: 245px; }
.dashboard-header {
  height: 102px;
  padding: 0 clamp(24px, 4vw, 58px);
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(16,15,20,.88);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.dashboard-kicker { margin: 0 0 5px; color: #5f5a68; font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.dashboard-kicker span { color: var(--purple-bright); }
.dashboard-header h1 { margin: 0; font-size: 25px; letter-spacing: -.035em; }
.admin-identity { margin-left: auto; display: flex; align-items: center; gap: 11px; }
.admin-identity div { display: grid; gap: 3px; }
.admin-identity strong { font-size: 12px; }
.admin-identity small { color: #716c79; font-size: 10px; }
.online-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(74,222,128,.55); }
.mobile-nav { display: none; background: transparent; border: 1px solid var(--line); border-radius: 6px; width: 38px; height: 38px; }
.dashboard-content { padding: clamp(24px, 4vw, 55px); }
.dashboard-panel { display: none; }
.dashboard-panel.active { display: block; animation: panel-in .25s ease; }
@keyframes panel-in { from { opacity: 0; transform: translateY(5px); } }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 22px; }
.stat-card { min-height: 165px; padding: 22px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); position: relative; overflow: hidden; }
.stat-card > span { color: var(--muted); font-size: 11px; font-weight: 750; }
.stat-card > strong { margin: 15px 0 auto; font-size: 43px; line-height: 1; letter-spacing: -.05em; }
.stat-card button { padding: 0; border: 0; background: transparent; color: var(--purple-bright); font-size: 10px; text-align: left; cursor: pointer; }
.stat-card small { color: #625d6a; font-size: 10px; }
.stat-accent { background: linear-gradient(145deg, #5b21b6, #36136e); }
.stat-accent::after { content: ""; width: 120px; height: 120px; position: absolute; right: -40px; top: -45px; border: 1px solid rgba(255,255,255,.17); border-radius: 50%; }
.stat-accent button, .stat-accent > span { color: rgba(255,255,255,.78); }
.dashboard-card { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; }
.card-heading { min-height: 88px; padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.card-heading .eyebrow { margin-bottom: 7px; font-size: 8px; }
.card-heading h2 { margin: 0; font-size: 18px; }
.text-button { padding: 0; border: 0; background: transparent; color: var(--purple-bright); font-size: 10px; cursor: pointer; }
.compact-list, .ticket-list, .admin-patch-list { display: grid; }
.compact-item { min-height: 76px; padding: 15px 24px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); }
.compact-item:last-child { border-bottom: 0; }
.compact-item strong { display: block; margin-bottom: 5px; font-size: 13px; }
.compact-item small { color: var(--muted); font-size: 10px; }
.status-pill { padding: 5px 8px; border-radius: 12px; color: #86efac; background: rgba(74,222,128,.08); border: 1px solid rgba(74,222,128,.15); font-size: 8px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.status-pill.closed { color: #a7a2af; border-color: var(--line); background: rgba(255,255,255,.02); }
.toolbar { margin-bottom: 18px; display: flex; justify-content: space-between; }
.filter-group { padding: 4px; display: flex; gap: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; }
.filter-group button { padding: 8px 14px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.filter-group button.active { color: white; background: var(--purple-dark); }
.ticket-item { padding: 24px; margin-bottom: 12px; display: grid; grid-template-columns: 1fr auto; gap: 22px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.ticket-item h3 { margin: 8px 0; font-size: 17px; }
.ticket-item p { max-width: 780px; margin: 0 0 15px; color: var(--muted); white-space: pre-wrap; line-height: 1.6; font-size: 12px; }
.ticket-meta { color: #6f6978; font-size: 9px; letter-spacing: .08em; }
.ticket-email { color: var(--purple-bright); }
.ticket-actions { display: flex; align-items: start; gap: 8px; }
.ticket-actions button { min-width: 112px; min-height: 35px; padding: 0 11px; border: 1px solid var(--line); border-radius: 6px; background: #111015; color: var(--muted); font-size: 10px; cursor: pointer; }
.ticket-actions button:hover { border-color: var(--purple); color: white; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr); gap: 18px; align-items: start; }
.editor-card .form-stack { padding: 24px; }
.form-row { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.editor-actions { justify-content: flex-end; }
.hidden { display: none !important; }
.stacked-heading { align-items: stretch; flex-direction: column; }
.compact-search { width: 100%; height: 37px; }
.library-card { max-height: calc(100vh - 155px); overflow: hidden; position: sticky; top: 122px; }
.admin-patch-list { max-height: calc(100vh - 290px); overflow-y: auto; }
.admin-patch-item { padding: 17px 20px; display: grid; grid-template-columns: 1fr auto; gap: 12px; border-bottom: 1px solid var(--line); }
.admin-patch-item:last-child { border-bottom: 0; }
.admin-patch-item h3 { margin: 0 0 6px; font-size: 13px; }
.admin-patch-item small { color: #6e6877; font-size: 9px; }
.admin-patch-actions { display: flex; gap: 5px; }
.admin-patch-actions button { width: 29px; height: 29px; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; }
.admin-patch-actions button:hover { color: white; border-color: var(--purple); }
.confirm-dialog { width: min(430px, calc(100% - 28px)); padding: 30px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); }
.confirm-dialog h2 { margin-top: 0; }
.confirm-dialog p { color: var(--muted); }
.confirm-dialog form > div { display: flex; justify-content: flex-end; gap: 8px; margin-top: 25px; }

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr .65fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .editor-layout { grid-template-columns: 1fr; }
  .library-card { max-height: none; position: static; }
  .admin-patch-list { max-height: 480px; }
}

@media (max-width: 800px) {
  .site-header { height: 66px; }
  .header-actions .button-primary { display: none; }
  .hero { min-height: 650px; display: block; padding-top: 100px; }
  .wolf-orbit { width: 330px; opacity: .28; position: absolute; right: -95px; top: 80px; z-index: -1; }
  .quick-links { grid-template-columns: 1fr; margin-top: -42px; }
  .feature-card { min-height: 205px; border-right: 0; border-bottom: 1px solid var(--line); }
  .feature-card:last-child { border-bottom: 0; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .search-field { width: 100%; }
  .patch-grid { grid-template-columns: 1fr; }
  .auth-shell { grid-template-columns: 1fr; padding-top: 130px; }
  .auth-copy { display: none; }
  .auth-card { width: min(480px, 100%); margin: auto; }
  .dashboard-sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .dashboard-sidebar.open { transform: translateX(0); box-shadow: 20px 0 80px rgba(0,0,0,.65); }
  .dashboard-main { width: 100%; margin-left: 0; }
  .mobile-nav { display: block; }
  .admin-identity div { display: none; }
}

@media (max-width: 560px) {
  .brand { font-size: 15px; }
  .brand-mark { width: 29px; height: 29px; }
  .hero { padding-inline: 22px; }
  .hero h1 { font-size: 51px; }
  .hero-buttons { align-items: stretch; flex-direction: column; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 12px; }
  .site-footer p { margin: 0; }
  .stat-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 140px; }
  .ticket-item { grid-template-columns: 1fr; }
  .ticket-actions button { width: 100%; }
  .form-row { grid-template-columns: 1fr; }
  .editor-actions { align-items: stretch; flex-direction: column; }
  .dashboard-content { padding: 18px 14px; }
  .dashboard-header { padding-inline: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Public support page: faithful classic support layout */
.support-page {
  --classic-navy: #002433;
  --classic-blue: #078ee9;
  --classic-bg: #242424;
  min-height: 100vh;
  background: var(--classic-bg);
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
}

.classic-topbar {
  height: 55px;
  padding: 0 max(calc((100vw - 1110px) / 2), 24px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--classic-navy);
}

.classic-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #f8f8f8;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
}

.classic-brand-mark {
  width: 31px;
  height: 30px;
  position: relative;
  display: inline-block;
}
.classic-brand-mark::before {
  content: "";
  width: 14px;
  height: 14px;
  position: absolute;
  left: 10px;
  top: 1px;
  border-radius: 50%;
  background: white;
}
.classic-brand-mark::after {
  content: "";
  width: 29px;
  height: 10px;
  position: absolute;
  left: 0;
  bottom: 2px;
  background: white;
  clip-path: polygon(0 72%, 42% 8%, 100% 15%, 80% 100%, 34% 100%);
}
.classic-brand-mark span::before,
.classic-brand-mark span::after {
  content: "";
  width: 10px;
  height: 2px;
  position: absolute;
  top: 4px;
  background: white;
}
.classic-brand-mark span::before { left: 0; transform: rotate(18deg); }
.classic-brand-mark span::after { right: 0; transform: rotate(-18deg); }

.classic-chevron {
  width: 20px;
  height: 20px;
  margin-left: 2px;
  display: grid;
  place-items: center;
  border: 1px solid #eee;
  border-radius: 50%;
  font-size: 13px;
  line-height: 1;
}

.classic-actions { display: flex; align-items: center; gap: 12px; }
.classic-button {
  height: 33px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--classic-blue);
  border-radius: 4px;
  background: transparent;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.classic-button:hover { background: rgba(7,142,233,.13); }
.classic-primary { padding-inline: 15px; background: var(--classic-blue); }
.classic-primary:hover { background: #1699ef; }
.classic-menu { width: 40px; padding: 0; color: var(--classic-blue); font-size: 17px; }

.classic-hero {
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(rgba(0,0,0,.06), rgba(0,0,0,.08)),
    url('/assets/magicwolf-hero.png') center 52% / cover no-repeat;
}

.classic-search {
  width: min(610px, 70vw);
  height: 40px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  border-radius: 24px;
  background: white;
  color: #6d6d6d;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.classic-search input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #555;
  font-size: 13px;
}
.classic-search input::placeholder { color: #6d6d6d; opacity: 1; }
.classic-search-icon {
  width: 16px;
  height: 16px;
  margin-right: 11px;
  position: relative;
  flex: 0 0 auto;
  border: 2px solid #d1d5d9;
  border-radius: 50%;
}
.classic-search-icon::after {
  content: "";
  width: 6px;
  height: 2px;
  position: absolute;
  right: -5px;
  bottom: -2px;
  border-radius: 2px;
  background: #d1d5d9;
  transform: rotate(45deg);
}

.hero-search-wrap {
  width: min(610px, 70vw);
  position: relative;
  z-index: 8;
}
.hero-search-wrap .classic-search { width: 100%; }
.patch-search-dropdown {
  width: 100%;
  max-height: 310px;
  margin-top: 7px;
  overflow-y: auto;
  position: absolute;
  left: 0;
  top: 40px;
  border: 1px solid #dadce0;
  border-radius: 12px;
  background: white;
  color: #292929;
  box-shadow: 0 10px 30px rgba(0,0,0,.28);
}
.patch-search-dropdown[hidden] { display: none; }
.patch-search-result {
  width: 100%;
  min-height: 64px;
  padding: 10px 15px;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid #ececec;
  background: white;
  color: #292929;
  text-align: left;
  cursor: pointer;
}
.patch-search-result:last-child { border-bottom: 0; }
.patch-search-result:hover,
.patch-search-result:focus { background: #f1f3f4; outline: 0; }
.patch-search-result > span:nth-child(2) { min-width: 0; display: grid; gap: 4px; }
.patch-search-result strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.patch-search-result small { overflow: hidden; color: #6c7073; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.patch-search-result time { color: #7a7a7a; font-size: 10px; white-space: nowrap; }
.patch-search-result-icon { color: #9aa0a6; font-size: 18px; }
.patch-search-empty { padding: 20px; color: #6c7073; text-align: center; font-size: 12px; }

.classic-main {
  width: min(1160px, 84%);
  margin: 0 auto;
  padding: 60px 0 50px;
}
.classic-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.classic-card {
  height: 192px;
  padding: 0 19px 17px;
  display: flex;
  align-items: flex-end;
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 3px;
  background:
    linear-gradient(to top, rgba(0,0,0,.89), rgba(0,0,0,.08)),
    url('/assets/magicwolf-hero.png') center 62% / cover no-repeat;
  color: white;
  text-align: left;
  cursor: pointer;
  transition: filter .16s ease;
}
.classic-card:hover { filter: brightness(1.13); }
.classic-card-support {
  background-image: linear-gradient(to top, rgba(0,0,0,.9), rgba(0,0,0,.06)), url('/assets/card-support.png');
}
.classic-card-patches {
  background-image: linear-gradient(to top, rgba(0,0,0,.9), rgba(0,0,0,.06)), url('/assets/card-patch-notes.png');
}
.classic-card-bugs {
  background-image: linear-gradient(to top, rgba(0,0,0,.9), rgba(0,0,0,.06)), url('/assets/card-bug-report.png');
}
.classic-card-content { display: block; width: 100%; }
.classic-card strong {
  display: block;
  margin: 0 0 7px;
  color: #0795f4;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.05;
}
.classic-card small {
  display: block;
  max-width: 320px;
  color: white;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}
.classic-divider { margin: 60px 0 34px; border: 0; border-top: 1px solid #737373; }
.classic-columns { display: grid; grid-template-columns: 2fr 1fr; gap: 70px; }
.classic-section-title { margin: 0 0 38px; text-align: center; font-size: 21px; }
.classic-activity-label { margin-bottom: 25px; font-size: 15px; font-weight: 700; }
.classic-activity-list { display: grid; }
.classic-activity-row {
  width: 100%;
  min-height: 74px;
  padding: 0 0 22px;
  margin: 0 0 23px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 0;
  border-bottom: 1px solid #666;
  background: transparent;
  color: white;
  text-align: left;
  cursor: pointer;
}
.classic-activity-row:hover strong { color: var(--classic-blue); }
.classic-activity-details { min-width: 0; display: grid; gap: 6px; }
.classic-activity-details strong { font-size: 14px; transition: color .15s ease; }
.classic-activity-details small { max-width: 470px; overflow: hidden; color: #ccc; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.classic-activity-meta { flex: 0 0 auto; color: #ddd; font-size: 12px; white-space: nowrap; }
.classic-empty { min-height: 74px; padding: 20px 0; color: #bbb; border-bottom: 1px solid #666; font-size: 13px; }
.main-recent-section { width: min(780px, 100%); margin: 0 auto; }
.main-recent-section > h2 { margin: 0 0 34px; text-align: center; font-size: 21px; }
.main-recent-section .classic-activity-label { text-align: center; }

@media (max-width: 800px) {
  .classic-topbar { padding: 0 18px; }
  .classic-brand { font-size: 20px; }
  .classic-primary { display: none; }
  .classic-hero { height: 260px; }
  .classic-search { width: 82vw; }
  .hero-search-wrap { width: 82vw; }
  .classic-main { width: calc(100% - 36px); padding-top: 36px; }
  .classic-cards { grid-template-columns: 1fr; gap: 18px; }
  .classic-columns { grid-template-columns: 1fr; gap: 0; }
  .classic-empty-column { display: none; }
}

@media (max-width: 480px) {
  .classic-menu { display: none; }
  .classic-actions { gap: 7px; }
  .classic-card strong { font-size: 22px; }
  .classic-activity-row { align-items: flex-start; flex-direction: column; }
  .patch-search-result { grid-template-columns: 22px 1fr; }
  .patch-search-result time { display: none; }
}

/* Dedicated support request page */
.ticket-page { min-height: 100vh; }
.ticket-shell {
  width: min(700px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 70px;
}
.ticket-breadcrumb { display: flex; gap: 9px; color: #aaa; font-size: 12px; }
.ticket-breadcrumb a { color: #1699ef; }
.ticket-shell h1 { margin: 28px 0 8px; font-size: 30px; font-weight: 500; }
.ticket-lead { margin: 0 0 34px; color: #c2c2c2; font-size: 13px; }
.ticket-form { display: grid; gap: 27px; }
.ticket-form label { display: block; color: white; font-size: 13px; }
.ticket-form label b { color: #ff3030; }
.ticket-form input,
.ticket-form select,
.ticket-form textarea {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid #d5d5d5;
  border-radius: 4px;
  outline: 0;
  background: white;
  color: #222;
  font: 14px Arial, Helvetica, sans-serif;
}
.ticket-form input,
.ticket-form select,
.ticket-form textarea { display: block; margin-top: 8px; }
.ticket-form textarea { min-height: 120px; resize: vertical; }
.ticket-form input:focus,
.ticket-form select:focus,
.ticket-form textarea:focus { border-color: #078ee9; box-shadow: 0 0 0 2px rgba(7,142,233,.24); }
.ticket-form small { display: block; margin-top: 6px; color: white; font-size: 12px; line-height: 1.45; }
.ticket-form-message { min-height: 18px; margin: -3px 0; color: #ff7d7d; font-size: 13px; }
.ticket-form-message.success { color: #72e5a0; }
.ticket-submit {
  width: 190px;
  height: 40px;
  margin-top: 4px;
  border: 0;
  border-radius: 4px;
  background: #078ee9;
  color: white;
  cursor: pointer;
}
.ticket-submit:hover { background: #1699ef; }
.ticket-submit:disabled { opacity: .65; cursor: wait; }

/* Simple support-portal login */
.classic-login-page { min-height: 100vh; background: #f4f4f4; color: #202124; font-family: Arial, Helvetica, sans-serif; }
.classic-login-page .classic-topbar { background: #002433; }
.classic-login-shell { min-height: calc(100vh - 55px); padding: 44px 18px; display: flex; justify-content: center; align-items: flex-start; }
.classic-login-card { width: min(480px, 100%); border: 1px solid #d7dce0; background: white; }
.classic-login-heading { padding: 27px 38px 21px; border-bottom: 1px solid #d7dce0; text-align: center; }
.classic-login-heading h1 { margin: 0 0 3px; font-size: 22px; font-weight: 500; }
.classic-login-heading a { color: #0878c9; font-size: 13px; text-decoration: underline; }
.classic-login-form { padding: 20px 49px 0; display: grid; gap: 25px; }
.classic-login-form label { display: block; color: #272b2e; font-size: 13px; font-weight: 700; }
.classic-login-form label span { font-weight: 400; }
.classic-login-form input {
  width: 100%;
  height: 42px;
  padding: 9px 12px;
  border: 1px solid #aeb8c1;
  border-radius: 4px;
  outline: none;
  background: #fff;
  color: #121212;
}
.classic-login-form label > input { display: block; margin-top: 8px; }
.classic-login-form input:focus { border-color: #0072c6; box-shadow: 0 0 0 3px rgba(0,114,198,.25); background: #eef5ff; }
.classic-password-field { display: flex; position: relative; margin-top: 8px; }
.classic-password-field input { padding-right: 48px; }
.classic-password-field button { width: 42px; position: absolute; right: 1px; top: 1px; bottom: 1px; border: 0; background: transparent; color: #66727a; cursor: pointer; font-size: 14px; }
.classic-login-message { min-height: 17px; margin: -9px 0 -8px; color: #c62828; font-size: 12px; }
.classic-signin-button { height: 41px; border: 0; border-radius: 3px; background: #287dbb; color: white; cursor: pointer; }
.classic-signin-button:hover { background: #176da9; }
.classic-signin-button:disabled { opacity: .65; cursor: wait; }
.classic-login-back { display: block; margin: 20px 0 25px; color: #0878c9; text-align: center; font-size: 12px; }

@media (max-width: 540px) {
  .ticket-shell { width: calc(100% - 30px); }
  .ticket-submit { width: 100%; }
  .classic-login-shell { padding-inline: 12px; }
  .classic-login-form { padding-inline: 24px; }
  .classic-login-heading { padding-inline: 24px; }
}

/* Shared server status */
.status-banner {
  min-height: 52px;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #b42318;
  border-bottom: 1px solid rgba(255,255,255,.24);
  color: white;
  text-align: center;
  font-size: 13px;
}
.status-banner[hidden] { display: none; }
.status-banner strong { font-size: 14px; }
.status-banner span { color: rgba(255,255,255,.86); }

/* Portal surfaces use the same navy/blue language as the public start page */
.classic-login-page { background: #242424; color: white; }
.classic-login-shell {
  min-height: calc(100vh - 55px);
  background: linear-gradient(rgba(0, 18, 27, .74), rgba(36, 36, 36, .96)), url('/assets/magicwolf-hero.png') center / cover no-repeat;
}
.classic-login-card {
  border-color: rgba(7,142,233,.45);
  background: rgba(0,36,51,.96);
  color: white;
  box-shadow: 0 24px 70px rgba(0,0,0,.42);
}
.classic-login-heading { border-color: rgba(255,255,255,.16); }
.classic-login-heading a, .classic-login-back { color: #45b8ff; }
.classic-login-form label { color: white; }
.classic-login-form input { border-color: #b6c3ca; background: white; color: #161b1e; }
.classic-signin-button { background: #078ee9; }
.classic-signin-button:hover { background: #1699ef; }

.dashboard-page { background: #242424; }
.dashboard-sidebar { background: #002433; }
.dashboard-main { background: #242424; }
.dashboard-header { background: rgba(0,36,51,.96); }
.stat-accent { background: linear-gradient(145deg, #078ee9, #045f9d); }

.status-control-card {
  min-height: 112px;
  margin-bottom: 22px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-left: 3px solid #078ee9;
}
.status-control-card h2 { margin: 0 0 7px; font-size: 19px; }
.status-control-card p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 12px; }
.status-control-actions { display: flex; align-items: center; gap: 12px; }
.server-status-pill {
  padding: 7px 11px;
  border: 1px solid rgba(74,222,128,.28);
  border-radius: 16px;
  background: rgba(74,222,128,.1);
  color: #86efac;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.server-status-pill.down { border-color: rgba(251,113,133,.35); background: rgba(251,113,133,.1); color: #fda4af; }

.compact-item[role="button"] { cursor: pointer; }
.compact-item[role="button"]:hover { background: rgba(7,142,233,.07); }
.ticket-conversation { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid var(--line); }
.ticket-conversation h4 { margin: 0 0 14px; font-size: 14px; }
.ticket-replies { display: grid; gap: 9px; margin-bottom: 16px; }
.ticket-reply { padding: 13px 15px; border: 1px solid rgba(7,142,233,.2); border-radius: 7px; background: #182228; }
.ticket-reply > div { display: flex; justify-content: space-between; gap: 12px; }
.ticket-reply strong { color: #45b8ff; font-size: 11px; }
.ticket-reply time { color: #7d8b93; font-size: 9px; }
.ticket-reply p { margin: 9px 0 0; color: #e5edf1; font-size: 12px; }
.ticket-no-replies { margin: 0; color: var(--muted); font-size: 11px; }
.ticket-reply-form { display: grid; gap: 9px; }
.ticket-reply-form textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: 0;
  background: #11191d;
  color: white;
}
.ticket-reply-form textarea:focus { border-color: #078ee9; }
.ticket-reply-form .button { justify-self: end; }
.ticket-reply-message { min-height: 15px; margin: 0; color: #fb7185; font-size: 11px; }

@media (max-width: 800px) {
  .classic-actions .classic-primary { display: inline-flex; }
  .status-banner { align-items: flex-start; flex-direction: column; gap: 3px; text-align: left; }
  .status-control-card { align-items: flex-start; flex-direction: column; }
  .status-control-actions { width: 100%; justify-content: space-between; }
  .ticket-actions { width: 100%; flex-wrap: wrap; }
  .ticket-actions button { flex: 1; }
}

@media (max-width: 480px) {
  .classic-topbar { gap: 10px; }
  .classic-brand { font-size: 17px; }
  .classic-actions .classic-primary { height: 34px; padding: 0 10px; font-size: 10px; }
  .status-control-actions { align-items: stretch; flex-direction: column; }
  .server-status-pill { align-self: flex-start; }
  .ticket-reply > div { flex-direction: column; gap: 3px; }
  .ticket-reply-form .button { width: 100%; }
}

/* Dedicated Patch Notes portal */
.patch-page-shell {
  width: min(900px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 80px;
}
.patch-page-heading {
  margin: 28px 0 30px;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 22px;
  text-align: center;
}
.patch-page-heading h1 { margin: 0 0 8px; font-size: 30px; font-weight: 500; }
.patch-page-heading p { margin: 0; color: #c2c2c2; font-size: 13px; }
.patch-page-search {
  width: min(610px, 100%);
  height: 42px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  border-radius: 22px;
  background: white;
}
.patch-page-search input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #252525;
  font-size: 13px;
}
.patch-page-list { display: grid; gap: 12px; }
.patch-results-panel {
  padding: 24px;
  border: 1px solid #555;
  border-radius: 4px;
  background: #262626;
}
.patch-results-panel > h2 {
  margin: 0 0 18px;
  text-align: center;
  font-size: 17px;
}
.patch-page-card {
  width: 100%;
  min-height: 126px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid #555;
  border-left: 3px solid #078ee9;
  border-radius: 4px;
  background: #292929;
  color: white;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}
.patch-page-card:hover { border-color: #078ee9; background: #2d3336; }
.patch-page-card-body { min-width: 0; display: grid; gap: 7px; }
.patch-page-card time { color: #45b8ff; font-size: 11px; }
.patch-page-card strong { font-size: 19px; }
.patch-page-card small { overflow: hidden; color: #c8c8c8; font-size: 13px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.patch-page-arrow { color: #078ee9; font-size: 30px; }
.patch-page-empty {
  min-height: 160px;
  padding: 30px;
  display: grid;
  place-items: center;
  border: 1px dashed #5e5e5e;
  border-radius: 4px;
  background: #292929;
  color: #c2c2c2;
  text-align: center;
  font-size: 13px;
}

@media (max-width: 700px) {
  .patch-page-shell { width: calc(100% - 30px); padding-top: 26px; }
  .patch-page-heading { align-items: stretch; }
  .patch-page-search { width: 100%; }
  .patch-results-panel { padding: 14px; }
  .patch-page-card { min-height: 118px; padding: 18px; }
  .patch-page-card small { white-space: normal; }
}
