/* PreChat site — light (teal) default, dark (Lovable lime) via data-theme="dark" */

:root,
html[data-theme="light"] {
  --bg: #ffffff;
  --bg-elevated: #ffffff;
  --surface: #f4f6f5;
  --ink: #102028;
  --muted: #3d4a54;
  --primary: #0d8f7b;
  --primary-hover: #0b7a69;
  --primary-fg: #ffffff;
  --line: #cfd6d4;
  --border: #cfd6d4;
  --bad: #c0392b;
  --soft: #eef3f1;
  --hero-glow: rgba(15, 166, 142, 0.12);
  --radius: 0.35rem;
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --max: 72rem;
  --header-bg: rgba(255, 255, 255, 0.92);
}

html[data-theme="dark"] {
  --bg: oklch(0.16 0.012 260);
  --bg-elevated: oklch(0.205 0.014 260);
  --surface: oklch(0.19 0.013 260);
  --ink: oklch(0.97 0.005 260);
  --muted: oklch(0.7 0.015 260);
  --primary: oklch(0.88 0.21 122);
  --primary-hover: oklch(0.84 0.2 122);
  --primary-fg: oklch(0.19 0.03 130);
  --line: oklch(1 0 0 / 12%);
  --border: oklch(1 0 0 / 12%);
  --bad: oklch(0.62 0.2 25);
  --soft: oklch(0.205 0.014 260);
  --hero-glow: oklch(0.88 0.21 122 / 0.08);
  --header-bg: oklch(0.16 0.012 260 / 0.88);
  /* legacy aliases used by cabinet */
  --teal: var(--primary);
  --teal-dark: var(--primary-hover);
}

:root {
  --teal: var(--primary);
  --teal-dark: var(--primary-hover);
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; }
html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .font-display, .brand-word {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

a { color: var(--primary); text-decoration: none; }
a:hover { opacity: 0.9; }

.container, .wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.container-narrow { max-width: 48rem; margin: 0 auto; padding: 0 1.25rem; }

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(10px);
}
.site-header .inner,
.site-header.container,
.site-header.wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  max-width: var(--max);
  margin: 0 auto;
}
.site-header .logo, .brand, .logo {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
}
.site-header .logo img, .brand img, .logo img {
  width: 32px; height: 32px; border-radius: 8px;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.2rem;
}
.site-nav a, .site-nav button.linkish {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  opacity: 0.92;
  background: none;
  border: none;
  padding: 0.45rem 0.65rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  border-radius: var(--radius);
  transition: color .15s, background .15s, opacity .15s;
}
.site-nav a:hover, .site-nav a.active, .site-nav button.linkish:hover {
  color: var(--ink);
  opacity: 1;
  background: var(--surface);
}
.site-nav .btn-nav {
  margin-left: 0.35rem;
  background: var(--primary);
  color: var(--primary-fg) !important;
  opacity: 1;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
}
.site-nav .btn-nav:hover { opacity: 0.92; color: var(--primary-fg) !important; background: var(--primary-hover); }
.theme-toggle {
  width: auto;
  min-width: 2.1rem;
  height: 2.1rem;
  padding: 0 0.55rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-sans);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin-left: 0.25rem;
}
.theme-toggle:hover { background: var(--soft); }

/* —— Buttons —— */
.btn, .primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  background: var(--primary);
  color: var(--primary-fg) !important;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .15s, background .15s, color .15s;
}
.btn:hover, .primary:hover {
  opacity: 0.95;
  background: var(--primary-hover);
  color: var(--primary-fg) !important;
}
.btn.ghost, .ghost, a.btn.ghost {
  background: var(--surface) !important;
  color: var(--ink) !important;
  border: 1px solid var(--border);
}
.btn.ghost:hover, .ghost:hover, a.btn.ghost:hover {
  background: var(--soft) !important;
  color: var(--ink) !important;
  border-color: color-mix(in srgb, var(--ink) 22%, var(--border));
  opacity: 1;
}
.btn.wide, .primary.wide, .btn.solid { width: 100%; }
.btn.is-disabled, a.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.75rem;
}

/* —— Hero —— */
.hero-block {
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.hero-block .hero-copy {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.5rem 1.25rem 2.5rem;
}
.brand-word {
  font-size: clamp(2.75rem, 8vw, 4.5rem);
  font-weight: 700;
  margin: 0;
  line-height: 1;
}
.hero-block h1 {
  margin: 1.25rem auto 0;
  max-width: 44rem;
  font-size: clamp(1.55rem, 3.8vw, 2.65rem);
  font-weight: 700;
  line-height: 1.2;
}
.hero-block .lead {
  margin: 1rem auto 0;
  max-width: 32rem;
  font-size: 1.1rem;
  color: var(--muted);
}
.hero-visual {
  width: 100%;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.hero-visual img {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  object-position: top center;
}
.hero-mock {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 0;
  max-width: var(--max);
  margin: 0 auto;
  min-height: 280px;
  text-align: left;
}
@media (max-width: 760px) {
  .hero-mock { grid-template-columns: 1fr; }
}
.hero-mock .pane {
  padding: 1.25rem;
  border-right: 1px solid var(--border);
}
.hero-mock .pane:last-child { border-right: none; border-left: 1px solid var(--border); }
@media (max-width: 760px) {
  .hero-mock .pane { border-right: none; border-left: none; border-bottom: 1px solid var(--border); }
  .hero-mock .pane:last-child { border-bottom: none; }
}
.bubble-in {
  max-width: 85%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  font-size: 0.82rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.bubble-out {
  max-width: 70%;
  margin-left: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  font-size: 0.82rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.draft-box {
  border: 1px solid color-mix(in srgb, var(--primary) 45%, var(--border));
  background: color-mix(in srgb, var(--primary) 10%, var(--bg));
  border-radius: var(--radius);
  padding: 0.85rem;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--ink);
}

/* —— Sections —— */
.band {
  border-bottom: 1px solid var(--border);
}
.band-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 4rem 1.25rem;
}
.band h2 {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 700;
  margin: 0;
}
.band .sub {
  margin: 0.75rem 0 0;
  max-width: 36rem;
  color: var(--muted);
}
.step-grid {
  display: grid;
  gap: 2.25rem;
  margin-top: 2.5rem;
}
@media (min-width: 800px) {
  .step-grid { grid-template-columns: repeat(3, 1fr); }
}
.step-n {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}
.step-grid h3 {
  margin: 0.4rem 0 0;
  font-size: 1.2rem;
}
.step-grid p {
  margin: 0.5rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}
.mock-card {
  margin-top: 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem;
}
.mock-dots { display: flex; gap: 0.35rem; margin-bottom: 0.75rem; }
.mock-dots span {
  width: 0.45rem; height: 0.45rem; border-radius: 50%;
  background: color-mix(in srgb, var(--muted) 40%, transparent);
}

.use-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.use-list li {
  display: grid;
  gap: 0.35rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--border);
}
.use-list li:last-child { border-bottom: none; }
@media (min-width: 640px) {
  .use-list li {
    grid-template-columns: minmax(0, 16rem) 1fr;
    gap: 1.5rem;
    align-items: baseline;
  }
}
.use-list strong { font-size: 1.05rem; }
.use-list span { color: var(--muted); }

.web-feats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  margin-top: 1.5rem;
}
.web-feats div { max-width: 14rem; }
.web-feats strong { display: block; }
.web-feats span { display: block; margin-top: 0.25rem; font-size: 0.9rem; color: var(--muted); }

/* —— Pricing cards —— */
.pricing-cards, .plan-grid, .packages {
  display: grid;
  gap: 1.15rem;
  margin-top: 2rem;
  text-align: left;
}
@media (min-width: 800px) {
  .pricing-cards, .plan-grid, .packages { grid-template-columns: repeat(3, 1fr); }
}
.plan-card, .pricing-cards .card, .card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.25rem;
  background: var(--surface);
  color: var(--ink);
}
.plan-card.popular, .pricing-cards .card.popular {
  border-color: var(--primary);
}
.plan-card .name, .pricing-cards .card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}
.plan-card .amount, .pricing-cards .card .amount {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin: 0.65rem 0 0.25rem;
}
.plan-card .desc, .pricing-cards .card .desc {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0.5rem 0 1rem;
}
.plan-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.1rem;
  font-size: 0.88rem;
}
.plan-card li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
}
.plan-card li span:first-child { color: var(--muted); font-weight: 500; }
.plan-card li span:last-child { font-weight: 700; color: var(--ink); }
.ribbon {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--primary);
  color: var(--primary-fg);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  margin-bottom: 0.45rem;
}

.rates-list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.rates-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.rates-list li:last-child { border-bottom: none; }
.rates-list .val { color: var(--ink); font-weight: 600; }

/* —— Install steps —— */
.install-steps { list-style: none; margin: 2.5rem 0 0; padding: 0; }
.install-steps li {
  display: grid;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 640px) {
  .install-steps li { grid-template-columns: 4rem 1fr; }
}
.install-n {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  color: var(--primary);
  margin: 0;
}
.shot-ph {
  margin-top: 1rem;
  min-height: 8rem;
  display: grid;
  place-items: center;
  border: 1px dashed var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
}
.sticky-install {
  position: sticky;
  top: 3.6rem;
  z-index: 30;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(10px);
}
.sticky-install .inner {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

/* —— Footer —— */
.site-footer, footer {
  border-top: 1px solid var(--border);
  padding: 2.25rem 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.site-footer .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .site-footer .inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.site-footer .foot-brand {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}
.site-footer .links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
}
.site-footer a { color: var(--ink); opacity: 0.78; text-decoration: none; }
.site-footer a:hover { opacity: 1; }
.reqs { margin-top: 0.75rem; line-height: 1.7; font-size: 0.82rem; }

/* —— Misc / cabinet shared —— */
.muted { color: var(--muted); }
.tiny { font-size: 0.88rem; color: var(--muted); }
.hero-mock .tiny.muted { color: var(--muted); font-weight: 600; }
.err, .error { color: var(--bad); }
.hidden { display: none !important; }
.ok { color: var(--primary); font-weight: 700; }
.balance { font-size: 1.35rem; margin: 0.2rem 0 0.6rem; }
.section { margin: 2rem 0; }
.grid { display: grid; gap: 1rem; }
@media (min-width: 760px) {
  .grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}
.badge {
  display: inline-block; padding: 0.25rem 0.7rem; border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 15%, var(--bg));
  color: var(--primary); font-size: 0.82rem; font-weight: 700;
}
.usage {
  margin: 1rem 0 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.usage-bar {
  height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 0.55rem 0;
}
.usage-bar > span {
  display: block; height: 100%; background: var(--primary); border-radius: 999px;
}
.usage-meta { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.88rem; color: var(--muted); }
.ledger { list-style: none; padding: 0; margin: 0; font-size: 0.9rem; }
.ledger li {
  display: flex; justify-content: space-between; gap: 0.75rem;
  padding: 0.65rem 0; border-bottom: 1px solid var(--border);
}
.ledger .credit { color: var(--primary); white-space: nowrap; }
.ledger .debit { color: var(--bad); white-space: nowrap; }
.row { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.6rem; }
label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.82rem; font-weight: 600; margin: 0.7rem 0; }
input[type=email], input[type=password], input[type=text], input:not([type]), input[type=number], select, textarea {
  border: 1px solid var(--border); border-radius: 10px; padding: 0.7rem 0.8rem; font: inherit;
  background: var(--bg); color: var(--ink);
}
.tg { width: 100%; margin: 0.4rem 0 0.8rem; }
.email-fallback { margin-top: 0.75rem; }
.email-fallback summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.pay-banner {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  background: color-mix(in srgb, var(--primary) 10%, var(--bg));
}
main.cabinet-main { max-width: 960px; margin: 0 auto; padding: 0 24px 3rem; }
.card + .card { margin-top: 1rem; }
.card h1, .card h2 { margin-top: 0; }
.legal-body { max-width: 760px; padding: 1.5rem 0 3rem; }
.legal-body h2 { font-size: 1.15rem; margin-top: 1.5rem; }
.legal-body p, .legal-body li { color: var(--ink); }
ul.clean { margin: 0.4rem 0; padding-left: 1.15rem; }
.page-hero { padding: 2.5rem 0 1rem; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.75rem); margin: 0; }
.page-hero p { color: var(--muted); max-width: 36rem; margin: 0.85rem 0 0; font-size: 1.05rem; }
.final-cta {
  text-align: center;
  padding: 4.5rem 1.25rem;
}
.final-cta h2 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.25rem); }
.final-cta p { margin: 0.75rem auto 0; max-width: 28rem; color: var(--muted); }

.owner-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  padding: 1.2rem 1.25rem;
}
.owner-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 12px 0;
}
.owner-grid div {
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 12px;
}
.owner-grid span { display: block; font-size: 0.75rem; color: var(--muted); }
.owner-grid b { font-size: 1.15rem; }

/* legacy rates grid */
.rates { padding: 40px 0 80px; text-align: center; }
.rates-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.rates-grid .item {
  padding: 20px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
}
.rates-grid img { width: 64px; height: 64px; margin-bottom: 10px; border-radius: 14px; }
.rates-grid .price { font-size: 1.15rem; font-weight: 800; color: var(--primary); margin: 6px 0; }
.rates-grid h3 { font-size: 0.95rem; margin-bottom: 4px; }
.rates-grid p { font-size: 0.8rem; color: var(--muted); }

.install-browser-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .install-browser-grid { grid-template-columns: 1fr 1fr; }
}
.install-browser-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
}
.install-browser-card h2 {
  margin: 0 0 0.85rem;
  font-size: 1.15rem;
  font-family: var(--font-display);
}
.install-browser-card ol {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--ink);
  line-height: 1.55;
  font-size: 0.95rem;
}
.install-browser-card li { margin: 0.45rem 0; }
.install-browser-card li::marker { font-weight: 700; color: var(--primary); }

@media (max-width: 680px) {
  .rates-grid, .owner-grid { grid-template-columns: 1fr 1fr; }
  .site-nav a { padding: 0.35rem 0.45rem; font-size: 0.82rem; }
  .site-nav .btn-nav { display: none; }
}
@media (max-width: 900px) and (min-width: 681px) {
  .rates-grid { grid-template-columns: repeat(3, 1fr); }
}
