/* =========================================================================
   ShyzosImage design system
   ShyzosCorp identity: deep space base, magenta → violet → blue accent arc.
   ========================================================================= */

:root {
  /* Brand arc, read left to right off the infinity mark. */
  --brand-magenta: #ff2d9b;
  --brand-pink: #e935c8;
  --brand-violet: #8b3dff;
  --brand-indigo: #4f46e5;
  --brand-blue: #1d8cf8;
  --brand-cyan: #22d3ee;

  /*
   * The end colours sit outside the box on purpose. With stops at 0% and
   * 100% the pure magenta and pure blue land exactly on the left and right
   * edges, which on a pill are the curved, antialiased ends: they blend
   * against whatever is behind and read as coloured fringes. Pushing the
   * stops past the edges means the visible ends are already mixed.
   */
  --gradient-brand: linear-gradient(100deg, var(--brand-magenta) -12%, var(--brand-violet) 48%, var(--brand-blue) 112%);
  --gradient-brand-soft: linear-gradient(100deg, rgba(255, 45, 155, 0.18), rgba(139, 61, 255, 0.16) 50%, rgba(29, 140, 248, 0.18));
  --gradient-text: linear-gradient(96deg, #ff5fb0, #b57cff 46%, #56b6ff);

  /* Surfaces */
  --ink-void: #030409;
  --ink-base: #05060e;
  --ink-raised: #0b0d19;
  --ink-panel: rgba(18, 20, 36, 0.55);
  --ink-input: #090b16;

  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.11);
  /* The bright edge along the top of a raised surface. */
  --line-lit: rgba(255, 255, 255, 0.16);

  /* Text */
  --text: #eceefb;
  --text-soft: #b4b8d4;
  --text-muted: #7c81a3;

  /* Radii */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  /* Elevation: a hairline, a close contact shadow, then the ambient one. */
  --shadow-sm: 0 1px 0 var(--line-lit) inset, 0 2px 10px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 1px 0 var(--line-lit) inset, 0 8px 20px -10px rgba(0, 0, 0, 0.7), 0 24px 50px -26px rgba(0, 0, 0, 0.9);
  --shadow-lg: 0 1px 0 var(--line-lit) inset, 0 20px 40px -20px rgba(0, 0, 0, 0.8), 0 60px 120px -50px rgba(0, 0, 0, 1);
  --glow-magenta: 0 18px 50px -22px rgba(255, 45, 155, 0.6);
  --glow-blue: 0 18px 50px -22px rgba(29, 140, 248, 0.6);

  /* Vertical rhythm */
  --block: clamp(56px, 7vw, 96px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --shell: 1180px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink-base);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient light: three coloured pools drifting behind everything. */
body::before {
  content: "";
  position: fixed;
  inset: -20% -10%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(46% 38% at 12% 4%, rgba(255, 45, 155, 0.22), transparent 62%),
    radial-gradient(40% 34% at 88% 8%, rgba(29, 140, 248, 0.2), transparent 60%),
    radial-gradient(52% 44% at 50% 96%, rgba(139, 61, 255, 0.16), transparent 66%);
  filter: blur(20px);
}

/* A very slow colour drift, so the page is never quite static. */
@media (prefers-reduced-motion: no-preference) {
  body::before { animation: drift 42s ease-in-out infinite alternate; }
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-2%, 1.5%, 0) scale(1.06); }
}

/* Fine grain so the flat darks never look like plastic. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

h1 { letter-spacing: -0.04em; }

/* Body copy that carries a section. */
.lead {
  max-width: 62ch;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-soft);
  text-wrap: pretty;
}

p { margin: 0; }

a { color: inherit; text-decoration: none; }

/*
 * Inline code needs an explicit size. A bare `font-family: monospace` makes
 * browsers fall back to their fixed monospace default, which is smaller than
 * the surrounding text and shifts the line box: that is what made list items
 * containing code jump out of alignment.
 */
code, kbd, samp, pre {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

:not(pre) > code {
  padding: 0.1em 0.4em;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: rgba(139, 61, 255, 0.12);
  color: #d9c6ff;
  line-height: inherit;
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--brand-violet);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

::selection { background: rgba(139, 61, 255, 0.4); color: #fff; }

/* ---------- Reusable atoms ------------------------------------------------ */

.shell {
  width: min(100% - 48px, var(--shell));
  margin-inline: auto;
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 13px 5px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(12px);
  font-size: 0.69rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.eyebrow i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gradient-brand);
  box-shadow: 0 0 12px rgba(255, 45, 155, 0.9);
  animation: pulse 2.6s var(--ease) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.75); }
}

/*
 * Buttons.
 *
 * Squared-off rather than pill-shaped, and lit by a defined edge rather than
 * a wide blur. A large soft glow reads as a template; a crisp top highlight
 * and a tight contact shadow read as a control you can press.
 */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 550;
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.18s var(--ease),
    border-color 0.18s var(--ease),
    box-shadow 0.18s var(--ease),
    transform 0.12s var(--ease);
}

.button:active { transform: translateY(1px); }

.button:focus-visible {
  outline: 2px solid var(--brand-violet);
  outline-offset: 2px;
}

.button-primary {
  position: relative;
  color: #fff;
  background: linear-gradient(180deg, #a855f7, #7c2fe0);
  border-color: #6d28d9;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 1px 2px rgba(0, 0, 0, 0.5),
    0 6px 16px -8px rgba(139, 61, 255, 0.65);
}

.button-primary:hover {
  background: linear-gradient(180deg, #b168f8, #8a3df0);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 1px 2px rgba(0, 0, 0, 0.5),
    0 10px 22px -10px rgba(139, 61, 255, 0.8);
}

.button-primary:active {
  background: linear-gradient(180deg, #8a3df0, #6d28d9);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35);
}

.button-quiet {
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--line-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.button-quiet:hover {
  background: rgba(255, 255, 255, 0.095);
  border-color: rgba(255, 255, 255, 0.2);
}

.button-quiet:active { background: rgba(255, 255, 255, 0.04); box-shadow: none; }

.button-ghost {
  color: var(--text-soft);
  background: transparent;
  border-color: var(--line);
}

.button-ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--line-strong);
}

/* The arrow nudges on hover; nothing else moves. */
.button span[aria-hidden] { transition: transform 0.18s var(--ease); }
.button:hover span[aria-hidden] { transform: translateX(2px); }

/* Full-width inside a stacked form. */
.button-block { width: 100%; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: color 0.2s;
}

.text-link:hover { color: var(--text); }

/* A card whose 1px border is itself a gradient. */
.panel {
  position: relative;
  border-radius: var(--r-lg);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012));
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-md);
}

.panel-lit::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--gradient-brand);
  opacity: 0.5;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ---------- Brand mark ---------------------------------------------------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* The mark is a wide ribbon, so height follows the source aspect ratio. */
.brand-mark {
  width: 34px;
  height: auto;
  flex: none;
  filter: drop-shadow(0 0 16px rgba(139, 61, 255, 0.45));
}

.brand-accent {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Header -------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100% - 48px, var(--shell));
  margin: 18px auto 0;
  padding: 11px 12px 11px 20px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: rgba(9, 10, 20, 0.72);
  backdrop-filter: blur(22px) saturate(160%);
  box-shadow: var(--shadow-md);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a:not(.button) {
  padding: 9px 15px;
  border-radius: var(--r-pill);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: color 0.2s, background 0.2s;
}

.site-nav a:not(.button):hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

.site-nav .button { min-height: 36px; padding: 0 16px; font-size: 0.84rem; }

.mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(34, 211, 238, 0.09);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #8ee6f5;
}

.mode-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-cyan);
  box-shadow: 0 0 10px var(--brand-cyan);
}

/* ---------- Hero ---------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  align-items: center;
  gap: 64px;
  width: min(100% - 48px, var(--shell));
  margin: 0 auto;
  padding: 108px 0 96px;
}

.hero h1 {
  margin: 26px 0 22px;
  font-size: clamp(2.9rem, 6.1vw, 4.6rem);
  font-weight: 700;
}

.hero-copy {
  max-width: 47ch;
  font-size: 1.09rem;
  color: var(--text-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin: 36px 0 30px;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-proof span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-proof span::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand-violet);
  box-shadow: 0 0 8px var(--brand-violet);
}

/* ---------- Hero product mock -------------------------------------------- */

.hero-stage {
  position: relative;
  perspective: 1600px;
}

.hero-stage .glow {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.glow-pink { top: -70px; left: -50px; background: rgba(255, 45, 155, 0.4); }
.glow-blue { bottom: -80px; right: -40px; background: rgba(29, 140, 248, 0.36); }

.product-shell {
  position: relative;
  border-radius: var(--r-xl);
  border: 1px solid var(--line-strong);
  background: linear-gradient(168deg, rgba(23, 25, 44, 0.95), rgba(8, 9, 18, 0.95));
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(139, 61, 255, 0.1);
  overflow: hidden;
  transform: rotateY(-7deg) rotateX(3deg);
  transition: transform 0.7s var(--ease);
}

.hero-stage:hover .product-shell { transform: rotateY(-3deg) rotateX(1deg); }

.window-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.window-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.window-brand img { width: 20px; height: auto; }

.window-dots { display: flex; gap: 6px; }

.window-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.embed-preview {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.embed-url {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #7cc4ff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* A message-client unfurl: coloured spine, header, title, preview. */
.embed-card {
  position: relative;
  display: grid;
  gap: 7px;
  padding: 13px 15px 15px 17px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

.embed-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--gradient-brand);
}

.embed-card header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.embed-card header img { width: 16px; height: auto; }
.embed-card strong { font-family: var(--font-display); font-size: 0.9rem; color: #a5c8ff; }
.embed-card > p { font-size: 0.72rem; color: var(--text-muted); }

.embed-image {
  position: relative;
  height: 96px;
  margin-top: 3px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 45, 155, 0.5), rgba(139, 61, 255, 0.45) 50%, rgba(29, 140, 248, 0.5)),
    repeating-conic-gradient(#0c0e1a 0% 25%, #101324 0% 50%) 0 0 / 18px 18px;
  overflow: hidden;
}

/* Slow sheen so the fake preview reads as a live surface, not a flat block. */
.embed-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.28) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: sheen 4.5s var(--ease) infinite;
}

@keyframes sheen {
  0%, 60% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.embed-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 34px;
  margin-top: 4px;
}

.embed-wave i {
  flex: 1;
  border-radius: var(--r-pill);
  background: var(--gradient-brand);
  animation: bounce 1.3s var(--ease) infinite;
}

.embed-wave i:nth-child(3n) { animation-delay: -0.2s; }
.embed-wave i:nth-child(3n + 1) { animation-delay: -0.6s; }
.embed-wave i:nth-child(4n) { animation-delay: -0.9s; }

@keyframes bounce {
  0%, 100% { height: 22%; opacity: 0.55; }
  50% { height: 100%; opacity: 1; }
}


.floating-tag {
  position: absolute;
  z-index: 3;
  padding: 9px 15px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: rgba(13, 15, 29, 0.9);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-md);
  font-size: 0.76rem;
  font-weight: 500;
  animation: float 6s ease-in-out infinite;
}

.tag-one { top: 8%; right: -22px; animation-delay: -1s; }
.tag-two { bottom: 14%; left: -30px; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-11px); }
}

/* ---------- Split feature (image + paste) --------------------------------- */

.section-head {
  display: grid;
  gap: 18px;
  max-width: 620px;
  margin-bottom: 52px;
}

.section-head h2 { font-size: clamp(2rem, 3.9vw, 3rem); }
.section-head p { color: var(--text-soft); }

.duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 110px;
}

.duo-card {
  position: relative;
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 26px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}

.duo-card:hover { transform: translateY(-5px); border-color: var(--line-strong); }

.duo-card::after {
  content: "";
  position: absolute;
  top: -120px;
  right: -100px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  transition: opacity 0.4s;
}

.duo-card:hover::after { opacity: 0.6; }
.duo-media::after { background: var(--brand-magenta); }
.duo-paste::after { background: var(--brand-blue); }

.duo-card h3 { position: relative; font-size: 1.25rem; }
.duo-card > p { position: relative; color: var(--text-soft); }

.duo-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.duo-media .duo-badge { color: #ff8ac8; background: rgba(255, 45, 155, 0.12); border: 1px solid rgba(255, 45, 155, 0.3); }
.duo-paste .duo-badge { color: #7cc4ff; background: rgba(29, 140, 248, 0.12); border: 1px solid rgba(29, 140, 248, 0.3); }

.duo-list {
  position: relative;
  display: grid;
  gap: 11px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

/*
 * Padding and an absolute tick, not grid.
 *
 * A grid list item turns every inline element it contains into a grid item,
 * so a single `<code>` inside the text dropped onto its own row. Keeping the
 * item as normal flow keeps inline content inline.
 */
.duo-list li {
  position: relative;
  padding-left: 28px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-soft);
}

.duo-list li::before {
  content: "";
  position: absolute;
  left: 0;
  /* Centres the tick on the first line: (line-height - icon) / 2. */
  top: calc((0.9rem * 1.55 - 16px) / 2);
  width: 16px;
  height: 16px;
  border-radius: 6px;
  background: var(--gradient-brand);
  opacity: 0.85;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9.55 17.6 4.4 12.45l1.42-1.42 3.73 3.74 8.63-8.64 1.42 1.42z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9.55 17.6 4.4 12.45l1.42-1.42 3.73 3.74 8.63-8.64 1.42 1.42z'/%3E%3C/svg%3E") center / contain no-repeat;
}

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

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 110px;
}

.feature-card {
  position: relative;
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 22px 20px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
  transition: background 0.35s var(--ease), transform 0.35s var(--ease);
}

.feature-card:hover { background: rgba(255, 255, 255, 0.045); transform: translateY(-4px); }

.feature-card .icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 6px;
  border-radius: 13px;
  border: 1px solid var(--line-strong);
  background: var(--gradient-brand-soft);
  font-size: 1.05rem;
}

.feature-card h3 { font-size: 1rem; }
.feature-card p { font-size: 0.92rem; color: var(--text-muted); }

/* ---------- Call to action ------------------------------------------------ */

.cta {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 56px 36px;
  margin-bottom: 96px;
  text-align: center;
  border-radius: var(--r-xl);
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(70% 130% at 50% 0%, rgba(139, 61, 255, 0.24), transparent 70%),
    linear-gradient(170deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01));
  overflow: hidden;
}

.cta h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.cta p { max-width: 52ch; color: var(--text-soft); }
.cta .hero-actions { margin: 8px 0 0; justify-content: center; }

/* The footer lives further down, next to the navigation it belongs with. */

/* ---------- Responsive ---------------------------------------------------- */

@media (max-width: 940px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 60px; padding: 70px 0 80px; }
  .hero-stage { order: 2; }
  .product-shell { transform: none; }
  .floating-tag { display: none; }
  .duo { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .shell,
  .hero,
  .site-header,
  .site-footer { width: min(100% - 32px, var(--shell)); }
  .site-header { padding-left: 16px; }
  .cta { padding: 40px 22px; }
}

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

/* =========================================================================
   Refinements: the details that separate a dark theme from a good one.
   ========================================================================= */

/* A lit top edge on every raised surface. Light comes from above, once. */
.panel,
.duo-card,
.feature-card,
.product-shell,
.cta,
.auth-card {
  position: relative;
}

.panel::after,
.duo-card::before,
.feature-card::before,
.cta::before,
.auth-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-lit), transparent);
  pointer-events: none;
}

/* Section rhythm, driven by one token. */
.section-head { margin-bottom: calc(var(--block) * 0.42); }
.duo,
.feature-grid { margin-bottom: var(--block); }
.cta { margin-bottom: var(--block); }

.section-head .eyebrow { margin-bottom: 4px; }
.section-head h2 { font-size: clamp(1.65rem, 2.9vw, 2.35rem); }

.hero { padding: clamp(48px, 6vw, 84px) 0 var(--block); }
.hero h1 { font-size: clamp(2.3rem, 4.4vw, 3.5rem); margin: 20px 0 18px; }

/* Hero specification strip: three hard numbers, no format promises. */
.hero-spec {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 26px 0 0;
  border-top: 1px solid var(--line);
}

.hero-spec div {
  padding: 18px 26px 0 0;
  margin-right: 26px;
  border-right: 1px solid var(--line);
}

.hero-spec div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }

.hero-spec dt {
  margin: 0 0 4px;
  font-size: 0.7rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-spec dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.hero-copy .lead { margin-top: 0; }

/* Cards lift on a real hover, not a colour change. */
.duo-card,
.feature-card { box-shadow: var(--shadow-sm); }
.duo-card:hover,
.feature-card:hover { box-shadow: var(--shadow-md); }

.feature-card .icon { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1); }

/* =========================================================================
   Credential pages

   Two panels on wide screens: the form, and the context that makes the form
   make sense. The aside is decorative, so it disappears on narrow screens
   rather than pushing the form below the fold.
   ========================================================================= */

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  width: min(100% - 48px, 960px);
  margin: clamp(28px, 5vw, 64px) auto var(--block);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.auth-single { grid-template-columns: minmax(0, 1fr); max-width: 480px; }

.auth-form {
  display: grid;
  gap: 12px;
  align-content: start;
  justify-items: start;
  padding: clamp(28px, 4vw, 44px);
}

.auth-form h1 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); }
.auth-intro { font-size: 0.92rem; color: var(--text-soft); }
.auth-centered { justify-items: center; text-align: center; }

.auth-footer {
  margin-top: 2px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.auth-footer a { color: #b18bff; text-decoration: underline; text-underline-offset: 3px; }
.auth-footer a:hover { color: #cbb0ff; }

.form-stack {
  display: grid;
  gap: 15px;
  width: 100%;
  margin-top: 10px;
}

.input-code {
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---- The aside ---- */

.auth-aside {
  position: relative;
  display: grid;
  gap: 14px;
  align-content: center;
  padding: clamp(28px, 4vw, 44px);
  border-left: 1px solid var(--line);
  background:
    radial-gradient(90% 70% at 80% 10%, rgba(139, 61, 255, 0.16), transparent 70%),
    rgba(255, 255, 255, 0.015);
  overflow: hidden;
}

.auth-aside-glow {
  position: absolute;
  right: -60px;
  bottom: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255, 45, 155, 0.18);
  filter: blur(70px);
  pointer-events: none;
}

.auth-mark {
  width: 96px;
  height: auto;
  margin-bottom: 4px;
  opacity: 0.95;
  filter: drop-shadow(0 0 22px rgba(139, 61, 255, 0.35));
}

.auth-aside h2 { position: relative; font-size: 1.25rem; }
.auth-aside p { position: relative; font-size: 0.9rem; color: var(--text-soft); }

.auth-facts {
  position: relative;
  display: grid;
  gap: 10px;
  margin: 8px 0 0;
}

.auth-facts div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.auth-facts div:last-child { border-bottom: 0; padding-bottom: 0; }
.auth-facts dt { margin: 0; font-size: 0.8rem; color: var(--text-muted); }

.auth-facts dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.auth-steps {
  position: relative;
  display: grid;
  gap: 9px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.auth-steps li {
  position: relative;
  padding-left: 30px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-soft);
  counter-increment: step;
}

.auth-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(139, 61, 255, 0.45);
  background: rgba(139, 61, 255, 0.15);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: #c9a6ff;
}

.form-error,
.form-notice {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  font-size: 0.88rem;
}

.form-error {
  border: 1px solid rgba(255, 107, 139, 0.35);
  background: rgba(255, 107, 139, 0.1);
  color: #ffa8b9;
}

.form-notice {
  border: 1px solid rgba(92, 230, 168, 0.3);
  background: rgba(92, 230, 168, 0.09);
  color: #8ff0c4;
}

@media (max-width: 820px) {
  .auth { grid-template-columns: minmax(0, 1fr); max-width: 480px; }
  .auth-aside { display: none; }
}

@media (max-width: 640px) {
  .auth { width: min(100% - 32px, 480px); }
}

.field-hint { font-size: 0.8rem; color: var(--text-muted); }

.key-reveal {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(139, 61, 255, 0.4);
  background: rgba(4, 5, 12, 0.7);
  overflow-x: auto;
}

.key-reveal code {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #d9c6ff;
  white-space: nowrap;
}

.invite-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.invite-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: rgba(4, 5, 12, 0.45);
}

.invite-list code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #d9c6ff;
}

.settings-subhead {
  margin: 22px 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.inline-form { display: inline-flex; margin: 0; }
.inline-form.spaced { margin-bottom: 22px; }

@media (max-width: 640px) {
  .auth { width: min(100% - 32px, var(--shell)); }
  .auth-card { padding: 28px 22px; }
  .hero-spec div { padding-right: 18px; margin-right: 18px; }
}

/* =========================================================================
   Badges and usernames

   Role set carried over from the previous build, drawn with the current
   palette. Each badge is a tinted chip: a coloured glyph, a hairline in the
   same hue, and a wash behind it.
   ========================================================================= */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 9px;
  border-radius: 9px;
  border: 1px solid var(--badge-line, rgba(255, 255, 255, 0.14));
  /*
   * The plate carries the hue now. The first version put every badge on the
   * same dark glass with only the mark coloured, which made a row of them
   * read as one thing repeated. The tint is low enough to stay dark next to
   * the surface it sits on, and different enough to tell apart at a glance.
   */
  background:
    linear-gradient(180deg, var(--badge-top, rgba(255, 255, 255, 0.07)), var(--badge-bottom, rgba(255, 255, 255, 0.02))),
    rgba(9, 10, 20, 0.9);
  color: var(--badge-text, var(--text-soft));
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.45;
  white-space: nowrap;
  vertical-align: middle;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 1px 2px rgba(0, 0, 0, 0.3);
}

.badge-mark {
  flex: none;
  width: 15px;
  height: 15px;
  color: var(--badge-glyph, currentColor);
  margin-top: -0.5px;
}

.badge-label { display: block; }

.badge-sm {
  gap: 6px;
  padding: 3px 10px 3px 7px;
  font-size: 0.67rem;
  border-radius: 8px;
}

.badge-sm .badge-mark { width: 13px; height: 13px; }

.badge-owner {
  --badge-text: #ffdfae;
  --badge-glyph: #ffbe57;
  --badge-line: rgba(255, 190, 87, 0.5);
  --badge-top: rgba(255, 190, 87, 0.26);
  --badge-bottom: rgba(255, 145, 60, 0.08);
}

.badge-co-owner {
  --badge-text: #ffd2ea;
  --badge-glyph: #ff8ac8;
  --badge-line: rgba(255, 138, 200, 0.5);
  --badge-top: rgba(255, 138, 200, 0.26);
  --badge-bottom: rgba(177, 139, 255, 0.1);
}

.badge-admin {
  --badge-text: #ffc2e0;
  --badge-glyph: #ff3ea5;
  --badge-line: rgba(255, 62, 165, 0.5);
  --badge-top: rgba(255, 62, 165, 0.26);
  --badge-bottom: rgba(255, 62, 165, 0.05);
}

.badge-dev {
  --badge-text: #d9c6ff;
  --badge-glyph: #a175ff;
  --badge-line: rgba(161, 117, 255, 0.5);
  --badge-top: rgba(139, 61, 255, 0.3);
  --badge-bottom: rgba(139, 61, 255, 0.06);
  font-family: var(--font-mono);
  letter-spacing: 0.07em;
}

.badge-mod {
  --badge-text: #a9f0d5;
  --badge-glyph: #34d39d;
  --badge-line: rgba(52, 211, 157, 0.48);
  --badge-top: rgba(52, 211, 157, 0.24);
  --badge-bottom: rgba(52, 211, 157, 0.05);
}

.badge-staff {
  --badge-text: #b7dcff;
  --badge-glyph: #3c92f5;
  --badge-line: rgba(60, 146, 245, 0.5);
  --badge-top: rgba(60, 146, 245, 0.26);
  --badge-bottom: rgba(60, 146, 245, 0.05);
}

.badge-bot {
  --badge-text: #b6ecf5;
  --badge-glyph: #22d3ee;
  --badge-line: rgba(34, 211, 238, 0.46);
  --badge-top: rgba(34, 211, 238, 0.22);
  --badge-bottom: rgba(34, 211, 238, 0.04);
  font-family: var(--font-mono);
  letter-spacing: 0.09em;
}

/*
 * Premium is the one badge with the full arc behind it, and it is a fixed
 * sheen rather than an animation. A chip that moves on every page pulls the
 * eye away from the content it sits next to.
 */
.badge-premium {
  --badge-text: #ffe7bd;
  --badge-glyph: #ffc963;
  --badge-line: rgba(255, 201, 99, 0.5);
  background:
    linear-gradient(112deg, rgba(255, 201, 99, 0.3), rgba(255, 45, 155, 0.18) 52%, rgba(60, 146, 245, 0.2)),
    rgba(9, 10, 20, 0.9);
}

.badge-user {
  --badge-text: #aab2d2;
  --badge-glyph: #8b95bd;
  --badge-line: rgba(255, 255, 255, 0.14);
}

/* Quieter than a member, because it is a state to see on your own page and
   not a rank to read on somebody else's. */
.badge-free {
  --badge-text: #8d94ad;
  --badge-glyph: #737b96;
  --badge-line: rgba(255, 255, 255, 0.1);
}

.badge-banned {
  --badge-text: #ffbcc8;
  --badge-glyph: #ff5f7f;
  --badge-line: rgba(255, 95, 127, 0.5);
  --badge-top: rgba(255, 95, 127, 0.24);
  --badge-bottom: rgba(255, 95, 127, 0.05);
}

/* ------------------------------------------------------------- Usernames -- */

.user-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/*
 * One solid colour per rank, held close together in lightness so a name still
 * reads as a name. The two top ranks get a gradient because there are only
 * ever a couple of those accounts.
 */
.user-tag {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.user-tag-user,
.user-tag-free { color: var(--text); }
.user-tag-staff { color: #82bdf2; }
.user-tag-mod { color: #63d0ad; }
.user-tag-dev { color: #ac8ff0; }
.user-tag-admin { color: #ee85c1; }
.user-tag-bot { color: #55cadd; font-family: var(--font-mono); }
.user-tag-banned { color: var(--text-muted); text-decoration: line-through; }

.user-tag-co-owner {
  background: linear-gradient(96deg, #f08fc6, #c9a4f2 62%, #9bb2f0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.user-tag-owner {
  background: linear-gradient(96deg, #f0c46e, #f08fc6 55%, #ac8ff0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.user-tag-premium {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* =========================================================================
   Navigation

   The same links render twice: inline on wide screens, inside a disclosure
   on narrow ones. Previously the narrow case just hid them, which made the
   dashboard and admin unreachable on a phone.
   ========================================================================= */

.nav-inline {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-menu { display: none; position: relative; }

.nav-menu summary {
  display: grid;
  place-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  list-style: none;
}

.nav-menu summary::-webkit-details-marker { display: none; }

.nav-menu summary span {
  display: block;
  width: 16px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

.nav-menu[open] summary span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-menu[open] summary span:nth-child(2) { opacity: 0; }
.nav-menu[open] summary span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.nav-drawer {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 60;
  display: grid;
  gap: 2px;
  min-width: 220px;
  padding: 8px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: rgba(9, 10, 20, 0.97);
  backdrop-filter: blur(22px) saturate(160%);
  box-shadow: var(--shadow-lg);
}

.nav-drawer a {
  display: block;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-soft);
}

.nav-drawer a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav-drawer .nav-admin { color: #ffa8d4 !important; }

.nav-drawer .nav-signout {
  display: block;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.nav-drawer .nav-signout .button { width: 100%; }

@media (max-width: 860px) {
  .nav-inline { display: none; }
  .nav-menu { display: block; }
  .nav-user { display: none; }
}

/* =========================================================================
   Footer
   ========================================================================= */

.site-footer {
  display: block;
  width: min(100% - 48px, var(--shell));
  margin: 0 auto;
  padding: 44px 0 36px;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--text-muted);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr);
  gap: 40px;
  padding-bottom: 32px;
}

.footer-brand { display: grid; gap: 12px; align-content: start; justify-items: start; }
.footer-brand p { max-width: 34ch; font-size: 0.85rem; line-height: 1.6; }

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 28px;
}

.footer-links > div { display: grid; gap: 7px; align-content: start; }

.footer-links h3 {
  margin-bottom: 4px;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.footer-links a {
  font-size: 0.86rem;
  color: var(--text-muted);
  transition: color 0.2s;
  overflow-wrap: anywhere;
}

.footer-links a:hover { color: var(--text); }

.footer-note {
  margin-top: -3px;
  font-size: 0.74rem;
  color: #61668a;
}

/* The language switcher, in the footer bar. Same control on every service. */
.lang-picker { position: relative; }

.lang-picker > summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text-soft);
  cursor: pointer;
  list-style: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}

/* Both spellings: one browser family still wants the WebKit pseudo-element. */
.lang-picker > summary::-webkit-details-marker { display: none; }
.lang-picker > summary::marker { content: ""; }

.lang-picker > summary:hover { color: var(--text); border-color: var(--line-strong); }

/* The chevron flips, so the control says whether it is open without a script. */
.lang-picker > summary::after {
  content: "";
  width: 5px;
  height: 5px;
  margin-left: 1px;
  border-right: 1.4px solid currentColor;
  border-bottom: 1.4px solid currentColor;
  transform: rotate(-135deg) translate(-2px, -2px);
  transition: transform 0.15s ease;
}

.lang-picker[open] > summary::after { transform: rotate(45deg) translate(-1px, -1px); }

.lang-picker .globe { flex: none; opacity: 0.8; }

.lang-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 20;
  display: grid;
  gap: 2px;
  min-width: 190px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  /* Opaque: a translucent menu over a footer is two sets of words at once. */
  background: #10111d;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.lang-choice {
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  text-align: left;
  color: var(--text-soft);
  cursor: pointer;
}

.lang-choice:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }

/* The one already chosen is text, not a disabled button: it is the state, not
   an unavailable option. */
.lang-choice.is-current { color: var(--text); cursor: default; font-weight: 600; }

.lang-note {
  padding: 6px 10px 2px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
  font-size: 0.72rem;
  line-height: 1.5;
  color: #61668a;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}

.footer-bottom a { color: var(--text-soft); text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom a:hover { color: var(--text); }

@media (max-width: 760px) {
  .footer-top { grid-template-columns: minmax(0, 1fr); gap: 30px; }
}

@media (max-width: 640px) {
  .site-footer { width: min(100% - 32px, var(--shell)); }
}


/* =========================================================================
   Syntax colours

   One palette for both the Markdown code fences and the paste source view.
   Hues are borrowed from the brand arc so highlighted code still belongs to
   the rest of the interface.
   ========================================================================= */

.tok-comment { color: #5f6588; font-style: italic; }
.tok-keyword { color: #ff79c6; font-weight: 500; }
.tok-literal { color: #ffb86c; }
.tok-string { color: #9ae6a0; }
.tok-number { color: #ffb86c; }
.tok-function { color: #7cc4ff; }
.tok-punct { color: #7c81a3; }
.tok-tag { color: #ff79c6; }
.tok-attr { color: #c9a6ff; }


/* =========================================================================
   Form controls

   These live here rather than in the dashboard stylesheet: sign-in and
   registration are public pages, and they were rendering raw browser inputs
   because the styles were only loaded inside the member area.
   ========================================================================= */

.field { display: grid; gap: 7px; }

.field label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/*
 * `appearance: none` is not cosmetic here. While the control keeps its native
 * appearance the engine paints the platform widget and ignores the background
 * and border entirely, which left these inputs as white boxes on a dark page.
 */
.field input,
.field select,
.field textarea {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 42px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--ink-input);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.92rem;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease);
}

.field input::placeholder,
.field textarea::placeholder { color: #565b7d; }

.field input:hover,
.field select:hover,
.field textarea:hover { border-color: rgba(255, 255, 255, 0.18); }

.field select {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%237c81a3' d='m7 10 5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 20px;
  cursor: pointer;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(139, 61, 255, 0.7);
  background: #0b0d1a;
  box-shadow: 0 0 0 3px rgba(139, 61, 255, 0.18);
}

/* Browsers paint their own autofill background; this keeps it dark. */
.field input:-webkit-autofill,
.field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px #0b0d1a inset;
  caret-color: var(--text);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

/* =========================================================================
   Markdown rendering
   ========================================================================= */

/*
 * Rendered Markdown.
 *
 * Lives here rather than in the dashboard stylesheet: the legal pages are
 * public and never loaded dashboard.css, so they were rendering with no
 * hierarchy at all, every line the same near-white as the headings.
 */
.markdown {
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.markdown > *:first-child { margin-top: 0; }
.markdown > *:last-child { margin-bottom: 0; }

.markdown h1,
.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
  margin: 1.9em 0 0.65em;
  line-height: 1.3;
  color: var(--text);
}

.markdown h1 { font-size: 1.9rem; }

.markdown h2 {
  font-size: 1.45rem;
  padding-bottom: 0.35em;
  border-bottom: 1px solid var(--line);
}

.markdown h3 { font-size: 1.15rem; }
.markdown h4 { font-size: 1rem; }

.markdown p { margin: 0 0 1.1em; }

.markdown a { color: #a78bfa; text-decoration: underline; text-underline-offset: 3px; }
.markdown a:hover { color: #c9a6ff; }

.markdown strong { color: var(--text); font-weight: 600; }
.markdown del { color: var(--text-muted); }

.markdown code {
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(139, 61, 255, 0.12);
  font-family: var(--font-mono);
  font-size: 0.86em;
  color: #d9c6ff;
}

.markdown pre {
  margin: 0 0 1.3em;
  padding: 16px 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: rgba(4, 5, 12, 0.8);
  overflow-x: auto;
}

.markdown pre code {
  padding: 0;
  border: 0;
  background: none;
  color: #d7dbf5;
  font-size: 0.85rem;
  line-height: 1.7;
}

.markdown pre[data-language]::before {
  content: attr(data-language);
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-violet);
}

.markdown blockquote {
  margin: 0 0 1.3em;
  padding: 4px 0 4px 18px;
  border-left: 3px solid transparent;
  border-image: var(--gradient-brand) 1;
  color: var(--text-muted);
}

.markdown ul,
.markdown ol { margin: 0 0 1.2em; padding-left: 1.4em; }

.markdown li { margin-bottom: 0.4em; }
.markdown li::marker { color: var(--brand-violet); }
.markdown li.task { list-style: none; margin-left: -1.4em; }
.markdown li.task input { accent-color: var(--brand-violet); margin-right: 8px; }

.markdown hr {
  height: 1px;
  margin: 2em 0;
  border: 0;
  background: var(--gradient-brand);
  opacity: 0.4;
}

.markdown img { max-width: 100%; border-radius: var(--r-sm); }

.markdown table {
  width: 100%;
  margin: 0 0 1.3em;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.markdown th,
.markdown td {
  padding: 9px 14px;
  border: 1px solid var(--line);
  text-align: left;
}

.markdown th {
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-weight: 600;
}

.markdown tbody tr:hover { background: rgba(139, 61, 255, 0.06); }


/* =========================================================================
   Legal and help pages

   Long documents need contrast between levels, not uniform brightness.
   Headings are bright, body copy is a step down, and asides are a step down
   again. A page of near-white on near-black is what made these unreadable.
   ========================================================================= */

.legal {
  width: min(100% - 48px, 1080px);
  margin: 0 auto;
  padding: 36px 0 var(--block);
}

.legal-head {
  display: grid;
  gap: 11px;
  justify-items: start;
  padding-bottom: 24px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.legal-head h1 { font-size: clamp(1.7rem, 3vw, 2.25rem); }
.legal-head .lead { font-size: 1rem; }
.legal-updated { font-size: 0.76rem; color: #61668a; }

/* Move between the four documents without going back to the footer. */
.legal-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 8px;
  padding: 3px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.legal-switch a {
  padding: 7px 14px;
  border-radius: var(--r-xs);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
}

.legal-switch a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

.legal-switch a[aria-current="page"] {
  color: #fff;
  background: rgba(139, 61, 255, 0.35);
}

.legal-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

/* ---- Contents ---- */

.legal-toc {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 8px;
}

.legal-toc-title {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.legal-toc ol {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.legal-toc a {
  display: block;
  padding: 6px 10px;
  border-left: 2px solid var(--line);
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text-muted);
  transition: color 0.2s, border-color 0.2s;
}

.legal-toc a:hover { color: var(--text); border-color: var(--brand-violet); }

/* ---- Document ---- */

.legal-body { max-width: 68ch; }

.legal-section { scroll-margin-top: 96px; }
.legal-section + .legal-section { margin-top: 34px; padding-top: 30px; border-top: 1px solid var(--line); }

.legal-section > h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
  line-height: 1.35;
  color: var(--text);
}

/* Terms are numbered; the other documents are not. */
.legal-numbered { counter-reset: clause; }

.legal-numbered .legal-section > h2 {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: baseline;
  gap: 2px;
  counter-increment: clause;
}

.legal-numbered .legal-section > h2::before {
  content: counter(clause) ".";
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--brand-violet);
}

/* Body copy sits below the headings in brightness, which is the whole point. */
.legal-body .markdown { color: #a9aecb; }
.legal-body .markdown p { margin-bottom: 0.9em; }
.legal-body .markdown > *:last-child { margin-bottom: 0; }
.legal-body .markdown strong { color: var(--text-soft); }
.legal-body .markdown a { color: #a78bfa; }

.legal-body .markdown table {
  font-size: 0.86rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

.legal-body .markdown th,
.legal-body .markdown td { border: 0; border-bottom: 1px solid var(--line); }
.legal-body .markdown tbody tr:last-child td { border-bottom: 0; }
.legal-body .markdown td:first-child { color: var(--text-soft); white-space: nowrap; }

/* ---- Callouts ---- */

.callout {
  display: grid;
  gap: 4px;
  margin: 0 0 1em;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  border-left: 3px solid;
  font-size: 0.9rem;
}

.callout strong { color: var(--text); }
.callout span { color: var(--text-soft); }

.callout-note {
  border-color: var(--brand-violet);
  background: rgba(139, 61, 255, 0.09);
}

.callout-warn {
  border-color: #ff6b8b;
  background: rgba(255, 107, 139, 0.09);
}

.callout-warn strong { color: #ffb3c2; }

/* ---- Rule lists ---- */

.rule-list {
  display: grid;
  gap: 9px;
  margin: 0 0 1em;
  padding: 0;
  list-style: none;
}

.rule-list li {
  position: relative;
  padding: 10px 14px 10px 34px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255, 107, 139, 0.2);
  background: rgba(255, 107, 139, 0.05);
  font-size: 0.89rem;
  line-height: 1.55;
}

.rule-list li::before {
  content: "\2717";
  position: absolute;
  left: 13px;
  top: 10px;
  font-size: 0.82rem;
  color: #ff6b8b;
}

.rule-list-soft li {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.rule-list-soft li::before { content: "\2022"; color: var(--text-muted); }

/* ---- Contact list ---- */

.contact-list { display: grid; gap: 10px; margin: 0; }

.contact-list div {
  display: grid;
  gap: 2px;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.contact-list dt { margin: 0; font-size: 0.88rem; font-weight: 600; }
.contact-list dt a { color: #a78bfa; }
.contact-list dd { margin: 0; font-size: 0.83rem; color: var(--text-muted); }

.legal-foot {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.legal-foot a { color: #a78bfa; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 900px) {
  .legal-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .legal-toc {
    position: static;
    padding: 14px 16px;
    border-radius: var(--r-sm);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.025);
  }
  .legal-toc ol { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .legal-toc a { border-left: 0; padding-left: 0; }
  .legal-body { max-width: none; }
}

@media (max-width: 640px) {
  .legal { width: min(100% - 32px, 1080px); }
}

/* =========================================================================
   Status pages: suspended account, maintenance
   ========================================================================= */

.status {
  display: grid;
  place-items: center;
  width: min(100% - 48px, 620px);
  margin: clamp(28px, 5vw, 64px) auto var(--block);
}

.status-card {
  display: grid;
  gap: 14px;
  justify-items: start;
  width: 100%;
  padding: clamp(26px, 4vw, 40px);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
  box-shadow: var(--shadow-lg);
}

.status-centered { justify-items: center; text-align: center; }
.status-card h1 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); }
.status-body { font-size: 0.94rem; color: var(--text-soft); }
.status-body a { color: #a78bfa; text-decoration: underline; text-underline-offset: 3px; }

.status-mark {
  width: 88px;
  height: auto;
  filter: drop-shadow(0 0 22px rgba(139, 61, 255, 0.35));
}

.status-reason {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  border-left: 3px solid #ff6b8b;
  background: rgba(255, 107, 139, 0.09);
}

.status-reason-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #ffa8b9;
}

.status-reason p:last-child { font-size: 0.93rem; color: var(--text); }

.status-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 2px; }

.eyebrow-warn {
  border-color: rgba(255, 107, 139, 0.35);
  color: #ffa8b9;
}

.eyebrow-warn i {
  background: linear-gradient(100deg, #ff6b8b, #ff9bb4);
  box-shadow: 0 0 12px rgba(255, 107, 139, 0.8);
}

@media (max-width: 640px) {
  .status { width: min(100% - 32px, 620px); }
}


/*
 * The signed-in member, with their avatar, in the header.
 *
 * The pill is sized by its own line box rather than by the avatar, so the
 * padding is symmetric around a 28px image and the name is centred against it.
 */
.nav-user {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 4px 14px 4px 4px;
  line-height: 28px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-soft);
  white-space: nowrap;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.nav-user:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line-strong);
}

.nav-avatar {
  display: block;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  /* The ring is a box-shadow rather than a border: a border on a round <img>
     lets the corners of the image escape past the circle, which shows as four
     patches of colour. A box-shadow follows the curve. */
  box-shadow: 0 0 0 1px var(--line-strong);
  overflow: hidden;
}

/* The initial needs centring; the image does not. */
span.nav-avatar { display: grid; place-items: center; }

.nav-avatar-empty {
  background: var(--gradient-brand);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.78rem;
}

.user-line-link { transition: opacity 0.18s var(--ease); }
.user-line-link:hover { opacity: 0.78; }
.user-line-link:hover .user-tag { text-decoration: underline; text-underline-offset: 3px; }

/* Marks a field the form works without. */
.field-optional {
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  vertical-align: 1px;
}

/* The rules page has no contents list, so the body takes the full column. */
.legal-layout-single { grid-template-columns: minmax(0, 1fr); }

.rules-raw {
  white-space: pre-wrap;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-soft);
}

/* =========================================================================
   The phone

   Three things a desktop browser never shows you, found by measuring the
   rendered page at 375 pixels rather than by looking at it.
   ========================================================================= */

@media (max-width: 640px) {
  /*
   * Anything under 16px makes iOS Safari zoom the whole page when the field
   * takes focus, and it does not zoom back out. The fields were 15.2px, so
   * every form on a phone ended with the reader pinching to see the rest of
   * it. Nothing about the layout changes; the text is one step larger inside
   * the control, which on a phone is the right size anyway.
   */
  .field input,
  .field select,
  .field textarea { font-size: 16px; }

  /*
   * Footer links were 22px tall with 7px between them, which is a 22px target
   * for a finger that covers about 45. Padding rather than a taller font, so
   * the type stays the size it was and only the reachable area grows.
   */
  .footer-links a { display: block; padding: 11px 0; }
  .footer-links > div { gap: 0; }
  .footer-brand .brand { padding: 6px 0; }

  /* A form's own button has the width of the form, the way every phone
     keyboard's own buttons do. */
  .form-stack > .button,
  .form-stack > button { width: 100%; }
}

/* =========================================================================
   The header on a phone

   Two symptoms, one cause.

   `.nav-user`, the chip with the avatar and the name, is hidden below 860px
   by a rule written earlier in this file than the rules that give the chip
   its own `display`. Same specificity, so source order decides, and the later
   one won: the chip never hid. With the menu button beside it the row was
   wider than the header it sits in, and what you saw depended on the site.
   ShyzosImage does not wrap, so its menu button sat outside the pill. The
   others do, so the name took a line of its own and pushed the button under
   it.

   The chip goes; the drawer already says who you are, and the avatar is not
   worth a row of its own on a screen this size.
   ========================================================================= */

@media (max-width: 860px) {
  .nav-user { display: none; }
}

@media (max-width: 640px) {
  /* Tighter, because at this width the pill has nothing to spare. */
  .site-header { gap: 12px; padding: 10px 14px; }

  /* One row, always. Wrapping here is what stacked the two controls. */
  .site-nav { flex-wrap: nowrap; }

  /* If anything has to give, it is the wordmark, and it gives by ellipsis. */
  .brand { min-width: 0; }
  .brand > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

