/* Prizz design system.
   Sharp corners everywhere, gold accent, Chakra Petch headings, Inter body.
   Hand-written: no framework, no build step. */

/* ---------- tokens ---------- */
:root {
  --gold:        #F5A623;
  --gold-hover:  #E8940E;
  --gold-light:  #FFF4D9;
  --gold-faint:  #FFFBF0;
  --black:       #111111;
  --white:       #FFFFFF;
  --gray-700:    #333333;
  --gray-500:    #888888;
  --gray-200:    #E5E5E5;
  --gray-100:    #F5F5F5;
  --red:         #DD4444;
  --green:       #2A8C3E;

  --font-head: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --t-fast:   150ms;
  --t-base:   200ms;
  --t-slow:   300ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Hard offset shadows rather than soft blur: they match the sharp corners
     and the pixel aesthetic, and they give press states something to travel. */
  --shadow-hard: 4px 4px 0 0 var(--black);
  --shadow-hard-sm: 3px 3px 0 0 var(--black);
  --shadow-soft: 0 12px 30px rgba(17, 17, 17, .10);
  --ease-in:  cubic-bezier(0.7, 0, 0.84, 0);
  --ease-both: cubic-bezier(0.65, 0, 0.35, 1);

  --shell-max: 1200px;
  --nav-h: 60px;
  --sidebar-w: 232px;

  /* One spacing scale, so vertical rhythm is a choice rather than an accident. */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* Long-form text stops being readable past roughly 70 characters. */
  --measure: 68ch;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--gray-700);
  background: var(--gray-100);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--black); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--gold-hover); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; color: var(--black); margin: 0 0 .5em; }
h1 { font-size: 36px; font-weight: 700; }
h2 { font-size: 28px; font-weight: 700; }
h3 { font-size: 20px; font-weight: 600; }
p  { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
hr { border: 0; border-top: 1px solid var(--gray-200); margin: 24px 0; }

/* Sharp corners are a brand rule, not a default. Enforce it. */
button, input, select, textarea, .card, .badge, .btn, .alert, .modal, .panel, img {
  border-radius: 0;
}
/* The native colour picker is the one documented exception. */
input[type="color"] { border-radius: revert; }

.small   { font-size: 13px; }
.muted   { color: var(--gray-500); }
.caption {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  font-weight: 600; color: var(--gray-500);
}
.center { text-align: center; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1 1 auto; min-width: 0; }
.wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
/* Alpine sets x-cloak until a component has initialised; without this rule the
   attribute does nothing and un-initialised markup flashes on load. */
[x-cloak] { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--gold); color: var(--black); padding: 12px 20px; font-weight: 600;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: 14px; line-height: 1;
  padding: 12px 24px; border: 2px solid transparent; cursor: pointer;
  text-decoration: none; text-align: center; white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease-both),
              color var(--t-fast) var(--ease-both),
              border-color var(--t-fast) var(--ease-both),
              transform var(--t-fast) var(--ease-both),
              opacity var(--t-fast) var(--ease-both);
}
/* Primary and dark buttons sit on a hard shadow and physically travel into it
   when pressed, so a tap has somewhere to go. */
.btn-gold, .btn-dark {
  box-shadow: var(--shadow-hard-sm);
  transform: translate(0, 0);
}
.btn-gold:hover:not(:disabled), .btn-dark:hover:not(:disabled) {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 0 var(--black);
}
.btn-gold:active:not(:disabled), .btn-dark:active:not(:disabled) {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 0 var(--black);
}
.btn-outline:hover:not(:disabled), .btn-ghost:hover:not(:disabled) {
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-hard-sm);
}
.btn-outline:active:not(:disabled), .btn-ghost:active:not(:disabled) {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 0 var(--black);
}
.btn-lg { box-shadow: var(--shadow-hard); }
.btn-lg:hover:not(:disabled) { box-shadow: 6px 6px 0 0 var(--black); }
.btn:disabled, .btn[aria-disabled="true"] { box-shadow: none !important; transform: none !important; }

/* An icon inside a button nudges with it. */
.btn .icon { transition: transform var(--t-base) var(--ease-out); }
.btn:hover:not(:disabled) .icon { transform: translateX(2px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }

.btn-gold    { background: var(--gold); color: var(--black); border-color: var(--black); }
.btn-gold:hover:not(:disabled)    { background: var(--gold-hover); border-color: var(--gold-hover); color: var(--black); }
/* Dark buttons carry white text. Gold is used as a *background* with dark text,
   never as a foreground colour on a dark surface. */
.btn-dark    { background: var(--black); color: var(--white); border-color: var(--black); }
.btn-dark:hover:not(:disabled)    { background: #2C2C2C; border-color: #2C2C2C; color: var(--white); }
.btn-outline { background: transparent; color: var(--gold-hover); border-color: var(--black); }
.btn-outline:hover:not(:disabled) { background: var(--gold-faint); color: var(--gold-hover); border-color: var(--black); }
.btn-ghost   { background: transparent; color: var(--gray-700); border-color: var(--black); }
.btn-ghost:hover:not(:disabled)   { background: var(--gray-100); color: var(--black); border-color: var(--black); }
.btn-danger  { background: transparent; color: var(--red); border-color: var(--red); }
.btn-danger:hover:not(:disabled)  { background: var(--red); color: var(--white); }

.btn-sm { font-size: 12px; padding: 8px 16px; }
.btn-lg { font-size: 16px; padding: 16px 32px; }
.btn-xl { font-size: 17px; padding: 19px 38px; }
.btn-block { display: flex; width: 100%; }

/* ---------- forms ---------- */
.field { display: block; margin-bottom: 18px; }
.field > label, .label {
  display: block; font-size: 13px; font-weight: 600; color: var(--black);
  margin-bottom: 6px; letter-spacing: .01em;
}
.input, input[type="text"], input[type="email"], input[type="password"], input[type="url"], textarea, select {
  width: 100%; padding: 12px 14px; background: var(--white);
  border: 1px solid var(--gray-200); color: var(--gray-700); font-size: 15px;
  transition: border-color var(--t-fast) var(--ease-both), box-shadow var(--t-fast) var(--ease-both);
}
.input:focus, input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-light);
}
.input:hover:not(:focus), input[type="text"]:hover:not(:focus),
input[type="email"]:hover:not(:focus), input[type="password"]:hover:not(:focus),
input[type="url"]:hover:not(:focus), textarea:hover:not(:focus) {
  border-color: var(--gray-500);
}
.input[aria-invalid="true"] { border-color: var(--red); }
textarea { resize: vertical; min-height: 120px; line-height: 1.6; font-family: var(--font-body); }
.hint { font-size: 13px; color: var(--gray-500); margin-top: 6px; }

.checkbox-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; font-size: 14px; }
.checkbox-row input[type="checkbox"] {
  width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--gold); flex: none; cursor: pointer;
}
.checkbox-row label { cursor: pointer; }

/* ---------- alerts ---------- */
.alert {
  padding: 12px 16px; font-size: 14px; border-left: 4px solid var(--gray-500);
  background: var(--gray-100); color: var(--gray-700); margin-bottom: 18px;
}
.alert-error   { background: #FDECEC; border-left-color: var(--red);   color: #8C1F1F; }
.alert-success { background: #E9F6EC; border-left-color: var(--green); color: #1B5C29; }
.alert-info    { background: var(--gold-light); border-left-color: var(--gold); color: #7A4E05; }

/* ---------- cards ---------- */
.card {
  background: var(--white); border: 1px solid var(--gray-200); padding: 20px;
}
.card-pad-lg { padding: 28px; }
.panel { background: var(--white); border: 2px solid var(--black); box-shadow: var(--shadow-hard-sm); }
.panel-head {
  padding: 16px 20px; border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.panel-body { padding: 20px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-head); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  padding: 4px 8px; background: var(--gray-100); color: var(--gray-700);
}
.badge-gold  { background: var(--gold);  color: var(--black); }
.badge-dark  { background: var(--black); color: var(--white); }
.badge-green { background: var(--green); color: var(--white); }
.badge-muted { background: var(--gray-100); color: var(--gray-500); }

/* ---------- logo ---------- */
.logo-mark { image-rendering: pixelated; display: block; }
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 700; font-size: 20px;
  letter-spacing: .04em; color: var(--black); text-decoration: none;
}
.wordmark:hover { color: var(--black); }

/* ---------- icons ---------- */
/* Inline SVG has no intrinsic size and fills black by default. This is the one
   place icon geometry is defined; every Icon() component carries .icon. */
.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

/* ---------- stars ---------- */
.stars { display: inline-flex; gap: 2px; line-height: 1; color: var(--gold); }
.stars svg { width: 16px; height: 16px; fill: currentColor; stroke: none; flex: none; }
.stars .star-off { color: var(--gray-200); }
.stars-lg svg { width: 22px; height: 22px; }

/* ---------- app shell ---------- */
.shell { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  background: var(--white); border-bottom: 1px solid var(--gray-200);
  position: sticky; top: 0; z-index: 30;
}
.topbar-inner {
  max-width: var(--shell-max); margin: 0 auto; padding: 0 20px;
  height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

.main {
  flex: 1 1 auto; width: 100%; max-width: var(--shell-max); margin: 0 auto;
  min-width: 0;
  padding: 24px 20px calc(var(--nav-h) + 40px);
}
.main-narrow { max-width: 520px; }
.main-mid    { max-width: 800px; }

/* Mobile: bottom tab bar. Desktop: sidebar. */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  display: flex; background: var(--white); border-top: 1px solid var(--gray-200);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 9px 4px; text-decoration: none; color: var(--gray-500);
  font-family: var(--font-head); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  border-top: 3px solid transparent; transition: color var(--t-fast), border-color var(--t-fast);
}
.tabbar a .icon { width: 21px; height: 21px; }
.tabbar a[aria-current="page"] { color: var(--black); border-top-color: var(--gold); }
.sidebar { display: none; }

@media (min-width: 900px) {
  .tabbar { display: none; }
  .app-body {
    display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    gap: 32px; max-width: var(--shell-max); margin: 0 auto;
    padding: 28px 20px 60px; width: 100%; align-items: start;
  }
  .app-body > .main { padding: 0; max-width: none; margin: 0; }
  .sidebar { display: block; position: sticky; top: calc(var(--nav-h) + 28px); }
  .sidebar a {
    display: flex; align-items: center; gap: 11px; padding: 11px 14px;
    text-decoration: none; color: var(--gray-700); font-family: var(--font-head);
    font-weight: 600; font-size: 14px; border-left: 3px solid transparent;
    transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  }
  .sidebar a .icon { width: 19px; height: 19px; }
  .sidebar a:hover { background: var(--white); color: var(--black); transform: translateX(2px); }
  .sidebar a[aria-current="page"] {
    background: var(--white); color: var(--black); border-left-color: var(--gold);
  }
}

/* ---------- page header ---------- */
/* Title, context, and the primary action share one row, so a screen does not
   open with four stacked bands of chrome before any content. */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-6);
}
.page-head h1 { margin: 0 0 var(--s-1); }
.page-head .page-sub {
  margin: 0; font-size: 14px; color: var(--gray-500);
  display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap;
}
.page-head .page-actions { display: flex; align-items: center; gap: var(--s-3); }
.dot-sep { color: var(--gray-200); }

/* The free-tier counter is information, not a call to action, so it reads as a
   sentence with a plain link rather than a badge competing with the header. */
.quota-line {
  font-size: 13px; color: var(--gray-500);
  display: inline-flex; align-items: center; gap: var(--s-2);
}
.quota-line a {
  color: var(--gold-hover); font-weight: 600; text-decoration: underline;
  text-underline-offset: 3px;
}
.quota-line a:hover { color: var(--black); }

/* ---------- account menu ---------- */
.acct { position: relative; }
.acct-trigger {
  display: flex; align-items: center; gap: var(--s-2);
  padding: 5px 10px 5px 5px; cursor: pointer;
  background: var(--white); border: 2px solid var(--black);
  font: inherit; color: var(--black);
  transition: box-shadow var(--t-fast) var(--ease-both), transform var(--t-fast) var(--ease-out);
}
.acct-trigger:hover { transform: translate(-1px, -1px); box-shadow: 2px 2px 0 0 var(--black); }
.acct-avatar {
  width: 26px; height: 26px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold); color: var(--black);
  font-family: var(--font-head); font-weight: 700; font-size: 11px;
}
.acct-name {
  font-size: 13px; font-weight: 600; max-width: 140px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.acct-chevron { font-size: 10px; color: var(--gray-500); }
@media (max-width: 560px) { .acct-name { display: none; } }

.acct-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50;
  min-width: 240px; background: var(--white);
  border: 2px solid var(--black); box-shadow: var(--shadow-hard);
}
.acct-head { padding: var(--s-3) var(--s-4); border-bottom: 2px solid var(--black); background: var(--gold-faint); }
.acct-email { font-size: 13px; font-weight: 600; color: var(--black); overflow-wrap: anywhere; }
.acct-plan { display: flex; align-items: center; gap: var(--s-2); margin-top: 6px; flex-wrap: wrap; }
.acct-item {
  display: block; width: 100%; text-align: left;
  padding: 11px var(--s-4); font-size: 14px; color: var(--gray-700);
  text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer;
  border-top: 1px solid var(--gray-100);
  transition: background-color var(--t-fast), padding-left var(--t-fast) var(--ease-out);
}
.acct-item:first-of-type { border-top: 0; }
.acct-item:hover { background: var(--gray-100); color: var(--black); padding-left: calc(var(--s-4) + 4px); }
.acct-item-pro { color: var(--gold-hover); font-weight: 600; }
.acct-item-out { color: var(--red); font-weight: 600; border-top: 2px solid var(--black); }
.acct-item-out:hover { background: #FDECEC; color: var(--red); }
@media (max-width: 480px) { .topbar-pro { display: none; } }

/* ---------- review list ---------- */
.review-list { display: grid; gap: var(--s-3); }

/* The card is itself a link, so the source link cannot nest inside it. It sits
   over the card's top-right corner instead of taking a row of its own, which
   broke the rhythm of the list. */
.review-row { position: relative; min-width: 0; }
.review-source {
  position: absolute; top: 0; right: 0; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: var(--s-5) var(--s-5) var(--s-3) var(--s-3);
  font-size: 12px; font-weight: 600; color: var(--gray-500);
  text-decoration: none; opacity: 0;
  transition: opacity var(--t-base) var(--ease-out), color var(--t-fast);
}
.review-source .icon { width: 13px; height: 13px; }
.review-row:hover .review-source,
.review-source:focus-visible { opacity: 1; }
.review-source:hover { color: var(--gold-hover); }
/* The timestamp shares that corner, so it steps aside rather than colliding. */
.review-time { transition: opacity var(--t-base) var(--ease-out); }
.review-row:hover .review-time { opacity: 0; }
@media (hover: none) {
  .review-source { opacity: 1; }
  .review-row .review-time { opacity: 0; }
}
.review-card {
  display: block; background: var(--white); border: 1px solid var(--gray-200);
  border-left: 3px solid transparent;
  padding: var(--s-5); text-decoration: none; color: inherit; position: relative;
  transition: border-color var(--t-base) var(--ease-both),
              box-shadow var(--t-base) var(--ease-out),
              transform var(--t-base) var(--ease-out);
}
.review-card:hover {
  border-color: var(--black); color: inherit;
  box-shadow: var(--shadow-hard-sm);
  transform: translate(-2px, -2px);
}
.review-card:active { transform: translate(0, 0); box-shadow: 0 0 0 0 var(--black); }
.review-card { min-width: 0; overflow-wrap: anywhere; }
.review-card .review-text {
  margin: var(--s-3) 0 var(--s-4); color: var(--gray-700);
  max-width: var(--measure);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.review-meta { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.review-author { font-weight: 600; color: var(--black); }

/* Eight identical gold "CREATE POST" cues shout over the reviews themselves.
   The arrow is always there so the row is obviously actionable; the words only
   appear on the row the user is actually pointing at. */
.review-cue {
  display: inline-flex; align-items: center; gap: var(--s-2);
  color: var(--gray-500);
  transition: color var(--t-base) var(--ease-both);
}
.review-cue .cue-label {
  opacity: 0; transform: translateX(6px);
  transition: opacity var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out);
}
.review-cue .cue-arrow { transition: transform var(--t-base) var(--ease-out); }

.review-card:hover .review-cue,
.review-card:focus-visible .review-cue { color: var(--gold-hover); }
.review-card:hover .cue-label,
.review-card:focus-visible .cue-label { opacity: 1; transform: none; }
.review-card:hover .cue-arrow { transform: translateX(3px); }

@media (hover: none) {
  /* Touch devices never hover, so the words are always shown there. */
  .review-cue .cue-label { opacity: 1; transform: none; }
}

/* Reviews stagger in as the list fills. */
.review-card {
  animation: rise var(--t-slow) var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 50ms);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.badge-new { animation: pulse-twice 900ms var(--ease-both) 2; }
@keyframes pulse-twice {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}

.empty-state {
  text-align: center; padding: var(--s-8) var(--s-5);
  background: var(--white); border: 2px solid var(--black);
  box-shadow: var(--shadow-hard-sm);
}
.empty-state h3 { margin-bottom: 8px; }

/* ---------- filters ---------- */
.filters { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-bottom: var(--s-5); }
.filter-chip {
  font-family: var(--font-head); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 8px 14px; background: var(--white); border: 1px solid var(--gray-200);
  color: var(--gray-500); cursor: pointer; text-decoration: none;
  transition: all var(--t-fast) var(--ease-both);
}
.filter-chip:hover {
  border-color: var(--black); color: var(--black);
  transform: translate(-1px, -1px); box-shadow: 2px 2px 0 0 var(--black);
}
.filter-chip:active { transform: translate(1px, 1px); box-shadow: none; }
.filter-chip[aria-pressed="true"] { background: var(--black); border-color: var(--black); color: var(--white); }

/* ---------- sync button ---------- */
.sync-btn .icon { width: 16px; height: 16px; }
.sync-btn:hover .sync-icon .icon { transform: rotate(-90deg); transition: transform var(--t-slow) var(--ease-out); }
.htmx-request .sync-icon, .sync-btn.htmx-request .sync-icon { animation: spin 900ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Instagram post frame ---------- */
/* A faithful mock of an Instagram feed post, so the user sees the thing they
   are about to publish rather than an abstract preview pane.
   The circular avatar is a deliberate exception to the sharp-corner rule: it is
   part of simulating another product's chrome, not our own UI. */
.ig-frame {
  background: var(--white);
  border: 1px solid var(--gray-200);
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  container-type: inline-size;
}

.ig-head {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
}
.ig-avatar {
  width: 34px; height: 34px; flex: none;
  border-radius: 50%;
  padding: 2px;
  background: conic-gradient(from 200deg, #F5A623, #DD4444, #C13584, #833AB4, #F5A623);
}
.ig-avatar > * {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.ig-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.ig-avatar .ig-initials {
  font-family: var(--font-head); font-weight: 700; font-size: 12px; color: var(--black);
}
.ig-username {
  font-weight: 600; font-size: 14px; color: var(--black);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ig-more { margin-left: auto; color: var(--gray-700); letter-spacing: 1px; line-height: 1; }

.ig-media {
  position: relative; aspect-ratio: 1 / 1; width: 100%;
  background: var(--gray-100); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.ig-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-media img.loaded { animation: ig-reveal 420ms var(--ease-out) both; }
@keyframes ig-reveal {
  from { opacity: 0; transform: scale(1.04); }
  to   { opacity: 1; transform: none; }
}
.ig-skeleton {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, var(--gray-100) 30%, #EDEDED 50%, var(--gray-100) 70%);
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.ig-actions {
  display: flex; align-items: center; gap: var(--s-4);
  padding: var(--s-3) var(--s-4) var(--s-2);
  color: var(--black);
}
.ig-actions .icon { width: 24px; height: 24px; stroke-width: 1.6; }
.ig-actions .ig-heart { fill: #ED4956; stroke: #ED4956; }
.ig-actions .ig-save { margin-left: auto; }

.ig-body { padding: 0 var(--s-4) var(--s-4); }
.ig-caption {
  font-size: 14px; line-height: 1.45; color: var(--black);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.ig-caption b { font-weight: 600; }
.ig-caption .ig-tags { color: #00376B; }
.ig-time {
  margin-top: var(--s-2); font-size: 11px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--gray-500);
}

.ig-time-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
/* Editing is an affordance on the post, not a form bolted underneath it, so the
   frame keeps reading as the thing that will be published. */
.ig-edit {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--gold-hover); font-weight: 600; text-decoration: underline;
  text-underline-offset: 3px;
}
.ig-edit:hover { color: var(--black); }

/* An editable caption keeps the frame honest: what is shown is what is shared. */
.ig-caption-edit {
  width: 100%; border: 1px dashed var(--gray-200); background: transparent;
  font-family: var(--font-body); font-size: 14px; line-height: 1.45;
  color: var(--black); padding: var(--s-2); resize: vertical; min-height: 96px;
}
.ig-caption-edit:focus { border-style: solid; border-color: var(--gold); box-shadow: none; }

/* ---------- share screen ---------- */
.share-grid { display: grid; gap: var(--s-6); min-width: 0; justify-items: center; }
.share-grid > * { min-width: 0; width: 100%; max-width: 440px; }

.share-actions { display: grid; gap: var(--s-3); }

/* Two secondary actions side by side under the primary one. */
.action-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); min-width: 0;
}
.action-grid .btn { min-width: 0; }
.action-grid .btn-block-span { grid-column: 1 / -1; }

/* ---------- brand settings ---------- */
/* min() keeps the track from forcing the grid wider than its container at
   narrow widths, which is what makes the page scroll sideways on a phone. */
.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: 16px;
}
.color-field { display: flex; flex-direction: column; gap: 6px; }
.color-field { min-width: 0; }
.color-field .swatch-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.color-field .swatch-row input[type="text"] { min-width: 0; }
.color-field input[type="color"] {
  width: 46px; height: 40px; padding: 2px; border: 1px solid var(--gray-200);
  background: var(--white); cursor: pointer; flex: none;
}
.color-field input[type="text"] { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

.tpl-preview {
  width: 100%; aspect-ratio: 1 / 1; display: flex; flex-direction: column;
  border: 1px solid var(--gray-200); overflow: hidden;
  transition: background-color var(--t-base) var(--ease-both);
}
.tpl-main {
  flex: 1 1 auto; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 5%; padding: 8% 10%; text-align: center;
  transition: background-color var(--t-base) var(--ease-both);
}
.tpl-quote {
  font-style: italic; font-size: clamp(11px, 2.9cqw, 19px); line-height: 1.5;
  transition: color var(--t-base) var(--ease-both);
}
.tpl-stars { display: flex; gap: 3px; }
.tpl-stars svg { width: clamp(13px, 4cqw, 26px); height: auto; transition: fill var(--t-base) var(--ease-both); }
.tpl-band {
  flex: 0 0 16%; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 0 5%; transition: background-color var(--t-base) var(--ease-both);
}
.tpl-band .tpl-author { font-weight: 700; font-size: clamp(9px, 2.3cqw, 15px); line-height: 1.15; }
.tpl-band .tpl-attr {
  font-size: clamp(6px, 1.3cqw, 9px); text-transform: uppercase;
  letter-spacing: .1em; opacity: .72; font-weight: 600;
}
.tpl-band .tpl-biz { font-weight: 700; font-size: clamp(9px, 2.3cqw, 15px); text-align: right; }
.tpl-band .tpl-logo { height: clamp(20px, 6cqw, 42px); width: auto; object-fit: contain; }
.tpl-preview-wrap { container-type: inline-size; }

/* ---------- upload control ---------- */
.drop {
  border: 2px dashed var(--gray-200); background: var(--gray-100);
  transition: border-color var(--t-fast) var(--ease-both), background-color var(--t-fast);
}
.drop.is-over { border-color: var(--gold); background: var(--gold-faint); }
.drop.is-picked { border-style: solid; border-color: var(--black); background: var(--white); }
.drop.is-busy { opacity: .7; pointer-events: none; }
.drop.is-busy .drop-icon { animation: drop-pulse 1s var(--ease-both) infinite; }
@keyframes drop-pulse { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.drop-body {
  display: flex; align-items: center; gap: var(--s-4);
  padding: var(--s-4) var(--s-5); cursor: pointer; min-width: 0;
}
.drop-icon {
  width: 42px; height: 42px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--white); border: 2px solid var(--black); color: var(--black);
  transition: transform var(--t-base) var(--ease-back);
}
.drop-body:hover .drop-icon { transform: translateY(-2px); box-shadow: 2px 2px 0 0 var(--black); }
.drop.is-picked .drop-icon { background: var(--gold); }
.drop-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.drop-title {
  font-size: 14px; font-weight: 600; color: var(--black);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.drop-hint { font-size: 12px; color: var(--gray-500); }
.drop-action { flex: none; pointer-events: none; }
.drop-error {
  margin: 0; padding: var(--s-2) var(--s-5) var(--s-3);
  font-size: 13px; color: var(--red); font-weight: 500;
}
@media (max-width: 520px) {
  .drop-body { flex-wrap: wrap; }
  .drop-action { width: 100%; justify-content: center; }
}

.logo-preview {
  height: 64px; width: auto; background: var(--gray-100);
  border: 1px solid var(--gray-200); padding: 6px; object-fit: contain;
}

/* ---------- post style configurator ---------- */

/* A screen that must not scroll fills the viewport exactly, rather than
   guessing at the height of the chrome above it. */
/* Below the sidebar breakpoint the tab bar is fixed over the bottom of the
   viewport, so a full-height page still has to clear it or its last control
   sits underneath and cannot be tapped. */
.app-body.is-full {
  min-height: 0;
  padding-bottom: calc(var(--nav-h) + var(--s-5) + env(safe-area-inset-bottom, 0px));
}
.app-body.is-full > .main { display: flex; flex-direction: column; min-height: 0; padding-bottom: 0; }
@media (min-width: 1000px) {
  .app-body.is-full {
    height: calc(100dvh - var(--nav-h));
    padding-top: var(--s-5);
    padding-bottom: var(--s-5);
    overflow: hidden;
    /* The shell aligns items to the top by default; a full-height screen has to
       stretch or its content overflows the clipped row instead of fitting. */
    align-items: stretch;
  }
}

/* ---- wizard shell ---- */
/* Sized to the viewport so a step never needs the page scrolled. Only the body
   of a step scrolls, and only when its own content is genuinely long. */
.wiz {
  display: grid; gap: var(--s-5); align-items: stretch; min-width: 0;
  grid-template-columns: 1fr;
}
@media (min-width: 1000px) {
  .wiz {
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: var(--s-6);
    flex: 1 1 auto; min-height: 0;
  }
}

.wiz-main {
  display: flex; flex-direction: column; min-width: 0; min-height: 0;
  background: var(--white); border: 2px solid var(--black);
  box-shadow: var(--shadow-hard);
}
.wiz-head { padding: var(--s-5) var(--s-5) var(--s-4); border-bottom: 2px solid var(--black); }
.wiz-context {
  display: block; margin-bottom: var(--s-3);
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--gold-hover);
}
.wiz-title { font-size: 24px; margin: 0 0 var(--s-1); }
.wiz-hint { margin: 0; font-size: 14px; color: var(--gray-500); }

.wiz-progress { display: flex; gap: var(--s-2); margin-bottom: var(--s-4); }
.wiz-dot {
  width: 30px; height: 30px; flex: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-size: 13px; font-weight: 700;
  background: var(--white); color: var(--gray-500);
  border: 2px solid var(--gray-200); padding: 0;
  transition: all var(--t-base) var(--ease-back);
}
.wiz-dot:hover { border-color: var(--gray-500); color: var(--black); }
.wiz-dot.is-done { background: var(--gold-light); border-color: var(--gold); color: var(--gold-hover); }
.wiz-dot.is-on {
  background: var(--black); border-color: var(--black); color: var(--white);
  transform: translate(-1px, -1px); box-shadow: 2px 2px 0 0 var(--gold);
}

.wiz-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: var(--s-5); }
.wiz-panel { animation: wiz-in 320ms var(--ease-out) both; }
@keyframes wiz-in {
  from { opacity: 0; transform: translateX(14px); }
  to   { opacity: 1; transform: none; }
}

.wiz-nav {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-4) var(--s-5); border-top: 2px solid var(--black);
  background: var(--gray-100); flex: none;
}
.wiz-count {
  font-family: var(--font-head); font-size: 14px; font-weight: 700;
  color: var(--gray-500); font-variant-numeric: tabular-nums;
}

.wiz-preview {
  display: flex; flex-direction: column; min-width: 0; min-height: 0;
  overflow-y: auto;
  background: var(--white); border: 2px solid var(--black);
  padding: var(--s-4); box-shadow: var(--shadow-hard);
}
.wiz-preview-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-3); margin-bottom: var(--s-3);
}
.wiz-preview-actions { display: grid; gap: var(--s-2); margin-top: var(--s-4); }

/* Below the two-column breakpoint the preview leads. A choice whose result is
   a screen and a half further down reads as a dead control, so the picture
   sits above the options and stays put while they scroll under it.
   `display: contents` splits the aside so only the picture is pinned: the
   buttons drop to the bottom of the page rather than eating a third of the
   viewport for the whole session. */
@media (max-width: 999px) {
  .wiz-preview { display: contents; }
  .wiz-preview-media {
    order: -1; position: sticky; top: var(--nav-h); z-index: 20;
    background: var(--white); border: 2px solid var(--black);
    box-shadow: var(--shadow-hard); padding: var(--s-3);
  }
  .wiz-preview-media .cfg-canvas { width: min(26vh, 100%); margin: 0 auto; }
  /* Flex rather than a fixed pair of columns: on the last step the "skip the
     rest" button is gone, and the remaining one should take the width instead
     of sitting in a half-empty grid. */
  .wiz-preview-actions { display: flex; margin-top: 0; }
  .wiz-preview-actions > .btn { flex: 1 1 0; min-width: 0; }

  /* Three controls on a 375px row: the default button padding overflows the
     panel and pushes the hard shadow past its border. */
  .wiz-nav { padding: var(--s-3) var(--s-4); gap: var(--s-2); }
  .wiz-nav .btn { padding-left: var(--s-3); padding-right: var(--s-3); }

  /* Anything the browser scrolls to has to clear the pinned picture, or it
     lands underneath it and cannot be tapped. */
  .wiz-head,
  .wiz-body :is(label, button, a, input) {
    scroll-margin-top: calc(var(--nav-h) + 26vh + 90px);
    scroll-margin-bottom: calc(var(--nav-h) + var(--s-4));
  }
}
.cfg-note { font-size: 13px; color: var(--gray-500); margin: 0 0 var(--s-3); }
.cfg-sub { margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--gray-100); }

/* ---- choice cards ---- */
.cfg-cards { display: grid; gap: var(--s-3); grid-template-columns: 1fr; }
@media (min-width: 560px) { .cfg-cards { grid-template-columns: 1fr 1fr; } }
.cfg-card {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3); border: 2px solid var(--gray-200); cursor: pointer;
  background: var(--white); min-width: 0;
  transition: border-color var(--t-fast) var(--ease-both), background-color var(--t-fast) var(--ease-both);
}
.cfg-card:hover { border-color: var(--black); transform: translate(-1px, -1px); box-shadow: var(--shadow-hard-sm); }
.cfg-card.is-on {
  border-color: var(--black); background: var(--gold-faint);
  box-shadow: var(--shadow-hard-sm);
}
.cfg-card:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 0 var(--black); }
.cfg-card-body { display: flex; flex-direction: column; min-width: 0; }
.cfg-card-label { font-weight: 600; font-size: 14px; color: var(--black); }
.cfg-card-hint { font-size: 12px; color: var(--gray-500); line-height: 1.4; }

/* Miniature diagrams of each layout, drawn in CSS so they cost nothing. */
.cfg-thumb {
  width: 52px; height: 52px; flex: none; position: relative;
  background: var(--gray-100); border: 1px solid var(--gray-200); overflow: hidden;
}
.cfg-thumb span { position: absolute; display: block; }
.cfg-thumb .t-a { background: var(--gray-500); }
.cfg-thumb .t-b { background: var(--black); }
.cfg-thumb .t-c { background: var(--gold); }

.cfg-thumb-full-photo .t-a { inset: 0; }
.cfg-thumb-full-photo .t-b { left: 20%; right: 20%; top: 42%; height: 6px; }
.cfg-thumb-full-photo .t-c { left: 20%; bottom: 22%; width: 30%; height: 4px; }

.cfg-thumb-side-photo .t-a { left: 0; top: 0; bottom: 0; width: 40%; }
.cfg-thumb-side-photo .t-b { left: 48%; right: 12%; top: 40%; height: 6px; }
.cfg-thumb-side-photo .t-c { left: 48%; bottom: 26%; width: 22%; height: 4px; }

.cfg-thumb-top-photo .t-a { left: 0; right: 0; top: 0; height: 38%; }
.cfg-thumb-top-photo .t-b { left: 18%; right: 18%; top: 58%; height: 6px; }
.cfg-thumb-top-photo .t-c { left: 0; right: 0; top: 38%; height: 3px; }

.cfg-thumb-elegant-dark .t-a { inset: 0; background: var(--black); }
.cfg-thumb-elegant-dark .t-b { left: 16%; right: 30%; top: 44%; height: 6px; background: var(--white); }
.cfg-thumb-elegant-dark .t-c { left: 16%; top: 24%; width: 26%; height: 4px; }

/* Little diagrams of what each brand mark puts on the post. */
.mark-thumb {
  width: 52px; height: 52px; flex: none;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  background: var(--gray-100); border: 1px solid var(--gray-200);
}
.mark-thumb .mk-logo { width: 14px; height: 14px; background: var(--gold); display: none; }
.mark-thumb .mk-text { width: 24px; height: 5px; background: var(--black); display: none; }
.mark-thumb-logo .mk-logo { display: block; }
.mark-thumb-text .mk-text { display: block; }
.mark-thumb-logo-text .mk-logo,
.mark-thumb-logo-text .mk-text { display: block; }
.mark-thumb-none::after { content: "—"; color: var(--gray-500); font-size: 18px; }

/* An option that needs an upload is offered but visibly incomplete. */
.cfg-card.is-missing { opacity: .72; }
.cfg-card.is-missing .cfg-card-hint { color: var(--red); }
.cfg-card.is-missing.is-on { opacity: 1; }

/* ---- chips ---- */
.cfg-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.cfg-chips-lg .cfg-chip { padding: 13px 20px; font-size: 14px; }
.cfg-chip {
  font-family: var(--font-head); font-size: 13px; font-weight: 600;
  padding: 9px 15px; border: 2px solid var(--gray-200); cursor: pointer;
  background: var(--white); color: var(--gray-700);
  transition: all var(--t-fast) var(--ease-both);
}
.cfg-chip:hover { border-color: var(--gray-500); color: var(--black); }
.cfg-chip.is-on {
  border-color: var(--black); background: var(--black); color: var(--white);
  box-shadow: var(--shadow-hard-sm); transform: translate(-1px, -1px);
}

/* ---- font samples ---- */
.cfg-font-sample {
  width: 52px; height: 52px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: var(--black);
  background: var(--gray-100); border: 1px solid var(--gray-200);
}
.font-playfair { font-family: "Playfair Display", Georgia, serif; font-style: italic; }
.font-inter    { font-family: var(--font-body); }
.font-chakra   { font-family: var(--font-head); font-weight: 700; }
.font-caveat   { font-family: "Caveat", cursive; font-size: 30px; }

/* ---- stock picker ---- */
.cfg-stock-cat + .cfg-stock-cat { margin-top: var(--s-4); }
.cfg-stock-cat .caption { margin-bottom: var(--s-2); }
.cfg-stock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: var(--s-2); }
.cfg-stock {
  display: block; cursor: pointer; position: relative; line-height: 0;
  border: 3px solid transparent; transition: border-color var(--t-fast) var(--ease-both);
}
.cfg-stock img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.cfg-stock:hover { border-color: var(--gray-500); }
.cfg-stock.is-on { border-color: var(--black); box-shadow: var(--shadow-hard-sm); }
.cfg-stock.is-on::after {
  content: "✓"; position: absolute; right: 3px; bottom: 2px;
  width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
  background: var(--gold); color: var(--black); font-size: 13px; font-weight: 700; line-height: 1;
}

.cfg-custom-preview,
.bg-preview {
  width: 96px; height: 96px; object-fit: cover;
  border: 1px solid var(--gray-200); background: var(--gray-100);
}

/* ---- accent swatches ---- */
.cfg-swatches { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.cfg-swatch {
  width: 38px; height: 38px; border: 3px solid var(--gray-200); cursor: pointer; padding: 0;
  transition: border-color var(--t-fast) var(--ease-both), transform var(--t-fast) var(--ease-out);
}
.cfg-swatch:hover { transform: translateY(-2px); }
.cfg-swatch.is-on { border-color: var(--black); box-shadow: var(--shadow-hard-sm); transform: translate(-2px, -2px); }

/* ---- slider ---- */
.cfg-slider { display: flex; align-items: center; gap: var(--s-4); }
.cfg-slider input[type="range"] { flex: 1; accent-color: var(--gold); min-width: 0; }
.cfg-slider output {
  font-family: var(--font-head); font-weight: 700; font-size: 14px;
  color: var(--black); min-width: 48px; text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---- preview ---- */
.cfg-canvas {
  position: relative; aspect-ratio: 1 / 1; background: var(--gray-100);
  overflow: hidden;
}
.cfg-canvas img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: opacity var(--t-base) var(--ease-both);
}
/* The preview is the real render, so a change takes a moment; dimming says the
   image on screen is one revision behind rather than letting it look stale. */
.cfg-canvas.is-rendering img { opacity: .45; }
.cfg-canvas.is-rendering::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: var(--gold); transform-origin: left center;
  animation: cfg-bar 900ms var(--ease-both) infinite;
}
@keyframes cfg-bar {
  0%   { transform: scaleX(0); opacity: 1; }
  70%  { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}
.cfg-actions { display: grid; gap: var(--s-2); margin-top: var(--s-4); }

/* ---- the install step ---- */
.wiz-install { display: grid; gap: var(--s-5); justify-items: center; text-align: center; }
.wiz-install-art { width: 100%; display: flex; justify-content: center; }
.wiz-install-phone {
  position: relative; width: 210px; height: 130px;
  background: linear-gradient(160deg, #2B2B2B, var(--black));
  border: 2px solid var(--black); overflow: hidden;
  display: flex; align-items: flex-start; justify-content: center; padding-top: 14px;
}
/* An iOS-style banner, matching the one on the landing page. */
.wiz-install-notif {
  display: flex; align-items: center; gap: 9px;
  width: 88%; padding: 9px 11px; border-radius: 16px;
  background: rgba(255, 255, 255, .68);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
  text-align: left;
  animation: notif-nudge 3.4s var(--ease-out) infinite;
}
@keyframes notif-nudge {
  0%, 100% { transform: translateY(-140%); opacity: 0; }
  12%      { transform: translateY(0); opacity: 1; }
  20%      { transform: translateY(-3px); }
  26%      { transform: translateY(0); }
  80%      { transform: translateY(0); opacity: 1; }
  92%      { transform: translateY(-140%); opacity: 0; }
}
.wiz-install-icon {
  width: 26px; height: 26px; flex: none; border-radius: 7px;
  background: var(--gold); border: 1px solid rgba(0, 0, 0, .18);
}
.wiz-install-notif b { display: block; font-size: 11px; color: var(--black); }
.wiz-install-notif i {
  display: block; font-size: 10px; font-style: normal;
  color: rgba(60, 60, 67, .72);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px;
}

.wiz-install-points {
  list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2);
  text-align: left; max-width: 40ch;
}
.wiz-install-points li {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 14px; color: var(--gray-700);
}
.wiz-install-points li::before {
  content: "✓"; color: var(--gold-hover); font-weight: 700; flex: none;
}
.wiz-install-actions { width: 100%; max-width: 340px; }

/* ---------- onboarding ---------- */

.onb { max-width: 620px; margin: 0 auto; }

/* A visible spine through setup, so three screens read as one flow. */
.onb-steps {
  display: flex; align-items: flex-start; gap: var(--s-2);
  margin: 0 0 var(--s-6); padding: 0; list-style: none;
  counter-reset: onb;
}
.onb-step {
  flex: 1 1 0; min-width: 0; position: relative;
  display: flex; flex-direction: column; gap: var(--s-2);
  padding-top: var(--s-2);
  border-top: 3px solid var(--gray-200);
  font-size: 12px; font-weight: 600; color: var(--gray-500);
  transition: border-color var(--t-slow) var(--ease-out), color var(--t-slow);
}
.onb-step.is-on { border-top-color: var(--gold); color: var(--black); }
.onb-step.is-done { border-top-color: var(--gold); color: var(--gray-700); }
.onb-num {
  width: 26px; height: 26px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 12px;
  background: var(--gray-100); color: var(--gray-500);
  transition: all var(--t-base) var(--ease-back);
}
.onb-num .icon { width: 14px; height: 14px; }
.onb-step.is-on .onb-num {
  background: var(--gold); color: var(--black); border: 2px solid var(--black);
  box-shadow: 2px 2px 0 0 var(--black);
}
.onb-step.is-done .onb-num { background: var(--gold-light); color: var(--gold-hover); }
.onb-label { line-height: 1.35; }
/* Only the step you are on is named. The other two are progress, not a menu,
   and labelling all three makes the eye hunt for which one is live. */
.onb-step:not(.is-on) .onb-label { display: none; }

.onb-card {
  background: var(--white); border: 2px solid var(--black);
  box-shadow: var(--shadow-hard); padding: var(--s-7) var(--s-6);
}
.onb-card h1 { font-size: 30px; margin: 0 0 var(--s-3); }
.onb-lead { color: var(--gray-500); margin: 0 0 var(--s-6); font-size: 16px; }
.onb-card .field { margin-bottom: var(--s-5); }

.onb-help { margin-top: var(--s-5); border-top: 1px solid var(--gray-100); padding-top: var(--s-4); }
.onb-help summary {
  cursor: pointer; font-size: 14px; font-weight: 600; color: var(--gray-700);
  list-style: none; display: flex; align-items: center; gap: var(--s-2);
}
.onb-help summary::-webkit-details-marker { display: none; }
.onb-help summary::before { content: "?"; display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; background: var(--gold-light); color: var(--gold-hover);
  font-weight: 700; font-size: 12px; flex: none; }
.onb-help summary:hover { color: var(--black); }
.onb-help ol { margin: var(--s-3) 0 0; padding-left: 20px; font-size: 14px; color: var(--gray-500); }
.onb-help li { margin-bottom: 5px; }

.onb-done {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-5); flex-wrap: wrap;
  padding: var(--s-4) var(--s-5); margin-bottom: var(--s-5);
  background: #E9F6EC; border: 2px solid var(--green);
  animation: onb-land 520ms var(--ease-back) both;
}
.onb-done-main { display: flex; align-items: flex-start; gap: var(--s-4); flex: 1 1 320px; min-width: 0; }
.onb-done-aside {
  display: flex; flex-direction: column; gap: var(--s-2); flex: none;
  padding-left: var(--s-5); border-left: 1px solid rgba(42, 140, 62, .3);
}
.onb-done-aside .small { color: #2A6B38; }
.onb-done-aside .btn-ghost { background: var(--white); border-color: var(--green); color: #1B5C29; }
.onb-done-aside .btn-ghost:hover { background: var(--white); box-shadow: 2px 2px 0 0 var(--green); }
@media (max-width: 720px) {
  .onb-done-aside { padding-left: 0; border-left: 0; border-top: 1px solid rgba(42, 140, 62, .3); padding-top: var(--s-3); width: 100%; }
}
@keyframes onb-land {
  from { opacity: 0; transform: translateY(-10px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.onb-done-mark {
  width: 30px; height: 30px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--green); color: var(--white);
}
.onb-done-mark .icon { width: 17px; height: 17px; stroke-width: 3; }
.onb-done-title { font-family: var(--font-head); font-weight: 700; font-size: 15px; color: #1B5C29; }
.onb-done-sub { font-size: 13px; color: #2A6B38; margin-top: 2px; line-height: 1.5; }

/* ---------- first-run style nudge ---------- */
.style-nudge {
  display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap;
  padding: var(--s-4) var(--s-5); margin-bottom: var(--s-5);
  background: var(--gold-faint); border: 1px solid var(--gold);
  border-left-width: 4px;
}
.style-nudge-title { font-family: var(--font-head); font-weight: 700; font-size: 15px; color: var(--black); }
.style-nudge-sub { font-size: 13px; color: var(--gray-700); margin-top: 2px; }
/* Four pixel blocks that tick through the accent, echoing the logo grid. */
.style-nudge-art { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; flex: none; }
.style-nudge-art span {
  width: 14px; height: 14px; background: var(--gold);
  animation: nudge-tick 2.4s var(--ease-both) infinite;
}
.style-nudge-art span:nth-child(2) { animation-delay: .15s; }
.style-nudge-art span:nth-child(3) { animation-delay: .45s; }
.style-nudge-art span:nth-child(4) { animation-delay: .3s; }
@keyframes nudge-tick {
  0%, 60%, 100% { opacity: .35; }
  25%           { opacity: 1; }
}

/* ---------- settings ---------- */
/* A grid, so related settings sit side by side instead of forming one long
   column that has to be read from the top every time. */
.set-grid { display: grid; gap: var(--s-5); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 860px) { .set-grid { grid-template-columns: 1fr 1fr; } }
.set-grid .panel { min-width: 0; }
.set-plan-row { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.set-plan-name {
  display: flex; align-items: center; gap: var(--s-2);
  font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--black);
  margin-bottom: 2px;
}

/* Closing an account is not the same rank of decision as changing an email, so
   it is folded away rather than sitting in the same stack. */
.danger { margin-top: var(--s-6); max-width: 520px; }
.danger summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  cursor: pointer; list-style: none;
  padding: var(--s-3) var(--s-4);
  border: 2px solid var(--gray-200); background: var(--white);
  font-size: 14px; font-weight: 600; color: var(--gray-500);
  transition: border-color var(--t-fast), color var(--t-fast);
}
.danger summary::-webkit-details-marker { display: none; }
.danger summary:hover { border-color: var(--red); color: var(--red); }
.danger[open] summary { border-color: var(--red); color: var(--red); border-bottom: 0; }
.danger[open] .danger-chev { transform: rotate(45deg); }
.danger-chev { font-size: 18px; line-height: 1; transition: transform var(--t-base) var(--ease-out); }
.danger form {
  padding: var(--s-5); border: 2px solid var(--red); border-top: 0; background: #FDECEC;
}
.danger form p { color: #8C1F1F; }

/* ---------- pricing ---------- */
.plan-grid { display: grid; gap: 16px; grid-template-columns: 1fr; min-width: 0; }
.plan { min-width: 0; }
@media (min-width: 720px) { .plan-grid { grid-template-columns: repeat(3, 1fr); } }
.plan {
  background: var(--white); border: 1px solid var(--gray-200); padding: var(--s-5);
  display: flex; flex-direction: column;
}
.plan-featured { border: 2px solid var(--black); box-shadow: var(--shadow-hard); }
.plan .price { font-family: var(--font-head); font-size: 40px; font-weight: 700; color: var(--black); line-height: 1; }
.plan .cadence { color: var(--gray-500); font-size: 13px; margin-bottom: 16px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 20px; flex: 1 1 auto; }
.plan li { padding: 7px 0 7px 24px; position: relative; font-size: 14px; border-bottom: 1px solid var(--gray-100); }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); font-weight: 700; }

/* ---------- upgrade gate ---------- */
.gate { text-align: center; padding: 40px 24px; background: var(--white); border: 1px solid var(--gray-200); animation: warm-in var(--t-slow) var(--ease-out) both; }
@keyframes warm-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.gate .gate-icon { font-size: 42px; line-height: 1; margin-bottom: 12px; }
.gate .btn-gold { animation: attention 1.1s var(--ease-both) .35s 1; }
@keyframes attention {
  0%, 100% { transform: scale(1); }
  40%      { transform: scale(1.045); }
}

/* ---------- toasts ---------- */
.toast-host {
  position: fixed; top: 16px; right: 16px; z-index: 90;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
  max-width: min(360px, calc(100vw - 32px));
}
.toast {
  pointer-events: auto; background: var(--black); color: var(--white);
  padding: var(--s-3) var(--s-4); font-size: 14px; font-weight: 500;
  border: 2px solid var(--black); border-left-width: 4px; border-left-color: var(--gold);
  box-shadow: var(--shadow-hard-sm);
  animation: toast-in 320ms var(--ease-back) both;
}
.toast.leaving { animation: toast-out var(--t-base) var(--ease-in) both; }
.toast-error   { border-left-color: var(--red); }
.toast-success { border-left-color: var(--green); }
@keyframes toast-in  { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(24px); } }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(17,17,17,.55); z-index: 80;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fade-in var(--t-base) var(--ease-out) both;
}
.modal {
  background: var(--white); border: 2px solid var(--black); padding: var(--s-6);
  max-width: 420px; width: 100%;
  box-shadow: 8px 8px 0 0 var(--black);
  animation: modal-in 340ms var(--ease-back) both;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- htmx transitions ---------- */
/* Every swap fades so server-rendered updates never "jump". */
.htmx-swapping { opacity: 0; transition: opacity var(--t-base) var(--ease-in); }
.htmx-added    { opacity: 0; }
.htmx-settling { opacity: 0; }
#page, [hx-target] { transition: opacity var(--t-base) var(--ease-out); }
.fade-in { animation: fade-in var(--t-base) var(--ease-out) both; }
.htmx-indicator { opacity: 0; transition: opacity var(--t-fast) var(--ease-both); }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }

/* ---------- confetti ---------- */
.confetti-host { position: fixed; inset: 0; pointer-events: none; z-index: 95; overflow: hidden; }
.confetti-bit {
  position: absolute; width: 8px; height: 12px; opacity: 0;
  animation: confetti-fall 1400ms var(--ease-in) forwards;
}
@keyframes confetti-fall {
  0%   { opacity: 1; transform: translateY(-10vh) rotate(0deg); }
  100% { opacity: 0; transform: translateY(80vh) rotate(540deg); }
}

/* ---------- landing ---------- */
.landing-nav {
  background: var(--white); border-bottom: 1px solid var(--gray-200);
  position: sticky; top: 0; z-index: 30;
}
.landing-nav-inner {
  max-width: var(--shell-max); margin: 0 auto; padding: 0 20px;
  min-height: var(--nav-h); display: flex; align-items: center; gap: var(--s-6);
}
.nav-links { display: flex; align-items: center; gap: var(--s-5); margin-right: auto; }
.nav-links a {
  position: relative; font-size: 14px; font-weight: 500; color: var(--gray-700);
  text-decoration: none; padding: 6px 0;
  transition: color var(--t-fast) var(--ease-both);
}
/* A gold rule wipes in under the link rather than a colour fade. */
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--gold); transform: scaleX(0); transform-origin: left center;
  transition: transform var(--t-base) var(--ease-out);
}
.nav-links a:hover { color: var(--black); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-actions { display: flex; align-items: center; gap: var(--s-2); flex: none; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .landing-nav-inner { flex-wrap: wrap; gap: var(--s-3); padding-block: var(--s-2); }
  .nav-links {
    order: 3; width: 100%; margin: 0; gap: var(--s-4);
    max-height: 0; overflow: hidden;
    transition: max-height var(--t-slow) var(--ease-out);
  }
  .nav-links.is-open { max-height: 200px; padding-bottom: var(--s-3); }
  .nav-actions { margin-left: auto; }
  .nav-login { display: none; }
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 40px; height: 40px; padding: 0 9px;
    background: transparent; border: 1px solid var(--gray-200); cursor: pointer;
  }
  .nav-toggle span {
    display: block; height: 2px; width: 100%; background: var(--black);
    transition: transform var(--t-base) var(--ease-out), opacity var(--t-fast);
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}

.hero {
  position: relative; overflow: hidden;
  background: var(--gold-faint);
  border-bottom: 1px solid var(--gray-200);
  padding: var(--s-8) 20px var(--s-9);
}
/* A slow pixel field behind the hero, echoing the logo's grid. Decoration that
   belongs to the brand rather than generic gradient soup. */
.hero::before {
  content: ""; position: absolute; inset: -40px; pointer-events: none;
  background-image:
    linear-gradient(var(--gold) 1px, transparent 1px),
    linear-gradient(90deg, var(--gold) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: .10;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 25%, transparent 75%);
  animation: pixel-drift 40s linear infinite;
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: var(--shell-max); margin: 0 auto;
  display: grid; gap: var(--s-8); align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 960px) {
  .hero-inner { grid-template-columns: 1.1fr .9fr; gap: var(--s-8); }
}
/* Left aligned everywhere: a centred paragraph of this length is harder to
   read, and the ragged right edge fights the demo beside it. */
.hero-copy { text-align: left; }
.hero-eyebrow {
  display: inline-block; margin-bottom: var(--s-4);
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--black);
  padding: 6px 12px; background: var(--gold); border: 2px solid var(--black);
  box-shadow: var(--shadow-hard-sm);
}
.hero h1 {
  font-size: clamp(32px, 4.6vw, 50px); max-width: 17ch; margin: 0 0 var(--s-4);
  letter-spacing: -0.01em;
}
.hero p.lead { font-size: 18px; color: var(--gray-700); max-width: 48ch; margin: 0 0 var(--s-6); }
.hero-cta { display: flex; gap: var(--s-3); flex-wrap: wrap; justify-content: flex-start; }

/* Plain reassurances, ticked. The pulsing squares read as decoration rather
   than as the three beats they were meant to describe. */
.hero-proof {
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5);
  margin: var(--s-5) 0 0; padding: 0; list-style: none;
  font-size: 13px; color: var(--gray-500);
}
.hero-proof li { display: flex; align-items: center; gap: 7px; }
.hero-proof li::before {
  content: "✓"; color: var(--gold-hover); font-weight: 700; font-size: 13px;
}

/* ---------- hero demo: notification, then the post ---------- */
.hero-demo { position: relative; display: flex; justify-content: center; }
.hero-demo-stack { position: relative; width: 100%; max-width: 400px; }

/* The push notification that starts the whole flow.
   Modelled on an iOS banner: translucent, blurred, rounded, light. It is a
   picture of someone's phone, not a piece of our UI, so it follows the
   platform's language rather than the sharp-cornered one everywhere else. */
.demo-notif {
  position: absolute; left: 4%; right: 4%; top: -20px; z-index: 3;
  display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-3);
  align-items: center;
  padding: 11px 13px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .62);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow:
    0 12px 34px rgba(17, 17, 17, .16),
    0 2px 6px rgba(17, 17, 17, .06),
    inset 0 1px 0 rgba(255, 255, 255, .9);
  color: var(--black);
  transform: translateY(-140%);
  opacity: 0;
}
/* A soft specular sheen across the top, the way glass catches light. */
.demo-notif::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(160deg, rgba(255,255,255,.75), rgba(255,255,255,0) 55%);
  pointer-events: none;
}
.demo-notif .notif-time {
  font-size: 11px; color: rgba(60, 60, 67, .6); align-self: flex-start;
  position: relative; z-index: 1;
}
.demo-notif.is-in { animation: notif-drop 4.6s var(--ease-out) both; }
@keyframes notif-drop {
  0%   { transform: translateY(-140%) rotate(-1.5deg); opacity: 0; }
  9%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  14%  { transform: translateY(-6px); }
  18%  { transform: translateY(0); }
  62%  { transform: translateY(0); opacity: 1; }
  74%  { transform: translateY(-140%); opacity: 0; }
  100% { transform: translateY(-140%); opacity: 0; }
}
.demo-notif img {
  width: 34px; height: 34px; image-rendering: pixelated;
  background: var(--white); padding: 4px;
  border-radius: 9px; position: relative; z-index: 1;
  box-shadow: 0 1px 3px rgba(17, 17, 17, .18);
}
.demo-notif > div { position: relative; z-index: 1; }
.demo-notif .notif-title {
  font-family: var(--font-body); font-weight: 600; font-size: 13px; color: var(--black);
}
.demo-notif .notif-body {
  font-size: 12px; color: rgba(60, 60, 67, .72); margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Posts swap by sliding, not by dissolving. */
.demo-post { position: relative; }
.demo-post .ig-frame { max-width: none; box-shadow: 0 18px 44px rgba(17, 17, 17, .10); }
.demo-slide-enter { animation: demo-in 520ms var(--ease-out) both; }
.demo-slide-leave { animation: demo-out 380ms var(--ease-in) both; }

/* The post steps back while the notification is on screen, and comes forward
   again as the tap lands — so the eye follows the story in the order the story
   happens, instead of choosing between two bright things.
   
   Applied to the inner frame, not to .demo-post: the wrapper already animates
   transform and opacity for the swap, and a second animation on the same
   properties would fight it. filter conflicts with nothing.
   
   The timing tracks notif-drop deliberately: dim as the banner arrives (9%),
   hold while it is being read, lift as the tap lands at 34%. */
.demo-post.is-dimmed .ig-frame { animation: demo-dim 4600ms linear both; }
@keyframes demo-dim {
  0%   { filter: none; }
  9%   { filter: brightness(.68) saturate(.85); }
  28%  { filter: brightness(.68) saturate(.85); }
  40%  { filter: none; }
  100% { filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .demo-post.is-dimmed .ig-frame { animation: none; filter: none; }
}
@keyframes demo-in {
  0%   { opacity: 0; transform: translateY(26px) scale(.96) rotate(1deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes demo-out {
  0%   { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-22px) scale(.97) rotate(-1deg); }
}

/* A tap ripple on the notification, so the "tap to share" beat is visible. */
.demo-tap {
  position: absolute; z-index: 4; left: 50%; top: 6px;
  width: 46px; height: 46px; margin-left: -23px;
  /* A square ripple, not a circle: sharp corners are a brand rule, and it
     reads as the pixel aesthetic rather than a generic material ripple. */
  border: 2px solid var(--gold);
  opacity: 0; pointer-events: none;
}
.demo-tap.is-in { animation: tap-ripple 4.6s var(--ease-out) both; }
/* The tap comes early, at a third of the cycle rather than two thirds.
   Between the banner landing and the tap, the notification announces one
   review while the post below still shows the previous one — true to the
   story, but a contradiction on screen, so it is kept short. */
@keyframes tap-ripple {
  0%, 28%  { opacity: 0; transform: scale(.3); }
  34%      { opacity: 1; transform: scale(.75); }
  46%      { opacity: 0; transform: scale(1.7); }
  100%     { opacity: 0; transform: scale(1.7); }
}

/* A slow horizontal drift of real review snippets. */
.scroller {
  border-block: 2px solid var(--black);
  background: var(--gold-faint); padding: var(--s-6) 0;
  overflow: hidden;
}
.scroller-viewport {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.scroller-track {
  display: flex; gap: var(--s-5); width: max-content; padding: 0 20px;
  animation: marquee 64s linear infinite;
}
.scroller:hover .scroller-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* The posts are the point of the strip, so they are shown at a size you can
   actually read the quote at, with nothing underneath to label them. */
.scroller-post {
  margin: 0; width: clamp(240px, 24vw, 340px); flex: none;
  background: var(--white); border: 2px solid var(--black);
  box-shadow: var(--shadow-hard-sm);
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out);
}
.scroller-post:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 0 var(--black); }
.scroller-post img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; display: block; }

.section { padding: var(--s-9) 20px; }

.section-head { max-width: 56ch; margin: 0 auto var(--s-7); text-align: center; }
.section-eyebrow {
  display: inline-block; margin-bottom: var(--s-3);
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gray-500);
}
.section-eyebrow::before {
  content: ""; display: inline-block; width: 18px; height: 2px;
  background: var(--gold); margin-right: 9px; vertical-align: middle;
}
.section-head h2 { margin: 0; }
.section-sub { margin: var(--s-3) 0 0; color: var(--gray-500); font-size: 16px; }
.section-alt { background: var(--white); border-top: 1px solid var(--gray-200); border-bottom: 1px solid var(--gray-200); }
.container { max-width: var(--shell-max); margin: 0 auto; }
.container-narrow { max-width: 760px; margin: 0 auto; }
.steps {
  display: grid; gap: var(--s-6); grid-template-columns: 1fr;
  counter-reset: step; position: relative;
}
@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  /* A gold rule that draws itself across the three steps on scroll. */
  .steps::before {
    content: ""; position: absolute; left: 23px; right: 23px; top: 23px;
    height: 2px; background: var(--gold); transform-origin: left center;
    transform: scaleX(0); opacity: .35;
  }
  .steps.is-visible::before { animation: draw-line 1100ms var(--ease-out) 180ms both; }
}
@keyframes draw-line { to { transform: scaleX(1); } }
.step { counter-increment: step; position: relative; }

/* Each step shows the real screen it describes rather than a diagram of it: a
   lock screen notification, the finished post, the share sheet. The chrome is
   someone else's product, so it is rounded and marked accordingly. */
.illo {
  background: var(--gold-faint); border: 2px solid var(--black);
  box-shadow: var(--shadow-hard-sm);
  margin-bottom: var(--s-4); overflow: hidden;
  display: grid; place-items: center;
  padding: var(--s-5);
}
/* A phone-shaped screen, not a landscape panel: at a phone's proportions the
   content laid out inside it is the real thing at the real size, which is the
   whole point of showing it rather than drawing it. */
.illo-phone-screen {
  position: relative; width: min(196px, 78%); aspect-ratio: 10 / 19;
  overflow: hidden; border-radius: 18px;
  background:
    radial-gradient(120% 90% at 22% 8%, #4a3a2c 0%, transparent 60%),
    radial-gradient(110% 80% at 85% 95%, #2b3440 0%, transparent 55%),
    #17171a;
  box-shadow: 0 10px 26px rgba(17, 17, 17, .28), inset 0 0 0 1px rgba(255, 255, 255, .1);
}
.illo-phone-light { background: var(--white); box-shadow: 0 10px 26px rgba(17, 17, 17, .2); }

/* ---- step 1: the notification on a lock screen ---- */
.illo-lock-clock {
  position: absolute; inset: 26px 0 auto; text-align: center; color: rgba(255,255,255,.92);
  font-family: var(--font-body); line-height: 1.05;
}
.illo-lock-day { display: block; font-size: 9px; opacity: .78; letter-spacing: .01em; }
.illo-lock-clock strong { font-size: 38px; font-weight: 300; letter-spacing: -.02em; }
.illo-banner {
  position: absolute; left: 4%; right: 4%; top: 40%;
  display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center;
  padding: 8px 10px; border-radius: 15px;
  background: rgba(255, 255, 255, .62);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .26);
  animation: illo-banner-in 4.4s var(--ease-out) infinite;
}
.illo-banner img {
  width: 26px; height: 26px; min-width: 26px; padding: 3px; border-radius: 7px;
  background: var(--white); image-rendering: pixelated;
}
/* The title cannot shrink below its own words, so without this the grid steals
   the width from the icon column and the app mark disappears. */
.illo-banner > div { min-width: 0; }
.illo-banner b {
  display: block; font-size: 10.5px; font-weight: 600; color: var(--black);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.illo-banner i {
  display: block; font-style: normal; font-size: 10px; margin-top: 1px;
  color: rgba(60, 60, 67, .74);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.illo-banner-time { font-size: 8.5px; color: rgba(60, 60, 67, .6); align-self: start; }
@keyframes illo-banner-in {
  0%   { transform: translateY(-160%) scale(.96); opacity: 0; }
  10%  { transform: translateY(0) scale(1); opacity: 1; }
  16%  { transform: translateY(-4px); }
  22%  { transform: translateY(0); }
  86%  { transform: translateY(0); opacity: 1; }
  96%, 100% { transform: translateY(-160%); opacity: 0; }
}

/* ---- steps 2 and 3: the share screen, a moment apart ---- */
.illo-app-screen {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  background: var(--white);
}
.illo-app-bar {
  flex: none; display: flex; align-items: center; gap: 6px;
  padding: 8px 10px; border-bottom: 1px solid var(--gray-200);
  font-family: var(--font-head); font-size: 9px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--gray-700);
}
.illo-app-bar img { flex: none; width: 16px; height: 16px; image-rendering: pixelated; }
.illo-app-body {
  flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; padding: 10px;
}
.illo-app-post {
  flex: none; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover;
  border: 1px solid var(--gray-200);
}
.illo-app-caption { width: 100%; display: grid; gap: 5px; }
.illo-app-caption span { height: 4px; background: var(--gray-200); display: block; }
.illo-app-caption span:nth-child(2) { width: 88%; }
.illo-app-caption span:nth-child(3) { width: 54%; }
.illo-app-cta {
  flex: none; margin: 0 10px 14px; padding: 7px 0; text-align: center;
  background: var(--gold); border: 2px solid var(--black);
  box-shadow: 3px 3px 0 0 var(--black);
  font-family: var(--font-head); font-size: 11px; font-weight: 700; color: var(--black);
  animation: illo-cta-press 3s var(--ease-both) infinite;
}
@keyframes illo-cta-press {
  0%, 58%, 100% { transform: translate(0, 0); box-shadow: 3px 3px 0 0 var(--black); }
  70%           { transform: translate(3px, 3px); box-shadow: 0 0 0 0 var(--black); }
  80%           { transform: translate(0, 0); box-shadow: 3px 3px 0 0 var(--black); }
}
/* The fingertip: a soft disc the size a thumb actually covers. */
.illo-tap {
  position: absolute; left: 50%; bottom: 14px; width: 38px; height: 38px;
  margin-left: -19px; border-radius: 50%; z-index: 2;
  background: rgba(17, 17, 17, .14); border: 1px solid rgba(17, 17, 17, .2);
  animation: illo-thumb 3s var(--ease-both) infinite;
}
@keyframes illo-thumb {
  0%, 46%, 100% { transform: translateY(44px); opacity: 0; }
  62%           { transform: translateY(0); opacity: 1; }
  74%           { transform: translateY(3px) scale(.9); opacity: 1; }
  88%           { transform: translateY(44px); opacity: 0; }
}

/* ---- step 3: the share sheet over that same screen ---- */
.illo-dimmed { position: absolute; inset: 0; }
.illo-dimmed::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: rgba(17, 17, 17, .42);
}
.illo-dimmed .illo-app-cta { animation: none; }
.illo-sheet {
  position: absolute; left: 3%; right: 3%; bottom: 0; z-index: 2;
  padding: 9px 11px 14px; border-radius: 16px 16px 0 0;
  background: rgba(246, 246, 248, .92);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, .34);
  animation: illo-sheet-up 3.8s var(--ease-out) infinite;
}
.illo-sheet-grab {
  display: block; width: 32px; height: 4px; margin: 0 auto 10px;
  border-radius: 2px; background: rgba(60, 60, 67, .3);
}
.illo-sheet-apps { display: flex; justify-content: space-between; gap: 9px; margin-bottom: 11px; }
.illo-app-icon { width: 100%; aspect-ratio: 1 / 1; border-radius: 22%; display: block; }
/* Recognisable stand-ins for the apps a share sheet offers, not their marks. */
/* The gradient alone. The camera outline read as a white square rather than a
   lens at this size, and a share sheet is recognisable from the colours. */
.illo-app-ig {
  background: radial-gradient(circle at 28% 100%, #fdd25c 0%, #f75d3c 32%, #d92e7f 62%, #8a3ab9 88%);
}
.illo-app-fb   { background: linear-gradient(160deg, #4c86ff, #1b58d6); }
.illo-app-msg  { background: linear-gradient(160deg, #6ce26c, #22b622); }
.illo-app-more { background: rgba(60, 60, 67, .16); }
.illo-sheet-rows { display: grid; gap: 6px; }
.illo-sheet-rows span {
  height: 14px; border-radius: 5px; background: rgba(255, 255, 255, .85);
  box-shadow: inset 0 0 0 1px rgba(60, 60, 67, .08);
}
@keyframes illo-sheet-up {
  0%   { transform: translateY(100%); opacity: 0; }
  16%  { transform: translateY(0); opacity: 1; }
  84%  { transform: translateY(0); opacity: 1; }
  98%, 100% { transform: translateY(100%); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .illo-banner, .illo-sheet, .illo-app-cta, .illo-tap { animation: none; }
  .illo-tap { opacity: 1; transform: none; }
}

.step::before {
  content: counter(step); display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; background: var(--gold); color: var(--black);
  font-family: var(--font-head); font-weight: 700; font-size: 20px;
  margin-bottom: var(--s-4); position: relative; z-index: 1;
}
/* Content is never hidden waiting to be revealed. Whole-section fade-ins break
   the page whenever the observer does not fire — a crawler, a screenshot, a
   browser that scrolled past too fast — and a dissolve is the dullest motion
   available. The liveliness here comes from things that are always on. */

.plan { transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out); }
.plan:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-hard); }
.plan-featured:hover { box-shadow: 7px 7px 0 0 var(--black); }

/* Step numbers tick through in sequence, the same beat as the hero. */
/* Two animations, not one: the lift eases, but the colours have to jump. A
   single keyframe set interpolates gold text towards black over a gold ground,
   which is the one pairing the palette forbids. */
.step::before {
  animation:
    step-lift 4.5s var(--ease-both) infinite,
    step-flip 4.5s steps(1, end) infinite;
}
.step:nth-child(2)::before { animation-delay: .5s; }
.step:nth-child(3)::before { animation-delay: 1s; }
@keyframes step-lift {
  0%, 9%, 26%, 100% { transform: translateY(0); }
  13%               { transform: translateY(-5px); }
}
@keyframes step-flip {
  0%        { background: var(--gold);  color: var(--black); }
  10%       { background: var(--black); color: var(--gold); }
  26%, 100% { background: var(--gold);  color: var(--black); }
}

/* Feature cards grow a pixel corner on hover, echoing the post template. */
.card-feature { position: relative; overflow: hidden; transition: border-color var(--t-base); }
.card-feature::after {
  content: ""; position: absolute; right: 0; bottom: 0;
  width: 0; height: 0;
  background:
    linear-gradient(135deg, transparent 50%, var(--gold) 50%);
  transition: width var(--t-slow) var(--ease-out), height var(--t-slow) var(--ease-out);
}
.card-feature:hover { border-color: var(--gold); }
.card-feature:hover::after { width: 34px; height: 34px; }

.faq details { border-bottom: 1px solid var(--gray-200); padding: 16px 0; }
.faq summary { font-family: var(--font-head); font-weight: 600; font-size: 16px; color: var(--black); cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 12px 0 0; color: var(--gray-700); }

.site-footer {
  background: var(--black); color: #B8B8B8;
  padding: var(--s-8) 20px var(--s-5); border-top: 4px solid var(--gold);
}
.footer-inner {
  max-width: var(--shell-max); margin: 0 auto;
  display: grid; gap: var(--s-7); grid-template-columns: 1fr;
}
@media (min-width: 780px) {
  .footer-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: var(--s-8); }
}

.footer-brand { max-width: 42ch; }
.wordmark-invert { color: var(--white); }
.wordmark-invert:hover { color: var(--white); }
/* The pixel logo has black in it, which disappears on a black ground. A light
   plate keeps the mark readable instead of half-vanishing. */
.logo-plate { background: var(--white); padding: 4px; border: 2px solid var(--gold); }
.footer-pitch { margin: var(--s-4) 0 var(--s-5); font-size: 14px; line-height: 1.65; color: #B8B8B8; }

/* Square, bordered and gold on hover, like every other control: these are the
   only outbound links in the footer, so they should not read as decoration. */
.footer-social { display: flex; gap: var(--s-3); margin-top: var(--s-5); }
.footer-social-link {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex: none;
  color: var(--white); border: 2px solid #3A3A3A; background: transparent;
  transition: color var(--t-fast), border-color var(--t-fast),
    background-color var(--t-fast), transform var(--t-fast) var(--ease-out);
}
.footer-social-link .icon { width: 19px; height: 19px; }
.footer-social-link:hover {
  color: var(--black); background: var(--gold); border-color: var(--gold);
  transform: translate(-2px, -2px); box-shadow: 3px 3px 0 0 var(--gold-hover);
}
.footer-social-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.footer-cols { display: grid; gap: var(--s-6); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.footer-col { display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.footer-col h3 {
  margin: 0 0 var(--s-2); font-size: 12px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--white);
}
.footer-col a {
  font-size: 14px; color: #B8B8B8; text-decoration: none; width: fit-content;
  transition: color var(--t-fast) var(--ease-both), transform var(--t-fast) var(--ease-out);
}
.footer-col a:hover { color: var(--white); transform: translateX(3px); }

.footer-base {
  max-width: var(--shell-max); margin: var(--s-7) auto 0;
  padding-top: var(--s-5); border-top: 1px solid #2A2A2A;
  display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6);
  justify-content: space-between; font-size: 12px; color: #8A8A8A;
}
.footer-note { max-width: 60ch; }
/* Scoped away from .btn: a footer button keeps its own foreground, or the
   link colour wins on specificity and paints gold text on a gold ground. */
.site-footer a:not(.btn) { color: #B8B8B8; }
.site-footer a:not(.btn):hover { color: var(--white); }

/* ---------- legal ---------- */
.legal { background: var(--white); padding: 32px; border: 1px solid var(--gray-200); }
.legal h2 { font-size: 22px; margin-top: 32px; }
.legal h2:first-of-type { margin-top: 0; }

/* ---------- install prompt ---------- */
/* ---------- install banner ---------- */
.install-banner {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  margin-bottom: var(--s-6);
  color: var(--black);
  background: var(--gold-faint);
  border: 2px solid var(--black);
  box-shadow: var(--shadow-hard-sm);
  overflow: hidden;
}
/* A drifting pixel field, echoing the logo, instead of a flat panel. */
.install-banner::after {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--gold-hover) 1px, transparent 1px),
    linear-gradient(90deg, var(--gold-hover) 1px, transparent 1px);
  background-size: 14px 14px;
  opacity: .14;
  animation: pixel-drift 24s linear infinite;
}
@keyframes pixel-drift { to { background-position: 140px 140px, 140px 140px; } }

.install-banner .install-icon {
  width: 44px; height: 44px; flex: none; position: relative; z-index: 1;
  image-rendering: pixelated;
  background: var(--white); padding: 5px; border: 2px solid var(--black);
}
.install-banner .install-copy { position: relative; z-index: 1; min-width: 0; }
.install-banner .install-title {
  font-family: var(--font-head); font-weight: 700; font-size: 16px;
  color: var(--black); line-height: 1.25;
}
.install-banner .install-sub {
  font-size: 13px; color: var(--gray-700); margin-top: 2px; line-height: 1.45;
}
.install-banner .install-actions {
  display: flex; gap: var(--s-2); position: relative; z-index: 1; flex: none;
}
.install-banner .btn-ghost { background: var(--white); }

@media (max-width: 620px) {
  .install-banner { grid-template-columns: auto 1fr; row-gap: var(--s-3); }
  .install-banner .install-actions { grid-column: 1 / -1; }
}

/* Honour a user's reduced-motion preference across every animation above. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Backoffice
   ==========================================================================
   Deliberately plainer than the product: dense tables, no motion, nothing that
   makes a destructive control look inviting. It shares the palette and the
   sharp corners so it is recognisably the same app, and nothing else. */

.badge-danger { background: var(--red); color: var(--white); }

/* A button that has to read as a link: the way out of a dead-end screen is a
   POST (it needs the CSRF token), but it is not the action being offered. */
.btn-link {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; color: var(--gray-500); text-decoration: underline;
  text-underline-offset: 2px;
}
.btn-link:hover { color: var(--black); }

.adm-topbar { border-bottom: 2px solid var(--black); }
.adm-tag {
  margin-left: var(--s-2); padding: 2px 7px;
  background: var(--black); color: var(--gold);
  font-family: var(--font-head); font-size: 10px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
}
/* The topbar row is flex, and a long address has no natural break, so without
   an explicit shrink it pushes the whole page sideways on a phone. */
.adm-topbar .row { min-width: 0; }
.adm-who {
  flex: 0 1 auto; min-width: 0; max-width: 30ch;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 560px) {
  /* Below this there is not room for both, and the button is the useful half.
     Which admin you are is on every page of the backoffice anyway. */
  .adm-who { display: none; }
}

.adm-nav { background: var(--white); border-bottom: 1px solid var(--gray-200); }
.adm-nav-inner {
  max-width: var(--shell-max); margin: 0 auto; padding: 0 20px;
  display: flex; gap: var(--s-1); overflow-x: auto;
}
.adm-nav a {
  display: flex; align-items: center; gap: 8px; padding: 13px 14px;
  text-decoration: none; color: var(--gray-700);
  font-family: var(--font-head); font-size: 14px; font-weight: 600;
  border-bottom: 3px solid transparent; white-space: nowrap;
}
.adm-nav a:hover { color: var(--black); }
.adm-nav a[aria-current="page"] { color: var(--black); border-bottom-color: var(--gold); }
.adm-nav .icon { width: 17px; height: 17px; }

.adm-main { padding-bottom: var(--s-8); }
.adm-h1 { font-size: 28px; margin: var(--s-5) 0 var(--s-2); }
.adm-h2 { font-size: 15px; margin: 0 0 var(--s-4); text-transform: uppercase; letter-spacing: .08em; }
.adm-lead { margin: 0 0 var(--s-6); color: var(--gray-500); max-width: var(--measure); }
/* A heading inside a section, for a second table under the same h2. */
.adm-h3 { font-size: 14px; margin: var(--s-5) 0 var(--s-2); font-weight: 700; }
.adm-empty { padding: var(--s-6); background: var(--gray-100); color: var(--gray-500); }
.adm-note { margin: 0 0 var(--s-3); font-size: 13px; color: var(--gray-500); }
.adm-sub { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.adm-nowrap { white-space: nowrap; }
.adm-link { color: var(--black); text-decoration: underline; text-underline-offset: 2px; }
.adm-back { display: inline-block; margin-top: var(--s-5); font-size: 13px; color: var(--gray-500); }

.adm-section { margin-bottom: var(--s-7); }

/* ---- numbers ---- */
.adm-stats {
  display: grid; gap: var(--s-4); margin-bottom: var(--s-5);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.adm-stat {
  display: flex; flex-direction: column; gap: 2px;
  padding: var(--s-4); background: var(--white);
  border: 2px solid var(--black); box-shadow: var(--shadow-hard-sm);
}
.adm-stat-label {
  font-family: var(--font-head); font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--gray-500);
}
.adm-stat-value { font-family: var(--font-head); font-size: 30px; line-height: 1.1; }
.adm-stat-hint { font-size: 12px; color: var(--gray-500); }

/* ---- sparkline ---- */
.adm-spark {
  margin: 0 0 var(--s-5); padding: var(--s-4);
  background: var(--white); border: 2px solid var(--black); box-shadow: var(--shadow-hard-sm);
}
.adm-spark figcaption {
  font-family: var(--font-head); font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--gray-500);
  margin-bottom: var(--s-3);
}
.adm-spark-bars {
  display: flex; align-items: flex-end; gap: 3px; height: 90px;
  border-bottom: 1px solid var(--gray-200);
}
/* min-height, not height: a day with nothing in it still needs a mark, or the
   chart reads as a gap in the data rather than a quiet day. */
.adm-spark-bar { flex: 1; min-height: 2px; background: var(--gold); }
.adm-spark-bar:hover { background: var(--black); }
.adm-spark-axis {
  display: flex; justify-content: space-between;
  margin-top: 6px; font-size: 11px; color: var(--gray-500);
}

/* ---- breakdowns ---- */
.adm-breakdowns {
  display: grid; gap: var(--s-4);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.adm-breakdown {
  padding: var(--s-4); background: var(--white);
  border: 2px solid var(--black); box-shadow: var(--shadow-hard-sm);
}
.adm-breakdown h3 {
  margin: 0 0 var(--s-3); font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--gray-500);
}
.adm-breakdown ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.adm-breakdown li {
  display: flex; justify-content: space-between; gap: var(--s-3);
  font-size: 13px; border-bottom: 1px solid var(--gray-100); padding-bottom: 5px;
}
.adm-breakdown li:last-child { border-bottom: 0; padding-bottom: 0; }

/* ---- tables ---- */
.adm-filters {
  display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center;
  margin: var(--s-5) 0 var(--s-3);
}
.adm-search { flex: 1 1 260px; min-width: 0; }
.adm-filters select { flex: none; }

/* The one thing on these pages allowed to scroll sideways: a table of eight
   columns cannot be made to fit a phone, and squeezing it makes it unreadable
   rather than narrower. */
.adm-table-wrap {
  overflow-x: auto; background: var(--white);
  border: 2px solid var(--black); box-shadow: var(--shadow-hard-sm);
  margin-bottom: var(--s-4);
}
.adm-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.adm-table th {
  text-align: left; padding: var(--s-3) var(--s-4);
  font-family: var(--font-head); font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--gray-500);
  border-bottom: 2px solid var(--black); background: var(--gray-100);
}
.adm-table td { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--gray-200); vertical-align: top; }
.adm-table tr:last-child td { border-bottom: 0; }
.adm-table tbody tr:hover { background: var(--gold-faint); }
.adm-flags { display: flex; flex-wrap: wrap; gap: 5px; }
.adm-flags-lead { margin-bottom: var(--s-4); }
.adm-row-actions .adm-form { margin: 0; }
.adm-pager { display: flex; align-items: center; gap: var(--s-3); }

/* ---- one account ---- */
/* minmax(0, 1fr), not 1fr: a plain 1fr track has a min-content floor, so the
   audit table's own min-width pushes the whole page sideways instead of
   scrolling inside its wrapper. */
.adm-cols { display: grid; gap: var(--s-5); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) {
  .adm-cols { grid-template-columns: minmax(0, 1fr) 320px; }
}
.adm-col { display: grid; gap: var(--s-5); min-width: 0; }
.adm-card {
  padding: var(--s-5); background: var(--white);
  border: 2px solid var(--black); box-shadow: var(--shadow-hard-sm);
}
.adm-card-danger { border-color: var(--red); box-shadow: 3px 3px 0 0 var(--red); }
.adm-card .adm-form { margin-bottom: var(--s-3); }
.adm-card .adm-form:last-child { margin-bottom: 0; }
.adm-card .adm-form select,
.adm-card .adm-form input[type="text"] { width: 100%; margin-bottom: var(--s-2); }
.adm-danger { color: var(--red); border-color: var(--red); }
.adm-danger:hover { background: var(--red); color: var(--white); }

.adm-callout {
  padding: var(--s-4); margin-bottom: var(--s-5);
  border: 2px solid var(--black); background: var(--gray-100);
  display: flex; flex-wrap: wrap; gap: var(--s-2);
}
.adm-callout-danger { border-color: var(--red); background: #FDF2F2; }

.adm-biz {
  display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: space-between;
  padding: var(--s-3) 0; border-bottom: 1px solid var(--gray-200);
}
.adm-biz:last-child { border-bottom: 0; padding-bottom: 0; }
.adm-biz-actions { display: flex; gap: var(--s-2); align-items: flex-start; }
.adm-biz-actions .adm-form { margin: 0; }

.adm-timeline { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-3); }
.adm-event {
  display: grid; grid-template-columns: 110px 1fr; gap: var(--s-3);
  font-size: 14px; padding-left: var(--s-4); border-left: 3px solid var(--gray-200);
}
.adm-event-when { color: var(--gray-500); font-size: 12px; }
.adm-event-signup { border-left-color: var(--gold); }
.adm-event-plan   { border-left-color: var(--green); }
.adm-event-block,
.adm-event-delete { border-left-color: var(--red); }

/* ---- impersonation ---- */
/* Fixed and loud on purpose: forgetting whose screen you are reading is the
   only way an admin does real damage with a read-only session. */
.imp-bar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: var(--s-3);
  padding: 10px 20px;
  background: var(--red); color: var(--white);
  border-bottom: 2px solid var(--black);
}
.imp-mark { display: flex; flex: none; }
.imp-mark .icon { width: 20px; height: 20px; }
.imp-text { flex: 1; min-width: 0; font-size: 14px; }
.imp-bar b { font-weight: 700; }
.imp-bar form { margin: 0; }
/* The app's own top bar is sticky at 0; with the banner above it, it has to
   start below it or the two overlap on the first scroll. */
.shell.is-impersonating .topbar { top: 42px; }

/* ==========================================================================
   Status page
   ==========================================================================
   Read in one glance, usually by somebody who is annoyed. The headline answers
   the only question that matters and the colour carries it before the words
   are read. */

.status-headline { display: flex; align-items: center; gap: var(--s-4); margin-bottom: var(--s-2); }
.status-headline h1 { margin: 0; font-size: 30px; }
.status-checked { margin: 0 0 var(--s-6); color: var(--gray-500); font-size: 14px; }

.status-dot {
  width: 14px; height: 14px; flex: none;
  background: var(--green); border: 2px solid var(--black);
}
.is-degraded > .status-dot { background: var(--gold); }
.is-down > .status-dot     { background: var(--red); }

.status-list {
  border: 2px solid var(--black); box-shadow: var(--shadow-hard);
  background: var(--white);
}
.status-row {
  display: flex; align-items: flex-start; gap: var(--s-4);
  padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--gray-200);
}
.status-row:last-child { border-bottom: 0; }
.status-row > .status-dot { margin-top: 4px; }
.status-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.status-row-body strong { font-family: var(--font-head); font-size: 15px; }
.status-desc { font-size: 13px; color: var(--gray-500); }
.status-state {
  flex: none; font-family: var(--font-head); font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--gray-500);
  padding-top: 3px;
}
.status-row.is-degraded .status-state { color: var(--gold-hover); }
.status-row.is-down .status-state     { color: var(--red); }

.status-foot { margin-top: var(--s-6); }

/* ---- backoffice alerts ---- */
.adm-alert { margin-bottom: var(--s-4); }
.adm-alert-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.adm-alert-head strong { font-size: 15px; }
.adm-alert-detail {
  margin: var(--s-3) 0 0; padding: var(--s-3);
  background: var(--gray-100); font-size: 12px; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word; overflow-x: auto;
}
.adm-alert-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--s-3); margin-top: var(--s-3);
}
.adm-alert-foot .adm-form { margin: 0; }

/* A plan that is advertised but not on sale. Legible, obviously inert, and
   still carrying its price — it is there to anchor the monthly one. */
.plan-soon { opacity: .72; }
.plan-soon .btn[disabled] { cursor: not-allowed; opacity: 1; }

/* Tables inside the legal pages. Two of them carry the parts of a privacy
   notice that are unreadable as prose — the lawful basis per purpose, and who
   the processors are — so they need to survive a phone. */
/* ---------------------------------------------------------------- blog --- */

/* The hero is gold because gold is a background in this design and never a
   foreground: everything on it is dark text on the gold ground. */
.blog-hero {
  background: var(--gold);
  border-bottom: 2px solid var(--black);
  padding: var(--s-8) 20px;
  color: var(--black);
}
/* Centred: a left-aligned block inside a centred narrow container leaves half
   the band empty on a wide screen and reads as a layout mistake. */
.blog-hero .container-narrow { text-align: center; }
.blog-hero h1 { max-width: 24ch; margin: var(--s-3) auto var(--s-4); }
.blog-hero .lead { max-width: 56ch; margin: 0 auto; color: var(--black); opacity: .82; }
.blog-hero .section-eyebrow { color: var(--black); }
.blog-hero .section-eyebrow::before { background: var(--black); }

/* auto-fit rather than a fixed column count, so the grid reflows without a
   breakpoint for every width. */
.post-grid {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  align-items: start;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 2px solid var(--black);
  box-shadow: var(--shadow-hard);
  text-decoration: none;
  color: inherit;
  transition: transform var(--t-fast) var(--ease-both),
              box-shadow var(--t-fast) var(--ease-both);
}
.post-card:hover,
.post-card:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 0 var(--black);
}

/* The cover sits on a tint rather than filling the card, because the sample is
   a 1080 square: cropping it to a banner cuts the quote in half. */
.post-card-cover { border-bottom: 2px solid var(--black); }
.cover-art { display: block; width: 100%; height: auto; }

/* A sample is a 1080 square in a 1.6:1 frame, so it is set on a tint at full
   height rather than cropped to fill. */
.cover-sample {
  aspect-ratio: 320 / 200;
  background: var(--gold-faint);
  display: flex; align-items: center; justify-content: center;
  padding: 5%;
}
.cover-sample img {
  height: 100%; width: auto; max-width: 100%; display: block;
  border: 1px solid var(--black); box-shadow: var(--shadow-hard-sm);
}

.post-card-body {
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  flex: 1;
}
.post-card-title {
  font-family: var(--font-head);
  font-size: 19px;
  line-height: 1.25;
  margin: var(--s-1) 0 0;
  color: var(--black);
}
.post-card:hover .post-card-title { text-decoration: underline; }
.post-card-desc { margin: 0; color: var(--gray-500); font-size: 15px; line-height: 1.5; }
.post-card-meta {
  margin: auto 0 0; padding-top: var(--s-3);
  font-size: 13px; color: var(--gray-500);
}
.post-card .badge { align-self: flex-start; }

/* The lead article spans two columns on a wide grid and lays out side by side,
   so a reader arriving at eleven same-day posts is told where to start. */
@media (min-width: 980px) {
  /* The full row, not two of three columns: sharing a row with a taller card
     leaves a block of dead space under the lead article. */
  .post-card.is-featured {
    grid-column: 1 / -1;
    flex-direction: row;
  }
  .post-card.is-featured .post-card-cover {
    border-bottom: 0;
    border-right: 2px solid var(--black);
    flex: 0 0 46%;
    display: flex;
    align-items: center;
  }
  .post-card.is-featured .post-card-body { justify-content: center; padding: var(--s-6); }
  .post-card.is-featured .post-card-title { font-size: 26px; }
  /* In a wide card the body is centred, so pushing the meta to the bottom
     opens a gap under the description instead of squaring the card off. */
  .post-card.is-featured .post-card-meta { margin-top: var(--s-4); }
  .post-card.is-featured .post-card-desc { font-size: 16px; }
}

/* ---- one article ---- */

.post-hero {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: var(--s-6) 20px var(--s-7);
}
.post-hero .container-narrow { text-align: center; }
.post-back { margin-bottom: var(--s-4); font-size: 14px; text-align: left; }
.post-hero h1 { margin: var(--s-3) auto var(--s-3); max-width: 26ch; }
.post-hero-meta { margin: 0; font-size: 14px; color: var(--gray-500); }

/* ---- article layout: prose, and a rail that follows ---- */

.post-layout { padding: var(--s-7) 20px var(--s-8); }
.post-main { min-width: 0; }

/* The rail is hidden below 1100px rather than stacked: a contents list sitting
   directly above the content it indexes is a second list of headings to scroll
   past before reaching the article. */
.post-rail { display: none; }

@media (min-width: 1100px) {
  .post-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 288px;
    gap: var(--s-8);
    /* Deliberately not align-items: start. That would size the rail to its own
       content, leaving position: sticky inside it nothing to travel through, so
       the contents would scroll away with the prose. */
  }
  .post-rail { display: block; }
  .post-rail-inner { position: sticky; top: calc(var(--nav-h) + 24px); }
}

.rail-cta {
  background: var(--gold); border: 2px solid var(--black);
  box-shadow: var(--shadow-hard-sm); padding: var(--s-5); margin-bottom: var(--s-5);
}
.rail-cta p { margin: 0 0 var(--s-4); font-size: 15px; line-height: 1.45; color: var(--black); }

.rail-toc {
  background: var(--white); border: 1px solid var(--gray-200); padding: var(--s-5);
}
.rail-toc h2 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--gray-500); margin: 0 0 var(--s-4);
}
.rail-toc ol { list-style: none; margin: 0; padding: 0; }
.rail-toc li { margin: 0; }
.rail-toc a {
  display: block; padding: 7px 0 7px 12px;
  border-left: 2px solid var(--gray-200);
  font-size: 14px; line-height: 1.35; color: var(--gray-500); text-decoration: none;
  transition: color var(--t-fast) var(--ease-both), border-color var(--t-fast) var(--ease-both);
}
.rail-toc a:hover { color: var(--black); border-left-color: var(--gray-500); }
.rail-toc a.is-active {
  color: var(--black); font-weight: 600; border-left-color: var(--gold);
}

/* The reading indicator, pinned to the bottom edge of the sticky nav. It is
   decorative and starts empty, so it hides nothing when JS does not run. */
.read-progress {
  position: fixed; top: var(--nav-h); left: 0; right: 0; height: 3px;
  z-index: 29; pointer-events: none;
}
.read-progress-fill {
  display: block; height: 100%; width: 0; background: var(--gold);
  transition: width 80ms linear;
}

/* A heading jumped to from the rail must not land under the sticky nav. */
.post-body h2 { scroll-margin-top: calc(var(--nav-h) + 20px); }

.post-cover {
  margin: 0 0 var(--s-7);
  border: 2px solid var(--black);
  box-shadow: var(--shadow-hard);
}

/* A comfortable measure for reading. The body is prose, so it is set narrower
   than the shell it sits in. */
.post-body { max-width: 70ch; font-size: 17px; line-height: 1.7; }
.post-body > p:first-child { font-size: 19px; color: var(--gray-700); }
.post-body h2 {
  font-size: 25px; margin: var(--s-8) 0 var(--s-3);
  padding-top: var(--s-5); border-top: 1px solid var(--gray-200);
}
.post-body h3 { font-size: 19px; margin: var(--s-6) 0 var(--s-2); }
.post-body p { margin: 0 0 var(--s-4); }
.post-body ul, .post-body ol { margin: 0 0 var(--s-4); padding-left: 1.3em; }
.post-body li { margin-bottom: var(--s-2); }
.post-body strong { color: var(--black); }
.post-body a { color: var(--black); text-decoration: underline; text-underline-offset: 2px; }
.post-body a:hover { background: var(--gold-light); }

/* Dark text on gold, never the other way round. */
.post-cta {
  max-width: 70ch; margin: var(--s-8) 0 0; padding: var(--s-6);
  background: var(--gold); border: 2px solid var(--black);
  box-shadow: var(--shadow-hard); color: var(--black);
}
.post-cta h2 { margin: 0 0 var(--s-3); font-size: 22px; color: var(--black); }
.post-cta p { margin: 0 0 var(--s-5); color: var(--black); max-width: 52ch; }

.post-related-head { margin: 0 0 var(--s-6); }

@media (max-width: 640px) {
  .blog-hero { padding: var(--s-7) 20px; }
  .blog-hero h1 { font-size: 30px; }
  .post-grid { gap: var(--s-5); grid-template-columns: 1fr; }
  .post-card-cover { padding: var(--s-4); }
  .post-card-cover img { max-width: 180px; }
  .post-layout { padding: var(--s-6) 20px var(--s-7); }
  .post-body { font-size: 16px; }
  .post-body > p:first-child { font-size: 17px; }
  .post-cta { padding: var(--s-5); box-shadow: var(--shadow-hard-sm); }
}

.legal-table {
  width: 100%; border-collapse: collapse; margin: var(--s-4) 0 var(--s-5);
  font-size: 14px; display: block; overflow-x: auto;
}
.legal-table th,
.legal-table td {
  text-align: left; padding: var(--s-3); border-bottom: 1px solid var(--gray-200);
  vertical-align: top;
}
.legal-table th {
  font-family: var(--font-head); font-size: 12px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--gray-500);
  border-bottom: 2px solid var(--black); white-space: nowrap;
}
.legal-table tr:last-child td { border-bottom: 0; }
.legal code {
  background: var(--gray-100); padding: 1px 5px; font-size: 13px;
}
