/*
 * LINKBOXER — Miami Vice / Synthwave / Cyberpunk theme.
 * Self-contained, no framework. Inspired by pudding.cool's editorial scale
 * and 80s Miami: hot pink + cyan + violet on deep indigo, with a neon grid
 * horizon and CRT scanlines.
 */

@import url("https://fonts.googleapis.com/css2?family=Audiowide&family=Orbitron:wght@500;700;900&family=Rajdhani:wght@400;500;600;700&family=VT323&display=swap");

/* ============ Tokens ============ */
:root {
  --pink:    #ff2e9a;
  --magenta: #ff10f0;
  --cyan:    #00f0ff;
  --violet:  #b14aff;
  --yellow:  #fff35c;
  --orange:  #ff8a3d;
  --blue:    #2a6bff;

  --bg-0: #07021a;
  --bg-1: #0d0327;
  --bg-2: #150a3a;
  --card: rgba(18, 8, 56, 0.72);
  --card-solid: #150a3a;

  --ink:       #f6e8ff;
  --ink-dim:   #b8a4dd;
  --ink-faint: #7c6aa8;

  --grid-line: rgba(255, 46, 154, 0.22);
  --scan:      rgba(0, 240, 255, 0.045);

  --radius: 4px;
  --max-w:  1100px;
  --read-w: 760px;

  --shadow-neon-pink: 0 0 18px rgba(255, 46, 154, 0.55);
  --shadow-neon-cyan: 0 0 18px rgba(0, 240, 255, 0.55);
}

/* ============ Reset-ish ============ */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
  color: var(--ink);
  min-height: 100vh;
  font-family: "Rajdhani", system-ui, sans-serif;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body { position: relative; overflow-x: hidden; }

img, svg, video { max-width: 100%; height: auto; display: block; }

hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--violet), transparent);
  margin: 2rem 0;
}

ul, ol { padding-left: 1.25rem; }

/* ============ Background layers ============ */
.vice-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 55% at 50% 0%,
      rgba(255, 46, 154, 0.35) 0%,
      rgba(177, 74, 255, 0.18) 35%,
      transparent 70%),
    radial-gradient(ellipse 70% 50% at 50% 100%,
      rgba(0, 240, 255, 0.18) 0%,
      rgba(42, 107, 255, 0.08) 40%,
      transparent 75%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 55%, #050015 100%);
}

.vice-bg__sun {
  position: absolute;
  left: 50%;
  bottom: 38%;
  width: 520px;
  height: 520px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 55%,
    var(--yellow) 0%,
    var(--orange) 28%,
    var(--pink) 55%,
    var(--magenta) 75%,
    transparent 80%);
  filter: blur(2px) drop-shadow(0 0 80px rgba(255, 46, 154, 0.5));
  opacity: 0.55;
}

/* black scan-bands across the sun, vaporwave style */
.vice-bg__sun::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-linear-gradient(
    180deg,
    transparent 0 18px,
    rgba(7, 2, 26, 0.85) 18px 22px
  );
  mask: radial-gradient(circle, #000 60%, transparent 78%);
  -webkit-mask: radial-gradient(circle, #000 60%, transparent 78%);
}

.vice-bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 60px 60px, 60px 60px;
  mask-image: linear-gradient(180deg,
    transparent 0%,
    transparent 55%,
    rgba(0, 0, 0, 0.95) 70%,
    rgba(0, 0, 0, 0.5) 100%);
  -webkit-mask-image: linear-gradient(180deg,
    transparent 0%,
    transparent 55%,
    rgba(0, 0, 0, 0.95) 70%,
    rgba(0, 0, 0, 0.5) 100%);
  transform: perspective(600px) rotateX(58deg);
  transform-origin: 50% 100%;
  opacity: 0.65;
}

.vice-bg__scan {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      transparent calc(60% - 1px),
      var(--pink) calc(60% - 1px),
      var(--pink) calc(60% + 1px),
      transparent calc(60% + 1px)),
    repeating-linear-gradient(0deg,
      transparent 0,
      transparent 2px,
      var(--scan) 3px,
      transparent 4px);
  box-shadow: inset 0 0 200px rgba(0, 0, 0, 0.55);
}

/* ============ Header / brand ============ */
.vice-header {
  position: relative;
  z-index: 2;
  padding: 2rem 1.5rem 1rem;
  text-align: center;
}

.vice-header__inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.vice-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  text-decoration: none;
  font-family: "Audiowide", "Orbitron", sans-serif;
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  letter-spacing: 0.05em;
  line-height: 1;
}

.vice-brand__mark {
  font-family: "VT323", monospace;
  color: var(--cyan);
  text-shadow: 0 0 14px var(--cyan);
  font-size: 0.6em;
  transform: translateY(-0.1em);
}

.vice-brand__text {
  background: linear-gradient(180deg,
    #fff 0%,
    #ffe0f4 28%,
    var(--pink) 55%,
    var(--orange) 82%,
    var(--yellow) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px rgba(255, 46, 154, 0.6));
}

.vice-brand__text span {
  background: linear-gradient(180deg, var(--cyan) 0%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px rgba(0, 240, 255, 0.55));
}

.vice-stripes {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin: 0.75rem 0 0.5rem;
}
.vice-stripes span {
  width: 64px;
  height: 5px;
  border-radius: 1px;
}
.vice-stripes span:nth-child(1) { background: var(--pink);   box-shadow: 0 0 12px var(--pink); }
.vice-stripes span:nth-child(2) { background: var(--orange); box-shadow: 0 0 12px var(--orange); }
.vice-stripes span:nth-child(3) { background: var(--yellow); box-shadow: 0 0 12px var(--yellow); }
.vice-stripes span:nth-child(4) { background: var(--cyan);   box-shadow: 0 0 12px var(--cyan); }
.vice-stripes span:nth-child(5) { background: var(--violet); box-shadow: 0 0 12px var(--violet); }

.vice-tagline {
  margin: 0.4rem 0 0;
  font-family: "VT323", monospace;
  color: var(--cyan);
  letter-spacing: 0.3em;
  font-size: 1.15rem;
  text-shadow: 0 0 8px var(--cyan);
  text-transform: uppercase;
}

/* ============ Nav ============ */
.vice-nav {
  position: relative;
  z-index: 2;
  margin: 1.5rem auto 0;
  max-width: var(--max-w);
  border-top: 1px solid var(--pink);
  border-bottom: 1px solid var(--cyan);
  background: linear-gradient(90deg,
    rgba(255, 46, 154, 0.10),
    rgba(177, 74, 255, 0.08),
    rgba(0, 240, 255, 0.10));
  box-shadow:
    0 0 22px rgba(255, 46, 154, 0.22),
    0 0 22px rgba(0, 240, 255, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.vice-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vice-nav li { padding: 0; }

/* Sign Out is a button_to, not a link_to -- its <form> wrapper would
   otherwise sit in the flex flow as its own (block-level) item. */
.vice-nav form.button_to,
.vice-drawer form.button_to { display: contents; }

.vice-nav a,
.vice-nav button,
.vice-drawer a,
.vice-drawer button {
  display: block;
  width: 100%;
  padding: 0.85rem 1.4rem;
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: left;
  color: #fff;
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.4);
  transition: color 0.15s ease, text-shadow 0.15s ease, background 0.15s ease;
  background: none;
  border: 0;
  border-right: 1px solid rgba(177, 74, 255, 0.25);
  cursor: pointer;
}

.vice-nav li:last-child a,
.vice-nav li:last-child button { border-right: 0; }

.vice-nav a:hover,
.vice-nav a:focus,
.vice-nav button:hover,
.vice-nav button:focus,
.vice-drawer a:hover,
.vice-drawer a:focus,
.vice-drawer button:hover,
.vice-drawer button:focus {
  color: var(--pink);
  background: rgba(255, 46, 154, 0.06);
  text-shadow: 0 0 10px var(--pink), 0 0 22px var(--pink);
}

/* Sign Out reads as its own, slightly separated thing rather than just
   another destination -- same idea as the iOS drawer's magenta Sign Out row. */
.vice-nav li:last-child button,
.vice-drawer li:last-child button {
  color: var(--magenta);
  text-shadow: 0 0 6px rgba(255, 16, 240, 0.4);
}

/* ============ Mobile drawer (hidden above 600px, see below) ============ */
.vice-header__inner { position: relative; }

.vice-menu-toggle {
  display: none;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  background: rgba(21, 10, 58, 0.7);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 6px;
  cursor: pointer;
}

.vice-menu-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
  border-radius: 1px;
}

.vice-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  /* Darker than the iOS drawer's own 0.55 -- the backdrop sits over the
     sun/grid art here, not a flat dark background, and needed more opacity
     to read as dimmed rather than nearly invisible against it. */
  background: rgba(4, 1, 16, 0.86);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

.vice-drawer-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.2s ease;
}

.vice-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 21;
  width: 280px;
  max-width: 84vw;
  overflow-y: auto;
  padding: 1.5rem 0 2rem;
  background: var(--bg-1);
  border-right: 1px solid rgba(255, 46, 154, 0.35);
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.18);
  transform: translateX(-100%);
  transition: transform 0.22s ease;
}

.vice-drawer.is-open { transform: translateX(0); }

.vice-drawer__wordmark {
  text-align: center;
  margin-bottom: 1.25rem;
  padding: 0 1rem 1rem;
  border-bottom: 1px solid rgba(177, 74, 255, 0.25);
}

.vice-drawer .vice-brand--small { font-size: clamp(1.4rem, 7vw, 1.9rem); }

.vice-drawer ul {
  display: block;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vice-drawer li { padding: 0; }

.vice-drawer a,
.vice-drawer button { border-right: 0; }

body.vice-drawer-locked { overflow: hidden; }

/* ============ Layout ============ */
.vice-main {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 2rem auto;
  padding: 0 1.5rem 4rem;
}

.vice-footer {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1rem 1.5rem 3rem;
  text-align: center;
  font-family: "VT323", monospace;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

.vice-footer p { margin: 0; }

.vice-divider {
  height: 4px;
  background: linear-gradient(90deg,
    var(--pink), var(--orange), var(--yellow), var(--cyan), var(--violet));
  box-shadow: 0 0 18px rgba(255, 46, 154, 0.5);
  border-radius: 2px;
  margin: 0 0 1.25rem;
}

/* ============ Typography ============ */
h1, h2, h3, h4, h5, h6 {
  font-family: "Orbitron", sans-serif;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.05;
  margin: 0 0 0.75rem;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  background: linear-gradient(180deg, #fff 0%, #ffd5f4 45%, var(--pink) 75%, var(--orange) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(255, 46, 154, 0.45));
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--cyan);
  text-shadow: var(--shadow-neon-cyan);
}

h3 {
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 46, 154, 0.45);
}

h4 { font-size: 1.1rem; color: var(--cyan); letter-spacing: 0.12em; }
h5 { font-size: 0.95rem; color: var(--pink); letter-spacing: 0.18em; }
h6 { font-size: 0.85rem; color: var(--violet); letter-spacing: 0.25em; }

p { margin: 0 0 1rem; }

a {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease, text-shadow 0.15s ease;
}
a:hover, a:focus {
  color: var(--pink);
  text-shadow: 0 0 10px rgba(255, 46, 154, 0.7);
}

code, kbd, samp, pre {
  font-family: "VT323", ui-monospace, monospace;
  font-size: 1.05em;
}

code, samp {
  background: #0a0226;
  color: var(--cyan);
  padding: 0 0.3em;
  border-radius: 2px;
}

pre {
  background: #0a0226;
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-left: 3px solid var(--cyan);
  padding: 1rem;
  overflow-x: auto;
  border-radius: var(--radius);
}

kbd {
  background: #0a0226;
  color: var(--yellow);
  border: 1px solid var(--yellow);
  box-shadow: 0 0 6px rgba(255, 243, 92, 0.45);
  padding: 0 0.4em;
  border-radius: 2px;
}

/* A tag rendered as a button (e.g. Briefing's "click to block") -- same
   look as kbd above, plus a pointer cursor and a pink hover cue matching
   the app-wide a:hover accent, signaling the click is an action. */
.tag-block-btn {
  font-family: "VT323", ui-monospace, monospace;
  font-size: 1.05em;
  background: #0a0226;
  color: var(--yellow);
  border: 1px solid var(--yellow);
  box-shadow: 0 0 6px rgba(255, 243, 92, 0.45);
  padding: 0 0.4em;
  border-radius: 2px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.tag-block-btn:hover, .tag-block-btn:focus {
  color: var(--pink);
  border-color: var(--pink);
  box-shadow: 0 0 8px rgba(255, 46, 154, 0.6);
}

mark {
  background: var(--yellow);
  color: var(--bg-0);
  padding: 0 0.25em;
  box-shadow: 0 0 12px rgba(255, 243, 92, 0.55);
}

blockquote {
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  border-left: 3px solid var(--pink);
  background: rgba(255, 46, 154, 0.06);
  color: var(--ink);
  font-style: italic;
}

::selection { background: var(--pink); color: var(--bg-0); }

/* ============ Cards / articles ============ */
article {
  position: relative;
  background: var(--card);
  border: 1px solid rgba(255, 46, 154, 0.35);
  border-left: 3px solid var(--pink);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow:
    inset 0 0 0 1px rgba(0, 240, 255, 0.06),
    0 12px 40px rgba(0, 0, 0, 0.55),
    0 0 24px rgba(255, 46, 154, 0.10);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

article:hover {
  transform: translateY(-1px);
  border-color: var(--cyan);
  border-left-color: var(--cyan);
  box-shadow:
    inset 0 0 0 1px rgba(0, 240, 255, 0.18),
    0 12px 40px rgba(0, 0, 0, 0.55),
    0 0 32px rgba(0, 240, 255, 0.25);
}

article > header {
  border-bottom: 1px dashed rgba(177, 74, 255, 0.35);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}

article > header > a:first-child,
article > header h2 a,
article > header h3 a {
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 46, 154, 0.45);
  letter-spacing: 0.02em;
}

article > header > a:first-child:hover {
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan);
}

article > header p {
  font-family: "VT323", monospace;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--cyan);
  margin: 0.1rem 0;
  text-transform: lowercase;
}

article > footer {
  border-top: 1px dashed rgba(177, 74, 255, 0.35);
  padding-top: 0.5rem;
  margin-top: 0.75rem;
}

article img {
  border: 2px solid var(--violet);
  box-shadow: 0 0 14px rgba(177, 74, 255, 0.45);
  border-radius: 2px;
  margin-top: 0.5rem;
}

/* ============ Forms / buttons ============ */
input, textarea, select {
  font-family: "Rajdhani", sans-serif;
  font-size: 1rem;
  background: rgba(7, 2, 26, 0.7);
  border: 1px solid rgba(0, 240, 255, 0.45);
  color: #fff;
  border-radius: 2px;
  padding: 0.5rem 0.75rem;
  box-shadow: inset 0 0 10px rgba(0, 240, 255, 0.08);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea { min-height: 8rem; line-height: 1.5; }

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow:
    0 0 0 3px rgba(255, 46, 154, 0.25),
    inset 0 0 10px rgba(255, 46, 154, 0.08);
}

input::placeholder, textarea::placeholder {
  color: rgba(246, 232, 255, 0.45);
  font-style: italic;
}

button,
input[type=submit],
input[type=button],
.btn,
[role=button] {
  display: inline-block;
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--pink);
  border-radius: 2px;
  background: linear-gradient(180deg, var(--pink), #c1077a);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    0 0 12px rgba(255, 46, 154, 0.55),
    inset 0 0 14px rgba(255, 255, 255, 0.12);
  transition: transform 0.12s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

button:hover, .btn:hover, [role=button]:hover,
input[type=submit]:hover, input[type=button]:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow:
    0 0 18px var(--pink),
    0 0 32px rgba(255, 46, 154, 0.55),
    inset 0 0 14px rgba(255, 255, 255, 0.2);
}

button:active, .btn:active { transform: translateY(0); }

.secondary, [role=button].secondary, button.secondary,
.btn-outline-secondary, .btn-secondary {
  background: transparent;
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.35), inset 0 0 10px rgba(0, 240, 255, 0.05);
}

.secondary:hover, button.secondary:hover,
.btn-outline-secondary:hover, .btn-secondary:hover {
  background: rgba(0, 240, 255, 0.08);
  color: #fff;
  box-shadow: 0 0 18px var(--cyan);
}

.btn-outline-primary {
  background: transparent;
  border-color: var(--pink);
  color: var(--pink);
  box-shadow: 0 0 10px rgba(255, 46, 154, 0.35);
}
.btn-outline-primary:hover {
  background: rgba(255, 46, 154, 0.08);
  color: #fff;
}

.btn-outline-danger {
  background: transparent;
  border-color: var(--orange);
  color: var(--orange);
  box-shadow: 0 0 10px rgba(255, 138, 61, 0.4);
}
.btn-outline-danger:hover {
  background: rgba(255, 138, 61, 0.12);
  color: #fff;
}

.btn-sm { font-size: 0.7rem; padding: 0.38rem 0.85rem; letter-spacing: 0.14em; }

/* button_to wraps in <form>; flatten its layout */
form[action][method] { display: inline; margin: 0; }

/* ============ Tables (admin dashboard) ============ */
.vice-table-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--grid-line);
  border-radius: var(--radius);
}

.vice-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.vice-table th, .vice-table td {
  padding: 0.6rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--grid-line);
  white-space: nowrap;
}

.vice-table th {
  font-family: "Orbitron", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  color: var(--cyan);
}

.vice-table td { color: var(--ink-dim); }
.vice-table tr:last-child td { border-bottom: 0; }

.vice-table .inline-form select { margin-right: 0.4rem; }

/* A description cell (feature flags) needs to read as a sentence, not
   force the whole table wide the way every other nowrap cell does. */
.vice-table td.wrap { white-space: normal; max-width: 32rem; }

/* ============ Admin nav ============ */
.admin-nav {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
  font-family: "Orbitron", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
}

.admin-nav a { color: var(--ink-dim); }
.admin-nav a.admin-nav__current { color: var(--pink); }

/* ============ Flash ============ */
.vice-flash {
  font-family: "Orbitron", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  padding: 0.7rem 1rem;
  border-radius: 2px;
  margin: 0 0 1rem;
}

.vice-flash--notice {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  box-shadow: var(--shadow-neon-cyan);
}

.vice-flash--alert {
  background: rgba(255, 138, 61, 0.08);
  border: 1px solid var(--orange);
  color: var(--orange);
  box-shadow: 0 0 12px rgba(255, 138, 61, 0.45);
}

/* ============ Pagination ============ */
nav[aria-label="Page navigation"] span {
  font-family: "VT323", monospace;
  font-size: 1.15rem;
  color: var(--cyan);
  letter-spacing: 0.1em;
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.4);
}

/* ============ Tag pills (legacy inline-style overrides) ============ */
[style*="background: #f0f0f0"],
[style*="background: rgb(240, 240, 240)"] {
  background: rgba(0, 240, 255, 0.12) !important;
  color: var(--cyan) !important;
  border: 1px solid var(--cyan) !important;
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.55);
  font-family: "VT323", monospace !important;
  letter-spacing: 0.05em;
}

[style*="color: #888"]  { color: var(--violet) !important; }
[style*="color: #555"]  { color: var(--ink-dim) !important; }
[style*="border-top: 1px solid #e0e0e0"]  { border-top: 1px dashed rgba(177, 74, 255, 0.4) !important; }
[style*="border: 1px solid #e0e0e0"]      { border-color: rgba(255, 46, 154, 0.35) !important; }

/* ============ Dashboard overrides ============ */
#dashboard {
  background: transparent;
  color: var(--ink);
  font-family: "Rajdhani", sans-serif;
  padding: 1rem 0;
}

#dashboard .card,
#dashboard .news-title,
#dashboard .count {
  background: var(--card);
  border: 1px solid rgba(255, 46, 154, 0.35);
  border-left: 3px solid var(--pink);
  color: #fff;
  box-shadow: 0 0 20px rgba(255, 46, 154, 0.15);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 1rem;
  border-radius: var(--radius);
}

#dashboard .news-title,
#dashboard .count {
  font-family: "Orbitron", sans-serif;
  background: linear-gradient(180deg, #fff, var(--pink) 65%, var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(255, 46, 154, 0.5));
}

#dashboard .new {
  color: var(--yellow);
  text-shadow: 0 0 10px var(--yellow);
}

#dashboard .article-headline {
  font-family: "Orbitron", sans-serif;
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.45);
  color: #fff;
}

/* ============ Misc utility ============ */
.mb-3 { margin-bottom: 1rem; }
.text-muted { color: var(--ink-faint); }

/* Form layouts used in views */
.form-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.form-group  { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.form-control-sm { font-size: 0.9rem; padding: 0.35rem 0.6rem; }

/* Stacked field: label above its input/textarea/select, one per row.
   This is the default pattern for multi-field forms — .form-group above
   is row-flex and is only meant for single-line inline groups (search bars). */
.field { display: block; margin-bottom: 1rem; }
.field > label { display: block; margin-bottom: 0.35rem; }
.field input[type], .field textarea, .field select { width: 100%; }
.field input[type=checkbox], .field input[type=radio] { width: auto; }

/* Row of checkbox/radio toggles that should stay inline, not stack full-width */
.field-check { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; margin-bottom: 1rem; }
.field-check label { display: inline-flex; align-items: center; gap: 0.4rem; }

/* ============ Bento grid (links index) ============ */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  min-width: 0;
}

.bento-grid > * { min-width: 0; }

/* Every 5th+1 card (1,6,11…) spans 2 columns for visual rhythm */
.bento-grid turbo-frame:nth-child(5n+1) { grid-column: span 2; }

.bento-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--card);
  border: 1px solid rgba(255, 46, 154, 0.35);
  border-top: 3px solid var(--pink);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow:
    inset 0 0 0 1px rgba(0, 240, 255, 0.06),
    0 8px 32px rgba(0, 0, 0, 0.55),
    0 0 20px rgba(255, 46, 154, 0.10);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.bento-card:hover {
  transform: translateY(-2px);
  border-top-color: var(--cyan);
  box-shadow:
    inset 0 0 0 1px rgba(0, 240, 255, 0.18),
    0 12px 40px rgba(0, 0, 0, 0.55),
    0 0 32px rgba(0, 240, 255, 0.22);
}

.bento-card--unread {
  border-top-color: var(--cyan);
  box-shadow:
    inset 0 0 0 1px rgba(0, 240, 255, 0.06),
    0 8px 32px rgba(0, 0, 0, 0.55),
    0 0 20px rgba(0, 240, 255, 0.18);
}

.bento-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-2);
  flex-shrink: 0;
}

.bento-card__thumb--empty {
  background: repeating-linear-gradient(
    45deg,
    var(--bg-2) 0px,
    var(--bg-2) 10px,
    rgba(255, 46, 154, 0.06) 10px,
    rgba(255, 46, 154, 0.06) 20px
  );
}

.bento-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  box-shadow: none;
  margin: 0;
  border-radius: 0;
  transition: transform 0.3s ease;
}

.bento-card:hover .bento-card__thumb img { transform: scale(1.04); }

.bento-card__body {
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bento-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.bento-card__meta-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bento-card__category {
  font-family: "VT323", monospace;
  font-size: 1rem;
  color: var(--cyan);
  text-transform: lowercase;
  letter-spacing: 0.08em;
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.55);
}

.bento-card__bias-badge {
  font-family: "VT323", monospace;
  font-size: 0.85rem;
  color: var(--violet);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid var(--violet);
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
}

/* A reader-corrected value (see Link#political_bias_corrected?) displays
   in pink instead of violet -- the same accent .tag-block-btn's hover uses
   for "you changed something here," distinct at a glance from the plain
   AI-guess/confirmed-agreement violet above. */
.bento-card__bias-badge--corrected {
  color: var(--pink);
  border-color: var(--pink);
}

.bento-card__bias-select {
  font-family: "VT323", monospace;
  font-size: 0.8rem;
  background: transparent;
  color: var(--ink-dim);
  border: 1px solid var(--ink-faint);
  border-radius: 4px;
  padding: 0.05rem 0.2rem;
}

.bento-card__age {
  font-family: "VT323", monospace;
  font-size: 0.9rem;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}

.bento-card__unread-badge {
  font-family: "VT323", monospace;
  font-size: 0.9rem;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.55);
}

.bento-card__title {
  font-family: "Orbitron", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-shadow: none;
  color: unset;
}

.bento-card__title a {
  color: #fff;
  text-decoration: none;
  text-shadow: 0 0 8px rgba(255, 46, 154, 0.4);
}

.bento-card__title a:hover {
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan);
}

.bento-card__summary {
  font-size: 0.88rem;
  color: var(--ink-dim);
  line-height: 1.5;
  margin: 0;
}

.bento-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: auto;
  padding-top: 0.25rem;
}

.bento-card__footer {
  padding: 0.65rem 1rem;
  border-top: 1px dashed rgba(177, 74, 255, 0.35);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

@media (max-width: 900px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-grid turbo-frame:nth-child(5n+1) { grid-column: span 2; }
}

@media (max-width: 540px) {
  .bento-grid { grid-template-columns: 1fr; }
  .bento-grid turbo-frame:nth-child(5n+1) { grid-column: span 1; }
}

/* ============ Landing page ============ */
.hero {
  text-align: center;
  padding: 2.5rem 0 1.5rem;
}

.hero__tagline {
  font-size: 1.15rem;
  color: var(--ink-dim);
  max-width: var(--read-w);
  margin: 0 auto 1.75rem;
}

.hero__cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.hero__note {
  font-family: "VT323", monospace;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2.5rem;
}

.platform-card {
  text-align: center;
  padding: 1.1rem 1rem;
  background: var(--card);
  border: 1px solid rgba(255, 46, 154, 0.25);
  border-radius: var(--radius);
}

.platform-card__name {
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
}

.platform-card__status {
  display: block;
  margin-top: 0.4rem;
  font-family: "VT323", monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.platform-card__status--live { color: var(--cyan); text-shadow: 0 0 8px rgba(0, 240, 255, 0.5); }
.platform-card__status--soon { color: var(--ink-faint); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0 2.5rem;
}

.feature-card {
  background: var(--card);
  border: 1px solid rgba(0, 240, 255, 0.22);
  border-left: 3px solid var(--cyan);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.feature-card h3 { margin-bottom: 0.4rem; }
.feature-card p { color: var(--ink-dim); margin: 0; font-size: 0.95rem; }

.pricing-card {
  background: var(--card);
  border: 1px solid var(--violet);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
  box-shadow: 0 0 18px rgba(177, 74, 255, 0.18);
}

.pricing-card h3 { margin-bottom: 0.5rem; }
.pricing-card p:last-child { margin-bottom: 0; }

/* ============ Legal pages — narrower for readability ============ */
.legal { max-width: var(--read-w); margin: 0 auto; }
.legal h2 { margin-top: 2rem; }
.legal ul { padding-left: 1.25rem; }
.legal li { margin-bottom: 0.4rem; }

/* ============ Clips show — readable content area ============ */
.clip-show {
  background: rgba(10, 2, 38, 0.90);
  border: 1px solid rgba(255, 46, 154, 0.28);
  border-top: 3px solid var(--pink);
  border-radius: var(--radius);
  padding: 2rem 2.5rem 2.5rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 16px 56px rgba(0, 0, 0, 0.72),
    0 0 32px rgba(255, 46, 154, 0.10);
}

.clip-show__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.clip-show__meta { flex: 1 1 0; min-width: 0; }

.clip-show__actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
  align-items: flex-start;
}

/* Tone down the title — still neon, just human-sized */
.clip-show h1 {
  font-family: "Rajdhani", system-ui, sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.04em;
  line-height: 1.25;
  background: linear-gradient(135deg, #fff 0%, var(--pink) 60%, var(--orange) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: none;
  margin-bottom: 0.25rem;
}

/* Markdown body — readable prose */
.clip-body {
  font-family: "Rajdhani", system-ui, sans-serif;
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--ink);
}

.clip-body h1, .clip-body h2, .clip-body h3,
.clip-body h4, .clip-body h5, .clip-body h6 {
  font-family: "Rajdhani", system-ui, sans-serif;
  text-transform: none;
  letter-spacing: 0.02em;
  line-height: 1.3;
  margin: 1.5rem 0 0.5rem;
}

.clip-body h1 {
  font-size: 1.55rem;
  background: linear-gradient(135deg, #fff 0%, var(--pink) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: none;
}

.clip-body h2 {
  font-size: 1.3rem;
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.35);
}

.clip-body h3 { font-size: 1.1rem; color: #fff; text-shadow: none; }
.clip-body h4 { font-size: 1rem; color: var(--cyan); letter-spacing: 0.06em; }

.clip-body p, .clip-body li { color: var(--ink); }

.clip-body a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.clip-body ul, .clip-body ol { padding-left: 1.4rem; margin-bottom: 1rem; }

.clip-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  overflow-x: auto;
  display: block;
}

.clip-body th, .clip-body td {
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(177, 74, 255, 0.35);
  text-align: left;
}

.clip-body th {
  background: rgba(177, 74, 255, 0.12);
  color: var(--cyan);
  font-weight: 600;
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  article, button, a, .vice-nav a { transition: none; }
}

/* ============ Mobile ============ */
@media (max-width: 600px) {
  .vice-header { padding-top: 1.25rem; }
  .vice-main { padding: 0 1rem 3rem; }
  article { padding: 1rem; }

  .clip-show { padding: 1.25rem 1rem 1.5rem; }
  .clip-show__actions { width: 100%; justify-content: flex-end; }

  /* The horizontal nav wrapped into a multi-row grid down here -- swap it
     for the hamburger + slide-in drawer instead. */
  .vice-nav--desktop { display: none; }
  .vice-menu-toggle { display: flex; }
  .vice-header__inner { padding-left: 3.25rem; }
  /* The hamburger's reserved space made the wordmark's usual clamp() clip
     against the right edge -- give it a tighter ceiling here. */
  .vice-brand { font-size: clamp(1.7rem, 9vw, 2.4rem); }
}
