@import url("https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Roboto:wght@400;500;700&display=swap");

/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
  --bg: #f7f6f2;
  --bg-deep: #f1efe9;
  --fg: #202823;
  --fg-soft: #3b453f;
  --muted: #6d756f;
  --muted-2: #8b928c;
  --card: #ffffff;
  --line: #e4e1d9;
  --line-soft: #ece9e2;
  --primary: #1b6b53;
  --primary-strong: #124f3d;
  --primary-soft: #eaf2ee;
  --primary-line: #cfe2d8;
  --amber: #b9822a;
  --danger: #b4433b;
  --danger-soft: #f9ecea;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(27, 38, 31, 0.05), 0 8px 22px -16px rgba(27, 38, 31, 0.35);
  --shadow-md: 0 2px 4px rgba(27, 38, 31, 0.04), 0 24px 50px -30px rgba(27, 38, 31, 0.35);
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Inter Tight", Inter, ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
}
::selection { background: rgba(27, 107, 83, 0.18); }
img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button[disabled] { cursor: not-allowed; opacity: 0.55; }
:focus-visible { outline: 2px solid #7bb39d; outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -0.025em; margin: 0; font-weight: 600; }
p { margin: 0; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ==========================================================================
   Buttons, forms and shared bits
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--card);
  color: var(--fg);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background 140ms, border-color 140ms, box-shadow 140ms, transform 100ms;
}
.btn:active { transform: translateY(1px); }
.btn svg { flex: 0 0 auto; }
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #f4fbf8;
  box-shadow: 0 10px 22px -16px rgba(18, 79, 61, 0.9);
}
.btn-primary:hover { background: var(--primary-strong); border-color: var(--primary-strong); }
.btn-outline { background: var(--card); border-color: var(--line); }
.btn-outline:hover { border-color: #d3cfc5; background: #fdfcf9; }
.btn-quiet { background: transparent; border-color: transparent; color: var(--fg-soft); }
.btn-quiet:hover { background: #efede6; }
.btn-lg { height: 48px; padding: 0 22px; border-radius: 12px; font-size: 14px; }
.btn-sm { height: 34px; padding: 0 12px; border-radius: 8px; font-size: 12px; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--fg-soft);
  transition: background 140ms, border-color 140ms, color 140ms;
}
.icon-btn:hover { background: #efede6; color: var(--fg); }
.icon-btn:disabled { opacity: 0.35; }
.icon-btn:disabled:hover { background: transparent; }
.icon-btn.bordered { border-color: var(--line); background: var(--card); }
.text-link { color: var(--primary); font-weight: 600; font-size: 13px; }
.text-link:hover { text-decoration: underline; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 11.5px; font-weight: 600; color: #4b554e; }
.input,
.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #dcd8ce;
  border-radius: 9px;
  background: #fdfcf9;
  color: var(--fg);
  font-size: 13px;
  outline: none;
  transition: border-color 140ms, box-shadow 140ms, background 140ms;
}
.input:focus,
.field input:focus {
  border-color: #9cc4b1;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(27, 107, 83, 0.1);
}
.field .hint { font-size: 10.5px; color: var(--muted); }

.alert { border: 1px solid; border-radius: 10px; padding: 10px 13px; font-size: 12px; line-height: 1.55; }
.alert.error { background: var(--danger-soft); border-color: #eed2ce; color: #8e3a33; }
.alert.success { background: #edf7f2; border-color: #d2e7dc; color: #1a634c; }
.alert.note { background: #f5f4ef; border-color: #e5e1d8; color: #555f58; }

.flash-stack { display: grid; gap: 8px; margin: 0 0 18px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 10.5px;
  color: var(--fg-soft);
}

/* ==========================================================================
   Brand
   ========================================================================== */

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, #225f4b 0%, #113c2e 100%);
  color: #edf7f1;
  box-shadow: 0 8px 18px -12px rgba(17, 60, 46, 0.85), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 15.5px; font-weight: 650; letter-spacing: -0.015em; }
.brand-tag { margin-top: 2px; font-size: 9.5px; color: var(--muted); letter-spacing: 0.02em; }
.brand-sm .brand-mark { width: 29px; height: 29px; border-radius: 8px; }
.brand-sm .brand-name { font-size: 14px; }

/* ==========================================================================
   Landing
   ========================================================================== */

.site { overflow-x: hidden; }
.site-shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(226, 223, 214, 0.75);
  background: rgba(247, 246, 242, 0.82);
  backdrop-filter: blur(14px) saturate(1.1);
}
.site-header .site-shell { display: flex; align-items: center; gap: 26px; height: 68px; }
.site-nav { display: flex; align-items: center; gap: 24px; margin-left: 20px; }
.site-nav a { font-size: 12.5px; font-weight: 500; color: #58625b; }
.site-nav a:hover { color: var(--fg); }
.site-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.site-actions .btn { height: 36px; padding: 0 13px; font-size: 12px; border-radius: 8px; }

.hero { position: relative; padding: 70px 0 76px; }
.hero::before {
  content: "";
  position: absolute;
  inset: -180px -30% auto -30%;
  height: 620px;
  background: radial-gradient(54% 60% at 60% 30%, rgba(211, 232, 221, 0.75), transparent 70%),
    radial-gradient(40% 50% at 10% 5%, rgba(240, 231, 212, 0.8), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr); gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid #d9e7df;
  border-radius: 999px;
  background: rgba(234, 242, 238, 0.9);
  color: #20624e;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.eyebrow .pulse { width: 5px; height: 5px; border-radius: 999px; background: #2a9a72; box-shadow: 0 0 0 3px rgba(42, 154, 114, 0.14); }
.hero h1 { margin: 20px 0 18px; font-size: clamp(42px, 5.6vw, 66px); letter-spacing: -0.035em; line-height: 0.98; }
.hero h1 em { font-style: normal; color: var(--primary); position: relative; }
.hero h1 em::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 4px;
  height: 8px;
  z-index: -1;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(173, 213, 194, 0.55), rgba(214, 232, 221, 0.2));
}
.hero-lede { font-size: 16px; line-height: 1.65; color: #556058; max-width: 46ch; }
.hero-ctas { display: flex; align-items: center; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 30px; padding-top: 22px; border-top: 1px solid rgba(219, 216, 207, 0.8); }
.proof { display: flex; flex-direction: column; gap: 2px; }
.proof strong { font-size: 17px; font-weight: 650; letter-spacing: -0.02em; }
.proof span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

.hero-art {
  position: relative;
  min-height: 600px;
  border-radius: 30px;
  border: 1px solid rgba(28, 66, 52, 0.12);
  background:
    radial-gradient(80% 60% at 80% 8%, rgba(255, 255, 255, 0.5), transparent 60%),
    linear-gradient(150deg, #e8f1eb 0%, #dfeae2 40%, #cadcd2 100%);
  overflow: hidden;
  box-shadow: 0 40px 80px -50px rgba(24, 56, 43, 0.6);
}
.hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(20, 55, 41, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(20, 55, 41, 0.055) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000 30%, transparent 96%);
}
.hero-orbit {
  position: absolute;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(19, 64, 46, 0.1);
  border-radius: 50%;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
}
.hero-orbit.two { width: 560px; height: 560px; opacity: 0.6; }
.hero-phones { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.hero-phone-main { position: relative; z-index: 2; filter: drop-shadow(0 36px 50px rgba(17, 50, 36, 0.28)); }
.hero-phone-back {
  position: absolute;
  z-index: 1;
  left: 6%;
  top: 12%;
  transform: rotate(-8deg);
  transform-origin: top left;
  opacity: 0.96;
  filter: drop-shadow(0 30px 44px rgba(17, 50, 36, 0.22));
}
.hero-phone-main .mini-phone { border-radius: 40px; }
.hero-badge {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 32px -24px rgba(19, 54, 39, 0.55);
  backdrop-filter: blur(8px);
  font-size: 10.5px;
  font-weight: 500;
  color: #2d453a;
}
.hero-badge strong { display: block; font-size: 11px; font-weight: 650; color: #1d3a2d; }
.hero-badge span { display: block; font-size: 9px; color: #75847a; margin-top: 1px; }
.hero-badge-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  flex: 0 0 auto;
}
.hero-badge.a { right: 5%; top: 14%; }
.hero-badge.b { left: 3%; bottom: 17%; }
.hero-badge.c { right: 7%; bottom: 9%; }
.hero-note { position: absolute; left: 26px; top: 24px; z-index: 3; font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: #5d7a6b; font-weight: 600; }

.logo-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fbfaf7; }
.logo-strip .site-shell { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 19px 0; flex-wrap: wrap; }
.logo-strip span { font-size: 11px; color: #8a918b; }
.logo-strip .wordmark { font-family: var(--font-display); font-size: 13px; font-weight: 600; color: #6c756e; letter-spacing: -0.01em; }

.section { padding: 78px 0; }
.section.tight { padding: 58px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.section-head .kicker { font-size: 10px; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary); margin-bottom: 9px; }
.section-head h2 { font-size: clamp(27px, 3.4vw, 38px); letter-spacing: -0.03em; }
.section-head p { max-width: 46ch; color: var(--muted); font-size: 13.5px; line-height: 1.65; }

.template-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.template-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.template-card:hover { transform: translateY(-4px); border-color: #d5d1c7; box-shadow: var(--shadow-md); }
.template-visual {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 248px;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(155deg, #f5f3ed 0%, #ebe9e2 55%, #e0e8e2 100%);
}
.template-visual.dark { background: radial-gradient(110% 80% at 50% 0%, #2c3339 0%, #161a1e 65%, #0b0e11 100%); }
.template-visual .mini-phone { position: absolute; top: 26px; }
.template-visual::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 55px;
  background: linear-gradient(to top, rgba(244, 242, 236, 0.85), transparent);
  pointer-events: none;
}
.template-visual.dark::after { background: linear-gradient(to top, rgba(11, 14, 17, 0.75), transparent); }
.template-meta { display: flex; flex-direction: column; gap: 2px; padding: 12px 13px 14px; }
.template-meta strong { font-size: 12px; font-weight: 600; letter-spacing: -0.01em; }
.template-meta span { font-size: 10px; color: var(--muted); }
.template-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 10.5px; font-weight: 600; color: var(--primary); }

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.feature-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  padding: 22px 21px;
  box-shadow: var(--shadow-sm);
}
.feature-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); margin-bottom: 15px; border: 1px solid #dcebe3; }
.feature-card h3 { font-size: 15px; margin-bottom: 7px; letter-spacing: -0.02em; }
.feature-card p { font-size: 12px; color: var(--muted); line-height: 1.65; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 54px; align-items: center; }
.split-copy .kicker { font-size: 10px; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary); margin-bottom: 10px; }
.split-copy h2 { font-size: clamp(27px, 3.2vw, 38px); margin-bottom: 14px; }
.split-copy p { color: var(--muted); font-size: 13.5px; line-height: 1.7; margin-bottom: 18px; }
.check-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.check-list li { display: flex; gap: 9px; font-size: 12px; color: var(--fg-soft); line-height: 1.55; }
.check-list svg { flex: 0 0 auto; margin-top: 2px; color: var(--primary); }

.split-art {
  position: relative;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, #f3f0e9 0%, #e9efe9 60%, #dfe9e2 100%);
  padding: 34px;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.split-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(43, 65, 52, 0.14) 1px, transparent 0);
  background-size: 20px 20px;
  opacity: 0.6;
}
.split-art .mini-phone { position: relative; z-index: 1; filter: drop-shadow(0 26px 36px rgba(21, 52, 37, 0.26)); }
.inspector-float {
  position: absolute;
  z-index: 2;
  right: 22px;
  bottom: 26px;
  width: 208px;
  border: 1px solid #e4e0d7;
  border-radius: 14px;
  background: #fff;
  padding: 13px;
  box-shadow: 0 24px 50px -26px rgba(30, 48, 36, 0.4);
}
.inspector-float .row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.inspector-float .lbl { font-size: 9px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.inspector-float .val { font-size: 9.5px; color: var(--fg); font-weight: 600; }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.swatches span { height: 26px; border-radius: 6px; border: 1px solid rgba(0, 0, 0, 0.06); }
.font-row { display: flex; gap: 5px; margin-top: 9px; }
.font-row span { flex: 1; padding: 4px 0; text-align: center; border: 1px solid var(--line); border-radius: 5px; font-size: 9px; color: var(--muted); }
.font-row span.on { border-color: var(--primary-line); background: var(--primary-soft); color: var(--primary); font-weight: 600; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { border-top: 1px solid var(--line); padding-top: 20px; }
.step .n { display: inline-flex; align-items: center; justify-content: center; width: 23px; height: 23px; border-radius: 7px; background: var(--primary-soft); color: var(--primary); font-size: 10.5px; font-weight: 650; }
.step h3 { font-size: 15px; margin: 12px 0 6px; }
.step p { font-size: 12px; color: var(--muted); line-height: 1.65; }

.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 48px;
  color: #f2f8f4;
  background:
    radial-gradient(80% 130% at 90% 10%, rgba(63, 133, 105, 0.55), transparent 60%),
    linear-gradient(145deg, #123f30 0%, #0c2d22 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(80% 120% at 85% 0%, #000, transparent 70%);
}
.cta-band h2 { position: relative; font-size: clamp(26px, 3.4vw, 38px); color: #fff; margin-bottom: 8px; }
.cta-band p { position: relative; color: #b8cec2; font-size: 13px; max-width: 48ch; }
.cta-band .btn { position: relative; flex: 0 0 auto; background: #f7fbf9; border-color: #f7fbf9; color: #133d2e; }
.cta-band .btn:hover { background: #fff; }

.site-footer { border-top: 1px solid var(--line); background: #fbfaf7; padding: 44px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.footer-brand p { margin-top: 12px; font-size: 11.5px; color: var(--muted); max-width: 30ch; line-height: 1.65; }
.footer-col h4 { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 11px; font-family: var(--font-sans); font-weight: 600; }
.footer-col a { display: block; font-size: 11.5px; color: var(--fg-soft); margin-bottom: 7px; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line-soft); font-size: 10px; color: var(--muted); flex-wrap: wrap; }

/* ==========================================================================
   Auth
   ========================================================================== */

.auth-page { min-height: 100vh; display: flex; align-items: stretch; background: var(--bg); }
.auth-visual {
  position: relative;
  flex: 1 1 52%;
  min-height: 100vh;
  overflow: hidden;
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #eef6f1;
  background:
    radial-gradient(80% 70% at 85% 0%, rgba(78, 148, 118, 0.45), transparent 60%),
    linear-gradient(150deg, #123f30 0%, #0d3025 55%, #08241b 100%);
}
.auth-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(80% 90% at 50% 40%, #000, transparent 85%);
}
.auth-visual .brand { position: relative; color: #f1f8f4; }
.auth-visual .brand-tag { color: #a9c7b8; }
.auth-visual .brand-mark { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.16); box-shadow: none; }
.auth-stage { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px 0 10px; }
.auth-stage::before {
  content: "";
  position: absolute;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}
.auth-stage .mini-phone { filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.45)); }
.auth-quote { position: relative; max-width: 420px; }
.auth-quote p { font-family: var(--font-display); font-size: 19px; line-height: 1.4; letter-spacing: -0.02em; color: #e8f3ed; }
.auth-quote span { display: block; margin-top: 10px; font-size: 10.5px; color: #9bbcad; letter-spacing: 0.06em; text-transform: uppercase; }
.auth-quote .dots { display: flex; gap: 5px; margin-bottom: 18px; }
.auth-quote .dots span { width: 5px; height: 5px; border-radius: 50%; background: #4e876f; }
.auth-quote .dots span:first-child { width: 18px; border-radius: 999px; background: #7fb69f; }
.auth-main { flex: 1 1 48%; display: flex; align-items: center; justify-content: center; padding: 40px 28px; background: #fbfaf7; }
.auth-card { width: min(404px, 100%); }
.auth-card .mobile-brand { display: none; margin-bottom: 26px; }
.auth-head h1 { font-size: 30px; letter-spacing: -0.03em; margin-bottom: 7px; }
.auth-head p { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin: 22px 0 18px; padding: 3px; border-radius: 10px; background: #efede7; border: 1px solid #e7e4dc; }
.auth-tabs a { display: block; text-align: center; padding: 7px 0; border-radius: 7px; font-size: 11.5px; font-weight: 600; color: #6c746e; }
.auth-tabs a.active { background: #fff; color: var(--fg); box-shadow: 0 1px 3px rgba(30, 42, 34, 0.09); }
.auth-form { display: grid; gap: 12px; }
.auth-form .field > span { font-size: 10.5px; }
.auth-form .input { height: 42px; }
.auth-submit { margin-top: 4px; width: 100%; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: #9ba19a; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.1em; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: #e8e5dd; }
.auth-guest { width: 100%; }
.auth-foot { margin-top: 18px; font-size: 10.5px; color: var(--muted); text-align: center; line-height: 1.6; }
.auth-foot a { color: var(--primary); font-weight: 500; }
.auth-error { margin-bottom: 4px; }

/* ==========================================================================
   Studio shell
   ========================================================================== */

.studio-page { height: 100vh; overflow: hidden; background: #f2f1ec; }
.app-shell { height: 100vh; display: flex; flex-direction: column; }
.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 62px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: #fcfbf8;
  z-index: 40;
}
.topbar-left { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
.topbar-divider { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.doc-title { display: flex; flex-direction: column; min-width: 0; max-width: 420px; }
.doc-name {
  width: 100%;
  max-width: 380px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  padding: 2px 6px;
  margin-left: -6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
  outline: none;
  text-overflow: ellipsis;
}
.doc-name:hover { background: #f3f1eb; }
.doc-name:focus { background: #fff; border-color: #d7e2db; box-shadow: 0 0 0 2px rgba(27, 107, 83, 0.08); }
.save-state { display: flex; align-items: center; gap: 5px; padding-left: 6px; font-size: 9.5px; color: var(--muted); white-space: nowrap; line-height: 1.3; }
.save-state::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #b3b8b2; flex: 0 0 auto; }
.save-state.saved::before { background: #29956f; }
.save-state.dirty::before { background: #c08a2c; }
.save-state.saving::before { background: #4b91c9; animation: pulse-dot 1s infinite; }
.save-state.error::before { background: var(--danger); }
@keyframes pulse-dot { 50% { opacity: 0.35; } }
.topbar-actions { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.topbar-actions .btn { height: 33px; padding: 0 11px; font-size: 11.5px; border-radius: 8px; }
.topbar-actions .icon-btn { width: 32px; height: 32px; }
.topbar-actions .divider { width: 1px; height: 20px; background: var(--line); margin: 0 2px; }

.user-menu { position: relative; }
.avatar-btn { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 2px 7px 2px 2px; }
.avatar { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #e6f0eb; color: #1e614b; font-size: 10.5px; font-weight: 650; }
.user-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 7px);
  width: 212px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 24px 44px -24px rgba(25, 40, 30, 0.35);
  display: none;
  z-index: 60;
}
.user-pop.open { display: block; }
.user-pop .meta { padding: 7px 8px 9px; border-bottom: 1px solid var(--line-soft); margin-bottom: 5px; }
.user-pop .meta strong { display: block; font-size: 11px; font-weight: 600; }
.user-pop .meta span { display: block; font-size: 9.5px; color: var(--muted); margin-top: 2px; word-break: break-all; }
.user-pop button { display: flex; align-items: center; gap: 7px; width: 100%; border: 0; background: transparent; border-radius: 7px; padding: 7px 8px; font-size: 11px; text-align: left; }
.user-pop button:hover { background: #f3f1eb; }
.user-pop button.danger { color: var(--danger); }

.studio-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 252px minmax(0, 1fr) 330px; }
.library { min-height: 0; overflow-y: auto; border-right: 1px solid var(--line); background: #fbfaf7; padding: 13px 12px 24px; scrollbar-width: thin; scrollbar-color: #d8d4ca transparent; }
.library::-webkit-scrollbar { width: 8px; }
.library::-webkit-scrollbar-thumb { background: #dcd8ce; border-radius: 99px; border: 2px solid #fbfaf7; }
.library::-webkit-scrollbar-track { background: transparent; }
.workspace { position: relative; min-width: 0; display: flex; flex-direction: column; background-color: #f4f2ec; background-image: radial-gradient(circle at 1px 1px, rgba(45, 62, 51, 0.12) 1px, transparent 0); background-size: 22px 22px; }
.inspector { min-height: 0; display: flex; flex-direction: column; border-left: 1px solid var(--line); background: #fbfaf7; }

.lib-section { margin-bottom: 18px; }
.lib-head { display: flex; align-items: center; justify-content: space-between; margin: 0 3px 8px; font-size: 9px; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: #8c928c; }
.lib-head .lib-count { font-size: 8.5px; letter-spacing: 0; text-transform: none; color: #9da29d; font-weight: 500; }
.screen-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.screen-btn {
  display: flex; align-items: center; gap: 6px; min-width: 0;
  padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; font-size: 10.5px; font-weight: 500; color: var(--fg-soft);
  text-align: left; transition: border-color 140ms, background 140ms;
}
.screen-btn:hover { border-color: #d3cec3; }
.screen-btn.active { border-color: #b9d4c7; background: var(--primary-soft); color: var(--primary-strong); font-weight: 600; box-shadow: inset 0 0 0 1px rgba(27, 107, 83, 0.06); }
.screen-btn svg { flex: 0 0 auto; opacity: 0.75; }
.screen-btn.active svg { opacity: 1; }
.screen-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.new-design-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; height: 33px; margin-bottom: 13px;
  border: 1px dashed #d3cec2; border-radius: 8px;
  background: rgba(255, 255, 255, 0.55); color: #59635b; font-size: 10.5px; font-weight: 500;
}
.new-design-btn:hover { background: #fff; border-color: #bfcfc5; color: var(--primary); }

.preset-list { display: flex; flex-direction: column; gap: 3px; }
.preset-btn { display: flex; align-items: center; gap: 9px; width: 100%; padding: 5px 6px; border: 1px solid transparent; border-radius: 8px; background: transparent; text-align: left; }
.preset-btn:hover { background: #f2f0e9; }
.preset-btn.active { background: #fff; border-color: var(--line); box-shadow: 0 2px 5px rgba(37, 49, 40, 0.04); }
.preset-thumb { width: 34px; height: 54px; flex: 0 0 auto; overflow: hidden; border-radius: 4px; border: 1px solid rgba(20, 32, 24, 0.1); background: #0d1114; display: flex; align-items: center; justify-content: center; }
.preset-thumb .mini-phone { flex: 0 0 auto; }
.preset-copy { min-width: 0; }
.preset-name { font-size: 10.5px; font-weight: 500; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preset-hint { margin-top: 1px; font-size: 8.5px; color: #8b918b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.saved-list { display: flex; flex-direction: column; gap: 3px; }
.saved-item { display: flex; align-items: center; gap: 6px; padding: 6px 7px; border: 1px solid transparent; border-radius: 8px; background: transparent; text-align: left; width: 100%; }
.saved-item:hover { background: #f2f0e9; }
.saved-item.active { background: #fff; border-color: var(--line); }
.saved-copy { flex: 1; min-width: 0; }
.saved-name { font-size: 10.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saved-meta { font-size: 8.5px; color: #8b918b; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saved-del { display: grid; place-items: center; width: 22px; height: 22px; border: 0; background: transparent; border-radius: 5px; color: #a3a8a2; opacity: 0; flex: 0 0 auto; }
.saved-item:hover .saved-del { opacity: 1; }
.saved-del:hover { background: #f9ecea; color: var(--danger); }
.lib-empty { border: 1px dashed #ddd8cc; border-radius: 9px; padding: 12px 10px; font-size: 9.5px; color: #8b918b; line-height: 1.55; background: rgba(255, 255, 255, 0.45); }
.lib-note { margin-top: 14px; padding: 9px 10px; border: 1px solid #e7e3da; border-radius: 8px; background: #f7f5ef; font-size: 9px; line-height: 1.6; color: #81877f; }
.lib-note strong { color: #5c665e; font-weight: 600; }

.workspace-toolbar {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 50px; padding: 0 15px;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 249, 245, 0.82);
  backdrop-filter: blur(10px);
}
.ws-tools { display: flex; align-items: center; gap: 12px; }
.ws-tool-label { font-size: 10px; font-weight: 500; color: var(--muted); }
.edit-switch { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--fg-soft); font-weight: 500; user-select: none; }
.zoom-group { display: flex; align-items: center; gap: 5px; }
.zoom-btn { height: 26px; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 0 8px; font-size: 9.5px; color: var(--fg-soft); }
.zoom-select { height: 26px; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 0 4px; font-size: 9.5px; color: var(--fg-soft); }
.stage-info { font-size: 9px; color: #8e948e; font-variant-numeric: tabular-nums; min-width: 84px; text-align: right; }
.canvas-scroller { flex: 1; min-height: 0; overflow: auto; display: flex; align-items: flex-start; justify-content: flex-start; padding: 30px; scrollbar-width: thin; scrollbar-color: #d5d1c6 transparent; }
.canvas-scroller::-webkit-scrollbar { width: 9px; height: 9px; }
.canvas-scroller::-webkit-scrollbar-thumb { background: #d7d3c8; border-radius: 999px; border: 2px solid #f4f2ec; }
.canvas-centre { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; margin: auto; }
.stage-fit { position: relative; flex: 0 0 auto; }
.stage-inner { transform-origin: top left; }
.stage-inner .shot-stage { overflow: hidden; }
.workspace-hint { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: 6px; height: 32px; border-top: 1px solid rgba(228, 225, 217, 0.7); font-size: 9.5px; color: #8b918b; background: rgba(250, 249, 245, 0.6); }
.workspace-hint kbd { font-family: var(--font-mono); font-size: 8.5px; padding: 1px 4px; border: 1px solid #ddd8cd; border-radius: 3px; background: #fff; color: #6c746d; }

.inspector-head { flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 14px 14px 10px; }
.inspector-eyebrow { font-size: 8.5px; font-weight: 650; letter-spacing: 0.13em; text-transform: uppercase; color: #8d938d; }
.inspector-title { font-family: var(--font-display); font-size: 15px; font-weight: 600; letter-spacing: -0.015em; margin-top: 1px; }
.inspector-head .icon-btn { margin-top: -2px; width: 26px; height: 26px; }
.insp-tabs { flex: 0 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin: 0 14px 12px; padding: 3px; border: 1px solid #e8e4dc; border-radius: 8px; background: #f1efe9; }
.insp-tab { border: 0; border-radius: 6px; background: transparent; padding: 6px 0; font-size: 10px; font-weight: 500; color: #777f78; }
.insp-tab.active { background: #fff; color: var(--fg); box-shadow: 0 1px 3px rgba(33, 47, 38, 0.09); font-weight: 600; }
.inspector-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 14px 26px; scrollbar-width: thin; scrollbar-color: #d8d4ca transparent; }
.inspector-body::-webkit-scrollbar { width: 8px; }
.inspector-body::-webkit-scrollbar-thumb { background: #d8d4ca; border-radius: 99px; border: 2px solid #fbfaf7; }
.insp-section { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.insp-section:first-child { padding-top: 4px; }
.insp-section:last-child { border-bottom: 0; }
.insp-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.insp-title { font-size: 11.5px; font-weight: 600; letter-spacing: -0.005em; }
.insp-hint { font-size: 9.5px; line-height: 1.5; color: #8a908a; margin-top: 2px; }
.insp-link { border: 0; background: none; padding: 0; font-size: 9.5px; font-weight: 500; color: var(--primary); white-space: nowrap; }
.insp-link:hover { text-decoration: underline; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.field-grid.one { grid-template-columns: 1fr; }
.ins-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 9px; font-weight: 500; color: #6e776f; }
.ins-field.full { grid-column: 1 / -1; }
.ins-field > span { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.ins-field input[type="text"],
.ins-field input[type="number"],
.ins-field select {
  width: 100%; height: 29px; padding: 0 7px;
  border: 1px solid #ddd9cf; border-radius: 6px;
  background: #fff; color: var(--fg); font-size: 11px;
  outline: none; min-width: 0;
  transition: border-color 130ms, box-shadow 130ms;
}
.ins-field input:focus, .ins-field select:focus { border-color: #9dc5b2; box-shadow: 0 0 0 2px rgba(27, 107, 83, 0.09); }
.ins-field select { padding-right: 4px; }
.ins-field input[type="color"] { width: 24px; height: 24px; border: 1px solid #dedad0; border-radius: 6px; background: #fff; padding: 1px; }
.segmented { display: flex; gap: 2px; padding: 2px; border: 1px solid #e5e1d8; border-radius: 7px; background: #f2f0ea; }
.segmented button { flex: 1; min-width: 0; border: 0; border-radius: 5px; background: transparent; padding: 5px 2px; font-size: 9.5px; color: #777f78; white-space: nowrap; }
.segmented button.active { background: #fff; color: var(--fg); box-shadow: 0 1px 2px rgba(30, 42, 34, 0.08); font-weight: 600; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.choice-grid.three { grid-template-columns: repeat(3, 1fr); }
.choice {
  display: flex; align-items: center; gap: 6px; min-width: 0;
  padding: 6px 7px; border: 1px solid #e2ded4; border-radius: 7px;
  background: #fff; font-size: 9.5px; font-weight: 500; color: #555f57; text-align: left;
}
.choice:hover { border-color: #cfc9bc; }
.choice.active { border-color: #b7d3c5; background: #eef6f1; color: #1c5f48; font-weight: 600; }
.choice .swatch { width: 16px; height: 16px; border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.08); flex: 0 0 auto; }
.choice .mini-dot { width: 5px; height: 5px; border-radius: 50%; background: #2c946d; flex: 0 0 auto; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 10.5px; color: #48524b; }
.toggle-row .tiny-hint { font-size: 8.5px; color: #959b95; margin-top: 1px; }
.switch { position: relative; width: 31px; height: 18px; flex: 0 0 auto; border: 0; border-radius: 999px; background: #dedad1; padding: 0; transition: background 160ms; }
.switch::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); transition: left 160ms; }
.switch.on { background: var(--primary); }
.switch.on::after { left: 15px; }
.slider-row { display: flex; align-items: center; gap: 8px; }
.slider-row input[type="range"] { flex: 1; height: 3px; accent-color: var(--primary); }
.slider-out { min-width: 32px; text-align: right; font-size: 9.5px; color: #7d857e; font-variant-numeric: tabular-nums; }
.color-list { display: grid; gap: 4px; }
.color-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 7px; border: 1px solid #e4e0d7; border-radius: 7px; background: #fff; font-size: 10px; }
.color-left { display: flex; align-items: center; gap: 6px; min-width: 0; }
.color-swatch { width: 15px; height: 15px; border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.09); flex: 0 0 auto; }
.color-row code { font-family: var(--font-mono); font-size: 8px; text-transform: uppercase; color: #929892; }
.edit-list { display: grid; gap: 5px; }
.edit-item { border: 1px solid #e4e0d7; border-radius: 8px; background: #fff; overflow: hidden; }
.edit-item summary { list-style: none; display: flex; align-items: center; gap: 6px; padding: 6px 7px; font-size: 10px; font-weight: 500; cursor: pointer; user-select: none; }
.edit-item summary::-webkit-details-marker { display: none; }
.edit-item summary .chev { margin-left: auto; color: #a2a7a1; transition: transform 150ms; flex: 0 0 auto; }
.edit-item[open] summary .chev { transform: rotate(90deg); }
.edit-item summary .sym { font-weight: 600; }
.edit-item summary .sum { margin-left: auto; font-size: 9px; color: #8d938c; }
.edit-item[open] summary .sum { display: none; }
.edit-body { padding: 1px 7px 8px; border-top: 1px solid #f1eee7; display: grid; gap: 6px; }
.edit-body .field-grid { gap: 5px; }
.edit-body .ins-field input, .edit-body .ins-field select { height: 27px; font-size: 10.5px; }
.mini-delete { width: 20px; height: 20px; border: 0; border-radius: 4px; background: transparent; color: #a3a8a2; display: grid; place-items: center; flex: 0 0 auto; }
.mini-delete:hover { background: #f9ecea; color: var(--danger); }
.add-btn { display: flex; align-items: center; justify-content: center; gap: 5px; width: 100%; height: 28px; margin-top: 2px; border: 1px dashed #d7d2c7; border-radius: 6px; background: transparent; color: #727b74; font-size: 9.5px; font-weight: 500; }
.add-btn:hover { border-color: #b8cfc2; background: #f8fbf9; color: var(--primary); }
.insp-note { border: 1px solid #e6e2d9; background: #f7f5ef; border-radius: 8px; padding: 8px 9px; font-size: 9px; line-height: 1.6; color: #81887f; }
.insp-note strong { color: #59645b; font-weight: 600; }

.panel-scrim { display: none; position: fixed; inset: 0; z-index: 45; background: rgba(24, 33, 27, 0.4); backdrop-filter: blur(2px); }
.rail-toggle, .inspector-toggle { display: none; }
.inspector-head #closeInspector { display: none; }

/* Export dialog */
.modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 18px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(19, 28, 22, 0.46); backdrop-filter: blur(6px); }
.modal-card {
  position: relative; width: min(466px, 100%); max-height: 92vh; overflow-y: auto;
  border: 1px solid #e2ded4; border-radius: 18px; background: #fff;
  padding: 22px; box-shadow: 0 40px 90px -30px rgba(18, 35, 25, 0.5);
}
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.modal-head h2 { font-size: 19px; letter-spacing: -0.025em; }
.modal-head p { margin-top: 5px; font-size: 11px; color: var(--muted); line-height: 1.55; }
.modal-close { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 7px; background: #fff; display: grid; place-items: center; color: #788078; }
.scale-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin: 16px 0 10px; }
.scale-btn { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 9px 4px; font-size: 11px; font-weight: 600; color: #5b655d; text-align: center; }
.scale-btn small { display: block; margin-top: 2px; font-size: 8.5px; font-weight: 400; color: #8b928b; }
.scale-btn.active { border-color: #b6d2c4; background: var(--primary-soft); color: var(--primary-strong); box-shadow: inset 0 0 0 1px rgba(27, 107, 83, 0.08); }
.export-summary { border: 1px solid var(--line); border-radius: 9px; background: #fbfaf6; padding: 10px 12px; display: grid; gap: 5px; font-size: 10.5px; }
.export-summary .row { display: flex; justify-content: space-between; gap: 10px; }
.export-summary .row span:first-child { color: var(--muted); }
.export-summary .row span:last-child { font-weight: 500; text-align: right; }
.export-note { margin-top: 10px; font-size: 9.5px; color: #8b918b; line-height: 1.55; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 16px; }
.modal-actions .btn { height: 38px; font-size: 11.5px; }
.export-close-row { display: flex; justify-content: flex-end; margin-top: 8px; }
.busy-spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.45); border-top-color: #fff; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: grid; gap: 7px; width: min(320px, calc(100% - 36px)); }
.toast {
  display: flex; align-items: flex-start; gap: 8px;
  border: 1px solid #e2ded4; border-radius: 9px; background: #fff;
  padding: 9px 11px; font-size: 10.5px; line-height: 1.5; color: #4a554c;
  box-shadow: 0 18px 40px -22px rgba(25, 39, 29, 0.4);
  animation: toast-in 180ms ease;
}
.toast.error { border-color: #eed2ce; background: #fdf4f2; color: #8f3a33; }
.toast.success { border-color: #d2e7dc; background: #f4fbf7; color: #1a634c; }
.toast .dot { width: 5px; height: 5px; margin-top: 5px; border-radius: 50%; background: currentColor; flex: 0 0 auto; opacity: 0.7; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }

/* Screen icons in the library */
.screen-ico { width: 14px; height: 14px; display: block; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1240px) {
  .studio-body { grid-template-columns: 224px minmax(0, 1fr) 312px; }
  .hero-grid { gap: 30px; }
  .template-visual { height: 226px; }
}

@media (max-width: 1120px) {
  .site-nav { display: none; }
  .hero { padding: 52px 0 60px; }
  .hero-art { min-height: 540px; }
  .hero-badge.a { top: 9%; }
  .hero-badge.c { display: none; }
  .template-grid { grid-template-columns: repeat(3, 1fr); }
  .template-card:nth-child(4), .template-card:nth-child(5) { display: none; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .split { gap: 30px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-col:last-child { display: none; }

  .studio-body { grid-template-columns: 224px minmax(0, 1fr); }
  .inspector {
    position: fixed; top: 62px; right: 0; bottom: 0; width: 330px; z-index: 50;
    transform: translateX(100%); transition: transform 220ms ease; box-shadow: -20px 0 50px -40px rgba(20, 32, 23, 0.4);
  }
  .app-shell.inspector-open .inspector { transform: translateX(0); }
  .app-shell.inspector-open .panel-scrim { display: block; }
  .topbar-actions .inspector-toggle { display: inline-flex; }
  .inspector-head #closeInspector { display: grid; }
  .doc-title { max-width: 300px; }
}

@media (max-width: 900px) {
  .site-shell { width: calc(100% - 34px); }
  .site-header .site-shell { height: 62px; }
  .site-actions .btn-quiet { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { min-height: 560px; max-width: 520px; margin: 8px auto 0; width: 100%; }
  .hero h1 { max-width: 16ch; }
  .section { padding: 58px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 24px; }
  .template-grid { grid-template-columns: repeat(2, 1fr); }
  .template-card:nth-child(3) { display: none; }
  .split { grid-template-columns: 1fr; }
  .split-art { min-height: 430px; order: -1; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 32px 26px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .auth-visual { display: none; }
  .auth-main { min-height: 100vh; padding: 28px 20px; }
  .auth-card .mobile-brand { display: inline-flex; }
  .auth-card { width: min(420px, 100%); }

  .studio-body { display: block; position: relative; }
  .workspace { height: 100%; }
  .library {
    position: fixed; top: 62px; bottom: 0; left: 0; width: 270px; z-index: 50;
    transform: translateX(-100%); transition: transform 220ms ease; box-shadow: 20px 0 50px -40px rgba(20, 32, 23, 0.4);
  }
  .app-shell.rail-open .library { transform: translateX(0); }
  .app-shell.rail-open .panel-scrim { display: block; }
  .topbar-actions .rail-toggle, .topbar-left .rail-toggle { display: inline-flex; }
  .topbar .brand-text { display: none; }
  .topbar-actions .shuffle-label { display: none; }
  .topbar-actions .btn-outline .btn-label { display: none; }
  .doc-title { max-width: 190px; }
  .doc-name { font-size: 12px; }
}

@media (max-width: 640px) {
  .site-shell { width: calc(100% - 28px); }
  .site-header .brand-tag { display: none; }
  .site-actions .btn-primary { padding: 0 10px; font-size: 11px; }
  .hero { padding: 38px 0 46px; }
  .hero h1 { font-size: clamp(36px, 10vw, 48px); }
  .hero-lede { font-size: 14px; }
  .hero-ctas .btn { flex: 1; }
  .hero-proof { gap: 16px; }
  .hero-art { min-height: 480px; }
  .hero-phone-main { transform: scale(0.82); }
  .hero-phone-back { display: none; }
  .hero-badge.a, .hero-badge.b { display: none; }
  .logo-strip .site-shell { justify-content: center; }
  .logo-strip .wordmark:nth-child(n+4) { display: none; }
  .template-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .template-visual { height: 190px; }
  .template-meta { padding: 10px 11px 12px; }
  .feature-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .cta-band { padding: 28px 22px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
  .auth-card h1 { font-size: 26px; }
  .topbar { height: 58px; padding: 0 9px; gap: 6px; }
  .topbar .brand { display: none; }
  .topbar-divider { display: none; }
  .doc-title { max-width: 150px; }
  .topbar-actions { gap: 4px; }
  .topbar-actions .btn { padding: 0 9px; }
  .topbar-actions .icon-btn { width: 29px; height: 29px; }
  .topbar-actions .avatar-btn { padding: 2px; }
  .avatar-btn .chev { display: none; }
  .workspace-toolbar { height: 44px; padding: 0 10px; }
  .ws-tool-label, .stage-info { display: none; }
  .canvas-scroller { padding: 16px 10px; }
  .workspace-hint { display: none; }
  .library { top: 58px; }
  .inspector { top: 58px; width: min(340px, 92vw); }
  .modal-card { padding: 18px; }
  .modal-actions { grid-template-columns: 1fr; }
}
