/* =========================================================================
   ShyzosCorp

   The front door, and the place passwords are typed. The palette is the one
   the products use; the frame is wider, because this page has something to
   say before it asks for anything.
   ========================================================================= */

:root {
  --ink: #070812;
  --ink-raised: #0e1020;
  --ink-input: #0a0b16;

  --text: #eceefb;
  --text-soft: #b9beda;
  --text-muted: #7d84a6;

  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);

  --magenta: #ff2d9b;
  --violet: #8b3dff;
  --blue: #1d8cf8;

  /*
   * 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(120deg, #ff2d9b -12%, #8b3dff 52%, #1d8cf8 112%);
  --gradient-text: linear-gradient(96deg, #ffc963, #ff6fb5 52%, #6fb6f7);

  --r-xs: 7px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

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

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

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

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

h1, h2, h3 { font-family: var(--font-display); line-height: 1.25; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid rgba(139, 61, 255, 0.7);
  outline-offset: 2px;
}

/* A single slow wash, rather than the three-pool drift the product sites use. */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 12% 0%, rgba(139, 61, 255, 0.16), transparent 70%),
    radial-gradient(50% 45% at 92% 8%, rgba(29, 140, 248, 0.13), transparent 70%),
    radial-gradient(40% 40% at 50% 100%, rgba(255, 45, 155, 0.08), transparent 70%);
  pointer-events: none;
}

/* ------------------------------------------------------------- Structure -- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(100% - 40px, var(--shell));
  margin: 18px auto 0;
  padding: 12px 18px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: rgba(12, 13, 26, 0.72);
  backdrop-filter: blur(16px);
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; }
.brand-mark { display: block; object-fit: contain; }
.brand-accent { background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px 18px;
  font-size: 0.88rem;
  color: var(--text-soft);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a:not(.button):hover { color: var(--text); }
.who { color: var(--text-muted); font-size: 0.82rem; }

main {
  width: min(100% - 40px, var(--shell));
  margin: 0 auto;
  padding: 40px 0 64px;
}

/* The footer is the one ShyzosImage uses, so the family reads as one. */
.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;
}

.key-reveal {
  width: 100%;
  padding: 13px 15px;
  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 {
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: #d9c6ff;
  white-space: nowrap;
}

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

@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;
}

.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 picker, on the footer's bottom row.
 *
 * A `details` rather than a row of pills: one control that says what the
 * language currently is before it offers to change it, on the line people
 * actually reach the end of. It opens upward because it lives at the bottom of
 * the page, and a menu that opens downward there opens off the screen.
 *
 * The word for the language, written in that language, and never a flag. A flag
 * is a country, and French is not France to most of the people reading it.
 */
.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; }
}

/* ---------------------------------------------------------------- Pieces -- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--gradient-brand); }

.lead { color: var(--text-soft); max-width: 62ch; }

.panel {
  padding: 26px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012)),
    rgba(10, 11, 22, 0.7);
}

.head { display: grid; gap: 10px; margin-bottom: 26px; }
.head h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }

/* ---------------------------------------------------------------- Fields -- */

.form-stack { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

label { font-size: 0.86rem; font-weight: 500; color: var(--text-soft); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  appearance: none;
  -webkit-appearance: none;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--ink-input);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.field textarea { min-height: 190px; resize: vertical; line-height: 1.65; }

.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  border-color: rgba(139, 61, 255, 0.6);
  outline: none;
  box-shadow: 0 0 0 3px rgba(139, 61, 255, 0.16);
}

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

.notice, .error {
  padding: 12px 16px;
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.notice { border: 1px solid rgba(52, 211, 157, 0.35); background: rgba(52, 211, 157, 0.09); color: #a9f0d5; }
.error { border: 1px solid rgba(255, 95, 127, 0.4); background: rgba(255, 95, 127, 0.1); color: #ffbcc8; }

/* --------------------------------------------------------------- Buttons -- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
}

.button:hover { transform: translateY(-1px); }
/*
 * The border carries a colour rather than staying transparent. The background
 * is painted across the border box, so a transparent border lets the gradient
 * through it and blend with the page at the rounded ends, which is what put a
 * fringe down each side of the button.
 */
.button-primary {
  background: var(--gradient-brand);
  border-color: rgba(139, 61, 255, 0.85);
  color: #fff;
  box-shadow: 0 8px 24px rgba(139, 61, 255, 0.28);
}
.button-quiet { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.05); color: var(--text); }
.button-quiet:hover { background: rgba(255, 255, 255, 0.09); }
.button-ghost { border-color: var(--line); color: var(--text-soft); background: transparent; }
.button-ghost:hover { color: var(--text); border-color: var(--line-strong); }
.button-block { width: 100%; }

.inline-form { display: inline-flex; gap: 8px; }

/* --------------------------------------------------------------- Tickets -- */

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.status-open { color: #f0cf94; border-color: rgba(237, 180, 95, 0.4); background: rgba(237, 180, 95, 0.1); }
.status-answered { color: #8fc7f5; border-color: rgba(60, 146, 245, 0.4); background: rgba(60, 146, 245, 0.1); }
.status-waiting { color: #cbb6f2; border-color: rgba(154, 108, 240, 0.4); background: rgba(154, 108, 240, 0.1); }
.status-resolved { color: #a9f0d5; border-color: rgba(52, 211, 157, 0.35); background: rgba(52, 211, 157, 0.09); }

.reference {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.ticket-list { display: grid; gap: 10px; }

.ticket-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), transform 0.18s var(--ease);
}

.ticket-row:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.045); transform: translateX(3px); }

.ticket-subject { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.ticket-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 4px; font-size: 0.78rem; color: var(--text-muted); }
.ticket-side { display: grid; justify-items: end; gap: 6px; }

/* ---------------------------------------------------------------- Thread -- */

.thread { display: grid; gap: 14px; margin: 24px 0; }

.message {
  padding: 18px 20px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
}

/* Staff replies are the ones being looked for when someone reopens a thread. */
.message-staff {
  border-color: rgba(139, 61, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(139, 61, 255, 0.08), transparent),
    rgba(255, 255, 255, 0.02);
}

.message-internal { border-style: dashed; border-color: rgba(237, 180, 95, 0.4); background: rgba(237, 180, 95, 0.05); }

.message-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.message-who { font-weight: 600; font-size: 0.92rem; }
.message-when { font-size: 0.76rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* The body is written by people we do not know: it is text, and stays text. */
.message-body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-soft); font-size: 0.94rem; }

.tag-internal {
  padding: 1px 9px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(237, 180, 95, 0.4);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f0cf94;
}

/* ----------------------------------------------------------------- Lists -- */

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 22px;
  padding: 5px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: none;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}

.tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.tab[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, 0.07); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 26px; }

.stat {
  padding: 16px 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
}

.stat b { display: block; font-family: var(--font-display); font-size: 1.6rem; line-height: 1.1; }
.stat span { font-size: 0.76rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }

.empty {
  padding: 40px 24px;
  border-radius: var(--r-md);
  border: 1px dashed var(--line-strong);
  text-align: center;
  color: var(--text-muted);
}

.split { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: start; }
.side { display: grid; gap: 14px; }
.side dl { display: grid; gap: 12px; margin: 0; }
.side dt { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.side dd { margin: 3px 0 0; font-size: 0.9rem; overflow-wrap: anywhere; }

.picker { display: flex; flex-wrap: wrap; gap: 8px; }

/* A radio card: the product picker, which reads better than a select here. */
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }

.choice span {
  display: grid;
  gap: 2px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.choice b { font-size: 0.92rem; font-weight: 600; }
.choice small { font-size: 0.76rem; color: var(--text-muted); }
.choice input:checked + span { border-color: rgba(139, 61, 255, 0.55); background: rgba(139, 61, 255, 0.12); }
.choice input:focus-visible + span { outline: 2px solid rgba(139, 61, 255, 0.7); outline-offset: 2px; }

.key-reveal {
  padding: 14px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: rgba(4, 5, 12, 0.6);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

@media (max-width: 860px) {
  .split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
  main { padding: 28px 0 48px; }
  .panel { padding: 20px; }
  .ticket-row { grid-template-columns: minmax(0, 1fr); }
  .ticket-side { justify-items: start; }
  .site-header { border-radius: var(--r-md); }
}

/* --------------------------------------------- Badges and usernames -- */

/* =========================================================================
   The front door
   ========================================================================= */

main.narrow { width: min(100% - 40px, 560px); }

.hero { padding: 40px 0 52px; display: grid; gap: 18px; justify-items: start; }
.hero h1 { font-size: clamp(2.1rem, 5.6vw, 3.6rem); line-height: 1.05; letter-spacing: -0.02em; }
.hero .lead { font-size: 1.06rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 10px 0 40px;
}

.card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 24px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    rgba(10, 11, 22, 0.7);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card h2 { font-size: 1.15rem; }
.card p { color: var(--text-soft); font-size: 0.94rem; }
.card-quiet { background: rgba(255, 255, 255, 0.02); }
.card-quiet:hover { transform: none; }

.text-link { color: #c9a6ff; font-size: 0.9rem; font-weight: 500; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.strip {
  padding: 30px 26px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(139, 61, 255, 0.14), transparent 62%),
    rgba(255, 255, 255, 0.02);
}

.strip h2 { font-size: 1.25rem; margin-bottom: 8px; }

/* ------------------------------------------------------------------ Team -- */

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

.member {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
}

.member-avatar {
  display: block;
  width: 72px;
  height: 72px;
  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;
}

span.member-avatar-empty {
  display: grid;
  place-items: center;
  background: var(--gradient-brand);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.6rem;
}

.member-name { font-size: 1.02rem; }
.member-badges { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.member-bio { margin-top: 8px; font-size: 0.86rem; color: var(--text-muted); }

/* --------------------------------------------------------------- Account -- */

.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.84rem;
  font-weight: 500;
  color: var(--text-soft);
  white-space: nowrap;
}

.nav-user:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.nav-admin { color: #ffb4dd; }

.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;
}

span.nav-avatar-empty {
  display: grid;
  place-items: center;
  background: var(--gradient-brand);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.8rem;
}

.connected { display: grid; gap: 10px; margin-top: 16px; }

.connection {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
}

/* The browser reading the page. Marked rather than hidden, so the list is
   complete and the row that cannot be ended says why. */
.connection.is-current {
  border-color: rgba(139, 61, 255, 0.4);
  background: rgba(139, 61, 255, 0.07);
}

/* ------------------------------------------------------- Second step -- */

.method-row { align-items: flex-start; }

/* What a method is actually worth, said next to its name rather than left
   for somebody to work out. */
.rank {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 2px;
}

.rank-basic { color: #d7b57a; border-color: rgba(215, 181, 122, 0.35); background: rgba(215, 181, 122, 0.09); }
.rank-strong { color: #8fd6ff; border-color: rgba(143, 214, 255, 0.35); background: rgba(143, 214, 255, 0.09); }
.rank-strongest { color: #8ff0c4; border-color: rgba(92, 230, 168, 0.38); background: rgba(92, 230, 168, 0.1); }

/* The one screen in the application whose content cannot be seen again. */
.codes-panel { border-color: rgba(92, 230, 168, 0.35); }

.codes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.codes code {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(4, 5, 12, 0.6);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: #d9f5e6;
  text-align: center;
}

.hint.error { color: #ffa8b9; }

/* Said where the damage happens, not only where it is started. */
.warn-line {
  padding: 12px 15px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(215, 181, 122, 0.32);
  background: rgba(215, 181, 122, 0.08);
  color: #e2c79a;
  font-size: 0.86rem;
  line-height: 1.65;
}

.warn-line strong { color: #f2ddb9; }

/* ------------------------------------------------------------- Dialogs -- */

/*
 * Rendered open by the server, upgraded to a real modal by a script. Both
 * states have to look right: without the script this is a panel in the page,
 * with it, it is centred over a backdrop.
 */
.modal {
  width: min(100% - 32px, 460px);
  padding: 26px 28px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: var(--ink-raised);
  color: var(--text);
}

.modal-wide { width: min(100% - 32px, 560px); }

.modal::backdrop {
  background: rgba(3, 4, 9, 0.72);
  backdrop-filter: blur(3px);
}

.modal-head { margin-bottom: 16px; }
.modal-head h2 { margin-bottom: 8px; font-size: 1.2rem; }

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* Not a modal yet, or no script: it still has to sit somewhere sensible. */
.modal:not(:modal) {
  margin: 18px auto;
  display: block;
}

.qr {
  display: flex;
  justify-content: center;
  margin: 18px 0;
}

.qr svg {
  border-radius: 10px;
  /* The quiet zone is drawn inside the square, so this is framing only. */
  background: #eceefb;
}

.reveal summary {
  cursor: pointer;
  font-size: 0.84rem;
  color: var(--text-muted);
  padding: 6px 0;
}

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

/* --------------------------------------------------------------- Consent -- */

.consent-who { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }

.consent-list { display: grid; gap: 10px; margin: 0 0 18px; padding: 0; list-style: none; }

.consent-list li {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
}

.consent-list b { font-size: 0.92rem; }
.consent-list span { font-size: 0.82rem; color: var(--text-muted); }

.consent-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.consent-actions .button { flex: 1; min-width: 140px; }

/* --------------------------------------------------------------- Members -- */

.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }

.filter-search {
  flex: 1 1 220px;
  min-width: 180px;
  padding: 10px 14px;
  appearance: none;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--ink-input);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.88rem;
}

.segmented {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  overflow-x: auto;
  scrollbar-width: none;
}

.segmented::-webkit-scrollbar { display: none; }

.segmented button {
  padding: 6px 14px;
  border: 0;
  border-radius: var(--r-xs);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

.segmented button[aria-pressed="true"] { color: #fff; background: rgba(139, 61, 255, 0.35); }

.member-row { display: flex; align-items: center; gap: 14px; min-width: 0; }

.row-avatar {
  display: block;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--ink-raised);
}

span.row-avatar-empty {
  display: grid;
  place-items: center;
  background: var(--gradient-brand);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.9rem;
}

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

@media (max-width: 620px) {
  .member { flex-direction: column; align-items: flex-start; }
  .consent-actions .button { width: 100%; }
}

/* ------------------------------------------------------------ Action log -- */

.log {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  overflow: hidden;
}

.log-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  padding: 13px 18px;
  background: rgba(255, 255, 255, 0.018);
  border-left: 2px solid transparent;
}

.log-row:nth-child(even) { background: rgba(255, 255, 255, 0.032); }

/* Anything that took something away is worth picking out of a long list. */
.log-destructive { border-left-color: rgba(224, 99, 127, 0.55); }

.log-when {
  display: grid;
  gap: 2px;
  font-size: 0.76rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.log-ip { font-family: var(--font-mono); font-size: 0.7rem; opacity: 0.7; }

.log-what p { margin: 0; font-size: 0.88rem; line-height: 1.5; }

.log-action {
  display: inline-block;
  margin-right: 7px;
  padding: 1px 9px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.log-destructive .log-action {
  color: #eeb2be;
  border-color: rgba(224, 99, 127, 0.4);
  background: rgba(224, 99, 127, 0.1);
}

.log-subject { color: var(--text-soft); }
.log-detail { margin-top: 3px !important; color: var(--text-muted); font-size: 0.82rem !important; }

@media (max-width: 760px) {
  .log-row { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px 14px; }
  .log-when { grid-auto-flow: column; justify-content: start; gap: 10px; }
}

.mini-select {
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xs);
  background: var(--ink-input);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.84rem;
}


/* =========================================================================
   Tokens the sheet already used

   Eight declarations across this file referred to these and they were never
   defined here, which in CSS is not an error: the declaration is simply
   dropped. So the rhythm between sections collapsed, the raised surfaces lost
   their shadow, and the lit top edge drew as nothing at all.

   Values are ShyzosImage's, because four sites that nearly match look worse
   than four that do.
   ========================================================================= */

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

  /* 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);

  /* Vertical rhythm. Every gap between sections is this or a fraction of it. */
  --block: clamp(56px, 7vw, 96px);
}

/* =========================================================================
   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;
  }
}

/* =========================================================================
   The header links

   Reported as "the buttons are stuck together", on the three sites that are
   not ShyzosImage, which is exactly right: they had a colour on hover and no
   padding at all, so the links touched each other and the hover lit a
   rectangle with no room around the word.

   ShyzosImage had the rule from the start. It never came across with the rest
   of the stylesheet, and nobody noticed for as long as the header was the
   only thing nobody looked at.
   ========================================================================= */

.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);
}

/* The buttons beside them get a height of their own, so a row of links and a
   button do not sit on two different baselines. */
.site-nav .button { min-height: 36px; padding: 0 16px; font-size: 0.84rem; }

/* =========================================================================
   The account tabs

   The account page was seven panels in one column, and somebody looking for
   one of them had to scroll past the other six and read while scrolling to
   know when to stop. It is three pages now.

   Same rules as ShyzosImage's settings, deliberately: two of our own services
   disagreeing about where settings live and what they look like costs more
   than the duplication of a dozen lines.
   ========================================================================= */

.settings-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 26px;
  padding: 5px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
  overflow-x: auto;
  scrollbar-width: none;
}

.settings-tabs::-webkit-scrollbar { display: none; }

.settings-tab {
  flex: 1;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}

.settings-tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }

.settings-tab.is-current {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

/*
 * The scrollbar is hidden, so on a phone the only thing saying the strip
 * scrolls is a tab cut in half at the edge. Fading that edge says it more
 * clearly, and only where the tabs can actually overflow.
 */
@media (max-width: 640px) {
  .settings-tabs {
    mask-image: linear-gradient(90deg, #000 88%, transparent);
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
}

/*
 * A region that just replaced itself.
 *
 * Content changing with no reason given reads as a glitch, and the reason
 * here is that something arrived. One pass of a lit edge is enough to say so
 * without pulling the eye off whatever was being read.
 */
[data-live-region].live-arrived {
  animation: live-arrived 1.2s ease-out;
}

@keyframes live-arrived {
  from { box-shadow: 0 0 0 1px rgba(139, 61, 255, 0.55); }
  to { box-shadow: 0 0 0 1px rgba(139, 61, 255, 0); }
}

@media (prefers-reduced-motion: reduce) {
  [data-live-region].live-arrived { animation: none; }
}

/* ---------------------------------------------------------------- Status -- */

/*
 * The banner carries the whole answer, so it is the one thing on the page with
 * a colour. Everything under it is detail somebody reads second.
 */
.status-banner {
  padding: 24px 26px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-strong);
  background: rgba(10, 11, 22, 0.7);
  margin-bottom: 26px;
}

.status-banner h2 { font-size: 1.35rem; margin-bottom: 6px; }
.status-banner p { color: var(--text-soft); line-height: 1.6; }

/* A stripe rather than a tinted panel: readable in both, and colourblind-safe
   because the sentence beside it says the same thing. */
.status-banner { border-left-width: 3px; }
.status-ok { border-left-color: #34d399; }
.status-warn { border-left-color: var(--magenta); }
.status-note { border-left-color: var(--blue); }
.status-unknown { border-left-color: var(--text-muted); }

.status-section {
  font-size: 1.05rem;
  margin: 26px 0 12px;
}

.status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border-radius: var(--r-md, 12px);
  border: 1px solid var(--line);
  background: rgba(10, 11, 22, 0.5);
  margin-bottom: 10px;
}

.status-item h3 { font-size: 1rem; margin-bottom: 4px; }

.status-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.status-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/*
 * The service list.
 *
 * A dot for the colour and a word for the meaning, always both. A row that
 * only changes colour says nothing in a screenshot, on a printed page, or to
 * somebody who cannot tell green from amber.
 */
.status-components {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(10, 11, 22, 0.5);
  overflow: hidden;
}

.status-component {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
}

.status-component:last-child { border-bottom: 0; }
.status-group .status-name { font-weight: 600; }

/* Indented, and lighter, so the group above reads as the heading it is. */
.status-child { padding-left: 34px; }
.status-child .status-name { color: var(--text-soft); }

.status-name { font-size: 0.92rem; }

.status-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.status-state i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  background: var(--text-muted);
}

.state-operational i { background: #34d399; }
.state-degraded i { background: #fbbf24; }
.state-partial i { background: #fb923c; }
.state-major i { background: var(--magenta); }
.state-maintenance i { background: var(--blue); }

.state-operational { color: var(--text-soft); }
.state-degraded,
.state-partial,
.state-major { color: var(--text); }

/* =========================================================================
   Legal documents: terms, privacy

   Ported from ShyzosImage, which had these and this site did not. Three
   brightness steps hold the page together: headings are bright, body copy sits
   a step down, and asides a step down again. A wall of near-white on near-black
   is what made the first version of these unreadable.
   ========================================================================= */

.legal {
  width: min(100% - 48px, var(--shell));
  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: var(--text-muted); }

/* Move between the 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;
}

.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(--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 clauses; the privacy policy is 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(--violet);
}

/*
 * Body copy sits below the headings in brightness, which is the whole point.
 *
 * Written out here rather than leaning on a shared prose class: this site
 * renders no markdown and has none, and a document that depended on one would
 * be a document waiting for somebody to add it.
 */
.legal-prose { color: var(--text-soft); line-height: 1.65; }
.legal-prose p { margin: 0 0 0.9em; }
.legal-prose > *:last-child { margin-bottom: 0; }
.legal-prose strong { color: var(--text); font-weight: 600; }
.legal-prose a { color: #a78bfa; text-decoration: underline; text-underline-offset: 3px; }
.legal-prose a:hover { color: #c9a6ff; }

.legal-prose code {
  padding: 2px 6px;
  border-radius: var(--r-xs);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--text);
}

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

.legal-prose th,
.legal-prose td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.legal-prose th {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
}

.legal-prose tbody tr:last-child td { border-bottom: 0; }
.legal-prose td:first-child { color: var(--text); width: 38%; }

/* ---- 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;
  line-height: 1.55;
}

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

.callout-note {
  border-color: var(--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; }

/* ---- 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; }

/* ---- Lists, facts, and the privacy policy's items ---- */

.legal-prose ul { margin: 0 0 0.9em; padding-left: 1.2em; }
.legal-prose li { margin: 0.3em 0; }

.legal-facts {
  display: grid;
  gap: 1px;
  margin: 0 0 1em;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--line);
  overflow: hidden;
}

.legal-facts div {
  display: grid;
  grid-template-columns: minmax(0, 12em) minmax(0, 1fr);
  gap: 16px;
  padding: 10px 14px;
  background: var(--ink);
}

.legal-facts dt { color: var(--text-muted); font-size: 0.88rem; }
.legal-facts dd { margin: 0; color: var(--text); }

/* Missing on purpose, and impossible to mistake for an answer. */
.legal-pending {
  display: inline-block;
  padding: 1px 8px;
  border: 1px dashed #ff8fa8;
  border-radius: var(--r-xs);
  color: #ffc2cf;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

/* One thing the site keeps, with the same four questions answered each time. */
.processing {
  margin: 0 0 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.02);
}

.processing h3 { font-size: 0.98rem; color: var(--text); margin: 0 0 4px; }
.processing > p { margin: 0 0 10px; }
.processing dl { display: grid; gap: 6px; margin: 0; }
.processing dl div { display: grid; grid-template-columns: minmax(0, 9.5em) minmax(0, 1fr); gap: 12px; }
.processing dt { color: var(--text-muted); font-size: 0.82rem; padding-top: 2px; }
.processing dd { margin: 0; font-size: 0.92rem; }

@media (max-width: 640px) {
  .legal-facts div, .processing dl div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

@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, var(--shell)); }
  .legal-prose table { display: block; overflow-x: auto; }
}

/* -------------------------------------------------------------------------
   Skip link

   The first thing on every page, for a keyboard: Tab once, Enter, and focus
   is past the header. Off screen until it has focus, then in the top-left
   corner above everything, with no motion to wait for.
   ------------------------------------------------------------------------- */

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--ink-raised);
  color: var(--text);
  font: 600 14px/1.2 Inter, system-ui, sans-serif;
  text-decoration: none;
  transform: translateY(calc(-100% - 24px));
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: none;
}
