/*
 * Shared dark reskin for ALL server-rendered legacy Django pages.
 *
 * Loaded by project/templates/base.html, so every template that extends it
 * (~42 pages: landing, about, contact, credits, subscriptions, trancelibs,
 * moderation, history, audiorepo/files, 404/banned/maintenance, …) gets the
 * new Angular UI's look without being ported to Angular.
 *
 * It re-themes to the ui/src/styles.css palette + topbar/footer look, and
 * styles the plain/Bootstrap-ish class names those templates already use
 * (.row/.col-*, .btn*, .alert, .card, .form-control, .well, .modal*,
 * .list-inline, text/display helpers) so template markup barely changes.
 *
 * Scope: everything content-related is nested under `.hy-shell` (the body
 * class), so pages that host the LEGACY Angular app can opt out with
 * {% block bodyclass %} and keep their own stylesheet's cascade. This file is
 * never loaded by the new SPA or the HypnoSpec player.
 */

:root {
  --hy-ground: #07050e;      /* page ground   (ui styles.css --color-ground)  */
  --hy-panel: #110d1d;       /* raised panels (--color-panel)                 */
  --hy-panel-2: #171227;     /* nav top / insets                              */
  --hy-edge: #2a2342;        /* default border (--color-edge)                 */
  --hy-edge-strong: #3b3060; /* emphasized border (--color-edge-strong)       */
  --hy-text: #ece9f8;        /* primary text                                  */
  --hy-muted: #c3bcdc;       /* secondary text / nav links                    */
  --hy-faint: #8d84ad;       /* tertiary text                                 */
  --hy-accent: #d946ef;      /* fuchsia accent (--color-accent-500)           */
  --hy-accent-300: #f0abfc;
  --hy-primary: #a78bfa;     /* violet primary (links / primary btn)          */
  --hy-primary-600: #7c3aed;
  --hy-success: #34d399;
  --hy-info: #38bdf8;
  --hy-warn: #fbbf24;
  --hy-danger: #fb7185;
  --hy-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --hy-font-display: 'Sora', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --hy-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ------------------------------------------------------------------ shell -- */

/* Document root near-black so overscroll, short pages, and the gap between
   full-document navigations never flash the default white on the dark UI.
   (base.html also inlines this in <head> for the earliest possible paint.) */
html { background-color: var(--hy-ground); }

/* Border-box, matching the new UI's .app-shell reset. Without this, padded
   full-width blocks (.hy-main's 1.5rem, .container's 0.75rem) add to 100% and
   push the document wider than the viewport — 48px of horizontal scroll on
   mobile on every legacy page. Chrome elements are listed explicitly so the
   fix also applies on .hy-chrome-only pages WITHOUT reaching into the legacy
   Angular app's own descendants. */
.hy-shell, .hy-shell *, .hy-shell *::before, .hy-shell *::after,
.hy-chrome-only, .hy-main, .hy-topnav, .hy-footer, .hy-footer-inner,
.hy-searchstrip, .hy-searchstrip form, .hy-searchstrip input {
  box-sizing: border-box;
}

.hy-shell {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: row;            /* sidebar + content column (redesign) */
  background-color: var(--hy-ground);
  color: var(--hy-text);
  font-family: var(--hy-font-sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Opt-out shell for pages that host the LEGACY Angular app: dark page +
   chrome, but none of the `.hy-shell X` content rules below, so the legacy
   app's own stylesheet keeps its cascade. Used via {% block bodyclass %}. */
.hy-chrome-only {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--hy-ground);
  color: var(--hy-text);
  font-family: var(--hy-font-sans);
}
.hy-chrome-only > #workspace { flex: 1; }

/* Content links only — scoped to the workspace so it can never out-specify the
   chrome (nav/footer live outside .hy-main). A bare `.hy-shell a` here beat
   `.hy-navlink`/`.hy-brand` on specificity (0,1,1 > 0,1,0) and repainted the
   whole topbar violet + underlined it on hover.
   No underline anywhere: the new UI never underlines (.app-shell a in
   ui/src/styles.css sets text-decoration:none and hovers shift colour). */
/* Decoration only — deliberately sets NO colour, so it cannot re-create the
   leak above. The new UI never underlines anything, anywhere. */
.hy-shell a, .hy-shell a:hover,
.hy-topnav a, .hy-topnav a:hover, .hy-topnav button,
.hy-footer a, .hy-footer a:hover { text-decoration: none; }

.hy-shell .hy-main a { color: var(--hy-primary); text-decoration: none; }
.hy-shell .hy-main a:hover { color: var(--hy-accent-300); text-decoration: none; }

.hy-shell h1, .hy-shell h2, .hy-shell h3,
.hy-shell h4, .hy-shell h5, .hy-shell h6 {
  font-family: var(--hy-font-display);
  font-weight: 600;
  color: var(--hy-text);
  margin: 0 0 0.5rem;
  line-height: 1.25;
}
.hy-shell small { color: var(--hy-faint); font-size: 0.8em; }
.hy-shell hr { border: 0; border-top: 1px solid var(--hy-edge); margin: 1.25rem 0; }
.hy-shell code, .hy-shell pre, .hy-shell kbd { font-family: var(--hy-font-mono); }

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

.hy-topnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1.5rem;
  border-bottom: 1px solid var(--hy-edge);
  background: linear-gradient(180deg, var(--hy-panel-2) 0%, #0b0813 100%);
}
.hy-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 0.75rem;
  font-family: var(--hy-font-display);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--hy-text);
}
.hy-brand:hover { color: var(--hy-text); text-decoration: none; }
.hy-brand img { height: 1.25rem; width: 1.25rem; }
.hy-brand .hy-sub-heart { color: var(--hy-accent-300); font-size: 0.875rem; }

.hy-navlink {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.6rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: var(--hy-muted);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.hy-navlink:hover { color: var(--hy-text); background: #221a36; text-decoration: none; }
.hy-navlink.is-active { color: var(--hy-text); background: #221a36; }
.hy-nav-spacer { flex: 1; }

/* Search strip — mirrors the SPA's app-search-bar band. The SPA version is a
   live typeahead; this one submits to /search/ (same destination). */
.hy-searchstrip {
  border-bottom: 1px solid var(--hy-edge);
  background: #0b0813;
}
.hy-searchstrip form {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.hy-shell .hy-searchstrip input,
.hy-searchstrip input {
  width: 100%;
  margin: 0;
  padding: 0.375rem 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #2e1065;
  border-radius: 0;
  font-size: 0.875rem;
  color: var(--hy-muted);
}
.hy-shell .hy-searchstrip input:focus,
.hy-searchstrip input:focus {
  outline: none;
  box-shadow: none;
  border-bottom-color: var(--hy-primary-600);
}
.hy-searchstrip input::placeholder { color: var(--hy-faint); }

.hy-beta-strip {
  background: rgba(56, 189, 248, 0.2);
  color: var(--hy-info);
  text-align: center;
  font-size: 0.75rem;
  padding: 0.15rem 0;
}

/* --------------------------------------------------------------- content -- */

.hy-main { flex: 1; width: 100%; max-width: 72rem; margin: 0 auto; padding: 1.5rem; }

.hy-card {
  background: var(--hy-panel);
  border: 1px solid var(--hy-edge);
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.hy-card-header {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--hy-edge);
  font-family: var(--hy-font-display);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.02);
}
.hy-card-sub { float: right; font-weight: 400; }
.hy-card-body { padding: 1.25rem; }

/* Bootstrap card shims (a couple of templates still use .card directly) */
.hy-shell .card {
  background: var(--hy-panel);
  border: 1px solid var(--hy-edge);
  border-radius: 0.75rem;
}
.hy-shell .card-header {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--hy-edge);
  font-weight: 600;
}
.hy-shell .card-body { padding: 1.25rem; }

/* Bootstrap "well" (search sidebar box) */
.hy-shell .well {
  background: var(--hy-panel-2);
  border: 1px solid var(--hy-edge);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
}
.hy-shell .well-sm { padding: 0.75rem; }

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

.hy-shell .container { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 0.75rem; }
.hy-shell .row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.75rem;
}
.hy-shell [class^="col-"], .hy-shell [class*=" col-"] {
  padding: 0 0.75rem;
  flex: 0 0 100%;
  max-width: 100%;
}
@media (min-width: 768px) {
  .hy-shell .col-md-1  { flex-basis: 8.3333%;  max-width: 8.3333%; }
  .hy-shell .col-md-2  { flex-basis: 16.6667%; max-width: 16.6667%; }
  .hy-shell .col-md-3  { flex-basis: 25%;      max-width: 25%; }
  .hy-shell .col-md-4  { flex-basis: 33.3333%; max-width: 33.3333%; }
  .hy-shell .col-md-6  { flex-basis: 50%;      max-width: 50%; }
  .hy-shell .col-md-8  { flex-basis: 66.6667%; max-width: 66.6667%; }
  .hy-shell .col-md-9  { flex-basis: 75%;      max-width: 75%; }
  .hy-shell .col-md-12 { flex-basis: 100%;     max-width: 100%; }
  .hy-shell .col-sm-2  { flex-basis: 16.6667%; max-width: 16.6667%; }
  .hy-shell .col-sm-10 { flex-basis: 83.3333%; max-width: 83.3333%; }
}

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

.hy-shell .btn {
  display: inline-block;
  font-family: var(--hy-font-sans);
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.4;
  text-align: center;
  vertical-align: middle;
  padding: 0.45rem 0.9rem;
  margin: 0 0.15rem 0.35rem 0;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  color: var(--hy-text);
  background: #221a36;
  text-decoration: none;
}
.hy-shell .btn:hover { text-decoration: none; filter: brightness(1.12); }
.hy-shell .btn:focus-visible { outline: 2px solid var(--hy-primary); outline-offset: 1px; }

.hy-shell .btn-primary { background: var(--hy-primary-600); border-color: var(--hy-primary-600); color: #fff; }
.hy-shell .btn-secondary { background: #2a2342; border-color: var(--hy-edge-strong); color: var(--hy-text); }
.hy-shell .btn-info { background: rgba(56,189,248,0.15); border-color: var(--hy-info); color: var(--hy-info); }
.hy-shell .btn-warning { background: rgba(251,191,36,0.15); border-color: var(--hy-warn); color: var(--hy-warn); }
.hy-shell .btn-danger { background: rgba(251,113,133,0.15); border-color: var(--hy-danger); color: var(--hy-danger); }
.hy-shell .btn-default { background: #1b1530; border: 1px solid var(--hy-edge-strong); color: var(--hy-muted); }
.hy-shell .btn-link { background: none; border: none; color: var(--hy-primary); padding-left: 0.25rem; padding-right: 0.25rem; }
.hy-shell .btn-link:hover { color: var(--hy-accent-300); filter: none; text-decoration: none; }

.hy-shell .btn-xs { padding: 0.2rem 0.45rem; font-size: 0.75rem; }
.hy-shell .btn-sm { padding: 0.3rem 0.6rem; font-size: 0.8125rem; }
.hy-shell .btn-md { padding: 0.45rem 0.9rem; }
.hy-shell .btn-lg { padding: 0.6rem 1.2rem; font-size: 1rem; }
.hy-shell .btn-block { display: block; width: 100%; margin-right: 0; }

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

.hy-shell .form-control,
.hy-shell input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
.hy-shell select,
.hy-shell textarea {
  display: block;
  width: 100%;
  padding: 0.45rem 0.7rem;
  font-family: var(--hy-font-sans);
  font-size: 0.9rem;
  color: var(--hy-text);
  background: var(--hy-ground);
  border: 1px solid var(--hy-edge-strong);
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}
.hy-shell .form-control:focus,
.hy-shell input:focus, .hy-shell select:focus, .hy-shell textarea:focus {
  outline: none;
  border-color: var(--hy-primary);
  box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.25);
}
.hy-shell label, .hy-shell .col-form-label { font-size: 0.875rem; color: var(--hy-muted); }
.hy-shell legend {
  font-family: var(--hy-font-display);
  font-size: 1rem;
  font-weight: 600;
  padding: 0 0.25rem;
  border: 0;
  width: auto;
}
.hy-shell fieldset { border: 1px solid var(--hy-edge); border-radius: 0.5rem; padding: 0.75rem 1rem; margin-bottom: 1rem; }

/* --------------------------------------------------------------- alerts -- */

.hy-shell .alert {
  padding: 0.7rem 1rem;
  border: 1px solid var(--hy-edge);
  border-left-width: 3px;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  background: var(--hy-panel-2);
  color: var(--hy-text);
}
.hy-shell .alert-success { border-left-color: var(--hy-success); }
.hy-shell .alert-info { border-left-color: var(--hy-info); }
.hy-shell .alert-warning { border-left-color: var(--hy-warn); }
.hy-shell .alert-danger { border-left-color: var(--hy-danger); }

/* --------------------------------------------------------------- badges -- */

.hy-shell .badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 9999px;
  background: var(--hy-edge-strong);
  color: var(--hy-text);
}

/* --------------------------------------------------- description lists -- */

.hy-shell dl { margin: 0; }
.hy-shell dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--hy-faint); margin-top: 0.5rem; }
.hy-shell dd { margin: 0 0 0.25rem; color: var(--hy-text); }

/* --------------------------------------------------------------- tables -- */

.hy-shell table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.hy-shell th, .hy-shell td { padding: 0.5rem 0.65rem; border-bottom: 1px solid var(--hy-edge); text-align: left; }
.hy-shell th { color: var(--hy-muted); font-weight: 600; }

/* --------------------------------------------------------------- modals -- */

.hy-shell .modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1050;
  overflow-y: auto;
  background: rgba(3, 2, 8, 0.7);
}
.hy-shell .modal.is-open { display: block; }
.hy-shell .modal-dialog {
  max-width: 34rem;
  margin: 8vh auto;
  padding: 0 1rem;
}
.hy-shell .modal-content {
  background: var(--hy-panel);
  border: 1px solid var(--hy-edge-strong);
  border-radius: 0.75rem;
  overflow: hidden;
}
.hy-shell .modal-header,
.hy-shell .modal-footer { padding: 0.85rem 1.25rem; border-color: var(--hy-edge); }
.hy-shell .modal-header { border-bottom: 1px solid var(--hy-edge); display: flex; align-items: center; justify-content: space-between; }
.hy-shell .modal-body { padding: 1.25rem; }
.hy-shell .modal-footer { border-top: 1px solid var(--hy-edge); display: flex; gap: 0.5rem; justify-content: flex-end; }
.hy-shell .modal-title { margin: 0; }
.hy-shell .modal .close {
  background: none;
  border: none;
  color: var(--hy-faint);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.hy-shell .modal .close:hover { color: var(--hy-text); }

/* -------------------------------------------------------------- footer -- */

.hy-footer {
  border-top: 1px solid var(--hy-edge);
  padding: 1.25rem 1.5rem;
  background: #0c041b;
  font-size: 0.875rem;
  color: var(--hy-muted);
}
.hy-footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.hy-footer .hy-footer-version { color: var(--hy-faint); font-size: 0.75rem; }
.hy-footer ul { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; list-style: none; margin: 0; padding: 0; }
.hy-footer a { color: var(--hy-muted); }
.hy-footer a:hover { color: var(--hy-primary); text-decoration: none; }

/* --------------------------------------------- accordion / collapse -- */
/* credits.html + contact.html use Bootstrap accordions. Without Bootstrap's
   CSS these rendered as default grey UA buttons, and without its JS they
   never collapsed — base.html ships a small vanilla collapse shim. */

.hy-shell .accordion { border: 1px solid var(--hy-edge); border-radius: 0.75rem; overflow: hidden; }
.hy-shell .accordion-item { border-bottom: 1px solid var(--hy-edge); background: var(--hy-panel); }
.hy-shell .accordion-item:last-child { border-bottom: 0; }
.hy-shell .accordion-header { margin: 0; }
.hy-shell .accordion-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.85rem 1.15rem;
  background: var(--hy-panel-2);
  color: var(--hy-text);
  border: 0;
  border-radius: 0;
  font-family: var(--hy-font-display);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.hy-shell .accordion-button:hover { background: #221a36; }
.hy-shell .accordion-button::after {
  content: "\203A";
  transform: rotate(90deg);
  font-size: 1.2rem;
  color: var(--hy-faint);
  transition: transform 0.15s;
}
.hy-shell .accordion-button.collapsed::after { transform: rotate(0deg); }
.hy-shell .accordion-body { padding: 1.15rem; }
/* Collapse: hidden unless opened (Bootstrap's own rule, re-declared). */
.hy-shell .collapse:not(.show) { display: none; }
.hy-shell .collapse.show { display: block; }

/* ------------------------------------------------- dropdown / paging -- */

.hy-shell .dropdown { position: relative; display: inline-block; }
.hy-shell .dropdown-menu {
  display: none;
  position: absolute;
  z-index: 1000;
  min-width: 10rem;
  padding: 0.35rem 0;
  margin-top: 0.25rem;
  background: var(--hy-panel);
  border: 1px solid var(--hy-edge-strong);
  border-radius: 0.5rem;
}
.hy-shell .dropdown-menu.show { display: block; }
.hy-shell .dropdown-item { display: block; padding: 0.4rem 0.9rem; color: var(--hy-muted); }
.hy-shell .dropdown-item:hover { background: #221a36; color: var(--hy-text); text-decoration: none; }

.hy-shell .pagination { display: flex; flex-wrap: wrap; gap: 0.25rem; list-style: none; padding: 0; }
.hy-shell .page-item .page-link,
.hy-shell .page-link {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--hy-edge-strong);
  border-radius: 0.4rem;
  color: var(--hy-muted);
  font-size: 0.875rem;
}
.hy-shell .page-link:hover { background: #221a36; color: var(--hy-text); text-decoration: none; }
.hy-shell .page-item.active .page-link { background: var(--hy-primary-600); border-color: var(--hy-primary-600); color: #fff; }

.hy-shell .input-group { display: flex; align-items: stretch; gap: 0.35rem; }
.hy-shell .input-group .form-control { margin-bottom: 0; }

.hy-shell .nav-tabs { display: flex; flex-wrap: wrap; gap: 0.25rem; border-bottom: 1px solid var(--hy-edge); margin-bottom: 1rem; list-style: none; padding: 0; }
.hy-shell .nav-link { display: inline-block; padding: 0.45rem 0.8rem; border-radius: 0.5rem 0.5rem 0 0; color: var(--hy-muted); }
.hy-shell .nav-link:hover { background: #221a36; color: var(--hy-text); text-decoration: none; }
.hy-shell .nav-link.active { background: var(--hy-panel); color: var(--hy-text); border: 1px solid var(--hy-edge); border-bottom-color: transparent; }
.hy-shell .tab-pane:not(.active) { display: none; }

.hy-shell .table-striped tbody tr:nth-child(odd) { background: rgba(255,255,255,0.02); }

/* ------------------------------------------------------- 18+ age gate -- */
/* Restored from base_old.html: the `firsttimechecker` script (inherited by 11
   templates) queries #r18-overlay and #workspace. The 07d1a75 rewrite kept the
   script but dropped the markup, so it threw a TypeError. Shown to ANONYMOUS
   visitors only, matching the new UI's MainLayout.ageGateVisible(). */

.r18-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(7, 5, 14, 0.93);
  text-align: center;
  padding: 12vh 1.5rem 0;
  overflow-y: auto;
  color: var(--hy-text);
  font-family: var(--hy-font-sans);
}
.r18-overlay h1 { font-size: 4rem; margin-bottom: 0.5rem; }
.r18-overlay h2 { font-size: 1.35rem; margin-bottom: 1rem; }
.r18-overlay p { max-width: 40rem; margin: 0 auto 1.5rem; color: var(--hy-muted); font-size: 0.95rem; }
.r18-overlay img { display: inline-block; }
.r18-overlay .btn-success { background: rgba(52,211,153,0.15); border: 1px solid var(--hy-success); color: var(--hy-success); }

/* ------------------------------------------------- bootstrap utilities -- */
/* Used by includes/footer.html and assorted legacy pages. */

.hy-shell .list-inline { list-style: none; padding: 0; margin: 0; }
.hy-shell .list-inline-item { display: inline-block; margin-right: 0.75rem; }
.hy-shell .list-inline-item:last-child { margin-right: 0; }
.hy-shell .text-right { text-align: right; }
.hy-shell .text-center { text-align: center; }
.hy-shell .text-left { text-align: left; }
.hy-shell .d-block { display: block; }
.hy-shell .d-none { display: none; }
.hy-shell .mb-3 { margin-bottom: 1rem; }
.hy-shell .mt-3 { margin-top: 1rem; }
@media (min-width: 768px)  { .hy-shell .d-md-none  { display: none; } }
@media (min-width: 992px)  { .hy-shell .d-lg-none  { display: none; } }
@media (min-width: 1200px) { .hy-shell .d-xl-none  { display: none; } }
@media (min-width: 1400px) { .hy-shell .d-xxl-none { display: none; } }
@media (max-width: 575px)  { .hy-shell .d-xs-none  { display: none; } }

/* The legacy footer include hard-codes its own dark background + white text;
   keep it consistent with the new footer treatment. */
.hy-shell footer { border-top: 1px solid var(--hy-edge); background: #0c041b !important; }
.hy-shell footer p, .hy-shell footer small { color: var(--hy-muted) !important; }
.hy-shell footer a { color: var(--hy-muted) !important; }
.hy-shell footer a:hover { color: var(--hy-primary) !important; text-decoration: none; }

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

.hy-shell .lobster { font-family: var(--hy-font-display); }
.hy-shell .text-muted { color: var(--hy-faint); }
.hy-shell .navbar { background: transparent; }

/* ===========================================================================
 * SIDEBAR SHELL + GLASSMORPHISM (redesign, 2026-07)
 * Static Django mirror of the SPA's side-nav.ts + main-layout.ts glass shell.
 * Mirrors ui/src/styles.css (tuned values: heavier column blur, borderless).
 * ======================================================================== */

/* Ambient violet glows behind everything (glass needs a lit backdrop). Applies
   to both the reskinned content shell and the Angular-host shell. */
.shell-ambient {
  background-color: var(--hy-ground);
  background-image:
    radial-gradient(600px 420px at 12% -5%, rgba(139, 92, 246, 0.14), transparent 65%),
    radial-gradient(700px 520px at 95% 10%, rgba(217, 70, 239, 0.09), transparent 60%),
    radial-gradient(900px 700px at 50% 115%, rgba(76, 29, 149, 0.18), transparent 65%);
  background-attachment: fixed;
}

/* Glass upgrade for the legacy card surfaces (parallels the SPA's hy:bg-panel
   override). Translucent + blur so the ambient shows through. */
.hy-shell .hy-card,
.hy-shell .card,
.hy-shell .well,
.hy-shell .modal-content,
.hy-shell .accordion-item {
  background-color: rgba(17, 13, 29, 0.55);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(236, 233, 248, 0.04);
}

/* -- layout ---------------------------------------------------------------- */

.hy-content-col {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hy-sidebar {
  width: 280px;
  flex-shrink: 0;
  align-self: flex-start;   /* don't let flex stretch it past 100vh */
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 40;
  user-select: none;
}
.hy-sidebar-inner { display: flex; flex-direction: column; height: 100%; }
.hy-sidebar-scroll { flex: 1; overflow-y: auto; padding: 0.5rem; display: flex; flex-direction: column; gap: 1rem; }

/* Angular-host pages render their own chrome — hide the reskin sidebar/strip. */
.hy-chrome-only .hy-sidebar,
.hy-chrome-only .hy-topstrip { display: none; }

/* Glass panels (heavier column blur + borderless, matching the SPA tuning). */
.glass-column {
  background: rgba(13, 10, 24, 0.72);
  backdrop-filter: blur(45px) saturate(140%);
  -webkit-backdrop-filter: blur(45px) saturate(140%);
}
.glass-strip {
  background: rgba(13, 10, 24, 0.55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  position: sticky;
  top: 0;
  z-index: 30;
}

/* -- brand (sidebar header) ------------------------------------------------ */

.hy-shell .hy-brand {
  padding: 1rem;
  gap: 0.5rem;
}

/* -- in-sidebar search ----------------------------------------------------- */

.hy-side-search { position: relative; }
.hy-side-search i {
  position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%);
  font-size: 0.85rem; color: var(--hy-faint);
}
.hy-shell .hy-side-search input {
  width: 100%; margin: 0;
  padding: 0.5rem 0.75rem 0.5rem 2.1rem;
  border-radius: 18px;
  border: 1px solid var(--hy-edge-strong);
  background: rgba(7, 5, 14, 0.6);
  color: var(--hy-muted);
  font-size: 0.875rem;
}
.hy-shell .hy-side-search input:focus { outline: none; border-color: var(--hy-primary); box-shadow: none; }

/* -- nav groups + links ---------------------------------------------------- */

.side-section { display: flex; flex-direction: column; }
.side-group {
  display: flex; align-items: center; width: 100%;
  cursor: pointer; padding: 0.75rem; gap: 1rem;
  border-radius: 0.5rem; border: 1px solid transparent; background: none;
  color: var(--hy-text); font-family: var(--hy-font-display);
  font-weight: 600; font-size: 0.95rem; text-align: left;
  transition: background-color 0.15s, border-color 0.15s;
}
.side-group:hover { background: rgba(34, 26, 54, 0.6); border-color: rgba(59, 48, 96, 0.6); }
.side-group .side-caret { margin-left: auto; color: var(--hy-faint); font-size: 0.85rem; transition: transform 0.15s; }
.side-group.is-collapsed .side-caret { transform: rotate(-90deg); }

.side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.side-divider { border: 0; border-top: 1px solid var(--hy-edge); margin: 0; }

.hy-shell .side-link {
  display: flex; align-items: center; cursor: pointer;
  padding: 0.7rem 0.75rem; gap: 0.6rem;
  border-radius: 0.65rem; border: 1px solid transparent;
  color: var(--hy-muted); font-weight: 500; font-size: 0.95rem; line-height: 1.2;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.hy-shell .side-link:hover {
  background: rgba(34, 26, 54, 0.6); border-color: rgba(59, 48, 96, 0.6);
  color: var(--hy-text); text-decoration: none;
}
.side-link .side-icon { font-size: 1rem; line-height: 1; color: var(--hy-faint); transition: color 0.15s; }
.side-link:hover .side-icon { color: var(--hy-text); }
.hy-dice { width: 0.75rem; height: 0.75rem; display: block; }

.side-chip { display: inline-flex; align-items: center; justify-content: center; padding: 0.3rem; border-radius: 0.4rem; font-size: 0.75rem; }
.side-chip-violet { background: rgba(139, 92, 246, 0.2); border: 1px solid rgba(139, 92, 246, 0.3); color: #c4b5fd; }
.side-chip-amber { background: rgba(251, 191, 36, 0.15); border: 1px solid rgba(251, 191, 36, 0.3); color: #fcd34d; }
.side-chip-rose { background: rgba(251, 113, 133, 0.15); border: 1px solid rgba(251, 113, 133, 0.3); color: #fda4af; }

/* -- sidebar footer (user) ------------------------------------------------- */

.hy-sidebar-footer { padding: 1rem; margin-top: auto; border-top: 1px solid var(--hy-edge); }
.hy-shell .hy-side-user { display: flex; align-items: center; gap: 0.5rem; color: var(--hy-text); font-weight: 500; }
.hy-side-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 9999px;
  background: rgba(124, 58, 237, 0.3); border: 1px solid rgba(124, 58, 237, 0.5);
  font-size: 0.85rem;
}
.hy-side-fineprint { font-size: 0.75rem; color: var(--hy-faint); }

/* -- top strip ------------------------------------------------------------- */

.hy-topstrip { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem; }
.hy-hamburger { display: none; background: none; border: none; cursor: pointer; color: var(--hy-muted); font-size: 1.25rem; }
.hy-shell .hy-strip-icon { color: var(--hy-muted); display: inline-flex; align-items: center; font-size: 1.25rem; transition: color 0.15s; }
.hy-shell .hy-strip-icon:hover { color: var(--hy-text); text-decoration: none; }
.hy-topstrip .hy-dice { width: 1.25rem; height: 1.25rem; }

/* -- responsive: off-canvas sidebar under 1024px --------------------------- */

@media (max-width: 1023px) {
  .hy-sidebar {
    position: fixed; left: 0; top: 0;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 60;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
  }
  .hy-sidebar.is-open { transform: translateX(0); }
  .hy-hamburger { display: inline-flex; }
}

@media (min-width: 1024px) {
  .hy-topstrip { padding-left: 2rem; padding-right: 2rem; }
}
