:root {
  --ink: #0e1814;
  --ink-soft: #2a3833;
  --bg: #f4efe4;
  --surface: #fdfbf6;
  --celadon: #7ba89f;
  --celadon-deep: #2f5a4d;
  --terracotta: #c5503a;
  --muted: #8a8478;
  --line: #d6cfbf;
  --line-soft: #ebe5d6;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Manrope', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.shell { max-width: 460px; margin: 80px auto; padding: 0 24px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 36px 32px;
}

/* ========== Auth layout: gradient canvas with floating form card ========== */
body.auth {
  background:
    radial-gradient(50% 50% at 14% 10%, rgba(166, 152, 244, 0.55) 0%, transparent 65%),
    radial-gradient(48% 50% at 92% 18%, rgba(125, 211, 252, 0.50) 0%, transparent 68%),
    radial-gradient(55% 55% at 80% 95%, rgba(251, 146, 120, 0.42) 0%, transparent 70%),
    radial-gradient(45% 55% at 8% 92%, rgba(196, 220, 255, 0.55) 0%, transparent 70%),
    #f7f7fb;
  min-height: 100vh;
  position: relative;
}
body.auth::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(rgba(15, 30, 25, 0.04) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  opacity: 0.5;
  z-index: 0;
}
body.auth::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #a698f4 0%, #7dd3fc 40%, #fb9278 100%);
  opacity: 0.85;
  pointer-events: none;
  z-index: 5;
}
.auth-shell {
  min-height: 100vh;
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(40px, 4vw, 72px);
  padding: clamp(40px, 4vw, 64px) clamp(32px, 4vw, 64px);
  align-items: stretch;
  position: relative;
}
.auth-brand {
  color: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}
.auth-brand > * { position: relative; }
.auth-brand__head { display: flex; align-items: center; gap: 12px; }
.auth-brand__mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  color: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-style: italic; font-weight: 500; font-size: 22px;
  box-shadow: 0 8px 22px rgba(99, 102, 241, 0.32);
}
.auth-brand__name { font: 700 17px 'Manrope', sans-serif; letter-spacing: -0.01em; color: var(--ink); }

.auth-brand__copy { max-width: 720px; }
.auth-brand__overline {
  font-size: 10px; letter-spacing: 0.32em; text-transform: uppercase;
  color: #4338ca; font-weight: 700; margin-bottom: 16px;
}
.auth-brand__h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(44px, 3vw, 58px); line-height: 1.05; font-weight: 400;
  letter-spacing: -0.028em; margin: 0 0 20px;
  color: #0b1020;
}
.auth-brand__h1 em {
  font-style: italic;
  background: linear-gradient(135deg, #6366f1 0%, #db4a85 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-brand__sub {
  font-size: 15.5px; line-height: 1.65; color: var(--ink-soft);
  max-width: 520px; margin: 0;
}

.auth-brand__chat { margin-top: 40px; max-width: 400px; }
.auth-brand__chat-wrap { display: flex; flex-direction: column; gap: 6px; }
.chat-bubble {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(15, 30, 25, 0.06);
  padding: 11px 15px; border-radius: 14px;
  font-size: 13.5px; line-height: 1.5;
  color: var(--ink-soft);
  margin-bottom: 2px;
  box-shadow: 0 4px 12px rgba(15, 30, 25, 0.04);
  backdrop-filter: blur(8px);
}
.chat-bubble--user {
  background: var(--celadon-deep); border-color: var(--celadon-deep);
  color: var(--surface);
  align-self: flex-end; margin-left: auto; max-width: 82%;
  border-radius: 14px 14px 4px 14px;
  box-shadow: 0 4px 14px rgba(47, 90, 77, 0.22);
}
.chat-bubble--bot { max-width: 92%; border-radius: 14px 14px 14px 4px; }

/* ========== Mock product stage on auth left panel ========== */
.auth-stage {
  position: relative;
  margin-top: 44px;
  width: 100%;
  max-width: 480px;
  height: 340px;
}
.mock-card {
  position: absolute;
  inset: 14px 36px 28px 0;
  background: var(--surface);
  border-radius: 14px;
  box-shadow:
    0 22px 50px rgba(15, 30, 25, 0.12),
    0 6px 14px rgba(15, 30, 25, 0.06),
    0 0 0 1px rgba(15, 30, 25, 0.04);
  padding: 16px 16px 14px;
  display: flex; flex-direction: column;
  transform: rotate(-1.4deg);
  animation: float-card 6.5s ease-in-out infinite;
}
@keyframes float-card {
  0%, 100% { transform: rotate(-1.4deg) translateY(0); }
  50%      { transform: rotate(-1.4deg) translateY(-6px); }
}

.mock-card__header {
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.mock-card__avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  font-family: 'Fraunces', serif; font-style: italic;
  color: var(--surface); font-weight: 500;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}
.mock-card__title {
  font: 600 12.5px 'Manrope', sans-serif;
  color: var(--ink); flex: 1;
}
.mock-card__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22);
}
.mock-card__status {
  font: 500 10.5px 'JetBrains Mono', monospace;
  color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.1em;
}

.mock-card__body {
  display: flex; flex-direction: column; gap: 8px;
  padding-top: 14px;
  flex: 1;
}
.mock-bubble {
  font-size: 12.5px; line-height: 1.55;
  padding: 9px 12px; border-radius: 12px;
  max-width: 86%;
  word-break: keep-all;
}
.mock-bubble--user {
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  color: var(--surface);
  align-self: flex-end;
  border-radius: 12px 12px 3px 12px;
  box-shadow: 0 4px 12px rgba(67, 56, 202, 0.2);
}
.mock-bubble--bot {
  background: var(--bg); color: var(--ink);
  align-self: flex-start;
  border: 1px solid var(--line-soft);
  border-radius: 3px 12px 12px 12px;
}
.mock-cursor::after {
  content: '▍';
  color: #6366f1;
  margin-left: 1px;
  animation: blink-cursor 1.1s steps(2) infinite;
}
@keyframes blink-cursor { to { opacity: 0; } }

.mock-typing {
  display: inline-flex; gap: 4px;
  padding: 11px 14px; border-radius: 12px 12px 12px 3px;
  background: var(--bg); border: 1px solid var(--line-soft);
  align-self: flex-start;
}
.mock-typing span {
  width: 5px; height: 5px; border-radius: 50%;
  background: #6366f1;
  opacity: 0.4;
  animation: typing 1.2s infinite;
}
.mock-typing span:nth-child(2) { animation-delay: 0.15s; }
.mock-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30%           { opacity: 1; transform: translateY(-2px); }
}

/* Floating chips around the card */
.mock-chip {
  position: absolute;
  background: var(--surface);
  border: 1px solid rgba(15, 30, 25, 0.06);
  border-radius: 10px;
  padding: 8px 12px;
  font: 500 11.5px 'Manrope', sans-serif;
  color: var(--ink-soft);
  display: flex; align-items: center; gap: 7px;
  box-shadow: 0 14px 32px rgba(15, 30, 25, 0.10), 0 0 0 1px rgba(15, 30, 25, 0.02);
  white-space: nowrap;
  animation: float-chip 7s ease-in-out infinite;
}
.mock-chip--source {
  bottom: -8px; right: -22px;
  transform: rotate(4deg);
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  animation-delay: 0.7s;
}
.mock-chip--source::before {
  content: ''; width: 16px; height: 18px;
  background: linear-gradient(180deg, var(--terracotta) 0%, #a23d2a 100%);
  border-radius: 2px;
  position: relative;
  flex-shrink: 0;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.1);
}
.mock-chip--stat {
  top: -14px; right: 32px;
  transform: rotate(-3deg);
  border-radius: 999px;
  color: #4338ca;
  font-weight: 700;
  animation-delay: 0.2s;
}
.mock-chip--stat::before {
  content: '↑'; color: #6366f1; font-weight: 800;
}
.mock-chip--badge {
  bottom: 38px; left: -20px;
  transform: rotate(-5deg);
  background: var(--ink);
  color: var(--surface);
  border-color: transparent;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation-delay: 1.2s;
}
@keyframes float-chip {
  0%, 100% { transform: var(--rest) translateY(0); }
  50%      { transform: var(--rest) translateY(-5px); }
}
.mock-chip--source { --rest: rotate(4deg); }
.mock-chip--stat   { --rest: rotate(-3deg); }
.mock-chip--badge  { --rest: rotate(-5deg); }

/* setup-step (signup mock) */
.setup-step {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--line-soft);
  background: var(--bg);
}
.setup-step--done { opacity: 0.7; }
.setup-step__num {
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font: 600 11px 'Manrope', sans-serif;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--ink-soft);
  flex-shrink: 0;
}
.setup-step--done .setup-step__num { background: #22c55e; color: var(--surface); border-color: #22c55e; }
.setup-step--active .setup-step__num { background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%); color: var(--surface); border-color: #4338ca; }
.setup-step--active { border-color: #6366f1; background: rgba(99, 102, 241, 0.06); }
.setup-step__title { font: 600 11.5px 'Manrope', sans-serif; color: var(--ink); margin-bottom: 2px; }
.setup-step__hint { font: 10.5px 'JetBrains Mono', monospace; color: var(--muted); }

/* mail mock (verify) */
.mail-subject {
  font: 600 12px 'Manrope', sans-serif; color: var(--ink);
  padding: 6px 0 8px;
  border-bottom: 1px dashed var(--line-soft);
  margin-bottom: 6px;
}
.mail-subject strong {
  font-family: 'JetBrains Mono', monospace;
  color: #db4a85;
  letter-spacing: 0.06em;
}
.mail-line {
  height: 7px; border-radius: 3px;
  background: var(--line-soft);
}
.mail-code {
  margin: 10px 0;
  padding: 14px 14px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(219,74,133,0.08));
  border: 1px solid rgba(99, 102, 241, 0.18);
  font: 700 24px 'JetBrains Mono', monospace;
  color: #4338ca;
  text-align: center; letter-spacing: 10px;
}

@media (max-width: 880px) {
  .auth-stage { display: none; }
}

.auth-brand__foot {
  font-size: 11px; color: var(--muted);
  letter-spacing: 0.06em;
  display: flex; justify-content: space-between; gap: 16px;
}

.auth-form {
  align-self: center;
  justify-self: end;
  width: clamp(360px, 28vw, 440px);
  background: var(--surface);
  border-radius: 22px;
  padding: 44px 44px 36px;
  position: relative;
  z-index: 2;
  box-shadow:
    0 32px 64px -24px rgba(15, 30, 25, 0.22),
    0 16px 28px -16px rgba(15, 30, 25, 0.10),
    0 0 0 1px rgba(15, 30, 25, 0.05);
}
.auth-form__inner { width: 100%; }
.auth-form .overline {
  font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase;
  color: #4338ca; font-weight: 700; margin-bottom: 8px;
}
.auth-form .title {
  font-family: 'Fraunces', serif;
  font-size: 36px; font-weight: 400; font-style: italic;
  margin: 0 0 28px; color: var(--ink);
  letter-spacing: -0.018em;
}
.auth-form .title em {
  font-style: normal;
  background: linear-gradient(135deg, #6366f1 0%, #db4a85 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-form label { font-size: 12px; color: var(--ink-soft); margin: 14px 0 6px; letter-spacing: 0.04em; display: block; }
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
  width: 100%; padding: 12px 14px; font: 14px inherit;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); border-radius: 8px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.auth-form input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); }
.auth-form button.primary {
  margin-top: 24px; width: 100%; padding: 13px 16px;
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  color: var(--surface);
  border: none; border-radius: 10px; cursor: pointer;
  font: 600 14px 'Manrope', sans-serif; letter-spacing: 0.01em;
  transition: filter .18s, transform .12s, box-shadow .18s;
  box-shadow: 0 8px 20px rgba(67, 56, 202, 0.22);
}
.auth-form button.primary:hover { background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%); filter: brightness(1.05); box-shadow: 0 10px 26px rgba(67, 56, 202, 0.32); }
.auth-form button.primary:active { transform: translateY(1px); }
.auth-form button.primary:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.auth-form .foot { margin-top: 22px; text-align: center; }
.auth-form .muted { font-size: 13px; color: var(--muted); }
.auth-form .muted a { color: #4338ca; text-decoration: none; border-bottom: 1px solid #4338ca; }
.auth-form .error { margin-top: 14px; padding: 10px 12px; background: rgba(197,80,58,0.08); border-left: 3px solid var(--terracotta); color: var(--terracotta); font-size: 13px; border-radius: 4px; }

/* verify-pending specific */
.auth-form .code-input {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px; letter-spacing: 12px; text-align: center; padding: 14px 0;
}
.auth-form .resend-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-soft);
}
.auth-form .muted-small { font-size: 12px; color: var(--muted); }
.auth-form .linkish {
  background: none; border: none; padding: 0;
  color: var(--celadon-deep); cursor: pointer; font: 500 13px inherit; text-decoration: underline;
}
.auth-form .linkish[disabled] { color: var(--muted); cursor: not-allowed; text-decoration: none; }

@media (max-width: 880px) {
  .auth-shell { grid-template-columns: 1fr; gap: 28px; padding: 32px 24px; }
  .auth-brand__h1 { font-size: 28px; margin-bottom: 12px; }
  .auth-brand__chat { display: none; }
  .auth-brand__foot { display: none; }
  .auth-form {
    width: 100%; justify-self: stretch;
    padding: 32px 26px;
    border-radius: 18px;
  }
}
.overline {
  font-size: 9px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--celadon-deep); font-weight: 700; margin-bottom: 8px;
}
.title {
  font-family: 'Fraunces', serif;
  font-size: 30px; font-weight: 400; font-style: italic;
  margin: 0 0 24px; color: var(--ink);
}
.title em { font-style: normal; color: var(--celadon-deep); }

label { display: block; font-size: 12px; color: var(--ink-soft); margin: 14px 0 6px; letter-spacing: 0.04em; }
input[type="text"], input[type="email"], input[type="password"] {
  width: 100%; padding: 10px 12px; font: 14px inherit;
  border: 1px solid rgba(15,30,25,0.10); background: var(--surface);
  color: var(--ink); border-radius: 8px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }

button.primary {
  margin-top: 24px;
  width: 100%; padding: 11px 16px;
  background: var(--celadon-deep); color: var(--surface);
  border: none; border-radius: 3px; cursor: pointer;
  font: 500 14px 'Manrope', sans-serif; letter-spacing: 0.02em;
  transition: background .18s;
}
button.primary:hover { background: var(--terracotta); }
button.primary:disabled { opacity: 0.5; cursor: not-allowed; }

.muted { color: var(--muted); font-size: 13px; }
.muted a { color: var(--celadon-deep); text-decoration: none; border-bottom: 1px solid var(--celadon-deep); }
.foot { margin-top: 18px; text-align: center; }

.error {
  margin-top: 14px; padding: 10px 12px;
  background: rgba(197, 80, 58, 0.08);
  border-left: 3px solid var(--terracotta);
  color: var(--terracotta); font-size: 13px;
}

.dashboard__placeholder {
  padding: 60px 24px; text-align: center;
  background: var(--surface); border: 1px dashed var(--line); border-radius: 6px;
  color: var(--muted); font-style: italic;
}

/* ========== App layout: sidebar + main ========== */
body.app {
  background:
    radial-gradient(45% 35% at 90% 0%, rgba(166, 152, 244, 0.12) 0%, transparent 65%),
    radial-gradient(40% 35% at 0% 100%, rgba(125, 211, 252, 0.10) 0%, transparent 65%),
    #f7f7fb;
}
.app {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

.sidebar {
  background:
    radial-gradient(60% 40% at 50% 0%, rgba(99, 102, 241, 0.22) 0%, transparent 60%),
    linear-gradient(180deg, #1e1b4b 0%, #14112e 100%);
  color: rgba(255,255,255,0.78);
  padding: 22px 18px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  border-right: 1px solid rgba(255,255,255,0.04);
}
.sidebar__brand {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.brand__mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  color: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-style: italic; font-size: 18px; font-weight: 500;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
}
.brand__name { font: 700 14.5px 'Manrope', sans-serif; letter-spacing: -0.01em; color: var(--surface); }

.sidebar__tenant {
  padding: 18px 0 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.tenant__label {
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(166, 152, 244, 0.7);
  font-weight: 600;
}
.tenant__name { font-family: 'Fraunces', serif; font-style: italic; font-size: 19px; color: var(--surface); margin-top: 4px; }

.sidebar__nav { display: flex; flex-direction: column; gap: 2px; padding: 14px 0; flex: 1; }
.sidebar__nav[hidden] { display: none; }
.nav-item[hidden] { display: none; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  text-decoration: none; color: rgba(255,255,255,0.6);
  font: 500 13.5px 'Manrope', sans-serif;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: var(--surface); }
.nav-item.is-active {
  background: linear-gradient(90deg, rgba(99,102,241,0.22) 0%, rgba(99,102,241,0.06) 100%);
  color: var(--surface);
}
.nav-item__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.18);
}
.nav-item.is-active .nav-item__dot {
  background: #a5b4fc;
  box-shadow: 0 0 0 3px rgba(165, 180, 252, 0.22), 0 0 12px rgba(99, 102, 241, 0.6);
}

.sidebar__foot {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 14px;
}
.me__email { font-size: 12px; color: rgba(255,255,255,0.66); word-break: break-all; }
.me__role {
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: #a5b4fc; margin-top: 4px;
  font-weight: 600;
}
.me__logout {
  margin-top: 12px; width: 100%;
  background: transparent; border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.78); padding: 8px; border-radius: 8px; cursor: pointer;
  font: 500 12px 'Manrope', sans-serif;
  transition: border-color .18s, color .18s, background .18s;
}
.me__logout:hover { border-color: #a5b4fc; color: var(--surface); background: rgba(99,102,241,0.08); }

/* ========== Main ========== */
.main { padding: 28px 36px 48px; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 22px; border-bottom: 1px solid rgba(99, 102, 241, 0.12);
  margin-bottom: 28px;
}
.topbar__crumb {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: #4338ca; font-weight: 700;
}
.topbar__title {
  font: 600 28px 'Manrope', sans-serif;
  margin: 6px 0 0; color: #0b1020;
  letter-spacing: -0.018em;
}

/* ========== Panels ========== */
.panel { display: flex; flex-direction: column; gap: 22px; }
.panel[hidden] { display: none; }

/* ========== Card block ========== */
.card-block {
  background: var(--surface);
  border: 1px solid rgba(15, 30, 25, 0.06);
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 1px 2px rgba(15, 30, 25, 0.03), 0 8px 20px rgba(15, 30, 25, 0.02);
}
.card-block__title {
  margin: 0 0 14px;
  font: 600 14.5px 'Manrope', sans-serif;
  color: #0b1020; letter-spacing: -0.01em;
}
.card-block__hint { color: var(--muted); font-size: 13px; margin: -8px 0 14px; }
.card-block__hint code {
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  background: rgba(99, 102, 241, 0.08); color: #4338ca;
  padding: 1px 6px; border-radius: 4px;
}

/* ========== KPIs ========== */
.kpis {
  display: grid; gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.kpi {
  background: var(--surface);
  border: 1px solid rgba(15, 30, 25, 0.06);
  border-radius: 12px;
  padding: 20px 22px;
  position: relative; overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 30, 25, 0.03), 0 8px 20px rgba(15, 30, 25, 0.02);
}
.kpi::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, #6366f1 0%, #db4a85 100%);
  opacity: 0.7;
}
.kpi__label { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.kpi__value {
  font-family: 'Fraunces', serif; font-size: 40px; font-weight: 400;
  color: #0b1020; margin: 10px 0 6px; letter-spacing: -0.028em;
}
.kpi__hint { font-size: 12px; color: var(--ink-soft); }

/* ========== Alerts ========== */
.alerts { display: flex; flex-direction: column; gap: 10px; }
.alert {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 18px; border-radius: 10px; font-size: 13.5px;
}
.alert--warn {
  background: linear-gradient(135deg, rgba(166, 152, 244, 0.12), rgba(125, 211, 252, 0.10));
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: #3730a3;
}
.alert--err {
  background: linear-gradient(135deg, rgba(251, 146, 120, 0.10), rgba(219, 74, 133, 0.08));
  border: 1px solid rgba(219, 74, 133, 0.25);
  color: #9d174d;
}
.alert__cta {
  font-weight: 600; text-decoration: none; color: inherit;
  border: 1px solid currentColor; padding: 5px 11px; border-radius: 6px;
  font-size: 12px; white-space: nowrap;
  background: rgba(255,255,255,0.5);
  transition: background .15s;
}
.alert__cta:hover { background: rgba(255,255,255,0.85); }

/* ========== Overview grid (sparkline + quick links) ========== */
.ov-grid { display: grid; gap: 14px; grid-template-columns: 2fr 1fr; }
.sparkline {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 8px; height: 120px; padding: 6px 4px 0;
}
.spark__col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.spark__bar {
  width: 100%;
  background: linear-gradient(180deg, #a5b4fc 0%, #6366f1 60%, #4338ca 100%);
  border-radius: 4px 4px 0 0; min-height: 4px;
}
.spark__lbl { font-size: 10px; color: var(--muted); margin-top: 6px; font-family: 'JetBrains Mono', monospace; }
.quick-links { list-style: none; padding: 0; margin: 0; }
.quick-links li { padding: 6px 0; }
.quick-links a { color: #4338ca; text-decoration: none; font-weight: 500; font-size: 14px; transition: color .15s; }
.quick-links a:hover { color: #db4a85; }

/* ========== Forms / inputs (dashboard) ========== */
.snippet-row { display: flex; gap: 8px; align-items: center; }
.snippet-row input { flex: 1; font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.add-domain-row { display: flex; gap: 8px; margin-top: 12px; }
.add-domain-row input { flex: 1; }
.upload-form { display: grid; grid-template-columns: 1fr 90px 1fr auto; gap: 10px; align-items: center; }
.upload-form input[type=file] { font-size: 13px; padding: 8px; border: 1px solid var(--line); border-radius: 3px; background: var(--bg); }
.upload-form select { padding: 10px 12px; border: 1px solid var(--line); border-radius: 3px; background: var(--bg); font: 14px inherit; }

/* ========== Tables ========== */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 11px 8px; border-bottom: 1px solid rgba(15,30,25,0.06); text-align: left; font-size: 13.5px; vertical-align: middle; }
.data-table th { font-weight: 700; color: var(--muted); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; }
.data-table .status-INDEXED {
  color: #15803d; font-weight: 600;
  position: relative; padding-left: 16px;
}
.data-table .status-INDEXED::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 7px; height: 7px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}
.data-table .status-FAILED {
  color: #be185d; font-weight: 600;
  position: relative; padding-left: 16px;
}
.data-table .status-FAILED::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 7px; height: 7px; border-radius: 50%; background: #db4a85;
}
.data-table .status-PENDING {
  color: #4338ca; font-weight: 500;
  position: relative; padding-left: 16px;
}
.data-table .status-PENDING::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 7px; height: 7px; border-radius: 50%; background: #a5b4fc;
  animation: pulse-pending 1.6s ease-in-out infinite;
}
@keyframes pulse-pending {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(99,102,241,0.5); }
  50%      { opacity: 0.6; box-shadow: 0 0 0 6px rgba(99,102,241,0); }
}
.data-table .empty { color: var(--muted); font-style: italic; text-align: center; padding: 22px 0; }
.usage-summary { font-size: 13px; color: var(--ink-soft); margin-bottom: 10px; }

/* ========== Buttons (dashboard variants) ========== */
.btn {
  background: transparent; border: 1px solid rgba(15,30,25,0.12);
  color: var(--ink-soft); padding: 8px 14px; border-radius: 8px; cursor: pointer;
  font: 500 13px 'Manrope', sans-serif;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:hover { border-color: #6366f1; color: #4338ca; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--primary {
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  border-color: transparent; color: var(--surface);
  box-shadow: 0 6px 16px rgba(67, 56, 202, 0.22);
}
.btn--primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 8px 22px rgba(67, 56, 202, 0.32);
  color: var(--surface);
}
.btn--danger {
  background: transparent; border-color: #db4a85; color: #be185d;
}
.btn--danger:hover { background: #db4a85; color: var(--surface); border-color: #db4a85; }
.btn--ghost { padding: 5px 11px; font-size: 12px; color: var(--ink-soft); border-color: rgba(15,30,25,0.10); }
.btn--ghost:hover { color: #be185d; border-color: #db4a85; }
.btn--sm { padding: 4px 10px; font-size: 11.5px; }

/* ========== Settings ========== */
.lang-options { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.lang-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px;
  cursor: pointer; font-size: 14px;
  transition: border-color .15s, background .15s;
}
.lang-opt:hover { border-color: var(--celadon); }
.lang-opt input[type="radio"] { accent-color: var(--celadon-deep); }
.lang-opt input[type="radio"]:checked + span { font-weight: 600; color: var(--celadon-deep); }

.domain-row {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid rgba(15,30,25,0.06);
}
.domain-row span {
  flex: 1; font-family: 'JetBrains Mono', monospace; font-size: 13px;
  color: var(--ink-soft);
}

/* clickable table row */
.row-clickable { cursor: pointer; transition: background .15s; }
.row-clickable:hover { background: rgba(99, 102, 241, 0.05); }

/* tenant detail meta block */
.detail-back {
  display: inline-block;
  font: 600 12.5px 'Manrope', sans-serif;
  color: #4338ca; text-decoration: none;
  padding: 6px 12px; border-radius: 8px;
  background: rgba(99, 102, 241, 0.08);
  transition: background .15s;
}
.detail-back:hover { background: rgba(99, 102, 241, 0.16); }

.tenant-meta { display: grid; gap: 8px; }
.tenant-meta__row {
  display: grid; grid-template-columns: 140px 1fr; gap: 14px;
  padding: 8px 0; border-bottom: 1px solid rgba(15,30,25,0.04);
  font-size: 13.5px;
}
.tenant-meta__row:last-child { border-bottom: none; }
.tenant-meta__k {
  color: var(--muted);
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  font-weight: 700;
  align-self: center;
}
.tenant-meta__v {
  color: var(--ink); font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px; word-break: break-all;
}
.empty { color: var(--muted); font-style: italic; padding: 14px 0; }

/* ========== Responsive ========== */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; flex-direction: row; flex-wrap: wrap; gap: 12px; padding: 14px; }
  .sidebar__brand, .sidebar__tenant, .sidebar__foot { border: none; padding: 0; }
  .sidebar__nav { flex-direction: row; flex-wrap: wrap; flex: 1 0 100%; padding: 0; gap: 6px; }
  .nav-item { padding: 7px 10px; font-size: 12.5px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .ov-grid { grid-template-columns: 1fr; }
  .upload-form { grid-template-columns: 1fr; }
}

/* ========== Shared site header (auth + pricing pages) ========== */
.site-header {
  position: sticky;
  top: 4px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(24px, 4vw, 56px);
  background: rgba(247, 247, 251, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(15, 30, 25, 0.06);
}
.site-header__brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
}
.site-header__mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  color: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-style: italic; font-weight: 500; font-size: 17px;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.28);
}
.site-header__name { font: 700 15px 'Manrope', sans-serif; letter-spacing: -0.01em; }
.site-header__nav {
  display: flex; align-items: center; gap: 8px;
}
.site-header__nav a {
  font: 600 13.5px 'Manrope', sans-serif;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.site-header__nav a:hover { color: var(--ink); background: rgba(15, 30, 25, 0.04); }
.site-header__nav a.is-active {
  color: var(--ink);
  background: rgba(99, 102, 241, 0.08);
}
.site-header__cta {
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  color: var(--surface) !important;
  box-shadow: 0 6px 16px rgba(67, 56, 202, 0.22);
}
.site-header__cta:hover { background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%) !important; filter: brightness(1.05); }

/* leave breathing room between sticky header and auth content */
.auth-shell { padding-top: clamp(56px, 5vw, 88px); }

@media (max-width: 880px) {
  .site-header { padding: 12px 18px; }
  .site-header__name { display: none; }
}

/* ========== Pricing page ========== */
body.pricing {
  background:
    radial-gradient(50% 50% at 14% 10%, rgba(166, 152, 244, 0.55) 0%, transparent 65%),
    radial-gradient(48% 50% at 92% 18%, rgba(125, 211, 252, 0.50) 0%, transparent 68%),
    radial-gradient(55% 55% at 80% 95%, rgba(251, 146, 120, 0.42) 0%, transparent 70%),
    radial-gradient(45% 55% at 8% 92%, rgba(196, 220, 255, 0.55) 0%, transparent 70%),
    #f7f7fb;
  min-height: 100vh;
  position: relative;
  color: var(--ink);
}
body.pricing::before {
  content: '';
  position: fixed; inset: 0;
  background-image: radial-gradient(rgba(15, 30, 25, 0.04) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  opacity: 0.5;
  z-index: 0;
}
body.pricing::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #a698f4 0%, #7dd3fc 40%, #fb9278 100%);
  opacity: 0.85;
  pointer-events: none;
  z-index: 5;
}

.pricing-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px clamp(24px, 4vw, 56px) 80px;
  position: relative;
  z-index: 1;
}

.pricing-hero {
  text-align: center;
  padding: clamp(48px, 6vw, 88px) 0 clamp(40px, 5vw, 64px);
}
.pricing-hero .overline {
  font-size: 10px; letter-spacing: 0.32em; text-transform: uppercase;
  color: #4338ca; font-weight: 700; margin-bottom: 18px;
}
.pricing-hero h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(40px, 4vw, 64px); line-height: 1.05; font-weight: 400;
  letter-spacing: -0.025em; margin: 0 0 20px;
  color: #0b1020;
}
.pricing-hero h1 em {
  font-style: italic;
  background: linear-gradient(135deg, #6366f1 0%, #db4a85 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.pricing-hero__sub {
  font-size: clamp(15.5px, 1vw, 18px); line-height: 1.6; color: var(--ink-soft);
  max-width: 580px; margin: 0 auto;
}

.pricing-tiers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 2vw, 28px);
  margin-bottom: clamp(64px, 7vw, 96px);
}
.tier-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 32px 28px;
  position: relative;
  display: flex; flex-direction: column;
  box-shadow:
    0 24px 48px -20px rgba(15, 30, 25, 0.14),
    0 0 0 1px rgba(15, 30, 25, 0.05);
}
.tier-card--featured {
  background: var(--surface);
  box-shadow:
    0 32px 64px -20px rgba(99, 102, 241, 0.30),
    0 0 0 2px #6366f1;
  transform: translateY(-8px);
}
.tier-card__badge {
  position: absolute;
  top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, #6366f1 0%, #db4a85 100%);
  color: var(--surface);
  font: 700 10px 'Manrope', sans-serif;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 999px;
  box-shadow: 0 8px 18px rgba(99, 102, 241, 0.32);
}
.tier-card__name {
  font: 700 13px 'Manrope', sans-serif;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.tier-card__price {
  font-family: 'Fraunces', serif;
  font-size: 42px; font-weight: 400; line-height: 1;
  color: var(--ink);
  margin-bottom: 4px;
}
.tier-card__price-period {
  font: 500 13px 'Manrope', sans-serif;
  color: var(--muted);
  margin-bottom: 22px;
}
.tier-card__audience {
  font-size: 14px; color: var(--ink-soft);
  margin-bottom: 22px; line-height: 1.5;
}
.tier-card__features {
  list-style: none; padding: 0; margin: 0 0 28px;
  display: flex; flex-direction: column; gap: 10px;
  font-size: 14px; color: var(--ink);
  flex: 1;
}
.tier-card__features li {
  display: flex; gap: 10px; align-items: flex-start;
  line-height: 1.45;
}
.tier-card__features li::before {
  content: '✓';
  color: #6366f1;
  font-weight: 700;
  flex-shrink: 0;
}
.tier-card__cta {
  display: block;
  text-align: center;
  text-decoration: none;
  padding: 13px 16px;
  border-radius: 10px;
  font: 600 14px 'Manrope', sans-serif;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
  transition: filter .15s, box-shadow .15s, transform .12s;
}
.tier-card__cta:hover { background: var(--surface); box-shadow: 0 6px 14px rgba(15, 30, 25, 0.08); }
.tier-card--featured .tier-card__cta {
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  color: var(--surface);
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(67, 56, 202, 0.28);
}
.tier-card--featured .tier-card__cta:hover { filter: brightness(1.05); }

@media (max-width: 880px) {
  .pricing-tiers { grid-template-columns: 1fr; }
  .tier-card--featured { transform: none; }
}

.pricing-compare {
  margin-bottom: clamp(56px, 6vw, 88px);
}
.pricing-compare h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 2.4vw, 38px); font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 28px;
  text-align: center;
  color: var(--ink);
}
.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 20px 40px -20px rgba(15, 30, 25, 0.10),
    0 0 0 1px rgba(15, 30, 25, 0.05);
  font-size: 14px;
}
.compare-table thead th {
  font: 700 13px 'Manrope', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 18px 20px;
  background: rgba(99, 102, 241, 0.04);
  color: var(--ink);
  text-align: center;
  border-bottom: 1px solid var(--line-soft);
}
.compare-table thead th:first-child { text-align: left; color: var(--muted); }
.compare-table tbody td,
.compare-table tbody th {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  text-align: center;
  font-weight: 400;
}
.compare-table tbody th {
  text-align: left;
  font-weight: 600;
  color: var(--ink-soft);
  width: 32%;
}
.compare-table tbody tr:last-child td,
.compare-table tbody tr:last-child th { border-bottom: none; }
.compare-table tbody tr:hover td,
.compare-table tbody tr:hover th { background: rgba(15, 30, 25, 0.02); }

@media (max-width: 880px) {
  .pricing-compare { overflow-x: auto; }
  .compare-table { min-width: 560px; }
}

.pricing-faq {
  margin-bottom: clamp(48px, 5vw, 72px);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.pricing-faq h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 2.4vw, 38px); font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  text-align: center;
  color: var(--ink);
}
.pricing-faq details {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 12px;
  transition: box-shadow .15s, border-color .15s;
}
.pricing-faq details[open] {
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: 0 12px 28px -16px rgba(99, 102, 241, 0.20);
}
.pricing-faq summary {
  cursor: pointer;
  font: 600 15px 'Manrope', sans-serif;
  color: var(--ink);
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.pricing-faq summary::-webkit-details-marker { display: none; }
.pricing-faq summary::after {
  content: '+';
  font-size: 22px; font-weight: 400; color: var(--muted);
  transition: transform .2s;
  flex-shrink: 0;
}
.pricing-faq details[open] summary::after {
  content: '−';
  color: #6366f1;
}
.pricing-faq details p {
  margin: 14px 0 0;
  font-size: 14.5px; line-height: 1.65;
  color: var(--ink-soft);
}

.pricing-foot {
  text-align: center;
  font-size: 12px; color: var(--muted);
  letter-spacing: 0.06em;
  padding-top: 32px;
  border-top: 1px solid var(--line-soft);
}

/* ========== Landing page ========== */
body.landing {
  background:
    radial-gradient(50% 50% at 14% 10%, rgba(166, 152, 244, 0.55) 0%, transparent 65%),
    radial-gradient(48% 50% at 92% 18%, rgba(125, 211, 252, 0.50) 0%, transparent 68%),
    radial-gradient(55% 55% at 80% 95%, rgba(251, 146, 120, 0.42) 0%, transparent 70%),
    radial-gradient(45% 55% at 8% 92%, rgba(196, 220, 255, 0.55) 0%, transparent 70%),
    #f7f7fb;
  min-height: 100vh;
  position: relative;
  color: var(--ink);
}
body.landing::before {
  content: '';
  position: fixed; inset: 0;
  background-image: radial-gradient(rgba(15, 30, 25, 0.04) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  opacity: 0.5;
  z-index: 0;
}
body.landing::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #a698f4 0%, #7dd3fc 40%, #fb9278 100%);
  opacity: 0.85;
  pointer-events: none;
  z-index: 5;
}

.landing-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px clamp(24px, 4vw, 56px) 80px;
  position: relative;
  z-index: 1;
}

.landing-hero {
  text-align: center;
  padding: clamp(64px, 8vw, 120px) 0 clamp(40px, 5vw, 64px);
}
.landing-hero .overline {
  font-size: 10px; letter-spacing: 0.32em; text-transform: uppercase;
  color: #4338ca; font-weight: 700; margin-bottom: 22px;
}
.landing-hero h1 {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', system-ui, sans-serif;
  font-size: clamp(40px, 3.6vw, 60px); line-height: 1.18; font-weight: 700;
  letter-spacing: -0.028em; margin: 0 0 20px;
  color: #0b1020;
  word-break: keep-all;
}
.landing-hero h1 em {
  font-family: inherit;
  font-style: normal;
  font-weight: 700;
  background: linear-gradient(135deg, #6366f1 0%, #db4a85 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.landing-hero__sub {
  font-size: clamp(16px, 1.1vw, 19px); line-height: 1.6; color: var(--ink-soft);
  max-width: 640px; margin: 0 auto 36px;
}
.landing-hero__ctas {
  display: flex; gap: 14px; justify-content: center; margin-bottom: 28px;
}
.landing-hero__attribution {
  font-size: 12.5px; color: var(--muted);
  letter-spacing: 0.05em;
}

/* Landing page button utility */
.landing-btn {
  display: inline-block;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 10px;
  font: 600 14.5px 'Manrope', sans-serif;
  letter-spacing: 0.01em;
  transition: filter .15s, box-shadow .15s, transform .12s, background .15s;
  border: 1px solid transparent;
}
.landing-btn--primary {
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  color: var(--surface);
  box-shadow: 0 10px 24px rgba(67, 56, 202, 0.28);
}
.landing-btn--primary:hover { filter: brightness(1.05); box-shadow: 0 12px 28px rgba(67, 56, 202, 0.34); }
.landing-btn--ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.landing-btn--ghost:hover { background: var(--bg); box-shadow: 0 6px 14px rgba(15, 30, 25, 0.08); }

@media (max-width: 880px) {
  .landing-hero__ctas { flex-direction: column; align-items: stretch; }
  .landing-hero__ctas .landing-btn { text-align: center; }
}

.landing-section {
  margin-bottom: clamp(64px, 7vw, 96px);
}
.landing-section h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 2.6vw, 40px); font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 28px;
  text-align: center;
  color: var(--ink);
}
.landing-intro p {
  font-size: clamp(15.5px, 1vw, 17.5px);
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.card-grid {
  display: grid;
  gap: clamp(16px, 1.8vw, 24px);
}
.card-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 24px 22px;
  box-shadow:
    0 18px 36px -20px rgba(15, 30, 25, 0.10),
    0 0 0 1px rgba(15, 30, 25, 0.05);
  transition: transform .15s, box-shadow .15s;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 24px 48px -20px rgba(15, 30, 25, 0.14),
    0 0 0 1px rgba(99, 102, 241, 0.18);
}
.feature-card__title {
  font: 600 15.5px 'Manrope', sans-serif;
  color: var(--ink);
  margin-bottom: 8px;
}
.feature-card__desc {
  font-size: 13.5px; line-height: 1.55;
  color: var(--ink-soft);
}

@media (max-width: 880px) {
  .card-grid--3 { grid-template-columns: 1fr; }
}

.benefit-list {
  list-style: none; padding: 0; margin: 0 auto;
  max-width: 880px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 28px;
}
.benefit-list li {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface);
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 14.5px; line-height: 1.55;
  color: var(--ink);
  box-shadow:
    0 14px 28px -18px rgba(15, 30, 25, 0.10),
    0 0 0 1px rgba(15, 30, 25, 0.04);
}
.benefit-list li::before {
  content: '✓';
  color: #6366f1;
  font-weight: 700;
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1.45;
}

@media (max-width: 880px) {
  .benefit-list { grid-template-columns: 1fr; }
}

.landing-cta {
  background: var(--surface);
  border-radius: 22px;
  padding: clamp(36px, 4vw, 56px) clamp(28px, 4vw, 56px);
  box-shadow:
    0 28px 56px -22px rgba(15, 30, 25, 0.14),
    0 0 0 1px rgba(15, 30, 25, 0.05);
  margin-bottom: clamp(56px, 6vw, 80px);
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(32px, 4vw, 64px);
  align-items: center;
}
.landing-cta__content { text-align: left; }
.landing-cta__overline {
  font-size: 10px; letter-spacing: 0.32em; text-transform: uppercase;
  color: #4338ca; font-weight: 700; margin-bottom: 14px;
}
.landing-cta h2 {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', system-ui, sans-serif;
  font-size: clamp(28px, 2.8vw, 42px); font-weight: 700;
  letter-spacing: -0.025em; line-height: 1.18;
  margin: 0 0 12px;
  text-align: left;
  color: var(--ink);
  word-break: keep-all;
}
.landing-cta h2 em {
  font-family: inherit;
  font-style: normal;
  font-weight: 700;
  background: linear-gradient(135deg, #6366f1 0%, #db4a85 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.landing-cta p {
  font-size: clamp(15px, 1vw, 17px);
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0 0 26px;
}
.landing-cta .landing-hero__ctas { margin-bottom: 0; justify-content: flex-start; }

/* 3-step stepper visualizing 5-minute setup */
.cta-steps {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
  gap: 0;
  position: relative;
}
.cta-step {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: flex-start;
  padding: 16px 0;
  position: relative;
}
.cta-step + .cta-step::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 17px;
  width: 2px; height: 24px;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.35), rgba(99, 102, 241, 0.08));
}
.cta-step__num {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  color: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font: 700 14px 'Manrope', sans-serif;
  flex-shrink: 0;
  box-shadow: 0 8px 18px rgba(99, 102, 241, 0.32);
}
.cta-step__body { padding-top: 4px; }
.cta-step__title {
  font: 600 15px 'Pretendard Variable', Pretendard, system-ui, sans-serif;
  color: var(--ink); margin-bottom: 4px;
}
.cta-step__desc {
  font-size: 13px; line-height: 1.5;
  color: var(--ink-soft);
}
.cta-step__desc code {
  font: 500 12px 'JetBrains Mono', monospace;
  background: rgba(99, 102, 241, 0.08);
  color: #4338ca;
  padding: 2px 6px; border-radius: 4px;
  word-break: break-all;
}
.cta-step__time {
  font: 500 11.5px 'JetBrains Mono', monospace;
  color: var(--muted);
  padding-top: 8px;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

@media (max-width: 880px) {
  .landing-cta { grid-template-columns: 1fr; text-align: left; }
  .landing-cta__content { text-align: left; }
  .landing-cta .landing-hero__ctas { justify-content: flex-start; }
}

.landing-foot {
  text-align: center;
  font-size: 12px; color: var(--muted);
  letter-spacing: 0.06em;
  padding-top: 32px;
  border-top: 1px solid var(--line-soft);
}

/* ========== Landing hero split + mock card ========== */
.landing-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
  text-align: left;
}
.landing-hero__content { text-align: left; }
.landing-hero__sub { margin: 0 0 36px; max-width: 540px; }
.landing-hero__ctas { justify-content: flex-start; }

.landing-hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}
.landing-mock {
  position: relative;
  background: var(--surface);
  border-radius: 18px;
  padding: 18px 18px 14px;
  box-shadow:
    0 32px 60px -24px rgba(15, 30, 25, 0.20),
    0 12px 22px -12px rgba(15, 30, 25, 0.10),
    0 0 0 1px rgba(15, 30, 25, 0.05);
  width: 100%;
  max-width: 420px;
  display: flex; flex-direction: column;
}
.landing-mock__header {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.landing-mock__avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  font-family: 'Fraunces', serif; font-style: italic; color: var(--surface);
  font-weight: 500; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}
.landing-mock__title { font: 600 13.5px 'Manrope', sans-serif; color: var(--ink); flex: 1; }
.landing-mock__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22);
}
.landing-mock__status {
  font: 500 10.5px 'JetBrains Mono', monospace;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em;
}
.landing-mock__body {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 0 12px;
}
.landing-mock__bubble {
  font-size: 13.5px; line-height: 1.55;
  padding: 10px 13px; border-radius: 12px;
  max-width: 88%;
  word-break: keep-all;
}
.landing-mock__bubble--user {
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  color: var(--surface);
  align-self: flex-end;
  border-radius: 12px 12px 3px 12px;
  box-shadow: 0 6px 14px rgba(67, 56, 202, 0.22);
}
.landing-mock__bubble--bot {
  background: #f4f4f8; color: var(--ink);
  align-self: flex-start;
  border: 1px solid rgba(15, 30, 25, 0.04);
  border-radius: 3px 12px 12px 12px;
}
.landing-mock__source {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; color: var(--muted);
  padding-top: 10px; margin-top: 4px;
  border-top: 1px dashed var(--line-soft);
}

.landing-mock__chip {
  position: absolute;
  background: var(--surface);
  border: 1px solid rgba(15, 30, 25, 0.06);
  border-radius: 10px;
  padding: 7px 12px;
  font: 600 11px 'Manrope', sans-serif;
  color: #4338ca;
  display: inline-flex; align-items: center; gap: 6px;
  box-shadow: 0 14px 28px rgba(15, 30, 25, 0.10);
  white-space: nowrap;
}
.landing-mock__chip--stat {
  top: -16px; right: 28px;
  transform: rotate(-3deg);
  border-radius: 999px;
}
.landing-mock__chip--badge {
  bottom: 28px; left: -22px;
  transform: rotate(-5deg);
  background: var(--ink);
  color: var(--surface);
  border-color: transparent;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 880px) {
  .landing-hero { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .landing-hero__content { text-align: center; }
  .landing-hero__sub { margin-left: auto; margin-right: auto; }
  .landing-hero__ctas { justify-content: center; }
  .landing-mock__chip--badge { left: -10px; }
}

/* ========== Demo widget (bottom-right floating chatbot) ========== */
.demo-widget {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 50;
}
.demo-widget__launcher {
  width: 56px; height: 56px;
  border-radius: 50%; border: none;
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  color: var(--surface);
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(67, 56, 202, 0.36), 0 0 0 1px rgba(15, 30, 25, 0.05);
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s, box-shadow .15s;
}
.demo-widget__launcher:hover { transform: translateY(-2px); box-shadow: 0 18px 32px rgba(67, 56, 202, 0.42); }
.demo-widget__launcher-close { display: none; font-size: 28px; line-height: 1; }
.demo-widget--open .demo-widget__launcher-icon { display: none; }
.demo-widget--open .demo-widget__launcher-close { display: inline; }

.demo-widget__panel {
  position: absolute;
  bottom: 72px; right: 0;
  width: 360px;
  height: 560px;
  max-height: calc(100vh - 120px);
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 28px 56px -16px rgba(15, 30, 25, 0.30), 0 0 0 1px rgba(15, 30, 25, 0.06);
  display: none;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  animation: demo-widget-pop .18s ease-out;
}
.demo-widget--open .demo-widget__panel { display: flex; }
@keyframes demo-widget-pop {
  from { opacity: 0; transform: scale(0.92) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.demo-widget__header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  color: var(--surface);
}
.demo-widget__avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  font-family: 'Fraunces', serif; font-style: italic;
  font-weight: 500; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.demo-widget__title { font: 600 14px 'Manrope', sans-serif; flex: 1; }
.demo-widget__close {
  background: none; border: none; color: var(--surface);
  font-size: 22px; line-height: 1; cursor: pointer;
  padding: 0 4px; opacity: 0.85;
}
.demo-widget__close:hover { opacity: 1; }

.demo-widget__body {
  flex: 1;
  padding: 14px 14px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
  background: #fafafd;
}
.demo-widget__bubble {
  font-size: 13px; line-height: 1.5;
  padding: 9px 12px; border-radius: 12px;
  max-width: 86%;
  word-break: keep-all;
}
.demo-widget__bubble--user {
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  color: var(--surface);
  align-self: flex-end;
  border-radius: 12px 12px 3px 12px;
}
.demo-widget__bubble--bot {
  background: var(--surface); color: var(--ink);
  align-self: flex-start;
  border: 1px solid var(--line-soft);
  border-radius: 3px 12px 12px 12px;
}

.demo-widget__chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 10px 14px;
  border-top: 1px solid var(--line-soft);
}
.demo-widget__chip {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  font: 500 12px 'Manrope', sans-serif;
  padding: 6px 10px; border-radius: 999px;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.demo-widget__chip:hover { border-color: #6366f1; color: #4338ca; background: rgba(99, 102, 241, 0.06); }

.demo-widget__foot {
  text-align: center;
  font-size: 10.5px; color: var(--muted);
  padding: 8px;
  letter-spacing: 0.04em;
  background: var(--surface);
  border-top: 1px solid var(--line-soft);
}

@media (max-width: 880px) {
  .demo-widget { bottom: 16px; right: 16px; }
  .demo-widget__panel { width: calc(100vw - 32px); max-width: 360px; }
}

/* ========== Landing alternating split sections ========== */
.landing-split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
}
.landing-split--reverse .landing-split__text { order: 2; }
.landing-split--reverse .landing-split__visual { order: 1; }

.landing-split__text { max-width: 460px; }
.landing-split__overline {
  font-size: 10px; letter-spacing: 0.32em; text-transform: uppercase;
  color: #4338ca; font-weight: 700; margin-bottom: 18px;
}
.landing-split h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 2.6vw, 42px); font-weight: 400;
  letter-spacing: -0.022em; line-height: 1.12;
  margin: 0 0 18px;
  text-align: left;
  color: var(--ink);
  word-break: keep-all;
}
.landing-split__lead {
  font-size: clamp(15px, 1vw, 17px);
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0;
}

/* override existing .landing-section h2 center alignment in split context */
.landing-section.landing-split h2 { text-align: left; }

/* Stat row for ABOUT POLYBOT section */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.stat-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 22px 18px;
  text-align: center;
  box-shadow:
    0 18px 36px -20px rgba(15, 30, 25, 0.12),
    0 0 0 1px rgba(15, 30, 25, 0.05);
  transition: transform .15s, box-shadow .15s;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 22px 44px -20px rgba(99, 102, 241, 0.22),
    0 0 0 1px rgba(99, 102, 241, 0.20);
}
.stat-card__num {
  font-family: 'Fraunces', serif;
  font-size: clamp(34px, 3vw, 44px); font-weight: 400; line-height: 1;
  background: linear-gradient(135deg, #6366f1 0%, #db4a85 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}
.stat-card__unit {
  font-family: 'Manrope', sans-serif;
  font-size: 0.55em; font-weight: 600;
  margin-left: 2px;
  background: inherit;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-card__label {
  font: 500 12px 'Manrope', sans-serif;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  line-height: 1.4;
}

/* 2-column card grid (for use inside split visual side) */
.card-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.feature-card__icon {
  font-size: 22px;
  margin-bottom: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(99,102,241,0.10) 0%, rgba(219,74,133,0.08) 100%);
  color: #4338ca;
}
.feature-card--wide { grid-column: span 2; }
.feature-card--wide .feature-card__icon { margin-bottom: 8px; }

/* Stacked benefit list for split context — single column with full width */
.benefit-list--stack {
  grid-template-columns: 1fr;
  gap: 8px;
}
.benefit-list--stack li {
  padding: 14px 18px;
  font-size: 14px;
}

@media (max-width: 880px) {
  .landing-split { grid-template-columns: 1fr; gap: 36px; }
  .landing-split--reverse .landing-split__text { order: 0; }
  .landing-split--reverse .landing-split__visual { order: 0; }
  .landing-split__text { max-width: none; }
  .stat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card-grid--2 { grid-template-columns: 1fr; }
  .feature-card--wide { grid-column: span 1; }
}

/* ========== Compare panel (WHY POLYBOT section) ========== */
.compare-panel {
  background: var(--surface);
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow:
    0 24px 48px -22px rgba(15, 30, 25, 0.14),
    0 0 0 1px rgba(15, 30, 25, 0.05);
}
.compare-panel__head {
  display: grid;
  grid-template-columns: 1fr 28px 1fr;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 6px;
}
.compare-panel__label {
  font: 700 11px 'Manrope', sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.compare-panel__label--before { color: var(--muted); }
.compare-panel__label--after  { color: #4338ca; }
.compare-panel__spacer { display: block; }

.compare-rows {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
}
.compare-row {
  display: grid;
  grid-template-columns: 1fr 28px 1fr;
  gap: 8px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 13.5px; line-height: 1.45;
}
.compare-row:last-child { border-bottom: none; }
.compare-row__before {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(138, 132, 120, 0.35);
  text-decoration-thickness: 1px;
}
.compare-row__arrow {
  font: 600 14px 'Manrope', sans-serif;
  color: #6366f1;
  text-align: center;
}
.compare-row__after {
  color: var(--ink);
  font-weight: 500;
}

@media (max-width: 880px) {
  .compare-panel__head,
  .compare-row {
    grid-template-columns: 1fr 20px 1fr;
    gap: 6px;
  }
  .compare-row { font-size: 12.5px; }
}
