/* ──────────────────────────────────────────────────────────────
   HoloSnap design system — cool paper, navy + royal + signal orange
   Source of truth: references/design-system.html
   ────────────────────────────────────────────────────────────── */
:root {
  /* Neutrals: cool paper */
  --paper:        #F6F8FC;
  --paper-2:      #EEF2F9;
  --surface:      #FFFFFF;
  --surface-sunk: #EEF2F9;
  --line:         #DCE3EF;
  --line-strong:  #C3CCDE;

  --ink:          #0E1A33;
  --ink-2:        #3D4A66;
  --ink-3:        #6E7A94;
  --ink-4:        #A8B1C3;

  /* Brand — deep navy + royal */
  --navy:         #1E3062;
  --navy-press:   #172550;
  --royal:        #3A5EA8;
  --royal-soft:   #E3EAF6;

  /* Hero accent — vivid signal orange */
  --accent:       #F26A1F;
  --accent-press: #D85A12;
  --accent-soft:  #FCE0CC;
  --accent-ink:   #FFFFFF;

  /* Status */
  --up:           #1DB06B;
  --up-soft:      #DAF5E6;
  --down:         #E63A3A;
  --down-soft:    #FDE2E2;
  --info:         #3A5EA8;
  --info-soft:    #E3EAF6;

  /* Radii */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-2xl: 20px;
  --r-pill: 999px;

  /* Shadows (cool navy-tinted) */
  --shadow-subtle: 0 1px 2px rgba(14, 26, 51, 0.06);
  --shadow-card:   0 2px 4px rgba(14, 26, 51, 0.05), 0 4px 12px rgba(14, 26, 51, 0.07);
  --shadow-lift:   0 4px 8px rgba(14, 26, 51, 0.07), 0 16px 32px rgba(14, 26, 51, 0.10);

  /* Type */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--royal);
  text-decoration: none;
  transition: color 120ms ease;
}
a:hover { color: var(--accent); }

code {
  background: var(--surface-sunk);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--ink-2);
}

img { max-width: 100%; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ──────────────────────────────────────────────────────────────
   NAV / SITE HEADER
   ────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 248, 252, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid rgba(220, 227, 239, 0.6);
}

.site-header nav.nav-row {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  height: 68px;
}
.site-header nav.nav-row > .brand { justify-self: start; }
.site-header nav.nav-row > .nav-links { justify-self: center; }
.site-header nav.nav-row > .nav-cta,
.site-header nav.nav-row > .nav-admin { justify-self: end; }

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }

.brand .logo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--navy);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.04em;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
}

.brand .name {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--ink); }

.nav-links .admin-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--royal);
  background: var(--royal-soft);
  padding: 4px 8px;
  border-radius: var(--r-sm);
}

.nav-cta {
  height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff !important;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 0 #000;
  transition: transform 80ms ease;
}
.nav-cta:hover { color: #fff !important; transform: translateY(-1px); }
.nav-cta:active { transform: translateY(1px); box-shadow: 0 0 0 #000; }

/* sign-out button styled to match nav links */
.inline-form { display: inline; }
.inline-form button {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  transition: border-color 120ms ease, color 120ms ease;
}
.inline-form button:hover {
  border-color: var(--royal);
  color: var(--ink);
}

/* ──────────────────────────────────────────────────────────────
   LAYOUT WRAPPERS
   ────────────────────────────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

main.container {
  padding-top: 0;
  padding-bottom: 0;
}

main.container.legal {
  padding: 64px 40px 96px;
  max-width: 800px;
}

main.container.contact {
  padding: 56px 40px 96px;
  max-width: 1200px;
}

/* ──────────────────────────────────────────────────────────────
   FLASH MESSAGES
   ────────────────────────────────────────────────────────────── */
.flash {
  max-width: 1200px;
  margin: 16px auto 0;
  padding: 12px 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  font-size: 14px;
}
.flash--notice {
  background: var(--up-soft);
  color: #0f7a46;
  border-color: rgba(29, 176, 107, 0.3);
}
.flash--alert {
  background: var(--down-soft);
  color: #b12a2a;
  border-color: rgba(230, 58, 58, 0.3);
}

/* ──────────────────────────────────────────────────────────────
   HEADINGS
   ────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  color: var(--ink);
  letter-spacing: -0.015em;
  margin: 0;
}
h1 { font-size: 28px; font-weight: 700; line-height: 1.2; }
h2 { font-size: 22px; font-weight: 600; line-height: 1.3; margin: 24px 0 8px; }
h3 { font-size: 19px; font-weight: 600; line-height: 1.3; }
h4 { font-size: 16px; font-weight: 600; line-height: 1.4; }

p { margin: 0 0 14px; color: var(--ink-2); }
.lead { color: var(--ink-2); font-size: 18px; line-height: 1.55; }
.muted { color: var(--ink-3); }

ul { padding-left: 22px; }
li { color: var(--ink-2); }
li::marker { color: var(--ink-3); }

/* ──────────────────────────────────────────────────────────────
   BUTTONS
   ────────────────────────────────────────────────────────────── */
.button,
button[type=submit],
input[type=submit] {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.005em;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease, transform 80ms ease, border-color 120ms ease;
  box-shadow: 0 2px 0 var(--accent-press);
}
.button:hover,
button[type=submit]:hover,
input[type=submit]:hover {
  background: var(--accent-press);
  color: #fff;
  text-decoration: none;
}
.button:active,
button[type=submit]:active,
input[type=submit]:active {
  transform: translateY(1px);
  box-shadow: 0 0 0 var(--accent-press);
}

.button.secondary {
  background: var(--surface);
  color: var(--navy);
  border-color: var(--line-strong);
  box-shadow: none;
}
.button.secondary:hover {
  background: var(--surface-sunk);
  border-color: var(--royal);
  color: var(--navy);
}

.button.navy {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 2px 0 #0c1630;
}
.button.navy:hover { background: var(--navy-press); color: #fff; }

.button.danger {
  background: var(--down);
  color: #fff;
  box-shadow: 0 2px 0 #b52b2b;
}
.button.danger:hover { background: #c92f2f; color: #fff; }

.button.lg {
  height: 48px;
  padding: 0 24px;
  font-size: 15px;
}

.button[disabled],
button[type=submit][disabled],
input[type=submit][disabled] {
  background: var(--surface-sunk);
  color: var(--ink-3);
  border-color: var(--line);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.7;
}
.button[disabled]:hover,
button[type=submit][disabled]:hover,
input[type=submit][disabled]:hover {
  background: var(--surface-sunk);
  color: var(--ink-3);
  border-color: var(--line);
}
.button[disabled]:active,
button[type=submit][disabled]:active,
input[type=submit][disabled]:active {
  transform: none;
  box-shadow: none;
}

/* ──────────────────────────────────────────────────────────────
   FORMS
   ────────────────────────────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  color: var(--ink-2);
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.field input[type=email],
.field input[type=password],
.field input[type=text],
.field input[type=url],
.field input[type=tel],
.field textarea {
  appearance: none;
  width: 100%;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(242, 106, 31, 0.15);
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-4);
}
.field textarea {
  resize: vertical;
  min-height: 130px;
}

.form-errors {
  background: var(--down-soft);
  color: #b12a2a;
  border: 1px solid rgba(230, 58, 58, 0.3);
  padding: 12px 14px;
  border-radius: var(--r-md);
  margin-bottom: 16px;
  font-size: 14px;
}

/* ──────────────────────────────────────────────────────────────
   FOOTER
   ────────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: 64px;
  padding: 56px 40px 32px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-3);
  font-size: 13px;
}

.site-footer .foot-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.foot-row {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.foot-lead {
  max-width: 320px;
}
.foot-lead p {
  margin: 12px 0 0;
  color: var(--ink-3);
  line-height: 1.55;
  font-size: 13px;
}

.foot-cols {
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}

.foot-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.foot-col .h {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  font-weight: 600;
  margin-bottom: 4px;
}
.foot-col a {
  color: var(--ink-3);
  text-decoration: none;
  font-size: 13px;
}
.foot-col a:hover { color: var(--ink); }

.foot-bottom {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.foot-bottom .legal {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
  line-height: 1.55;
  max-width: 760px;
}

/* ──────────────────────────────────────────────────────────────
   LANDING — HERO
   ────────────────────────────────────────────────────────────── */
.hero {
  padding: 56px 0 72px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-press);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

h1.hero-h {
  margin: 18px 0;
  font-size: 76px;
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 800;
  color: var(--ink);
}
h1.hero-h .accent { color: var(--accent); }
h1.hero-h .underline {
  position: relative;
  background: linear-gradient(transparent 80%, var(--accent-soft) 80%);
  padding: 0 4px;
}

.hero-sub {
  font-size: 18px;
  color: var(--ink-2);
  line-height: 1.5;
  max-width: 520px;
  margin: 0 0 28px;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 20px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff !important;
  text-decoration: none;
  box-shadow: 0 2px 0 #000;
  transition: transform 100ms ease;
}
.store-btn:hover { transform: translateY(-1px); color: #fff !important; }
.store-btn:active { transform: translateY(1px); box-shadow: 0 0 0 #000; }
.store-btn .glyph { width: 24px; height: 24px; }
.store-btn .small {
  font-size: 10px;
  opacity: 0.78;
  line-height: 1;
  letter-spacing: 0.02em;
}
.store-btn .big {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-top: 2px;
}

.trust {
  display: flex;
  gap: 22px;
  margin-top: 32px;
  align-items: center;
  color: var(--ink-3);
  font-size: 13px;
  flex-wrap: wrap;
}
.stars { color: var(--accent); font-size: 14px; letter-spacing: 1px; }
.trust b { color: var(--ink); font-weight: 700; }
.trust .sep { width: 1px; height: 18px; background: var(--line-strong); }

/* phone stage */
.phone-stage {
  position: relative;
  height: 760px;
  display: grid;
  place-items: center;
}
.phone-stage::after {
  content: "";
  position: absolute;
  width: 580px;
  height: 580px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0) 60%);
}

.phone {
  position: relative;
  z-index: 2;
  width: 320px;
  height: 692px;
  background: #0e1a33;
  border-radius: 48px;
  padding: 12px;
  box-shadow:
    0 30px 60px rgba(14, 26, 51, 0.28),
    0 8px 16px rgba(14, 26, 51, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.phone .screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 38px;
  overflow: hidden;
  background: #fff;
}
.phone .speaker {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 28px;
  background: #000;
  border-radius: 18px;
  z-index: 30;
}

.phone-2 {
  position: absolute;
  z-index: 1;
  width: 268px;
  height: 580px;
  right: 24px;
  top: 40px;
  background: #0e1a33;
  border-radius: 40px;
  padding: 10px;
  transform: rotate(8deg);
  box-shadow:
    0 30px 60px rgba(14, 26, 51, 0.22),
    0 8px 16px rgba(14, 26, 51, 0.15);
}
.phone-2 .screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 32px;
  overflow: hidden;
  background: #fff;
}

.phone-3 {
  position: absolute;
  z-index: 1;
  width: 240px;
  height: 520px;
  left: -16px;
  top: 80px;
  background: #0e1a33;
  border-radius: 36px;
  padding: 9px;
  transform: rotate(-7deg);
  box-shadow:
    0 30px 60px rgba(14, 26, 51, 0.22),
    0 8px 16px rgba(14, 26, 51, 0.15);
}
.phone-3 .screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 30px;
  overflow: hidden;
  background: #fff;
}

/* ──────────────────────────────────────────────────────────────
   STATS BAR
   ────────────────────────────────────────────────────────────── */
.stats {
  background: var(--navy);
  color: #fff;
  border-radius: 20px;
  padding: 32px 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: center;
  margin: 0 0 96px;
  position: relative;
  overflow: hidden;
}
.stats::before {
  content: "";
  position: absolute;
  inset: -10%;
  background: repeating-conic-gradient(
    from 0deg at 50% 50%,
    rgba(242, 106, 31, 0.22) 0deg 2deg,
    transparent 2deg 8deg
  );
  -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent 30%, rgba(0,0,0,0.4) 50%, #000 80%);
          mask-image: radial-gradient(circle at 50% 50%, transparent 30%, rgba(0,0,0,0.4) 50%, #000 80%);
  opacity: 0.6;
  animation: spin 28s linear infinite;
}
.stats > * { position: relative; z-index: 1; }
.stat .k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 222, 200, 0.7);
  margin-bottom: 8px;
}
.stat .v {
  font-family: var(--font-mono);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--accent);
}
.stat .v.white { color: #fff; }
.stat .desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
}

/* ──────────────────────────────────────────────────────────────
   SECTION HEADERS
   ────────────────────────────────────────────────────────────── */
section.block {
  padding: 96px 0;
}

.section-head {
  margin-bottom: 56px;
  max-width: 720px;
}
.section-head .eyebrow {
  background: transparent;
  padding: 0;
  height: auto;
  color: var(--accent-press);
}
h2.sec {
  margin: 14px 0;
  font-size: 48px;
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 800;
  color: var(--ink);
}
.section-head p {
  font-size: 17px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0;
}

/* ──────────────────────────────────────────────────────────────
   FEATURE GRID
   ────────────────────────────────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 280px;
  position: relative;
  overflow: hidden;
}

.feat .ico-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-press);
  display: grid;
  place-items: center;
}

.feat h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.feat p {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.55;
  font-size: 15px;
  flex: 1;
}
.feat .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feat.hero {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  grid-column: span 2;
  flex-direction: row;
  gap: 28px;
  padding: 32px;
}
.feat.hero .body { flex: 1; }
.feat.hero h3 { color: #fff; font-size: 30px; }
.feat.hero p { color: rgba(255, 255, 255, 0.75); font-size: 16px; }
.feat.hero .ico-wrap {
  background: rgba(242, 106, 31, 0.18);
  color: var(--accent);
}
.feat.hero .vis {
  width: 220px;
  aspect-ratio: 0.62;
  background: #1a2747;
  border-radius: 14px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

/* ──────────────────────────────────────────────────────────────
   HOW IT WORKS
   ────────────────────────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: step;
}
.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  counter-increment: step;
  position: relative;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 18px;
}
.step h4 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.step p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}
.step .vis {
  height: 160px;
  background: var(--paper-2);
  border-radius: 12px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
}

/* ──────────────────────────────────────────────────────────────
   PRICE SHOWCASE
   ────────────────────────────────────────────────────────────── */
.showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.showcase .copy h2.sec { margin-top: 14px; }

.showcase .check-list {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.showcase .check-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.5;
}
.showcase .check-list .check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
}
.showcase .check-list b { color: var(--ink); font-weight: 700; }

.showcase .frame {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 12px 36px rgba(14, 26, 51, 0.06);
}
.showcase .price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}
.showcase .price-row .name {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.showcase .price-row .meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  margin-left: auto;
}
.showcase .price-big {
  font-family: var(--font-mono);
  font-size: 44px;
  font-weight: 700;
  color: var(--up);
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.showcase .price-big .pct {
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--up-soft);
  color: #0f7a46;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.chart-wrap {
  margin-top: 18px;
  background: var(--paper-2);
  border-radius: 12px;
  padding: 16px;
}
.chart-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.chart-tabs .t {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 6px;
  color: var(--ink-3);
  font-weight: 600;
}
.chart-tabs .t.on {
  background: var(--navy);
  color: #fff;
}

.legend-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.legend-row .cell {
  background: var(--paper-2);
  border-radius: 10px;
  padding: 10px 12px;
}
.legend-row .cell .k {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.legend-row .cell .v {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  margin-top: 2px;
}
.legend-row .cell.low .v { color: var(--down); }
.legend-row .cell.mid .v { color: var(--ink); }
.legend-row .cell.high .v { color: var(--up); }

.last-sold {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--paper-2);
  border-radius: 10px;
}
.last-sold .k {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.last-sold .src {
  font-size: 12px;
  color: var(--ink-2);
  margin-top: 2px;
}
.last-sold .v {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--up);
}

/* ──────────────────────────────────────────────────────────────
   PRICING
   ────────────────────────────────────────────────────────────── */
.pricing {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 880px;
  margin: 0 auto;
}
.plan {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.plan.pro {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  position: relative;
}
.plan.pro .plan-name,
.plan.pro .price { color: #fff; }
.plan.pro li { color: rgba(255, 255, 255, 0.75); }
.plan.pro b { color: #fff; }
.plan.pro .ribbon {
  position: absolute;
  top: -12px;
  right: 24px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}
.plan-name {
  font-size: 14px;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--ink);
}
.price .num {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.price .per {
  font-size: 14px;
  color: var(--ink-3);
}
.plan.pro .price .per { color: rgba(255, 255, 255, 0.6); }

.plan ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plan li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.5;
}
.plan li::before {
  content: "✓";
  color: var(--accent);
  flex-shrink: 0;
  font-weight: 700;
  width: 18px;
}
.plan.pro li::before { color: var(--accent); }

.plan-cta {
  height: 48px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  font-family: var(--font-sans);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.plan-cta.free {
  background: var(--paper-2);
  color: var(--ink);
}
.plan-cta.pro {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 0 var(--accent-press);
}
.plan-cta.pro:hover { background: var(--accent-press); color: #fff; }

/* ──────────────────────────────────────────────────────────────
   FAQ
   ────────────────────────────────────────────────────────────── */
.faq {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 32px;
  max-width: 1080px;
  margin: 0 auto;
}
.qa {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.qa h4 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.qa p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
}

/* ──────────────────────────────────────────────────────────────
   BIG CTA
   ────────────────────────────────────────────────────────────── */
.big-cta {
  background: var(--accent);
  border-radius: 28px;
  padding: 64px 56px;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.big-cta > * { position: relative; z-index: 1; }
.big-cta h2 {
  margin: 0;
  font-size: 56px;
  line-height: 1.0;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: #fff;
}
.big-cta p {
  margin: 14px auto 28px;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 480px;
  line-height: 1.5;
}
.big-cta .cta-row { justify-content: center; }
.big-cta .cta-row .store-btn {
  background: var(--ink);
  color: #fff !important;
}

/* ──────────────────────────────────────────────────────────────
   LEGAL PAGES (Terms, Privacy)
   ────────────────────────────────────────────────────────────── */
.legal-page h1 {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 8px;
}
.legal-page .last-updated {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 32px;
  display: inline-block;
  padding: 6px 12px;
  background: var(--surface-sunk);
  border-radius: var(--r-pill);
}
.legal-page p {
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.65;
  margin: 0 0 16px;
}
.legal-page h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin: 40px 0 12px;
  letter-spacing: -0.015em;
}
.legal-page h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin: 24px 0 8px;
  letter-spacing: -0.005em;
}
.legal-page ul {
  margin: 0 0 16px;
  padding-left: 20px;
}
.legal-page li {
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.65;
  margin-bottom: 6px;
}
.legal-page strong { color: var(--ink); font-weight: 600; }
.legal-page a {
  color: var(--royal);
  text-decoration: underline;
  text-decoration-color: rgba(58, 94, 168, 0.4);
  text-underline-offset: 2px;
}
.legal-page a:hover { color: var(--accent); text-decoration-color: var(--accent); }

.legal-toc {
  margin-top: 32px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.legal-toc a {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: var(--r-pill);
  text-decoration: none;
}
.legal-toc a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ──────────────────────────────────────────────────────────────
   CONTACT PAGE
   ────────────────────────────────────────────────────────────── */
.contact-grid {
  max-width: 720px;
  margin: 0 auto;
}

.contact-info {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  position: sticky;
  top: 96px;
}
.contact-info h2 {
  margin: 0 0 14px;
  font-size: 19px;
  font-weight: 600;
}
.contact-info p {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.6;
}
.contact-info p.muted {
  font-size: 13px;
  color: var(--ink-3);
}
.contact-info a {
  color: var(--royal);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.contact-info a:hover { color: var(--accent); }

.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}
.contact-channel {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper);
}
.contact-channel .ico-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--royal-soft);
  color: var(--royal);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.contact-channel .label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.contact-channel .v {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 2px;
  word-break: break-word;
}
.contact-channel .v a {
  color: var(--ink);
  text-decoration: none;
}
.contact-channel .v a:hover { color: var(--accent); }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px;
  box-shadow: 0 12px 36px rgba(14, 26, 51, 0.06);
}
.contact-form h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.contact-form .lead {
  font-size: 15px;
  color: var(--ink-2);
  margin: 0 0 24px;
}

.recaptcha-attribution {
  margin-top: 18px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--ink-3);
  line-height: 1.6;
}
.recaptcha-attribution a {
  color: var(--ink-3);
  text-decoration: underline;
}
.recaptcha-attribution a:hover { color: var(--accent); }

.contact-hero {
  text-align: center;
  margin-bottom: 48px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.contact-hero h1 {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 14px 0 14px;
}
.contact-hero .lead {
  font-size: 18px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0;
}

/* ──────────────────────────────────────────────────────────────
   AUTH (Devise sign-in / password reset)
   ────────────────────────────────────────────────────────────── */
.auth-shell {
  max-width: 440px;
  margin: 56px auto 96px;
  padding: 0 20px;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px;
  box-shadow: 0 12px 36px rgba(14, 26, 51, 0.06);
}
.auth-card h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 8px;
}
.auth-sub {
  font-size: 14px;
  color: var(--ink-3);
  margin: 0 0 24px;
}
.auth-lockout {
  margin: 0 0 18px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: 13px;
  line-height: 1.45;
  background: var(--down-soft);
  color: #b12a2a;
  border: 1px solid rgba(230, 58, 58, 0.3);
}
.auth-form .field label {
  text-transform: none;
  letter-spacing: 0;
}
.auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 18px;
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
}
.auth-remember input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}
.auth-submit {
  width: 100%;
}
.auth-links {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.auth-links p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
}
.auth-links a {
  color: var(--royal);
  text-decoration: none;
}
.auth-links a:hover { color: var(--accent); }

.password-field { position: relative; }
.password-field input[type=password],
.password-field input[type=text] {
  padding-right: 44px;
}
.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: var(--r-sm, 8px);
  color: var(--ink-3);
  cursor: pointer;
}
.password-toggle:hover { color: var(--ink); }
.password-toggle:focus-visible {
  outline: none;
  color: var(--ink);
  box-shadow: 0 0 0 2px rgba(242, 106, 31, 0.35);
}

/* ──────────────────────────────────────────────────────────────
   ADMIN / GENERIC TABLES (kept light)
   ────────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 16px 0 24px;
}
.stats-grid .stat,
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 18px;
}
.stats-grid .stat .label,
.stat-card .label {
  color: var(--ink-3);
  font-size: 13px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.stats-grid .stat .value,
.stat-card .value {
  font-size: 22px;
  font-weight: 600;
  margin-top: 4px;
  font-family: var(--font-mono);
  color: var(--ink);
}
.stats-grid .stat.ok  .value { color: var(--up); }
.stats-grid .stat.bad .value { color: var(--down); }
.stats-grid .stat .pct {
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-3);
  font-family: var(--font-mono);
}
.stats-row-label {
  margin: 16px 0 4px;
  color: var(--ink-3);
  font-size: 12px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.stats-row-label + .stats-grid { margin-top: 4px; }

/* Status badges + recurring-task ("Cron") table helpers. Admin-scoped so the
   marketing site is untouched; colors come straight from the status tokens. */
.shell .badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--ink-3);
  background: var(--surface-sunk);
}
.shell .badge.ok    { color: #0F6A44;            background: var(--up-soft); }
.shell .badge.bad   { color: #A81F1F;            background: var(--down-soft); }
.shell .badge.info  { color: var(--royal);       background: var(--info-soft); }
.shell .badge.warn  { color: var(--accent-press); background: var(--accent-soft); }
.shell .badge.muted { color: var(--ink-3);        background: var(--surface-sunk); }

/* Secondary line inside a table cell (the relative "x ago" under a timestamp). */
.cell-sub {
  display: block;
  margin-top: 2px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* Single-line, ellipsised long text inside a table cell (e.g. feedback message). */
.cell-truncate {
  display: block;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Anchor-shortcut chips on long admin pages (card show) — one pill per
   section, mirroring the legal-toc pattern but admin-scoped and tighter. */
.shell .page-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.shell .page-toc a {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 5px 10px;
  border-radius: var(--r-pill);
  text-decoration: none;
}
.shell .page-toc a:hover {
  border-color: var(--accent);
  color: var(--accent);
}
/* The topbar is sticky — without this, anchor jumps land the section
   heading underneath it. */
.shell section[id] { scroll-margin-top: calc(var(--top-h) + 12px); }

.shell tr.is-overdue td { background: rgba(242, 106, 31, 0.06); }
.shell tr.is-overdue td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

.failure-details summary {
  cursor: pointer;
  color: var(--ink-1);
}
.failure-details summary code {
  color: var(--down);
}
.failure-details[open] summary {
  margin-bottom: 8px;
}
.failure-message {
  margin: 8px 0 4px;
  font-size: 12px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.failure-trace {
  margin: 0;
  padding: 10px 12px;
  background: var(--surface-sunk);
  border: 1px solid var(--line);
  border-radius: var(--r-sm, 4px);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 360px;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--r-md);
  overflow: hidden;
}
th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
th {
  background: var(--surface-sunk);
  color: var(--ink-3);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}
th a {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}
th a:hover    { color: var(--ink-1); }
th a.is-active { color: var(--ink-1); }
td { color: var(--ink-2); font-size: 14px; }

/* ──────────────────────────────────────────────────────────────
   RESPONSIVE
   ────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .container { padding: 0 24px; }
  .site-header nav.nav-row { padding: 0 24px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .phone-stage { height: 600px; }
  h1.hero-h { font-size: 56px; }
  .features { grid-template-columns: 1fr 1fr; }
  .feat.hero { grid-column: span 2; flex-direction: column; }
  .feat.hero .vis { width: 100%; aspect-ratio: 1.6; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .showcase { grid-template-columns: 1fr; gap: 32px; }
  h2.sec { font-size: 36px; }
  .big-cta { padding: 48px 32px; }
  .big-cta h2 { font-size: 40px; }
}

@media (max-width: 720px) {
  .container { padding: 0 20px; }
  .site-header nav.nav-row { padding: 0 20px; height: 60px; }
  .nav-links { display: none; }
  .hero { padding: 32px 0 48px; }
  h1.hero-h { font-size: 40px; }
  .phone-stage { height: 500px; transform: scale(0.85); }
  .features { grid-template-columns: 1fr; }
  .feat.hero { grid-column: auto; }
  .stats { grid-template-columns: 1fr 1fr; padding: 24px; gap: 16px; }
  .steps { grid-template-columns: 1fr; }
  .pricing { grid-template-columns: 1fr; }
  .faq { grid-template-columns: 1fr; }
  section.block { padding: 64px 0; }
  h2.sec { font-size: 30px; }
  .big-cta h2 { font-size: 32px; }
  .legal-page h1 { font-size: 32px; }
  .contact-hero h1 { font-size: 36px; }
  .contact-form { padding: 24px; }
  .foot-cols { gap: 24px; }
}

/* ──────────────────────────────────────────────────────────────
   GAMES SUPPORTED
   ────────────────────────────────────────────────────────────── */
.games {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-top: 32px;
}
.game {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  transition: border-color 120ms ease, transform 120ms ease;
}
.game:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.game .gico {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.game .gname {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.game .gtag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}
.game.featured {
  border-color: var(--accent);
  background: var(--accent-soft);
}

@media (max-width: 1024px) { .games { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px)  { .games { grid-template-columns: repeat(2, 1fr); } }

/* ──────────────────────────────────────────────────────────────
   ADMIN SHELL
   Two-column shell (dark sticky sidebar + topbar + page wrap)
   used by every auth-walled admin page.
   All selectors are scoped under .shell so the public marketing
   layout (which reuses .brand / .logo / .name) is unaffected.
   ────────────────────────────────────────────────────────────── */
:root {
  --side-w: 244px;
  --side-w-collapsed: 64px;
  --top-h: 56px;
}

.admin-body { background: var(--paper); }

.shell {
  display: grid;
  grid-template-columns: var(--side-w) 1fr;
  min-height: 100vh;
  transition: grid-template-columns 180ms ease;
}

/* ── Sidebar ── */
.shell aside.side {
  background: var(--ink); /* navy-deep */
  color: #cdd5e6;
  padding: 16px 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.shell .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 12px;
  text-decoration: none;
}
.shell .brand .logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--navy);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.04em;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25);
}
.shell .brand .word {
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.shell .brand .word .sub {
  font-weight: 500;
  font-size: 10px;
  color: var(--ink-4);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 2px;
}

.shell .nav-group-title {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #c5cee0;
  padding: 14px 12px 6px;
}
.shell a.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: #b6becf;
  border-radius: var(--r-md);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
}
.shell a.nav:hover { background: rgba(255, 255, 255, 0.04); color: #fff; }
.shell a.nav.active {
  background: var(--navy);
  color: #fff;
  box-shadow: inset 2px 0 0 var(--accent);
}
.shell a.nav.active .ico { stroke: var(--accent); }
.shell a.nav .ico {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
  flex-shrink: 0;
}
.shell a.nav .count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-4);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
}
.shell a.nav.active .count { color: #fff; background: rgba(242, 106, 31, 0.25); }

.shell .side-footer {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 10px;
}
.shell .side-footer .av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
}
.shell .side-footer .ident { min-width: 0; }
.shell .side-footer .who {
  font-size: 12px;
  color: #fff;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.shell .side-signout-form { margin: 2px 0 0; }
.shell .side-signout {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
  cursor: pointer;
}
.shell .side-signout:hover { color: var(--accent); }

/* ── Main column ── */
.shell main.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.shell .topbar {
  height: var(--top-h);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.shell .crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-3);
}
.shell .crumbs .sep { color: var(--ink-4); }
.shell .crumbs .here { color: var(--ink); font-weight: 600; }
.shell .topbar .spacer { flex: 1; }

.shell .env-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.shell .env-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--up);
}
.shell .env-pill.staging .dot { background: var(--accent); }

/* ── Page wrap ── */
.shell .page {
  padding: 28px 36px 80px;
  max-width: 1800px;
  align-self: stretch;
}

/* Flash messages keep their existing colors but sit flush with the
   topbar inside the admin shell instead of centering on the page. */
.shell .flash {
  max-width: none;
  margin: 0;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-top: 0;
}

/* ── Sidebar toggle (lives in the topbar) ── */
.shell .side-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-right: 4px;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  color: var(--ink-3);
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.shell .side-toggle:hover {
  background: var(--surface-2, rgba(15, 23, 42, 0.05));
  color: var(--ink);
  border-color: var(--line);
}
.shell .side-toggle .ico {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
}
.shell .side-toggle[aria-pressed="true"] .ico {
  /* Flip the panel divider so the icon reads as "open" when collapsed. */
  transform: scaleX(-1);
}

/* ── Collapsed state ──
   Triggered by an inline boot script setting data-admin-side="collapsed"
   on <html> from localStorage, which prevents a flash of the expanded
   sidebar on first paint. */
html[data-admin-side="collapsed"] .shell {
  grid-template-columns: var(--side-w-collapsed) 1fr;
}
html[data-admin-side="collapsed"] .shell aside.side {
  padding: 16px 8px;
  align-items: center;
}
html[data-admin-side="collapsed"] .shell .brand {
  justify-content: center;
  padding: 6px 0 18px;
  gap: 0;
  width: 100%;
}
html[data-admin-side="collapsed"] .shell .brand .word,
html[data-admin-side="collapsed"] .shell .nav-group-title,
html[data-admin-side="collapsed"] .shell .nav-label,
html[data-admin-side="collapsed"] .shell .side-footer .ident {
  display: none;
}
html[data-admin-side="collapsed"] .shell a.nav {
  justify-content: center;
  padding: 10px 8px;
  gap: 0;
  width: 100%;
}
html[data-admin-side="collapsed"] .shell a.nav.active {
  box-shadow: inset 0 0 0 1px var(--accent);
}
html[data-admin-side="collapsed"] .shell .side-footer {
  justify-content: center;
  padding: 12px 0;
  width: 100%;
}

/* ──────────────────────────────────────────────────────────────
   ADMIN FILTERS + PAGINATION
   Used by /admin/groups and /admin/cards. The filter form is a
   plain GET form — every selection becomes a query param so URLs
   are shareable and the page is fully back-button friendly.
   ────────────────────────────────────────────────────────────── */
.filters {
  margin: 12px 0 20px;
  padding: 16px;
  background: var(--surface-sunk);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
}
.filter-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.filter-grid input[type="text"],
.filter-grid input[type="number"],
.filter-grid select {
  padding: 7px 10px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  text-transform: none;
  letter-spacing: 0;
}
.filter-grid input[type="text"]:focus,
.filter-grid input[type="number"]:focus,
.filter-grid select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(242, 106, 31, 0.18);
}
.filter-grid .filter-actions {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

/* Per-group page header (/admin/groups/:id and /admin/groups/:id/gallery).
   Title + meta on the left, view-swap and back buttons stacked on the right.
   Falls back to a stacked column on narrow viewports so neither side gets
   squeezed below readable width. */
.group-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
.group-header-text { flex: 1 1 auto; min-width: 0; }
.group-header-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  flex-shrink: 0;
}

/* Segmented Table | Gallery switcher in the per-group header. Two link_to's
   wrapped in a flex group with a shared border so they read as one control
   rather than two adjacent buttons — visually distinct from the "← All sets"
   back-link sitting beneath them. */
.view-toggle {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
}
.view-toggle-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.005em;
  height: 40px;
  padding: 0 18px;
  background: transparent;
  color: var(--navy);
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.view-toggle-button + .view-toggle-button {
  border-left: 1px solid var(--line-strong);
}
.view-toggle-button:hover {
  background: var(--surface-sunk);
  color: var(--navy);
  text-decoration: none;
}
.view-toggle-button.is-active,
.view-toggle-button.is-active:hover {
  background: var(--navy);
  color: #fff;
  cursor: default;
}

/* R2 coverage pill next to the gallery's card count. Green at 100%, red
   anywhere below — a quick read on whether a set has unfetched images. */
.r2-coverage-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: middle;
}
.r2-coverage-badge.good {
  background: var(--up-soft);
  color: #0f7a46;
  border: 1px solid rgba(29, 176, 107, 0.3);
}
.r2-coverage-badge.partial {
  background: var(--down-soft);
  color: #b12a2a;
  border: 1px solid rgba(230, 58, 58, 0.3);
}

/* Gallery grid: thumbnail-only view of /admin/cards. Each tile is an
   aspect-ratio'd link to the card's detail page; images are signed R2 URLs
   so there's no Rails proxy redirect on the request. */
.card-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.card-gallery-item {
  display: block;
  aspect-ratio: 5 / 7;
  background: var(--surface-sunk);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.card-gallery-item:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-subtle);
}
.card-gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.card-gallery-item-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
}

/* Expansion artwork (logo + symbol) preview tiles on the show page. Two
   cards side by side: a checkerboard preview box — so transparent or light
   PNGs stay visible — above a compact metadata block. Wraps to one column
   when the content well is narrow. */
.artwork-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin: 0;
}
.artwork-tile {
  display: flex;
  flex-direction: column;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
}
/* Shared transparency checkerboard — the expansion artwork tiles and the
   card-detail image frames both sit assets on it, so alpha / letterboxing
   reads the same way on either page. */
.artwork-figure,
.r2-image-frame {
  background-color: var(--surface);
  background-image:
    linear-gradient(45deg, var(--surface-sunk) 25%, transparent 25%),
    linear-gradient(-45deg, var(--surface-sunk) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--surface-sunk) 75%),
    linear-gradient(-45deg, transparent 75%, var(--surface-sunk) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.artwork-figure {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 132px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}
.artwork-figure img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.artwork-figure.is-empty {
  background-image: none;
  background-color: var(--surface-sunk);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
}
.artwork-tile figcaption {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
}
.artwork-tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.artwork-tile-head strong { font-size: 14px; }
.artwork-meta {
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-3);
}
.artwork-meta code { word-break: break-all; }

/* Card detail "Images in R2" — each printing's small + large bytes as a
   tile that mirrors the expansion artwork tiles: a checkerboard image frame
   on top, full byte / type / fetched / R2-key metadata below. Tiles are a
   uniform width so the metadata has room to read; the explicit frame height
   gives the contained image a definite box (a flex box sized only by
   aspect-ratio collapses). */
.r2-images {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}
.r2-image {
  display: flex;
  flex-direction: column;
  width: 180px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.r2-image:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-subtle);
}
.r2-image-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 230px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
.r2-image-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.r2-image figcaption {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
}
.r2-image figcaption strong { font-size: 13px; }
.r2-image-meta {
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-3);
}
.r2-image-meta code { word-break: break-all; }
.r2-image-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 180px;
  height: 230px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
  background: var(--surface-sunk);
  color: var(--ink-3);
  font-size: 11px;
  text-align: center;
}

/* Scrydex monthly-budget indicator at the top of /admin/groups. Flips red and
   reads "Rate limit hit" when the cached state shows we're under the buffer. */
.rate-limit-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-md, 6px);
  background: var(--surface-sunk, var(--surface));
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
}
.rate-limit-state.is-exhausted {
  color: var(--down);
  border-color: var(--down);
}

/* Wrapper sits below the table and horizontally centers the pager. */
.pagination-wrap {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

/* The nav itself is a flex row that wraps when it has to. */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
}

/* Wrapper spans are layout-only; chrome lives on the visible child. */
.pagination .page,
.pagination .first,
.pagination .last,
.pagination .prev,
.pagination .next {
  display: inline-flex;
  margin: 0;
  padding: 0;
}

/* Fixed-size pill shared by links, the current page, and the gap. */
.pagination a,
.pagination .current,
.pagination .gap {
  box-sizing: border-box;
  display: inline-block;
  height: 32px;
  min-width: 32px;
  padding: 0 10px;
  line-height: 30px; /* 32px box − 2 × 1px border */
  text-align: center;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  text-decoration: none;
  vertical-align: middle;
  user-select: none;
}
.pagination a {
  color: var(--ink-2);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow-subtle);
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.pagination a:hover {
  color: var(--navy);
  background: var(--surface-sunk);
  border-color: var(--line-strong);
}
.pagination a:active { transform: translateY(1px); }
.pagination a:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(242, 106, 31, 0.22);
}
.pagination .current {
  color: #fff;
  background: var(--navy);
  border-color: var(--navy);
  box-shadow: 0 2px 0 #0c1630;
}
.pagination .gap {
  color: var(--ink-4);
  min-width: 0;
  padding: 0 4px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

/* Stack inline-form buttons + plain links side-by-side in a table cell so
   "Parse" and "Cards →" line up cleanly on /admin/groups. */
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.row-actions .inline-form { display: inline-flex; }

/* ──────────────────────────────────────────────────────────────
   ADMIN BULK ACTIONS
   Used on /admin/scrydex_expansions. A 3-column grid lays out
   each action as: step number | button(s) | inline description,
   so a long list of operations stays compact and scannable. h3
   section headers and intro paragraphs span the full grid width.
   ────────────────────────────────────────────────────────────── */
/* Key/value detail grid for admin show pages. The dl's natural
   dt,dd,dt,dd order flows into a 4-track grid as [label value label value],
   so a 10-field block is ~5 rows tall instead of the ~20 a default <dl>
   stacks. Collapses to one pair per row on narrow viewports. */
.kv-grid {
  display: grid;
  grid-template-columns: max-content 1fr max-content 1fr;
  gap: 6px 16px;
  align-items: baseline;
  margin: 0;
}
.kv-grid dt {
  color: var(--ink-3);
  font-size: 13px;
}
.kv-grid dd {
  margin: 0;
}
@media (max-width: 720px) {
  .kv-grid {
    grid-template-columns: max-content 1fr;
  }
}

/* ──────────────────────────────────────────────────────────────
   FEATURE-REQUEST OPERATOR CONSOLE (/admin/feature_requests/:id)
   A comment thread + an internal "danger zone". Admin-scoped so the
   marketing site is untouched; colors come from the shared tokens.
   ────────────────────────────────────────────────────────────── */
.comment-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.comment {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  background: var(--surface);
}
.comment.is-admin {
  background: var(--info-soft);
  border-color: var(--royal-soft);
}
.comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.comment-author {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
}
.comment-meta {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
}
.comment-body {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.5;
}
.comment-body p:last-child { margin-bottom: 0; }
.comment-foot { margin-top: 10px; }

/* Heading row on the show page: title + meta on the left, status badge on the
   right, with a thin keyline beneath. */
.fr-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.fr-head .fr-meta {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--ink-3);
}

/* Internal danger zone — a red-keylined block that visually separates a
   destructive action from the routine status/reply forms above it. */
.danger-zone {
  margin-top: 12px;
  padding: 16px 18px;
  border: 1px solid rgba(230, 58, 58, 0.35);
  border-radius: var(--r-md);
  background: var(--down-soft);
}
.danger-zone h2 {
  margin: 0 0 4px;
  font-size: 15px;
  color: #a81f1f;
}
.danger-zone p {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--ink-2);
}

.bulk-actions {
  display: grid;
  grid-template-columns: 36px max-content 1fr;
  column-gap: 12px;
  row-gap: 4px;
  align-items: center;
  margin: 12px 0 20px;
  padding: 16px;
  background: var(--surface-sunk);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.bulk-actions > h3,
.bulk-actions > p {
  grid-column: 1 / -1;
  margin: 0;
}
.bulk-actions > h3 {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}
.bulk-actions > h3:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.bulk-actions > p.muted {
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--ink-3);
}
.bulk-action {
  display: contents;
}
.bulk-action-step {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  text-align: right;
  padding: 4px 0;
}
.bulk-action-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 4px 0;
}
.bulk-action-controls .inline-form { display: inline-flex; }
.bulk-action-meta {
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-3);
  padding: 4px 0;
}

/* /admin/scrydex_usage — instant hover tooltip on each budget-chart datapoint.
   Pure CSS (no JS): hovering a datapoint's full-height column band reveals its
   tip group. The band has pointer-events:all so the whole column is hoverable,
   not just the dot. */
.bc-dp .bc-tip { opacity: 0; transition: opacity 0.08s ease; }
.bc-dp:hover .bc-tip { opacity: 1; }
.bc-dp:hover circle { r: 4; }
