/* QueekSpace design system — hand-written, no build step. */

:root {
  /* White canvas + glowing green brand. */
  --canvas: #ffffff;
  --canvas-2: #f4faf7;
  --surface: #ffffff;
  --surface-2: #f7fbf9;
  --surface-3: #eef7f2;
  --border: #e1ede7;
  --border-strong: #c6dccf;
  --text: #0a1410;
  --text-dim: #26352e;
  --muted: #56675f;
  --faint: #67786f;
  --accent: #047857;
  --accent-hover: #036248;
  --accent-ink: #ffffff;
  --accent-soft: rgba(4, 120, 87, 0.08);
  --accent-soft-2: rgba(4, 120, 87, 0.16);
  --mint: #0f9d63;
  --mint-soft: rgba(15, 157, 99, 0.1);
  --amber: #a4620a;
  --amber-soft: rgba(164, 98, 10, 0.1);
  --danger: #c0392b;
  --danger-soft: rgba(192, 57, 43, 0.08);
  --ok: #047857;
  --grad: linear-gradient(115deg, #046b4e 0%, #067a52 48%, #0f9d63 100%);
  --grad-bright: linear-gradient(135deg, #067a52, #046b4e);
  --glow: 0 12px 34px rgba(16, 185, 129, 0.28);
  --glow-soft: 0 8px 22px rgba(16, 185, 129, 0.18);
  --shadow: 0 22px 50px rgba(6, 40, 30, 0.1);
  --shadow-sm: 0 8px 22px rgba(6, 40, 30, 0.07);
  --radius: 16px;
  --radius-sm: 11px;
  --radius-xs: 8px;
  --font: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-display: "Sora", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sidebar-w: 248px;
}

html[data-theme="dark"] {
  --canvas: #05100b;
  --canvas-2: #071811;
  --surface: #0a1f16;
  --surface-2: #0d271c;
  --surface-3: #113226;
  --border: #17392b;
  --border-strong: #245441;
  --text: #eaf6f0;
  --text-dim: #c6e0d4;
  --muted: #93b3a5;
  --faint: #6d8b7d;
  --accent: #34d399;
  --accent-hover: #6ee7b7;
  --accent-ink: #04231a;
  --accent-soft: rgba(52, 211, 153, 0.14);
  --accent-soft-2: rgba(52, 211, 153, 0.24);
  --mint: #34d399;
  --mint-soft: rgba(52, 211, 153, 0.14);
  --amber: #f5b544;
  --amber-soft: rgba(245, 181, 68, 0.12);
  --danger: #ff7b72;
  --danger-soft: rgba(255, 123, 114, 0.12);
  --ok: #34d399;
  --grad: linear-gradient(115deg, #34d399 0%, #10b981 50%, #6ee7b7 100%);
  --grad-bright: linear-gradient(135deg, #10b981, #34d399);
  --glow: 0 12px 34px rgba(16, 185, 129, 0.35);
  --glow-soft: 0 8px 22px rgba(16, 185, 129, 0.22);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.28);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme]) 
  --canvas: #05100b;
  --canvas-2: #071811;
  --surface: #0a1f16;
  --surface-2: #0d271c;
  --surface-3: #113226;
  --border: #17392b;
  --border-strong: #245441;
  --text: #eaf6f0;
  --text-dim: #c6e0d4;
  --muted: #93b3a5;
  --faint: #6d8b7d;
  --accent: #34d399;
  --accent-hover: #6ee7b7;
  --accent-ink: #04231a;
  --accent-soft: rgba(52, 211, 153, 0.14);
  --accent-soft-2: rgba(52, 211, 153, 0.24);
  --mint: #34d399;
  --mint-soft: rgba(52, 211, 153, 0.14);
  --amber: #f5b544;
  --amber-soft: rgba(245, 181, 68, 0.12);
  --danger: #ff7b72;
  --danger-soft: rgba(255, 123, 114, 0.12);
  --ok: #34d399;
  --grad: linear-gradient(115deg, #34d399 0%, #10b981 50%, #6ee7b7 100%);
  --grad-bright: linear-gradient(135deg, #10b981, #34d399);
  --glow: 0 12px 34px rgba(16, 185, 129, 0.35);
  --glow-soft: 0 8px 22px rgba(16, 185, 129, 0.22);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.28);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin: 0;
  font-weight: 650;
}

h1 {
  font-size: clamp(2rem, 3.4vw, 3rem);
}
h2 {
  font-size: clamp(1.55rem, 2.4vw, 2.15rem);
}
h3 {
  font-size: 1.08rem;
}

p {
  margin: 0;
}

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

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

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

::selection {
  background: var(--accent-soft-2);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.muted {
  color: var(--muted);
}
.mono {
  font-family: var(--mono);
  font-size: 0.9em;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}
.eyebrow--light {
  color: #c9c2ff;
}
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px var(--mint-soft);
}

/* ---------- Brand ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.045em;
  color: var(--text);
  white-space: nowrap;
}
.brand--light {
  color: #fff;
}
.brand--compact {
  font-size: 16px;
}
.brand--compact .logo-mark {
  width: 26px;
  height: 26px;
}
.logo-mark {
  flex: 0 0 auto;
  filter: drop-shadow(0 6px 14px rgba(108, 92, 231, 0.28));
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: -0.01em;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease,
    box-shadow 0.16s ease, color 0.16s ease;
  white-space: nowrap;
}
.btn:active {
  transform: translateY(1px);
}
.btn--primary {
  background: var(--grad-bright);
  color: var(--accent-ink);
  box-shadow: var(--glow-soft);
}
.btn--primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--glow);
}
.btn--ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn--ghost:hover {
  background: var(--surface-2);
  border-color: var(--muted);
}
.btn--danger {
  background: var(--danger);
  color: #fff;
}
.btn--danger:hover {
  filter: brightness(1.08);
}
.btn--sm {
  height: 36px;
  padding: 0 13px;
  font-size: 13.5px;
  border-radius: 9px;
}
.btn--lg {
  height: 50px;
  padding: 0 24px;
  font-size: 15.5px;
}
.btn--block {
  width: 100%;
}
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  transition: color 0.15s ease, background 0.15s ease;
}
.icon-btn:hover {
  color: var(--text);
  background: var(--surface-2);
}
.icon-btn svg {
  width: 19px;
  height: 19px;
}
.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
}
/* Light is the default: show the moon ("go dark"). Dark shows the sun. */
html:not([data-theme]) .theme-toggle .icon-moon,
html[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}
html[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) .theme-toggle .icon-moon {
    display: none;
  }
  html:not([data-theme]) .theme-toggle .icon-sun {
    display: block;
  }
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  font-weight: 600;
  font-size: inherit;
}
.link-btn:hover {
  text-decoration: underline;
}
.link-btn--danger {
  color: var(--danger);
}
.tiny-link {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}
.tiny-link:hover {
  text-decoration: underline;
}
.text-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 22px;
  font-weight: 600;
  color: var(--accent);
}
.text-link span {
  transition: transform 0.15s ease;
}
.text-link:hover span {
  transform: translateX(3px);
}
.text-link--danger {
  color: var(--danger);
}

/* ---------- Pills / badges / avatars ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
}
.pill--mint {
  background: var(--mint-soft);
  border-color: transparent;
  color: var(--mint);
}
.pill--muted {
  color: var(--faint);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
  background: var(--surface-3);
  color: var(--muted);
  white-space: nowrap;
}
.badge--ok {
  background: var(--mint-soft);
  color: var(--mint);
}
.badge--warn {
  background: var(--amber-soft);
  color: var(--amber);
}
.badge--muted {
  background: var(--surface-3);
  color: var(--faint);
}
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--grad-bright);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  flex: 0 0 auto;
}
.avatar--lg {
  width: 58px;
  height: 58px;
  font-size: 18px;
}
img.avatar {
  object-fit: cover;
  display: inline-block;
  background: var(--surface-3);
  padding: 0;
}

/* ---------- Alerts / banners ---------- */
.alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 18px;
  border: 1px solid transparent;
}
.alert--danger {
  background: var(--danger-soft);
  border-color: rgba(255, 107, 107, 0.3);
  color: var(--danger);
}
.alert--ok {
  background: var(--mint-soft);
  border-color: rgba(34, 211, 166, 0.24);
  color: var(--mint);
}
.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 13.5px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.banner--ok {
  border-color: rgba(34, 211, 166, 0.25);
  background: var(--mint-soft);
}
.banner--warn {
  border-color: rgba(245, 165, 36, 0.28);
  background: var(--amber-soft);
}
.banner form {
  margin: 0;
}

/* ---------- Forms ---------- */
.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form--panel {
  margin-top: 26px;
  max-width: 560px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.field label,
.label-row label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
}
.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.input {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  background: var(--canvas-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 14.5px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
html[data-theme="dark"] .input {
  background: #08180f;
}
.input::placeholder {
  color: var(--faint);
}
.input:hover {
  border-color: var(--border-strong);
}
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
textarea.input {
  min-height: 108px;
  resize: vertical;
  line-height: 1.5;
}
.input--code {
  font-family: var(--mono);
  font-size: 24px;
  letter-spacing: 12px;
  text-align: center;
  padding-left: 18px;
}
.input--compact {
  min-height: 38px;
  height: 38px;
  padding: 7px 10px;
  font-size: 13.5px;
  width: auto;
  min-width: 180px;
}
.input-wrap {
  position: relative;
}
.input-wrap .input {
  padding-right: 76px;
}
.reveal {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 6px;
}
.reveal:hover {
  color: var(--text);
  background: var(--surface-2);
}
.hint {
  font-size: 12px;
  color: var(--faint);
  margin: 0;
  line-height: 1.5;
}
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.check input {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--accent);
}
.check a {
  color: var(--accent);
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.form-actions--start {
  margin-top: 18px;
}
.inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.input-prefix {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--canvas-2);
  overflow: hidden;
}
html[data-theme="dark"] .input-prefix {
  background: #08180f;
}
.input-prefix span {
  padding: 0 0 0 13px;
  color: var(--faint);
  font-size: 13px;
  white-space: nowrap;
}
.input-prefix .input {
  border: 0;
  background: transparent;
  box-shadow: none;
}

/* ---------- Auth ---------- */
.auth-body {
  background: var(--canvas);
}
.auth {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  min-height: 100vh;
}
.auth-aside {
  position: relative;
  overflow: hidden;
  padding: 44px clamp(34px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 500px at 85% 12%, rgba(16, 185, 129, 0.30), transparent 62%),
    radial-gradient(700px 420px at 4% 92%, rgba(34, 211, 166, 0.16), transparent 60%),
    linear-gradient(155deg, #04150e 0%, #08251a 48%, #03120c 100%);
  color: #fff;
}
.auth-aside::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(700px 500px at 50% 40%, #000, transparent 78%);
  pointer-events: none;
}
.auth-aside > * {
  position: relative;
  z-index: 1;
}
.auth-aside__copy {
  margin: auto 0;
  max-width: 460px;
  padding: 48px 0;
}
.auth-aside h2 {
  font-size: clamp(2rem, 3vw, 2.9rem);
  letter-spacing: -0.045em;
  margin-bottom: 16px;
  color: #fff;
}
.muted-light {
  color: rgba(236, 239, 248, 0.62);
  font-size: 15.5px;
  line-height: 1.6;
}
.auth-points {
  list-style: none;
  padding: 0;
  margin: 0 0 34px;
  display: flex;
  flex-direction: column;
  gap: 17px;
}
.auth-points li {
  display: flex;
  gap: 13px;
  align-items: flex-start;
}
.auth-points strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.auth-points span {
  font-size: 13px;
  color: rgba(236, 239, 248, 0.56);
}
.point-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: #cfc8ff;
  flex: 0 0 auto;
}
.point-icon svg {
  width: 19px;
  height: 19px;
}
.auth-aside__foot {
  font-size: 11.5px;
  color: rgba(236, 239, 248, 0.38);
}
.auth-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px clamp(22px, 5vw, 68px);
  min-height: 100vh;
  background: var(--canvas);
}
.auth-main__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 34px;
}
.auth-main__top .theme-toggle {
  margin-left: auto;
}
.auth-main__top .brand--compact {
  display: none;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}
.auth-head {
  margin-bottom: 26px;
}
.auth-head h1 {
  font-size: clamp(1.85rem, 2.6vw, 2.3rem);
  margin-bottom: 9px;
}
.auth-sub {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.auth-sub strong {
  color: var(--text-dim);
  font-weight: 600;
}
.auth-head--message {
  text-align: center;
}
.message-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 20px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-soft-2);
}
.message-icon svg {
  width: 26px;
  height: 26px;
}
.auth-switch {
  margin: 22px 0 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
}
.auth-switch a {
  color: var(--accent);
  font-weight: 600;
}
.auth-security {
  margin: 18px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--faint);
}
.auth-security svg {
  width: 14px;
  height: 14px;
}
.auth-legal {
  max-width: 420px;
  margin: 26px auto 0;
  text-align: center;
  font-size: 11px;
  color: var(--faint);
  line-height: 1.55;
}
.auth-legal a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.resend-form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 18px 0 0;
  font-size: 13px;
}

/* ---------- Landing ---------- */
.landing-body {
  background: var(--canvas);
}
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--canvas) 82%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-head.is-scrolled {
  border-bottom-color: var(--border);
}
.site-head__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.site-nav {
  display: flex;
  gap: 26px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
}
.site-nav a:hover {
  color: var(--text);
}
.site-head__actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.site-notice {
  max-width: 1200px;
  margin: 14px auto 0;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--amber-soft);
  border: 1px solid rgba(245, 165, 36, 0.25);
  color: var(--amber);
  font-size: 13px;
  text-align: center;
}
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(54px, 8vw, 100px) 26px clamp(60px, 8vw, 104px);
}
.hero::before {
  content: "";
  position: absolute;
  width: 900px;
  height: 900px;
  right: -260px;
  top: -320px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2), transparent 62%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  width: 700px;
  height: 700px;
  left: -280px;
  bottom: -420px;
  background: radial-gradient(circle, rgba(34, 211, 166, 0.1), transparent 62%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.7rem, 5.6vw, 4.4rem);
  letter-spacing: -0.055em;
  margin-bottom: 22px;
}
.hero__sub {
  max-width: 540px;
  color: var(--muted);
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.65;
}
.hero__actions {
  display: flex;
  gap: 11px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.hero__meta {
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 12.5px;
  color: var(--muted);
}
.hero__meta li {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero__meta svg {
  width: 14px;
  height: 14px;
  color: var(--mint);
}
.hero__visual {
  position: relative;
  min-height: 470px;
  padding: 8px 26px 56px 40px;
}
.browser-card {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotate(0.6deg);
  max-width: 430px;
  margin-left: auto;
}
.browser-card__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 13px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-strong);
}
.browser-card__url {
  margin-left: 8px;
  flex: 1;
  font-size: 10.5px;
  color: var(--faint);
  background: var(--canvas-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.preview-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.preview-media--linen {
  background:
    radial-gradient(340px 220px at 72% 24%, rgba(255, 255, 255, 0.5), transparent 66%),
    linear-gradient(145deg, #d8c9b4 0%, #b8a58c 42%, #7c6a52 100%);
}
.preview-media--linen::before,
.preview-media--linen::after {
  content: "";
  position: absolute;
  border-radius: 24px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.04));
  box-shadow: 0 24px 40px rgba(40, 30, 20, 0.22);
  transform: rotate(-8deg);
}
.preview-media--linen::before {
  width: 58%;
  height: 54%;
  left: 9%;
  top: 22%;
}
.preview-media--linen::after {
  width: 38%;
  height: 66%;
  right: 11%;
  top: 12%;
  transform: rotate(7deg);
  opacity: 0.8;
}
.preview-media__tag {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #2a2018;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(6px);
  padding: 4px 7px;
  border-radius: 5px;
}
.preview-media__domain {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  font-size: 9.5px;
  font-weight: 600;
  color: #fff;
  background: rgba(10, 12, 18, 0.62);
  backdrop-filter: blur(6px);
  padding: 4px 7px;
  border-radius: 5px;
}
.browser-card__body {
  padding: 15px 16px 16px;
}
.preview-title {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 15px;
  letter-spacing: -0.025em;
  line-height: 1.3;
  margin-bottom: 5px;
}
.preview-desc {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
  margin-bottom: 13px;
}
.preview-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.preview-price {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.seller-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: var(--muted);
}
.seller-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-soft-2);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
}
.verified {
  color: var(--mint);
}
.preview-actions {
  display: flex;
  gap: 6px;
}
.mini-btn {
  font-size: 10.5px;
  font-weight: 600;
  padding: 6px 9px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--muted);
}
.mini-btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.float-card {
  position: absolute;
  z-index: 2;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: 13px 14px;
  width: 236px;
}
.float-card--ai {
  right: 4px;
  bottom: -26px;
  transform: rotate(-1.4deg);
}
.float-card--control {
  left: -38px;
  top: 168px;
  transform: rotate(-2deg);
  width: 206px;
}
.float-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.float-card__head strong {
  display: block;
  font-size: 11.5px;
  font-weight: 650;
}
.float-card__head span {
  display: block;
  font-size: 9.5px;
  color: var(--faint);
}
.ai-orb {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: conic-gradient(from 210deg, var(--accent), var(--mint), var(--accent));
  box-shadow: 0 0 0 4px var(--accent-soft);
  flex: 0 0 auto;
}
.float-card__text {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-dim);
  margin-bottom: 9px;
}
.citation {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--mint);
  background: var(--mint-soft);
  padding: 3px 6px;
  border-radius: 5px;
}
.citation svg {
  width: 10px;
  height: 10px;
}
.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 10.5px;
  border-top: 1px solid var(--border);
}
.control-row:first-of-type {
  border-top: 0;
}
.control-value {
  color: var(--faint);
  font-size: 10px;
}
.switch {
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  position: relative;
  flex: 0 0 auto;
}
.switch::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--faint);
  top: 2px;
  left: 2px;
  transition: transform 0.15s ease;
}
.switch--on {
  background: var(--accent);
  border-color: var(--accent);
}
.switch--on::after {
  background: #fff;
  transform: translateX(12px);
}

.trust-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--canvas-2);
}
.trust-strip__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--faint);
}
.trust-items {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: -0.02em;
}

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(64px, 8vw, 108px) 26px;
}
.section--how {
  padding-top: 20px;
}
.section-head {
  max-width: 660px;
  margin-bottom: 42px;
}
.section-head h2 {
  margin-bottom: 12px;
}
.section-sub {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  max-width: 620px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.feature-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.feature-icon svg {
  width: 22px;
  height: 22px;
}
.feature-card h3 {
  font-size: 18px;
  margin-bottom: 9px;
}
.feature-card p {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}
.feature-note {
  margin-top: auto;
  padding-top: 18px;
  font-size: 11.5px;
  color: var(--faint);
  border-top: 1px solid var(--border);
  margin-top: 18px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  counter-reset: step;
}
.step {
  border-top: 1px solid var(--border-strong);
  padding-top: 20px;
}
.step-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 16px;
}
.step h3 {
  font-size: 17px;
  margin-bottom: 8px;
}
.step p {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}
.split--reverse .split__copy {
  order: 2;
}
.split__copy h2 {
  margin-bottom: 14px;
}
.check-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.check-list li {
  display: flex;
  gap: 9px;
  font-size: 13.5px;
  color: var(--text-dim);
}
.check-list span {
  color: var(--mint);
  font-weight: 700;
  flex: 0 0 auto;
}
.doc-panel,
.control-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.doc-panel__head,
.control-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.mini-eyebrow {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 4px;
  font-weight: 650;
}
.doc-panel__head h3,
.control-panel__head h3 {
  font-size: 17px;
}
.progress-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--mint);
  background: conic-gradient(var(--mint) 72%, var(--surface-3) 0);
  position: relative;
}
.progress-ring::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--surface);
}
.progress-ring {
  z-index: 1;
}
.progress-ring::after {
  content: "72%";
  position: absolute;
  z-index: 2;
}
.progress-ring {
  color: transparent;
}
.doc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--border);
}
.doc-row strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
}
.doc-row span {
  display: block;
  font-size: 10.5px;
  color: var(--faint);
}
.doc-check {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex: 0 0 auto;
}
.doc-row--done .doc-check {
  background: var(--mint-soft);
  color: var(--mint);
}
.doc-row--missing .doc-check {
  background: var(--amber-soft);
  color: var(--amber);
}
.doc-state {
  margin-left: auto;
  font-size: 9.5px !important;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mint) !important;
}
.doc-state--warn {
  color: var(--amber) !important;
}
.doc-note {
  margin-top: 13px;
  padding: 9px 11px;
  border-radius: 8px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 10.5px;
  line-height: 1.5;
}
.pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-top: 1px solid var(--border);
}
.pref-row strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
}
.pref-row span {
  display: block;
  font-size: 10.5px;
  color: var(--faint);
}
.seg {
  display: flex;
  gap: 2px;
  padding: 2px;
  background: var(--surface-2);
  border-radius: 7px;
  border: 1px solid var(--border);
  font-size: 9.5px !important;
  color: var(--faint) !important;
}
.seg span {
  padding: 3px 6px;
  border-radius: 5px;
}
.seg--active {
  background: var(--accent);
  color: #fff !important;
}
.pref-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
  font-size: 10px;
  color: var(--faint);
}

.section--pricing {
  padding-top: 30px;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.price-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
}
.price-card--featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 24px 60px var(--accent-soft-2);
}
.price-badge {
  position: absolute;
  top: -11px;
  left: 24px;
  background: var(--accent);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
}
.price-card__head h3 {
  font-size: 18px;
  margin-bottom: 3px;
}
.price-card__head p {
  color: var(--faint);
  font-size: 12px;
}
.price {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.05em;
  margin: 18px 0 6px;
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.price__currency {
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
  align-self: flex-start;
  margin-top: 6px;
}
.price__period {
  font-size: 12px;
  font-weight: 500;
  color: var(--faint);
  margin-left: 4px;
  letter-spacing: 0;
}
.price-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}
.price-list li {
  font-size: 12.5px;
  color: var(--text-dim);
  padding-left: 18px;
  position: relative;
}
.price-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--mint);
  font-size: 11px;
  font-weight: 700;
}
.pricing-note {
  margin-top: 18px;
  text-align: center;
  font-size: 11.5px;
  color: var(--faint);
}
.security-band {
  background:
    radial-gradient(800px 400px at 15% 0%, rgba(16, 185, 129, 0.22), transparent 60%),
    linear-gradient(140deg, #04150e, #0a2a1d 55%, #03120c);
  color: #fff;
  padding: clamp(56px, 7vw, 90px) 26px;
}
.security-band__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 50px;
  align-items: center;
}
.security-band h2 {
  margin-bottom: 13px;
}
.security-band p {
  color: rgba(236, 239, 248, 0.6);
  font-size: 14px;
  line-height: 1.65;
  max-width: 520px;
}
.security-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.security-points li {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 14px 15px;
}
.security-points strong {
  display: block;
  font-size: 12.5px;
  margin-bottom: 3px;
}
.security-points span {
  font-size: 10.5px;
  color: rgba(236, 239, 248, 0.48);
}
.cta-band {
  text-align: center;
  padding: clamp(64px, 8vw, 100px) 26px;
  max-width: 780px;
  margin: 0 auto;
}
.cta-band h2 {
  margin-bottom: 10px;
}
.cta-band p {
  color: var(--muted);
  margin-bottom: 26px;
}
.cta-band__actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.site-foot {
  border-top: 1px solid var(--border);
  background: var(--canvas-2);
}
.site-foot__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 26px 34px;
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}
.site-foot__brand {
  max-width: 320px;
}
.site-foot__brand p {
  color: var(--faint);
  font-size: 12px;
  line-height: 1.6;
  margin-top: 12px;
}
.site-foot__cols {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
}
.site-foot__cols h4 {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 12px;
  font-family: var(--font);
  font-weight: 650;
}
.site-foot__cols a {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  padding: 3px 0;
}
.site-foot__cols a:hover {
  color: var(--text);
}
.site-foot__bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 26px 26px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  font-size: 10.5px;
  color: var(--faint);
}

/* ---------- App shell ---------- */
.app-body {
  background: var(--canvas);
}
.app {
  display: flex;
  min-height: 100vh;
}
.app-sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  border-right: 1px solid var(--border);
  background: var(--canvas-2);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px;
}
.app-sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 6px 20px;
}
.sidebar-close {
  display: none;
}
.app-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.app-nav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  transition: background 0.14s ease, color 0.14s ease;
}
.app-nav__item svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.app-nav__item:hover {
  background: var(--surface-2);
  color: var(--text);
}
.app-nav__item.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.app-nav__item.is-disabled {
  cursor: default;
  opacity: 0.62;
}
.app-nav__item.is-disabled:hover {
  background: transparent;
  color: var(--muted);
}
.soon {
  margin-left: auto;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--faint);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 4px;
}
.app-nav__label {
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 20px 10px 6px;
  font-weight: 650;
}
.app-sidebar__foot {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 6px;
  border-radius: 9px;
}
.user-chip:hover {
  background: var(--surface-2);
}
.user-chip strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
}
.user-chip span {
  display: block;
  font-size: 10.5px;
  color: var(--faint);
}
.sidebar-links {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sidebar-links a,
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 7px;
  font-size: 12.5px;
  color: var(--muted);
  background: none;
  border: 0;
  width: 100%;
  text-align: left;
}
.sidebar-links a:hover,
.sidebar-link:hover,
.sidebar-links a.is-active {
  background: var(--surface-2);
  color: var(--text);
}
.sidebar-links svg {
  width: 16px;
  height: 16px;
}
.sidebar-links form {
  margin: 0;
}
.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.app-topbar {
  height: 64px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 26px;
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: blur(14px);
}
.app-topbar__left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-open {
  display: none;
}
.page-heading {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.app-topbar__actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.search-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--faint);
  font-size: 11.5px;
}
.search-pill svg {
  width: 13px;
  height: 13px;
}
.avatar-link {
  display: inline-flex;
  border-radius: 50%;
  border: 1px solid var(--border);
}
.app-content {
  padding: 30px 26px 60px;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
}
.sidebar-scrim {
  display: none;
}

/* ---------- Dashboard ---------- */
.page-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.page-intro h1 {
  font-size: clamp(1.75rem, 2.6vw, 2.3rem);
  margin-bottom: 5px;
}
.page-intro p {
  font-size: 13px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 17px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-card--accent {
  background: linear-gradient(145deg, var(--accent-soft), transparent 80%), var(--surface);
  border-color: var(--accent-soft-2);
}
.stat-label {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 650;
}
.stat-card strong {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.stat-note {
  font-size: 10.5px;
  color: var(--faint);
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: 14px;
  margin-bottom: 14px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.panel--soft {
  background: var(--surface-2);
}
.panel--danger {
  border-color: rgba(255, 107, 107, 0.22);
}
.panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.panel__head h2 {
  font-size: 16px;
  margin-bottom: 4px;
}
.panel__head p {
  font-size: 12px;
  line-height: 1.5;
}
.setup-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.setup-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.setup-item:first-child {
  border-top: 0;
  padding-top: 0;
}
.setup-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  color: var(--faint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 650;
  flex: 0 0 auto;
}
.setup-item.is-done .setup-check {
  background: var(--mint-soft);
  border-color: transparent;
  color: var(--mint);
}
.setup-item strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}
.setup-item span {
  display: block;
  font-size: 11.5px;
  color: var(--faint);
}
.setup-item > div {
  flex: 1;
  min-width: 0;
}
.setup-item form {
  margin: 0;
}
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
.timeline li {
  display: flex;
  gap: 12px;
  padding-bottom: 17px;
  position: relative;
}
.timeline li:last-child {
  padding-bottom: 0;
}
.timeline li > span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  margin-top: 4px;
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
  background: var(--surface);
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 14px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}
.timeline li:last-child::before {
  display: none;
}
.timeline li.is-done > span {
  background: var(--mint);
  border-color: var(--mint);
}
.timeline li.is-current > span {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.timeline strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
}
.timeline small {
  display: block;
  font-size: 10.5px;
  color: var(--faint);
  line-height: 1.5;
}
.timeline .is-done strong {
  color: var(--muted);
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.detail-grid > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.detail-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 650;
}
.detail-grid strong {
  font-size: 12.5px;
  font-weight: 600;
  word-break: break-word;
}
.detail-grid .badge {
  align-self: flex-start;
}

/* ---------- Settings ---------- */
.settings {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 86px;
}
.settings-nav a {
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--muted);
}
.settings-nav a:hover {
  background: var(--surface-2);
  color: var(--text);
}
.settings-nav a.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.settings-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.settings-content > .alert {
  margin-bottom: 0;
}
.profile-id {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 0 2px;
}
.profile-id strong {
  display: block;
  font-size: 15px;
}
.profile-id span {
  display: block;
  font-size: 12px;
}
.profile-id .pill {
  margin-left: auto;
}
.security-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.security-row strong {
  display: block;
  font-size: 13px;
  margin-bottom: 3px;
}
.security-row p {
  font-size: 11.5px;
  max-width: 480px;
  line-height: 1.55;
}
.security-row--stack {
  align-items: flex-start;
  flex-direction: column;
}
.table-wrap {
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.table th {
  text-align: left;
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 650;
  padding: 0 12px 9px 0;
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 11px 12px 11px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tr:last-child td {
  border-bottom: 0;
}
.session-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}
.session-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
  flex: 0 0 auto;
}
.session-dot.is-current {
  background: var(--mint);
  box-shadow: 0 0 0 3px var(--mint-soft);
}
.session-device {
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 340px;
}
.danger-copy {
  border: 1px solid rgba(255, 107, 107, 0.2);
  background: var(--danger-soft);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 13px;
}
.danger-copy ul {
  margin: 10px 0;
  padding-left: 18px;
  color: var(--text-dim);
}
.danger-copy li {
  margin-bottom: 5px;
}
.danger-copy p {
  color: var(--text-dim);
}

/* ---------- Misc pages ---------- */
.error-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
}
.error-page {
  text-align: center;
  padding: 40px 24px;
  max-width: 520px;
}
.error-page .brand {
  justify-content: center;
  margin-bottom: 40px;
}
.error-code {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.14em;
  margin-bottom: 14px;
}
.error-page h1 {
  font-size: 2rem;
  margin-bottom: 12px;
}
.error-page .muted {
  margin-bottom: 26px;
}
.error-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.dev-body {
  background: var(--canvas);
}
.dev-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px;
}
.dev-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 26px;
}
.dev-head h1 {
  font-size: 2rem;
  margin-bottom: 4px;
}
.empty {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  color: var(--faint);
  font-size: 13px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .hero__inner {
    grid-template-columns: 1fr;
  }
  .hero__visual {
    min-height: 430px;
    max-width: 520px;
    margin: 10px auto 0;
    width: 100%;
  }
  .browser-card {
    margin: 0 auto;
  }
  .float-card--ai {
    right: 0;
  }
  .float-card--control {
    left: 0;
  }
  .feature-grid,
  .pricing-grid,
  .steps {
    grid-template-columns: 1fr 1fr;
  }
  .split,
  .security-band__inner {
    grid-template-columns: 1fr;
    gap: 38px;
  }
  .split--reverse .split__copy {
    order: 0;
  }
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .site-nav {
    display: none;
  }
  .auth {
    grid-template-columns: 1fr;
  }
  .auth-aside {
    display: none;
  }
  .auth-main {
    min-height: 100vh;
    padding: 24px 22px 40px;
  }
  .auth-main__top .brand--compact {
    display: inline-flex;
  }
  .auth-main__top {
    margin-bottom: 44px;
  }
  .app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 60;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: var(--shadow);
  }
  .app-sidebar.is-open {
    transform: translateX(0);
  }
  .sidebar-close,
  .sidebar-open {
    display: inline-flex;
  }
  .sidebar-scrim {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 55;
    backdrop-filter: blur(2px);
  }
  .sidebar-scrim[hidden] {
    display: none;
  }
  .app-content {
    padding: 22px 18px 50px;
  }
  .app-topbar {
    padding: 0 18px;
  }
  .search-pill {
    display: none;
  }
  .settings {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .settings-nav {
    position: static;
    flex-direction: row;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .settings-nav a {
    white-space: nowrap;
  }
}

@media (max-width: 720px) {
  .feature-grid,
  .pricing-grid,
  .steps {
    grid-template-columns: 1fr;
  }
  .hero {
    padding-top: 40px;
  }
  .hero h1 {
    font-size: clamp(2.4rem, 10vw, 3.2rem);
  }
  .hero__visual {
    min-height: 0;
    padding: 0 0 64px;
  }
  .float-card--control {
    display: none;
  }
  .float-card--ai {
    position: relative;
    right: auto;
    bottom: auto;
    margin: -22px 6px 0 auto;
    width: 218px;
  }
  .float-card {
    transform: none;
  }
  .security-points {
    grid-template-columns: 1fr;
  }
  .site-foot__inner {
    gap: 30px;
  }
  .site-foot__cols {
    gap: 34px;
  }
  .site-foot__bottom {
    flex-direction: column;
    gap: 6px;
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .stat-card {
    padding: 13px 14px;
  }
  .stat-card strong {
    font-size: 23px;
  }
  .panel {
    padding: 17px 16px;
  }
  .banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .page-intro {
    align-items: flex-start;
    flex-direction: column;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .profile-id {
    flex-wrap: wrap;
  }
  .profile-id .pill {
    margin-left: 0;
    order: 3;
    width: 100%;
  }
  .security-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .inline-form {
    width: 100%;
  }
  .inline-form .input--compact {
    flex: 1;
    min-width: 0;
  }
  .browser-card {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .site-head__inner {
    padding: 12px 14px;
    gap: 10px;
  }
  .site-head__inner .brand {
    font-size: 15.5px;
    gap: 8px;
  }
  .site-head__inner .brand .logo-mark {
    width: 26px;
    height: 26px;
  }
  .site-head__actions {
    gap: 6px;
  }
  .site-head__actions .btn--sm {
    height: 34px;
    padding: 0 11px;
    font-size: 12.5px;
  }
  .site-head__actions .icon-btn {
    width: 34px;
    height: 34px;
  }
  .hero,
  .section,
  .security-band,
  .cta-band {
    padding-left: 18px;
    padding-right: 18px;
  }
  .stat-grid {
    grid-template-columns: 1fr;
  }
  .hero__actions .btn {
    width: 100%;
  }
  .auth-main {
    padding: 18px 16px 32px;
  }
  .auth-main__top {
    margin-bottom: 34px;
  }
  .app-topbar {
    padding: 0 12px;
    height: 58px;
  }
  .app-content {
    padding: 18px 12px 42px;
  }
  .table th,
  .table td {
    padding-right: 10px;
  }
}

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

/* ============================================================
   Phase 2 — feed, post cards, profiles, composer
   ============================================================ */

.site-head--solid {
  background: var(--canvas);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.feed-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.feed-head h1 {
  font-size: clamp(1.8rem, 2.6vw, 2.35rem);
  margin-bottom: 6px;
}
.feed-head p {
  font-size: 13px;
  line-height: 1.6;
  max-width: 640px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 9px;
  margin-bottom: 20px;
}
.filter-search {
  position: relative;
  flex: 1 1 240px;
  min-width: 180px;
}
.filter-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--faint);
  pointer-events: none;
}
.filter-search .input {
  padding-left: 34px;
  min-height: 42px;
  height: 42px;
  background: var(--canvas-2);
}
.filter-bar .input--select {
  width: auto;
  min-width: 130px;
  height: 42px;
  min-height: 42px;
  padding: 0 34px 0 11px;
  font-size: 12.5px;
}
.input--select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--faint) 50%),
    linear-gradient(135deg, var(--faint) 50%, transparent 50%);
  background-position: calc(100% - 16px) 19px, calc(100% - 11px) 19px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.filter-bar .btn {
  height: 42px;
}

.explore-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 20px;
  align-items: start;
}
.rail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 86px;
}
.rail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.rail-card h2 {
  font-size: 14.5px;
  margin-bottom: 4px;
}
.rail-card > p {
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: 10px;
}
.rail-card--accent {
  background: linear-gradient(150deg, var(--accent-soft), transparent 75%), var(--surface);
  border-color: var(--accent-soft-2);
}
.rail-card .text-link {
  margin-top: 12px;
  font-size: 12.5px;
}
.follow-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
}
.follow-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 0;
  border-top: 1px solid var(--border);
}
.follow-list li:first-child {
  border-top: 0;
  padding-top: 2px;
}
.follow-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}
.follow-item:hover strong {
  color: var(--accent);
}
.follow-item__copy {
  min-width: 0;
}
.follow-item__copy strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.follow-item__copy small {
  display: block;
  font-size: 10.5px;
  color: var(--faint);
}
.follow-list form {
  margin: 0;
}
.seller-dot--lg {
  width: 30px;
  height: 30px;
  font-size: 11px;
}
.seller-dot--xl {
  width: 64px;
  height: 64px;
  font-size: 24px;
  border-radius: 18px;
  color: #fff;
  background: var(--grad-bright);
}

.mini-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.mini-list li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}
.mini-list li > span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  color: var(--faint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  font-weight: 700;
  flex: 0 0 auto;
}
.mini-list li.is-done > span {
  background: var(--mint-soft);
  border-color: transparent;
  color: var(--mint);
}
.mini-list strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
}
.mini-list small {
  display: block;
  font-size: 10.5px;
  color: var(--faint);
  line-height: 1.4;
}
.rail-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--surface-3);
  margin-top: 14px;
  overflow: hidden;
}
.rail-progress span {
  display: block;
  height: 100%;
  background: var(--grad-bright);
  border-radius: inherit;
}
.tiny {
  font-size: 10.5px;
  margin-top: 6px;
}

/* Post grid + card */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.post-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.post-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.post-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
}
.post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.post-card:hover .post-card__media img {
  transform: scale(1.025);
}
.post-card__domain {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  font-size: 9.5px;
  font-weight: 600;
  color: #fff;
  background: rgba(8, 10, 16, 0.64);
  backdrop-filter: blur(6px);
  padding: 3px 7px;
  border-radius: 5px;
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.post-card__badge,
.post-card__disclosure {
  position: absolute;
  top: 10px;
  z-index: 2;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 5px;
}
.post-card__badge {
  left: 10px;
  background: var(--accent);
  color: #fff;
}
.post-card__disclosure {
  right: 10px;
  background: rgba(8, 10, 16, 0.64);
  color: #fff;
  backdrop-filter: blur(6px);
}
.post-fallback {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.post-fallback::before {
  content: "";
  position: absolute;
  width: 72%;
  height: 85%;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.14);
  transform: rotate(-11deg);
  filter: blur(0.2px);
}
.post-fallback::after {
  content: "";
  position: absolute;
  width: 42%;
  height: 60%;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.1);
  right: 10%;
  top: 8%;
  transform: rotate(9deg);
}
.post-fallback__mark {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.post-fallback__domain {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 10px;
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.02em;
}
.post-fallback--0 {
  background: linear-gradient(145deg, #d8c6ab 0%, #a48360 60%, #74583c 100%);
}
.post-fallback--1 {
  background: linear-gradient(145deg, #b8d3e2 0%, #6f97b1 58%, #3d627c 100%);
}
.post-fallback--2 {
  background: linear-gradient(145deg, #d6c2e2 0%, #9977b4 58%, #684c82 100%);
}
.post-fallback--3 {
  background: linear-gradient(145deg, #c2d9c0 0%, #7ba07a 58%, #4a6d4b 100%);
}
.post-fallback--4 {
  background: linear-gradient(145deg, #e6c9ae 0%, #c08f68 58%, #8a5c3d 100%);
}
.post-fallback--hero {
  aspect-ratio: 16 / 9;
}
.post-fallback--hero .post-fallback__mark {
  font-size: 90px;
}
.post-card__body {
  padding: 14px 15px 15px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.post-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.chip--muted {
  background: var(--surface-3);
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  font-size: 10.5px;
}
.post-time {
  font-size: 10px;
  color: var(--faint);
  white-space: nowrap;
}
.post-card__title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.32;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card__title:hover {
  color: var(--accent);
}
.post-card__desc {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
  flex: 1;
}
.post-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.post-price {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.post-price--lg {
  font-size: 16px;
  margin-left: auto;
}
.seller-mini {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--muted);
  max-width: 58%;
}
.seller-mini span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.seller-mini:hover {
  color: var(--text);
}
.post-card__actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.post-card__actions form {
  margin: 0;
}
.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 600;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: transparent;
  white-space: nowrap;
}
.mini-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}
.mini-btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.mini-btn--primary:hover {
  background: var(--accent-hover);
  color: #fff;
}
.mini-btn.is-saved {
  background: var(--accent-soft);
  border-color: var(--accent-soft-2);
  color: var(--accent);
}

.empty-state {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 48px 26px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.empty-state__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.empty-state__icon svg {
  width: 24px;
  height: 24px;
}
.empty-state h3 {
  font-size: 17px;
}
.empty-state p {
  color: var(--muted);
  font-size: 13px;
  max-width: 420px;
  margin-bottom: 8px;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
}
.pager__label {
  font-size: 11px;
  color: var(--faint);
}

.public-feed {
  max-width: 1200px;
  margin: 0 auto;
  padding: 38px 26px 90px;
}
.public-feed .feed-head h1 {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
}

/* Post detail */
.post-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 26px 90px;
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--faint);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.breadcrumbs a:hover {
  color: var(--text);
}
.post-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}
.post-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}
.post-hero {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  overflow: hidden;
}
.post-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-detail__body {
  padding: 24px 26px 26px;
}
.post-detail__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.post-detail h1 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  margin-bottom: 12px;
}
.post-lead {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.post-body {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-dim);
  white-space: pre-line;
  margin-bottom: 18px;
}
.tag-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.post-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.post-actions form {
  margin: 0;
}
.post-disclaimer {
  margin-top: 16px;
  font-size: 10.5px;
  color: var(--faint);
  line-height: 1.55;
}
.post-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 86px;
}
.seller-card,
.trust-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.seller-card {
  text-align: center;
}
.seller-card .seller-dot--xl {
  margin: 0 auto 12px;
}
.seller-card h2 {
  font-size: 18px;
  margin-bottom: 6px;
}
.seller-card p {
  font-size: 12px;
  line-height: 1.55;
  margin-bottom: 8px;
}
.seller-card form {
  margin-top: 14px;
}
.trust-card h3 {
  font-size: 13.5px;
  margin-bottom: 9px;
}
.trust-card ul {
  margin: 0;
  padding-left: 16px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}
.trust-card li {
  margin-bottom: 5px;
}
.related-section {
  margin-top: 38px;
}
.section-head--tight {
  margin-bottom: 18px;
}
.section-head--tight h2 {
  font-size: 20px;
}

/* Profile */
.profile-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 26px 26px 90px;
}
.profile-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}
.profile-cover {
  height: 130px;
  background:
    radial-gradient(500px 220px at 20% 0%, rgba(255, 255, 255, 0.28), transparent 65%),
    var(--grad);
  opacity: 0.9;
}
.profile-cover--0 { background: var(--grad); }
.profile-cover--1 { background: linear-gradient(120deg, #3f8fb5, #2c6788 60%, #6ac7b4); }
.profile-cover--2 { background: linear-gradient(120deg, #9a6bb8, #6d4888 60%, #c78fb5); }
.profile-cover--3 { background: linear-gradient(120deg, #6f9e6b, #4c7249 60%, #c8b46c); }
.profile-cover--4 { background: linear-gradient(120deg, #c08a5f, #8a5a37 60%, #d6b45f); }
.profile-hero__body {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 0 26px 24px;
  margin-top: 0;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}
.profile-avatar {
  border: 4px solid var(--surface);
  border-radius: 20px;
  background: var(--accent);
  margin-top: -46px;
  position: relative;
  z-index: 2;
}
.profile-identity {
  flex: 1;
  min-width: 220px;
  padding-top: 36px;
}
.profile-identity .eyebrow {
  margin-bottom: 6px;
}
.profile-identity h1 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin-bottom: 6px;
}
.profile-identity p {
  font-size: 13px;
  max-width: 560px;
}
.profile-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--muted);
}
.profile-stats strong {
  color: var(--text);
  font-weight: 650;
}
.profile-actions {
  padding-top: 36px;
}
.profile-posts {
  margin-top: 26px;
}

/* Composer */
.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}
.composer__main .panel {
  padding: 22px;
}
.composer__side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 86px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.url-row {
  display: flex;
  gap: 8px;
}
.url-row .input {
  flex: 1;
}
.preview-slot {
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  padding: 14px;
  margin: 4px 0 18px;
  background: var(--canvas-2);
  min-height: 96px;
}
.preview-slot[data-state="loading"] {
  opacity: 0.6;
}
.preview-slot__empty {
  display: flex;
  gap: 12px;
  align-items: center;
}
.preview-slot__empty--error {
  border-color: rgba(245, 165, 36, 0.4);
}
.preview-slot__icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface-3);
  color: var(--faint);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.preview-slot__icon svg {
  width: 20px;
  height: 20px;
}
.preview-slot__empty strong {
  display: block;
  font-size: 12.5px;
  margin-bottom: 3px;
}
.preview-slot__empty p {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
}
.preview-slot__card {
  display: flex;
  gap: 12px;
  align-items: center;
}
.preview-slot__card img {
  width: 148px;
  height: 92px;
  object-fit: cover;
  border-radius: 8px;
  flex: 0 0 auto;
}
.preview-slot__fallback {
  width: 148px;
  height: 92px;
  border-radius: 8px;
  background: var(--grad-bright);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  flex: 0 0 auto;
}
.preview-slot__copy {
  min-width: 0;
}
.preview-slot__domain {
  display: block;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--faint);
  margin-bottom: 3px;
}
.preview-slot__copy strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
  line-height: 1.3;
}
.preview-slot__copy p {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Seller table */
.table--posts td {
  padding-top: 9px;
  padding-bottom: 9px;
}
.post-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}
.post-row__thumb {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  flex: 0 0 auto;
}
.post-row__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-row__copy {
  min-width: 0;
}
.post-row__copy strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.post-row__copy small {
  display: block;
  font-size: 10.5px;
  color: var(--faint);
}
.row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.row-actions form {
  margin: 0;
}
.check-list--small li {
  font-size: 11.5px;
}

@media (max-width: 1100px) {
  .explore-layout,
  .post-detail,
  .composer {
    grid-template-columns: 1fr;
  }
  .rail,
  .post-side,
  .composer__side {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .profile-hero__body {
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .post-grid,
  .post-grid--three {
    grid-template-columns: 1fr;
  }
  .rail,
  .post-side,
  .composer__side {
    grid-template-columns: 1fr;
  }
  .filter-bar {
    padding: 8px;
  }
  .filter-search {
    flex: 1 1 100%;
  }
  .filter-bar .input--select {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }
  .filter-bar .btn {
    flex: 1 1 calc(50% - 4px);
  }
  .public-feed,
  .post-page,
  .profile-page {
    padding-left: 18px;
    padding-right: 18px;
  }
  .post-detail__body {
    padding: 18px 17px 20px;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
  .url-row {
    flex-direction: column;
  }
  .preview-slot__card {
    align-items: flex-start;
  }
  .preview-slot__card img,
  .preview-slot__fallback {
    width: 96px;
    height: 70px;
  }
  .profile-hero__body {
    padding: 0 18px 20px;
  }
  .profile-identity {
    padding-top: 0;
  }
  .profile-actions {
    padding-top: 0;
    width: 100%;
  }
  .profile-avatar {
    margin-top: -26px;
  }
  .post-side {
    position: static;
  }
}
.rail-progress .w-0 { width: 0; }
.rail-progress .w-1 { width: 25%; }
.rail-progress .w-2 { width: 50%; }
.rail-progress .w-3 { width: 75%; }
.rail-progress .w-4 { width: 100%; }

/* ============================================================
   Phase 3 — buyer control, notifications, compare
   ============================================================ */

.nav-count {
  margin-left: auto;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-count--accent {
  background: var(--accent);
  color: #fff;
}
.notification-btn {
  position: relative;
}
.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--canvas);
}

/* Preference choices */
.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
}
.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.choice {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.choice:hover {
  border-color: var(--border-strong);
}
.choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.choice input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--accent);
}
.choice strong {
  display: block;
  font-size: 12.5px;
  font-weight: 650;
}
.choice small {
  display: block;
  font-size: 10.5px;
  color: var(--faint);
  line-height: 1.45;
  margin-top: 2px;
}
.check--boxed {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  padding: 13px;
  margin: 16px 0;
}
.check--boxed strong {
  display: block;
  font-size: 12.5px;
  color: var(--text-dim);
}
.check--boxed small {
  display: block;
  font-size: 10.5px;
  color: var(--faint);
  line-height: 1.45;
}
.topic-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.topic {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 11.5px;
  color: var(--muted);
  cursor: pointer;
}
.topic:has(input:checked) {
  border-color: var(--accent-soft-2);
  background: var(--accent-soft);
  color: var(--accent);
}
.topic input {
  width: 13px;
  height: 13px;
  accent-color: var(--accent);
}

/* Notification list */
.notification-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.notification-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.notification-row.is-unread {
  border-color: var(--accent-soft-2);
  background: linear-gradient(90deg, var(--accent-soft), transparent 55%), var(--surface);
}
.notification-row form {
  margin: 0;
}
.notification-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: 0;
  text-align: left;
}
.notification-item:hover {
  background: var(--surface-2);
}
.notification-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.notification-copy {
  min-width: 0;
  flex: 1;
}
.notification-copy strong {
  display: block;
  font-size: 12.5px;
  font-weight: 650;
}
.notification-copy > span {
  display: block;
  font-size: 12.5px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notification-copy small {
  display: block;
  font-size: 10.5px;
  color: var(--faint);
  margin-top: 2px;
}
.notification-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}

/* Compare */
.compare-wrap {
  padding: 0;
}
.compare-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  font-size: 12.5px;
}
.compare-table th {
  text-align: left;
  vertical-align: top;
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 650;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  width: 120px;
  background: var(--surface-2);
}
.compare-table td {
  vertical-align: top;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  border-left: 1px solid var(--border);
  width: 240px;
}
.compare-table tr:last-child th,
.compare-table tr:last-child td {
  border-bottom: 0;
}
.compare-media {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 9px;
  background: var(--surface-2);
}
.compare-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.compare-title {
  display: block;
  font-weight: 650;
  font-size: 13px;
  line-height: 1.35;
  margin-bottom: 7px;
}
.compare-title:hover {
  color: var(--accent);
}
.compare-remove {
  margin: 0;
}

/* Why page */
.why-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 46px 26px 90px;
}
.why-page h1 {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  margin-bottom: 10px;
}
.why-reason {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-dim);
  margin-bottom: 24px;
}
.why-card {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 22px;
}
.why-thumb {
  width: 130px;
  height: 84px;
  border-radius: 9px;
  flex: 0 0 auto;
  overflow: hidden;
}
.why-thumb .post-fallback__mark {
  font-size: 28px;
}
.why-card h2 {
  font-size: 16px;
  margin: 6px 0 4px;
}
.why-card h2 a:hover {
  color: var(--accent);
}
.why-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

/* Seller notification rule */
.rule-form {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
  text-align: left;
}
.rule-form label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 650;
  margin-bottom: 6px;
}
.rule-row {
  display: flex;
  gap: 6px;
}
.rule-row .input {
  flex: 1;
  min-width: 0;
}

@media (max-width: 720px) {
  .choice-grid {
    grid-template-columns: 1fr;
  }
  .why-page {
    padding: 32px 18px 70px;
  }
  .why-card {
    align-items: flex-start;
  }
  .why-thumb {
    width: 92px;
    height: 64px;
  }
}

/* ============================================================
   Phase 4 — private messages
   ============================================================ */

.messages-page {
  display: grid;
  grid-template-columns: 318px minmax(0, 1fr);
  gap: 14px;
  height: calc(100vh - 154px);
  min-height: 540px;
}
.thread-list {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.thread-list__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 17px 16px 13px;
  border-bottom: 1px solid var(--border);
}
.thread-list__head h2 {
  font-size: 17px;
  margin: 2px 0 0;
}
.thread-rows {
  overflow-y: auto;
  flex: 1;
  padding: 6px;
}
.thread-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  color: var(--text);
  position: relative;
}
.thread-row:hover {
  background: var(--surface-2);
}
.thread-row.is-active {
  background: var(--accent-soft);
}
.thread-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.thread-avatar--lg {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  font-size: 13px;
}
.thread-copy {
  min-width: 0;
  flex: 1;
}
.thread-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.thread-top strong {
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.thread-top time {
  font-size: 9.5px;
  color: var(--faint);
  flex: 0 0 auto;
}
.thread-snippet {
  display: block;
  font-size: 11px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.thread-unread {
  position: absolute;
  right: 8px;
  bottom: 8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.thread-empty {
  padding: 34px 18px;
  text-align: center;
  color: var(--faint);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.thread-empty p {
  margin: 0;
  color: var(--text-dim);
  font-weight: 600;
}

.conversation {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.conversation__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}
.conversation__identity {
  min-width: 0;
  flex: 1;
}
.conversation__identity strong {
  display: block;
  font-size: 13.5px;
  font-weight: 650;
}
.conversation__identity span {
  display: block;
  font-size: 10.5px;
  color: var(--faint);
}
.conversation__tools {
  display: flex;
  align-items: center;
  gap: 12px;
}
.conversation__tools form {
  margin: 0;
}
.conversation-back {
  display: none;
}
.message-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background:
    radial-gradient(900px 300px at 100% 0%, var(--accent-soft), transparent 70%),
    var(--surface);
}
.message-day {
  text-align: center;
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 4px;
}
.message {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  max-width: 78%;
}
.message.is-mine {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.message-avatar {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-bottom: 2px;
}
.message-bubble {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 13px 13px 13px 4px;
  padding: 9px 12px;
  min-width: 70px;
}
.message.is-mine .message-bubble {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  border-radius: 13px 13px 4px 13px;
}
.message-body {
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.message-meta {
  margin-top: 4px;
  font-size: 9px;
  color: var(--faint);
  text-align: right;
}
.message.is-mine .message-meta {
  color: rgba(255, 255, 255, 0.65);
}
.message-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  padding: 5px 9px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 600;
}
.message.is-mine .message-link {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.message-preview {
  display: flex;
  gap: 9px;
  margin-top: 8px;
  padding: 7px;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  max-width: 340px;
}
.message-preview img {
  width: 54px;
  height: 54px;
  border-radius: 6px;
  object-fit: cover;
  flex: 0 0 auto;
  background: var(--surface-3);
}
.message-preview span {
  min-width: 0;
}
.message-preview small {
  display: block;
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--faint);
}
.message-preview strong {
  display: block;
  font-size: 11.5px;
  line-height: 1.35;
  margin: 1px 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.message-preview em {
  display: block;
  font-size: 10px;
  color: var(--faint);
  font-style: normal;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.typing-indicator {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--faint);
  font-size: 10px;
  padding: 5px 8px;
}
.typing-indicator span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--faint);
  animation: typing-bounce 1.1s infinite ease-in-out;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.12s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.24s; }
.typing-indicator em { font-style: normal; margin-left: 3px; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.55; }
  30% { transform: translateY(-3px); opacity: 1; }
}
.conversation-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  gap: 6px;
}
.conversation-empty h2 {
  font-size: 20px;
  margin: 4px 0 0;
}
.conversation-empty p {
  max-width: 380px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}
.composer {
  flex: 0 0 auto;
  border-top: 1px solid var(--border);
  padding: 10px 12px 11px;
  background: var(--surface);
}
.composer__input {
  width: 100%;
  resize: none;
  min-height: 38px;
  max-height: 140px;
  padding: 9px 11px;
  font-size: 13px;
  line-height: 1.45;
}
.composer__foot {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 7px;
}
.composer__hint {
  font-size: 9.5px;
  color: var(--faint);
  flex: 1;
}
.composer__count {
  font-size: 9.5px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.composer--disabled {
  color: var(--faint);
  font-size: 12px;
  padding: 16px;
  text-align: center;
}
.composer--disabled p {
  margin: 0;
}
.message-start {
  margin-top: 8px;
}

/* Report + blocked */
.report-page {
  max-width: 680px;
}
.report-page h1 {
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  margin: 4px 0 8px;
}
.report-quote {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 16px 0;
}
.report-quote strong {
  font-size: 11.5px;
}
.report-quote p {
  font-size: 12.5px;
  color: var(--text-dim);
  margin: 4px 0 0;
  line-height: 1.55;
}
.choice-grid--stack {
  grid-template-columns: 1fr;
}
.blocked-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.blocked-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
}
.blocked-row > div {
  flex: 1;
  min-width: 0;
}
.blocked-row strong {
  display: block;
  font-size: 12.5px;
}
.blocked-row span {
  display: block;
  font-size: 10.5px;
  color: var(--faint);
}
.blocked-row form {
  margin: 0;
}
.empty-state--sm {
  padding: 34px 20px;
}

@media (max-width: 980px) {
  .messages-page {
    grid-template-columns: 270px minmax(0, 1fr);
  }
  .message {
    max-width: 86%;
  }
}
@media (max-width: 760px) {
  .messages-page {
    display: block;
    height: auto;
    min-height: 0;
  }
  .messages-page.has-thread .thread-list {
    display: none;
  }
  .messages-page:not(.has-thread) .conversation {
    display: none;
  }
  .thread-list {
    max-height: 65vh;
  }
  .conversation {
    height: calc(100vh - 140px);
    min-height: 480px;
  }
  .conversation-back {
    display: inline-flex;
  }
  .conversation__tools {
    gap: 8px;
  }
  .composer__hint {
    display: none;
  }
}

.message-seen {
  margin-left: 6px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.7);
}
.composer-error {
  margin: 4px 0 2px;
  color: var(--danger);
  font-size: 11px;
}
.typing-indicator[hidden] {
  display: none;
}

.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;
}
.composer {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.composer__input {
  display: block;
}
.conversation-empty--inline {
  min-height: 280px;
  padding: 30px 20px 10px;
  justify-content: center;
}
.conversation-empty--inline h2 {
  font-size: 17px;
}
textarea.composer__input {
  min-height: 38px;
  max-height: 140px;
}

/* ============================================================
   Phase 5 — knowledge, AI settings, grounded chat
   ============================================================ */

.knowledge-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.knowledge-stat {
  padding: 16px;
}
.knowledge-stat.is-on {
  border-color: var(--accent-soft-2);
}
.knowledge-stat__value {
  display: block;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}
.knowledge-stat__label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  font-weight: 700;
  margin-top: 2px;
}
.knowledge-stat p {
  margin: 7px 0 0;
  font-size: 10.5px;
  line-height: 1.5;
}
.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.knowledge-grid .panel {
  display: flex;
  flex-direction: column;
}
.knowledge-grid .form {
  flex: 1;
}
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
  padding: 22px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  background: var(--surface-2);
  cursor: pointer;
  margin-bottom: 10px;
}
.upload-zone:hover {
  border-color: var(--accent);
}
.upload-zone svg {
  width: 25px;
  height: 25px;
  color: var(--accent);
}
.upload-zone strong {
  font-size: 12px;
}
.upload-zone span {
  font-size: 10px;
  color: var(--faint);
  line-height: 1.45;
}
.upload-zone input {
  margin-top: 6px;
  font-size: 10px;
  max-width: 100%;
}
.knowledge-suggest {
  margin-bottom: 16px;
}
.suggest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.suggest-item {
  display: flex;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
}
.suggest-num {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  padding-top: 2px;
}
.suggest-item strong {
  display: block;
  font-size: 11.5px;
}
.suggest-item p {
  margin: 2px 0 0;
  font-size: 10.5px;
  color: var(--faint);
  line-height: 1.45;
}
.doc-title {
  display: block;
  font-size: 12px;
}
.doc-meta {
  display: block;
  font-size: 9.5px;
  color: var(--faint);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 420px;
  white-space: nowrap;
}

/* AI settings */
.ai-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  background:
    radial-gradient(500px 180px at 0% 0%, var(--accent-soft), transparent 70%),
    var(--surface);
}
.ai-hero.is-on {
  border-color: var(--accent-soft-2);
}
.ai-hero__status {
  display: flex;
  align-items: center;
  gap: 13px;
}
.ai-hero__status h2 {
  font-size: 17px;
  margin: 0 0 2px;
}
.ai-hero__status p {
  margin: 0;
  font-size: 11px;
}
.ai-orb {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 24px var(--accent-soft-2);
  flex: 0 0 auto;
}
.ai-orb--sm {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 11px;
}
.ai-hero__stats {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: var(--muted);
  text-align: right;
}
.ai-hero__stats a:hover {
  color: var(--accent);
}
.ai-hero__stats strong {
  display: block;
  font-size: 17px;
  color: var(--text);
}
.test-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.test-row .input {
  flex: 1;
}
.test-results {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.test-result {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 12px;
  background: var(--surface-2);
  position: relative;
}
.test-result p {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.55;
  color: var(--text-dim);
}
.test-score {
  position: absolute;
  top: 10px;
  right: 12px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--faint);
}

/* Question inbox */
.question-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 18px;
}
.question-card {
  padding: 16px;
}
.question-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.question-head > div {
  flex: 1;
  min-width: 0;
}
.question-head strong {
  display: block;
  font-size: 12.5px;
}
.question-head span {
  display: block;
  font-size: 10px;
  color: var(--faint);
}
.question-text {
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 12px;
  color: var(--text);
}
.answered-panel {
  margin-top: 8px;
}
.answered-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.answered-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
}
.answered-row strong {
  display: block;
  font-size: 12px;
}
.answered-row span {
  display: block;
  font-size: 9.5px;
  color: var(--faint);
  margin-top: 2px;
}
.answered-row p {
  margin: 5px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-dim);
}
.answered-row form {
  flex: 0 0 auto;
}

/* Buyer AI chat */
.chat-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 26px 60px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}
.chat-shell {
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 620px;
  height: calc(100vh - 180px);
  overflow: hidden;
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex: 0 0 auto;
}
.chat-head__identity {
  flex: 1;
  min-width: 0;
}
.chat-head h1 {
  font-size: 16px;
  margin: 0;
}
.chat-head p {
  margin: 2px 0 0;
  font-size: 10px;
  color: var(--faint);
}
.seller-dot--lg {
  width: 38px;
  height: 38px;
  font-size: 14px;
  border-radius: 11px;
  flex: 0 0 auto;
}
.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 20px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background:
    radial-gradient(700px 260px at 100% 0%, var(--accent-soft), transparent 70%),
    var(--surface);
}
.chat-intro {
  max-width: 540px;
  margin: 18px auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.chat-intro p {
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
  color: var(--text);
}
.chat-intro small {
  font-size: 10.5px;
  color: var(--faint);
  line-height: 1.5;
}
.chat-message {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  max-width: 78%;
}
.chat-message.is-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.chat-message.is-seller .chat-bubble {
  border-color: var(--mint-soft);
}
.chat-avatar {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 8.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.chat-bubble {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 13px 13px 13px 4px;
  padding: 10px 12px;
}
.chat-message.is-user .chat-bubble {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  border-radius: 13px 13px 4px 13px;
}
.chat-text {
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.chat-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  color: var(--faint);
  margin-top: 5px;
  justify-content: flex-end;
}
.chat-message.is-user .chat-meta {
  color: rgba(255, 255, 255, 0.68);
}
.chat-grounded {
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--mint-soft);
  color: var(--mint);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.chat-citations {
  margin-top: 7px;
  border-top: 1px solid var(--border);
  padding-top: 5px;
}
.chat-citations summary {
  cursor: pointer;
  font-size: 9.5px;
  color: var(--accent);
  font-weight: 600;
}
.chat-citations ul {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.chat-citations li strong {
  display: block;
  font-size: 9.5px;
}
.chat-citations li span {
  display: block;
  font-size: 9.5px;
  color: var(--faint);
  line-height: 1.45;
  margin-top: 1px;
}
.chat-composer {
  border-top: 1px solid var(--border);
  padding: 10px 12px;
  background: var(--surface);
  flex: 0 0 auto;
}
.chat-composer textarea {
  min-height: 40px;
  max-height: 110px;
  resize: none;
  font-size: 13px;
}
.chat-composer__foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 7px;
}
.chat-composer__foot .composer__hint {
  flex: 1;
}
.chat-handoff {
  padding: 0 12px 10px;
  text-align: right;
  background: var(--surface);
}
.chat-status {
  padding: 8px 14px;
  font-size: 10.5px;
  color: var(--muted);
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}
.chat-status.is-handoff {
  color: var(--mint);
  background: var(--mint-soft);
}
.chat-status.is-error {
  color: var(--danger);
  background: var(--danger-soft);
}
.chat-off {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 40px;
}
.chat-off h2 {
  font-size: 21px;
  margin: 0;
}
.chat-off p {
  max-width: 420px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}
.chat-off form {
  margin: 0;
}
.chat-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-side h2 {
  font-size: 14px;
  margin: 0 0 8px;
}
.chat-rules {
  margin: 0;
  padding-left: 17px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--text-dim);
}
.chat-side__seller {
  display: flex;
  align-items: center;
  gap: 9px;
}
.chat-side__seller strong {
  display: block;
  font-size: 12px;
}
.chat-side__seller span {
  display: block;
  font-size: 9.5px;
  color: var(--faint);
}

@media (max-width: 1000px) {
  .knowledge-grid {
    grid-template-columns: 1fr;
  }
  .chat-page {
    grid-template-columns: 1fr;
  }
  .chat-side {
    display: none;
  }
}
@media (max-width: 720px) {
  .knowledge-stats {
    grid-template-columns: 1fr;
  }
  .suggest-grid {
    grid-template-columns: 1fr;
  }
  .chat-page {
    padding: 16px 14px 40px;
  }
  .chat-shell {
    height: calc(100vh - 140px);
    min-height: 480px;
  }
  .chat-message {
    max-width: 88%;
  }
  .ai-hero {
    flex-direction: column;
    align-items: flex-start;
  }
}

.knowledge-grid .form button[type="submit"] {
  margin-top: auto;
}
.chat-citations summary {
  font-size: 10.5px;
}
.chat-citations li strong,
.chat-citations li span {
  font-size: 10.5px;
  line-height: 1.5;
}

/* ============================================================
   Phase 6 — website widget
   ============================================================ */

.embed-create {
  max-width: 720px;
}
.embed-keys {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.embed-key {
  padding: 15px 16px;
}
.embed-key.is-revoked {
  opacity: 0.65;
}
.embed-key__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.embed-key__head strong {
  display: block;
  font-size: 13px;
}
.embed-key__head span {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--faint);
  margin-top: 2px;
}
.embed-key__origins {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 10px 0;
}
.snippet {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.6;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  overflow-x: auto;
  white-space: pre;
}
.embed-key__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  font-size: 10px;
}
.embed-key__actions form {
  margin: 0;
}

/* iframe page */
html:has(.embed-body),
.embed-body {
  background: var(--canvas);
}
.embed-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
}
.embed-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}
.embed-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(360px 120px at 0% 0%, var(--accent-soft), transparent 75%),
    var(--surface);
}
.embed-head strong {
  display: block;
  font-size: 13px;
}
.embed-head span {
  display: block;
  font-size: 9.5px;
  color: var(--faint);
}
.embed-log {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  background: var(--surface-2);
}
.embed-intro {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.embed-intro p {
  margin: 0 0 4px;
  font-size: 12.5px;
  line-height: 1.55;
}
.embed-intro small {
  font-size: 9.5px;
  color: var(--faint);
  line-height: 1.45;
}
.embed-message {
  display: flex;
  max-width: 88%;
}
.embed-message.is-user {
  align-self: flex-end;
}
.embed-bubble {
  padding: 8px 10px;
  border-radius: 11px 11px 11px 4px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.embed-message.is-user .embed-bubble {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  border-radius: 11px 11px 4px 11px;
}
.embed-text {
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.embed-bubble details {
  margin-top: 6px;
  border-top: 1px solid var(--border);
  padding-top: 4px;
}
.embed-bubble summary {
  font-size: 9px;
  color: var(--accent);
  cursor: pointer;
}
.embed-bubble ul {
  list-style: none;
  margin: 5px 0 0;
  padding: 0;
}
.embed-bubble li strong {
  display: block;
  font-size: 9px;
}
.embed-bubble li span {
  display: block;
  font-size: 9px;
  color: var(--faint);
  line-height: 1.45;
}
.embed-composer {
  display: flex;
  gap: 6px;
  padding: 9px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.embed-composer input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 9px 10px;
  font: inherit;
  font-size: 12px;
  background: var(--canvas-2);
  color: var(--text);
}
.embed-composer input:focus {
  outline: none;
  border-color: var(--accent);
}
.embed-composer button {
  width: 36px;
  border: 0;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 17px;
  cursor: pointer;
}
.embed-status {
  padding: 6px 12px;
  font-size: 9.5px;
  color: var(--muted);
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}
.embed-status.is-handoff {
  color: var(--mint);
  background: var(--mint-soft);
}
.embed-status.is-error {
  color: var(--danger);
  background: var(--danger-soft);
}
.embed-foot {
  padding: 6px 12px 8px;
  font-size: 8.5px;
  color: var(--faint);
  text-align: center;
  background: var(--surface);
}
.embed-foot a {
  color: var(--accent);
}
.embed-off {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 30px;
  text-align: center;
}
.embed-off p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.embed-blocked {
  padding: 36px 24px;
  align-items: center;
  text-align: center;
  justify-content: center;
}
.embed-blocked h1 {
  font-size: 19px;
  margin: 10px 0 4px;
}
.embed-blocked p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

/* API keys + developer docs */
.api-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.endpoint-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 6px 0 8px;
}
.endpoint-list > div {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}
.endpoint-list code {
  font-size: 10px;
  flex: 1;
}
.endpoint-list small {
  font-size: 9px;
  color: var(--faint);
}
.api-keys {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.api-key {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
}
.api-key.is-revoked {
  opacity: 0.65;
}
.api-key > div:first-child {
  flex: 1;
  min-width: 0;
}
.api-key strong {
  display: block;
  font-size: 12.5px;
}
.api-key .mono {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--faint);
  margin: 2px 0;
}
.api-key .muted {
  font-size: 9.5px;
}
.api-key__meta {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 9.5px;
  color: var(--faint);
  white-space: nowrap;
}
.api-key form {
  margin: 0;
}
.dev-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 46px 26px 90px;
}
.dev-page h1 {
  font-size: clamp(2rem, 3.4vw, 2.9rem);
  margin: 6px 0 8px;
}
.dev-lede {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-dim);
  max-width: 640px;
  margin-bottom: 24px;
}
.dev-section {
  margin-bottom: 12px;
}
.dev-section h2 {
  font-size: 16px;
  margin: 0 0 8px;
}
.dev-section p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 8px 0 0;
}
.code-block {
  background: #06251a;
  color: #E7EAF2;
  border-radius: 10px;
  padding: 13px 15px;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.6;
  overflow-x: auto;
  margin: 0;
}
.dev-errors {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dev-errors > div {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: var(--text-dim);
}
.dev-errors code {
  color: var(--accent);
  font-family: var(--mono);
  width: 34px;
}
@media (max-width: 760px) {
  .api-grid {
    grid-template-columns: 1fr;
  }
  .api-key {
    flex-wrap: wrap;
  }
}

/* ============================================================
   Phase 7 — plans, entitlements, billing
   ============================================================ */

.pricing-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 26px 90px;
}
.pricing-page h1 {
  font-size: clamp(2rem, 3.6vw, 3rem);
  margin: 6px 0 8px;
  max-width: 700px;
}
.pricing-lede {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-dim);
  max-width: 640px;
  margin-bottom: 28px;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}
.pricing-grid--compact {
  margin: 14px 0;
}
.price-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.price-card.is-featured {
  border-color: var(--accent);
  box-shadow: 0 16px 40px var(--accent-soft);
}
.price-badge {
  position: absolute;
  top: -10px;
  left: 18px;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
}
.price-card h2 {
  font-size: 17px;
  margin: 0 0 8px;
}
.price-amount {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
}
.price-amount strong {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: -0.035em;
}
.price-amount span {
  font-size: 10.5px;
  color: var(--faint);
}
.price-blurb {
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--text-dim);
  min-height: 38px;
  margin: 0 0 10px;
}
.price-features {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.price-features li {
  font-size: 11.5px;
  color: var(--muted);
  padding-left: 15px;
  position: relative;
  line-height: 1.45;
}
.price-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--mint);
  font-size: 10px;
  font-weight: 700;
}
.pricing-faq {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.pricing-faq h3 {
  font-size: 13px;
  margin: 0 0 5px;
}
.pricing-faq p {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0;
}
.billing-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.billing-current h2 {
  font-size: 24px;
  margin: 2px 0 4px;
}
.billing-note {
  margin-top: 16px;
}
.billing-note h2 {
  font-size: 16px;
  margin: 0 0 12px;
}
.billing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.billing-grid > div {
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
}
.billing-grid strong {
  display: block;
  font-size: 11.5px;
}
.billing-grid span {
  display: block;
  font-size: 10px;
  color: var(--faint);
  line-height: 1.45;
  margin-top: 3px;
}
.btn.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}
@media (max-width: 900px) {
  .pricing-grid,
  .pricing-faq {
    grid-template-columns: 1fr;
  }
  .billing-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Legal + admin */
.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 26px 90px;
}
.legal-page h1 {
  font-size: clamp(2rem, 3.4vw, 2.7rem);
  margin: 6px 0 5px;
}
.legal-updated {
  font-size: 10.5px;
  color: var(--faint);
  margin-bottom: 24px;
}
.legal-body p {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-dim);
  margin: 0 0 15px;
}
.admin-reports {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.admin-report {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
}
.admin-report strong {
  display: block;
  font-size: 11.5px;
}
.admin-report span {
  display: block;
  font-size: 10px;
  color: var(--faint);
  margin-top: 2px;
}
.admin-report form {
  margin: 0;
}

/* Keyword alerts (Settings → Feed & alerts) */
.alert-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.alert-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}
.alert-item strong {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.alert-item form {
  margin: 0;
}

/* Embedded video posts */
.post-hero--video {
  padding: 0;
  background: #000;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.post-video,
.post-video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.post-video iframe {
  aspect-ratio: 16 / 9;
}
.post-video__link {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(9, 12, 18, 0.78);
  color: #fff;
  font-size: 12px;
  text-decoration: none;
}
.post-video__link:hover { background: rgba(9, 12, 18, 0.92); }

/* Inline video playback on cards */
.post-card__media-wrap {
  position: relative;
  aspect-ratio: 16 / 10;   /* keep the media box when the anchor is replaced by the player */
  overflow: hidden;
}
.post-card__media-wrap .post-card__media { display: block; height: 100%; }
.post-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(9, 12, 18, 0.72);
  color: #fff;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.post-card__play:hover,
.post-card__play:focus-visible {
  background: var(--accent);
  transform: translate(-50%, -50%) scale(1.06);
}
.post-card__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: inherit;
  background: #000;
}

/* Infinite scroll */
.feed-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 26px 0 34px;
  color: var(--muted);
  font-size: 13px;
}
.feed-more__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  animation: feed-pulse 1.7s ease-in-out infinite;
}
.feed-more.is-loading .feed-more__dot {
  animation-duration: 0.8s;
}
@keyframes feed-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .feed-more__dot { animation: none; opacity: 0.8; }
}
.js .pager--fallback { display: none; }

/* Portrait players (TikTok, Instagram reels) */
.post-hero--portrait {
  aspect-ratio: 9 / 16;
  max-width: 430px;
  max-height: 78vh;
  margin: 0 auto;
  border-radius: var(--radius-sm);
}
.post-hero--portrait .post-video,
.post-hero--portrait .post-video iframe {
  aspect-ratio: 9 / 16;
  height: 100%;
}

/* Google sign-in / sign-up */
.oauth-block { margin: 0 0 1.25rem; }
.oauth-block .btn--block { width: 100%; justify-content: center; gap: .55rem; }
.oauth-block__mark {
  display: inline-grid; place-items: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--canvas); color: var(--accent);
  font-weight: 700; font-size: .8rem;
  border: 1px solid var(--border);
}
.oauth-block__terms { margin: .5rem 0 0; font-size: .78rem; color: var(--faint); text-align: center; }
.auth-divider {
  display: flex; align-items: center; gap: .75rem;
  margin: 0 0 1.25rem; color: var(--faint); font-size: .8rem;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}
