/* ============================================================
   AINCO Software — minimalist design system
   Inspired by quiet, considered industrial design.
   ============================================================ */

:root {
  --ink: #1d1d1f;
  --ink-soft: #6e6e73;
  --paper: #ffffff;
  --paper-soft: #f5f5f7;
  --accent: #2e86de;
  --accent-deep: #1b6ec2;
  --hairline: rgba(0, 0, 0, 0.08);
  --radius: 28px;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 700px; margin: 0 auto; padding: 0 24px; }

/* ---------------- Navigation ---------------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 52px;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--hairline);
}

.nav-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.nav-brand svg { height: 18px; width: auto; }

.brand-stack { display: flex; flex-direction: column; gap: 2.5px; line-height: 1; }
.nav-brand .brand-ainco { color: #58a1e6; font-weight: 800; font-size: 13.5px; letter-spacing: 0.04em; }
.nav-brand .brand-soft {
  font-size: 6.4px;
  font-weight: 600;
  letter-spacing: 0.345em;
  color: var(--ink);
  margin-left: 1px;
}

/* AI surface switcher */
.cgm-surfaces {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 44px 0 22px;
}

.cgm-surfaces button {
  border: 0;
  background: #e9e9ec;
  color: var(--ink-soft);
  font: 600 13px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.cgm-surfaces button:hover { background: #dededf; color: var(--ink); }
.cgm-surfaces button.active { background: var(--ink); color: #fff; }

.hero-logo { width: 200px; height: auto; margin: 0 auto 38px; display: block; }
.footer-logo { width: 120px; height: auto; margin-bottom: 12px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.nav-links a { transition: color 0.25s var(--ease); }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); font-weight: 500; }

.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 5px 14px;
  border-radius: 980px;
  font-weight: 500;
  transition: background 0.25s var(--ease);
}
.nav-cta:hover { background: var(--accent-deep); }

/* ---------------- Typography ---------------- */

.display {
  font-size: clamp(44px, 8vw, 88px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.025em;
}
.display em { font-style: italic; font-weight: 700; }

.headline {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.title {
  font-size: clamp(24px, 3.4vw, 36px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.lede {
  font-size: clamp(19px, 2.4vw, 26px);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
}

.body-lg { font-size: 19px; line-height: 1.55; color: var(--ink-soft); }
.body-md { font-size: 17px; line-height: 1.6; color: var(--ink-soft); }

.eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.accent { color: var(--accent); }

/* ---------------- Sections ---------------- */

.section { padding: 130px 0; }
.section-tight { padding: 90px 0; }
.section-dark { background: #000; color: #f5f5f7; }
.section-dark .lede, .section-dark .body-lg, .section-dark .body-md { color: #a1a1a6; }
.section-dark .eyebrow { color: #6db3f2; }
.section-dark .quote { color: #f5f5f7; }
.section-dark .accent { color: #6db3f2; }
.section-dark .walk { color: #f5f5f7; }
.quote-walk .quote { font-size: clamp(21px, 2.9vw, 34px); line-height: 1.45; }
.section-soft { background: var(--paper-soft); }

.center { text-align: center; }

.hero {
  padding: 190px 0 150px;
  text-align: center;
}

.hero .lede { max-width: 640px; margin: 28px auto 0; }

.hero-sub { padding: 158px 0 76px; }

.footer-brand { margin-bottom: 12px; }
.footer-brand svg { height: 22px; }
.footer-brand .brand-ainco { font-size: 16px; }
.footer-brand .brand-soft { font-size: 7.6px; }

/* ---------------- Buttons ---------------- */

.actions {
  display: flex;
  gap: 18px;
  justify-content: center;
  align-items: center;
  margin-top: 42px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-size: 17px;
  font-weight: 500;
  padding: 12px 28px;
  border-radius: 980px;
  transition: all 0.25s var(--ease);
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); transform: scale(1.02); }

.btn-ghost { color: var(--accent); }
.btn-ghost:hover { text-decoration: underline; }

.link-arrow {
  color: var(--accent);
  font-size: 17px;
  font-weight: 500;
}
.link-arrow::after { content: " \2192"; }
.link-arrow:hover { text-decoration: underline; }

/* ---------------- Cards & grids ---------------- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 70px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 70px;
}

.card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 44px 36px;
  text-align: left;
}

.section-dark .card { background: #161617; }
.section-soft .card { background: var(--paper); }

.card h3 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.card .num {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 22px;
}

.card p { font-size: 15.5px; line-height: 1.55; color: var(--ink-soft); }
.section-dark .card p { color: #a1a1a6; }
.section-dark .card h3 { color: #f5f5f7; }

/* ---------------- Stats band ---------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 80px;
  text-align: center;
}

.stat strong {
  display: block;
  font-size: clamp(34px, 4.5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat span {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-soft);
}

.section-dark .stat span { color: #a1a1a6; }

/* ---------------- Demo / device frame ---------------- */

.frame {
  margin: 80px auto 0;
  max-width: 760px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  text-align: left;
}

.frame-bar {
  display: flex;
  gap: 7px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--hairline);
}

.frame-bar i {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #e3e3e6;
}

.frame-body { padding: 36px 40px 44px; }

.chat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.chat-bubble {
  border-radius: 16px;
  padding: 18px 22px;
  font-size: 16px;
  line-height: 1.55;
}

.chat-before {
  background: #fff3f1;
  border: 1px solid #ffd9d4;
  color: #3a3a3c;
}

.chat-before mark {
  background: #ffd9d4;
  color: #c0392b;
  border-radius: 4px;
  padding: 0 4px;
  font-weight: 500;
}

.chat-after {
  background: #f0f7ff;
  border: 1px solid #cfe5fb;
  color: #3a3a3c;
}

.chat-after mark {
  background: #d8eafc;
  color: var(--accent-deep);
  border-radius: 4px;
  padding: 0 4px;
  font-weight: 500;
}

.chat-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 26px 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chat-divider::before, .chat-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hairline);
}

/* ---------------- Layers (technology) ---------------- */

.layers { margin-top: 70px; display: grid; gap: 20px; }

.layer {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  align-items: start;
  background: #161617;
  border-radius: var(--radius);
  padding: 44px 40px;
  text-align: left;
}

.layer .tag {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6db3f2;
  padding-top: 5px;
}

.layer h3 { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 10px; color: #f5f5f7; }
.layer p { font-size: 16px; line-height: 1.6; color: #a1a1a6; }

.formula {
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 15px;
  color: #6db3f2;
  margin-top: 16px;
  letter-spacing: 0.02em;
}

/* ---------------- Quote ---------------- */

.quote {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  max-width: 820px;
  margin: 0 auto;
}

.walk {
  font-size: clamp(19px, 2.6vw, 24px);
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.quote-attr {
  margin-top: 30px;
  font-size: 16px;
  color: var(--ink-soft);
}

/* ---------------- Prose (story pages) ---------------- */

.prose { max-width: 660px; margin: 0 auto; }

.prose p {
  font-size: 19px;
  line-height: 1.65;
  color: #3a3a3c;
  margin-bottom: 28px;
}

.prose h2 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 70px 0 24px;
}

.prose .pull {
  font-size: clamp(24px, 3.2vw, 32px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 56px 0;
}

.section-dark .prose p { color: #c7c7cc; }
.section-dark .prose h2 { color: #f5f5f7; }
.section-dark .prose .pull { color: #f5f5f7; }

/* ---------------- Checklist ---------------- */

.promise-list { list-style: none; margin-top: 60px; display: grid; gap: 0; text-align: left; }

.promise-list li {
  padding: 30px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.promise-list li:first-child { border-top: 1px solid var(--hairline); }

.promise-list .mark { color: var(--accent); font-weight: 700; }

.section-dark .promise-list li { border-color: rgba(255,255,255,0.12); }

/* ---------------- Logo band ---------------- */

.logo-band {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 44px;
  margin-top: 56px;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: -0.01em;
}

.section-dark .logo-band { color: #86868b; }

/* ---------------- Footer ---------------- */

.footer {
  background: var(--paper-soft);
  border-top: 1px solid var(--hairline);
  padding: 44px 0 60px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  flex-wrap: wrap;
}

.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a:hover { text-decoration: underline; }

.footer-note { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--hairline); }

/* ---------------- Reveal animation ---------------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.in { opacity: 1; transform: none; }

/* ---------------- Mountain mark ---------------- */

.mark-lg { width: 110px; margin: 0 auto 36px; }

/* ---------------- Contact ---------------- */

.contact-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 60px 48px;
  text-align: center;
  max-width: 560px;
  margin: 70px auto 0;
  box-shadow: 0 20px 60px rgba(0,0,0,0.06);
}

.contact-card h3 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.contact-card p { color: var(--ink-soft); font-size: 16px; }
.contact-card + .contact-card { margin-top: 20px; }

/* ============================================================
   Product mockups (.cgm-*) — faithful to AICG 0.2.131 build
   Green accent #16804d, iOS visual language.
   ============================================================ */

:root {
  --cg-accent: #16804d;
  --cg-accent-soft: rgba(22, 128, 77, 0.10);
  --cg-amber: #b67500;
  --cg-red: #c2261e;
}

/* --- gallery tabs --- */
.cgm-tabs {
  display: inline-flex;
  background: #e9e9ec;
  border-radius: 999px;
  padding: 3px;
  margin: 56px auto 0;
  gap: 2px;
}

.section-dark .cgm-tabs { background: #2c2c2e; }

.cgm-tab {
  border: 0;
  background: transparent;
  font: 600 14px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  color: var(--ink-soft);
  padding: 9px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.section-dark .cgm-tab { color: #a1a1a6; }

.cgm-tab.active { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,0.12); }
.section-dark .cgm-tab.active { background: #636366; color: #fff; }

.cgm-pane { display: none; margin-top: 50px; }
.cgm-pane.active { display: block; animation: cgm-in 0.4s var(--ease); }

@keyframes cgm-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.cgm-caption {
  margin-top: 30px;
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.section-dark .cgm-caption { color: #a1a1a6; }

/* --- shared device shadow --- */
.cgm-device {
  margin: 0 auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  border-radius: 18px;
  text-align: left;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ============ 1. POPUP ============ */

.cgm-pop {
  width: 360px;
  background: #f2f2f7;
  border-radius: 18px;
  padding: 12px 14px 14px;
  font-size: 15px;
  color: #1c1c1e;
  position: relative;
}

.cgm-group { background: #fff; border-radius: 13px; overflow: hidden; }

.cgm-sectlabel {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #8a8a8e;
  padding: 16px 6px 7px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.cgm-sectlabel .cgm-muted { font-weight: 400; text-transform: none; letter-spacing: 0; }

.cgm-brandcard { display: flex; align-items: center; gap: 12px; padding: 13px 14px; }

.cgm-brandmark {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--cg-accent-soft);
  display: grid; place-items: center;
  flex: none;
  color: var(--cg-accent);
}

.cgm-brandmark svg { width: 24px; height: 24px; }

.cgm-bmeta { flex: 1; min-width: 0; }
.cgm-bname { font-size: 18px; font-weight: 700; letter-spacing: -0.2px; }

.cgm-status {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 4px;
  font-size: 12px; font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--cg-accent);
  background: var(--cg-accent-soft);
}

.cgm-status .cgm-led { width: 7px; height: 7px; border-radius: 50%; background: var(--cg-accent); }
.cgm-status[data-state="paused"] { color: var(--cg-amber); background: rgba(182,117,0,0.12); }
.cgm-status[data-state="paused"] .cgm-led { background: var(--cg-amber); }
.cgm-status[data-state="off"] { color: #8a8a8e; background: #ececee; }
.cgm-status[data-state="off"] .cgm-led { background: #aeaeb2; }

.cgm-power-wrap { position: relative; flex: none; }

.cgm-power {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--cg-accent);
  background: transparent;
  color: var(--cg-accent);
  display: grid; place-items: center;
  cursor: pointer;
  transition: 0.2s;
}

.cgm-power svg { width: 19px; height: 19px; }
.cgm-power[data-state="paused"] { border-color: var(--cg-amber); color: var(--cg-amber); }
.cgm-power[data-state="off"] { border-color: #aeaeb2; color: #aeaeb2; }

.cgm-power-menu {
  position: absolute;
  top: 46px; right: 0;
  width: 180px;
  background: #fff;
  border: 1px solid rgba(60,60,67,0.14);
  border-radius: 13px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.18);
  padding: 6px;
  z-index: 30;
  display: none;
}

.cgm-power-menu.open { display: block; }

.cgm-power-menu .cgm-msec {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.03em;
  color: #8a8a8e;
  padding: 7px 10px 4px;
}

.cgm-power-menu button {
  display: flex; width: 100%;
  border: 0; background: transparent;
  color: #1c1c1e;
  font: 500 14px/1 inherit;
  font-family: inherit;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.cgm-power-menu button:hover { background: #ececee; }
.cgm-power-menu hr { border: 0; border-top: 1px solid rgba(60,60,67,0.14); margin: 5px 4px; }

.cgm-seg-wrap { padding: 5px; }

.cgm-seg { display: flex; background: #e9e9ec; border-radius: 10px; padding: 2px; }

.cgm-seg button {
  flex: 1;
  border: 0; background: transparent;
  color: #1c1c1e;
  font: 600 14px/1 inherit;
  font-family: inherit;
  padding: 9px 0;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.cgm-seg button.active {
  background: var(--cg-accent);
  color: #fff;
  box-shadow: 0 1px 3px rgba(22,128,77,0.28);
}

.cgm-row {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 14px;
  cursor: pointer;
  position: relative;
  transition: background 0.12s;
}

.cgm-row:hover { background: #f7f7f8; }
.cgm-row:active { background: #e5e5ea; }
.cgm-row + .cgm-row::before {
  content: "";
  position: absolute;
  top: 0; left: 49px; right: 0;
  height: 1px;
  background: rgba(60,60,67,0.14);
}

.cgm-rowic {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex: none;
  background: var(--cg-accent-soft);
  color: var(--cg-accent);
}

.cgm-rowic svg { width: 16px; height: 16px; }
.cgm-rowic.amber { background: rgba(255,159,10,0.16); color: #ff9f0a; }

.cgm-rmain { flex: 1; min-width: 0; }
.cgm-rtitle { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cgm-rmeta { display: flex; align-items: center; gap: 8px; margin-top: 3px; font-size: 12px; color: #8a8a8e; }
.cgm-chip { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--cg-accent); }
.cgm-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--cg-accent); }
.cgm-arrow { color: #aeaeb2; flex: none; }

.cgm-foot { display: flex; gap: 10px; margin-top: 14px; }

.cgm-pill {
  flex: 1;
  border: 0;
  border-radius: 999px;
  font: 600 14px/1 inherit;
  font-family: inherit;
  padding: 11px 0;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
}

.cgm-pill:active { transform: scale(0.98); }
.cgm-pill.ghost { background: #ececee; color: #3a3a3c; }
.cgm-pill.tinted { background: var(--cg-accent-soft); color: var(--cg-accent); }

/* ============ 2. SETTINGS ============ */

.cgm-set {
  width: 380px;
  background: #f2f2f7;
  border-radius: 18px;
  padding: 18px 16px;
  font-size: 15px;
  color: #1c1c1e;
  max-height: 560px;
  overflow-y: auto;
}

.cgm-set::-webkit-scrollbar { width: 0; }

.cgm-largetitle { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; padding: 2px 6px 14px; }

.cgm-acct { display: flex; align-items: center; gap: 12px; padding: 13px 14px; }

.cgm-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--cg-accent);
  color: #fff;
  font-size: 16px; font-weight: 700;
  display: grid; place-items: center;
  flex: none;
}

.cgm-acct .cgm-nm { font-size: 16px; font-weight: 600; }

.cgm-badge {
  display: inline-block;
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ececee;
  color: #8a8a8e;
  vertical-align: 2px;
  margin-left: 4px;
}

.cgm-acct .cgm-sub { font-size: 12.5px; color: #8a8a8e; margin-top: 2px; }

.cgm-ctl-label { font-size: 13px; font-weight: 600; color: #3a3a3c; margin-bottom: 7px; }

.cgm-set-rowval { font-size: 14px; color: #8a8a8e; flex: none; }

.cgm-chev { color: #c5c5c7; flex: none; width: 8px; }

/* ============ 3. WHISPER (in-page detection) ============ */

.cgm-browser {
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  text-align: left;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
}

.cgm-browser-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  background: #fafafa;
}

.cgm-browser-bar i { width: 11px; height: 11px; border-radius: 50%; background: #e3e3e6; flex: none; }

.cgm-urlbar {
  flex: 1;
  background: #ececee;
  border-radius: 8px;
  font-size: 12px;
  color: #8a8a8e;
  padding: 6px 12px;
  text-align: center;
}

.cgm-chat { padding: 30px 28px 26px; }

.cgm-composer {
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.5;
  color: #3a3a3c;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.cgm-composer .cgm-send {
  float: right;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 0;
  background: #1c1c1e;
  color: #fff;
  cursor: pointer;
  display: grid; place-items: center;
  margin-left: 10px;
}

.cgm-whisper {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.985);
  border: 1px solid rgba(0,0,0,0.07);
  border-left: 4px solid var(--cg-accent);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 10px 32px rgba(0,0,0,0.18);
  font-size: 14.5px;
  color: #0a0a0a;
}

.cgm-w-brandrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.cgm-w-brand {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 600;
  letter-spacing: -0.01em;
  color: #1c1c1e;
}

.cgm-w-brand svg { width: 16px; height: 16px; color: var(--cg-accent); }

.cgm-w-tier {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.02em;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  background: var(--cg-accent-soft);
  color: #14532d;
  box-shadow: inset 0 0 0 0.5px rgba(22,128,77,0.20);
}

.cgm-w-tier i { width: 6px; height: 6px; border-radius: 50%; background: var(--cg-accent); }

.cgm-w-msg { font-size: 15.5px; font-weight: 500; line-height: 1.4; color: #14532d; }

.cgm-w-pills { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.cgm-w-pills .sp { flex: 1; }

.cgm-w-btn {
  cursor: pointer;
  font: 600 13.5px/1 inherit;
  font-family: inherit;
  padding: 7px 14px;
  border-radius: 999px;
  border: none;
  flex-shrink: 0;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.cgm-w-btn:active { transform: scale(0.97); }

.cgm-w-btn.cancel {
  background: #fef2f2; color: #991b1b;
  box-shadow: inset 0 0 0 0.5px rgba(220,38,38,0.20);
}
.cgm-w-btn.cancel:hover { background: #fee2e2; }

.cgm-w-btn.review { background: transparent; color: #8a8a8e; }
.cgm-w-btn.review:hover { background: #ececee; color: #3a3a3c; }

.cgm-w-btn.proceed {
  background: var(--cg-accent); color: #fff;
  box-shadow: 0 1px 3px rgba(22,128,77,0.25);
}
.cgm-w-btn.proceed:hover { filter: brightness(1.06); }

.cgm-expand {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.7;
  padding: 16px 22px;
  margin-top: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  display: none;
}

.cgm-expand.visible { display: block; animation: cgm-in 0.3s var(--ease); }
.cgm-expand .strike { text-decoration: line-through; color: #9ca3af; font-style: italic; }
.cgm-expand .added {
  color: #14532d; font-weight: 500;
  background: rgba(22,128,77,0.06);
  border-radius: 3px;
  padding: 0 3px;
}

/* sent-state */
.cgm-sentmsg {
  display: none;
  margin-top: 16px;
  background: var(--cg-accent-soft);
  border: 1px solid rgba(22,128,77,0.25);
  color: #14532d;
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 500;
}

.cgm-sentmsg.visible { display: block; animation: cgm-in 0.3s var(--ease); }

/* --- site-wide demo toast --- */
.site-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(16px);
  background: rgba(28,28,30,0.94);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 999px;
  opacity: 0;
  transition: 0.25s var(--ease);
  pointer-events: none;
  z-index: 500;
  backdrop-filter: blur(10px);
  max-width: 84vw;
  text-align: center;
}

.site-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* clickable hints */
.logo-band span { cursor: pointer; transition: color 0.2s var(--ease); }
.logo-band span:hover { color: var(--accent); }
.stat { cursor: pointer; }
.card[data-toast] { cursor: pointer; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.card[data-toast]:hover { transform: translateY(-3px); box-shadow: 0 12px 36px rgba(0,0,0,0.08); }

@media (max-width: 760px) {
  .cgm-browser { max-width: 100%; }
  .cgm-pop, .cgm-set { width: 100%; max-width: 380px; }
}

/* ============================================================
   V5 — Chat surface money shot (.cgs-*), scan drawer (.acd-*),
   actual-size labels, popup accordions, settings sheets.
   ============================================================ */

.cgm-size-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: #e9e9ec;
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 20px;
}

.cgm-size-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--cg-accent); }

/* ---------- chat surface window ---------- */

.cgs-window {
  max-width: 920px;
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  text-align: left;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: #1c1c1e;
}

.cgs-body { display: flex; min-height: 520px; }

/* single-column chat surface (no sidebar) */
.cgs-single { display: flex; flex-direction: column; min-height: 460px; }

/* whisper inside a flow window (typed-text demo) — centered overlay */
.cgs-mid {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  width: min(620px, calc(100% - 56px));
  z-index: 6;
  display: none;
}
.cgs-flow[data-stage="compact"] .cgs-mid[data-show~="compact"],
.cgs-flow[data-stage="details"] .cgs-mid[data-show~="details"] { display: block; }
.cgs-mid .cgm-whisper { margin: 0; }
.cgs-mid .cgs-diff { margin: 12px 0 0; }
.cgs-window .cgm-whisper[data-show] { display: none; }
.cgs-flow[data-stage="compact"] .cgm-whisper[data-show~="compact"],
.cgs-flow[data-stage="details"] .cgm-whisper[data-show~="details"] { display: flex; }

/* inline safer-version diff */
.cgs-diff {
  margin: 0 20px 18px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.7;
  color: #3a3a3c;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.cgs-diff .strike { text-decoration: line-through; color: #9ca3af; font-style: italic; }
.cgs-diff .added {
  color: #14532d; font-weight: 500;
  background: rgba(22,128,77,0.06);
  border-radius: 3px;
  padding: 0 3px;
}

/* beta sign-up form */
.beta-form { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.beta-form input {
  font: inherit;
  font-size: 15.5px;
  padding: 13px 20px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.15);
  min-width: 230px;
  outline: none;
  background: #fff;
  color: var(--ink);
}
.beta-form input::placeholder { color: #aeaeb2; }
.beta-form input:focus {
  border-color: rgba(46,134,222,0.6);
  box-shadow: 0 0 0 3px rgba(46,134,222,0.12);
}
.beta-form input.invalid { border-color: rgba(220,38,38,0.55); }
.beta-done { font-size: 19px; font-weight: 600; color: var(--accent); }

/* beta admin (beta.html#admin) */
.beta-admin {
  max-width: 640px;
  margin: 30px auto 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  overflow: hidden;
  text-align: left;
}
.beta-admin-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 12px;
  padding: 12px 18px;
  font-size: 14px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.beta-admin-row:last-child { border-bottom: 0; }
.beta-admin-row span:first-child { font-weight: 600; }
.beta-admin-row span:last-child { color: #8a8a8e; font-size: 12.5px; }

/* live Try-it demo */
.txt[contenteditable] { outline: none; cursor: text; min-height: 1.4em; white-space: pre-wrap; }
.txt[contenteditable]:empty::before { content: 'Type anything\2026'; color: #aeaeb2; }
.cgs-flow[data-live] .cgs-input:focus-within {
  border-color: rgba(46,134,222,0.55);
  box-shadow: 0 0 0 3px rgba(46,134,222,0.12);
}
.warnhl { background: #fef3c7; border-radius: 3px; padding: 0 2px; }
.cgs-diff strong, .cgs-msg strong { font-weight: 600; }

/* OCR pixel redaction demo — centered in the chat window */
.ocr-demo {
  position: absolute;
  left: 50%;
  top: 54%;
  transform: translate(-50%, -50%);
  margin: 0;
  z-index: 5;
  text-align: center;
}
.ocr-demo .ocr-shot { margin: 0 auto; box-shadow: 0 14px 44px rgba(0,0,0,0.16); background: #fff; }
.ocr-shot {
  max-width: 340px;
  background: #f5f5f7;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
}
.ocr-bub {
  background: #e9e9eb;
  color: #1c1c1e;
  font-size: 12px;
  line-height: 1.5;
  padding: 7px 11px;
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  max-width: 88%;
  align-self: flex-start;
}
.ocr-bub.me {
  background: #2e86de;
  color: #fff;
  align-self: flex-end;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 4px;
}
.ocr-hit { border-radius: 4px; padding: 0 2px; transition: all 0.25s ease; }
.cgs-flow[data-stage="details"] .ocr-hit { box-shadow: 0 0 0 2px #d97706; }
.cgs-flow[data-stage="sent"] .ocr-hit { background: #1c1c1e; color: transparent; box-shadow: none; text-shadow: none; }
.cgs-flow[data-stage="sent"] .ocr-bub.me .ocr-hit { background: #0f3f68; }
.ocr-cap { font-size: 11.5px; color: #8a8a8e; margin-top: 8px; }
.ocr-cap span[data-show] { display: none; }
.cgs-flow[data-stage="details"] .ocr-cap span[data-show~="details"],
.cgs-flow[data-stage="sent"] .ocr-cap span[data-show~="sent"] { display: inline; }

.cgs-side {
  width: 178px;
  flex: none;
  background: #f9f9fa;
  border-right: 1px solid rgba(0,0,0,0.07);
  padding: 16px 12px;
  font-size: 12.5px;
  color: #8a8a8e;
}

.cgs-side .cgs-side-hd { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #aeaeb2; padding: 6px 8px; }
.cgs-side .cgs-side-item { padding: 8px 8px; border-radius: 8px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #3a3a3c; }
.cgs-side .cgs-side-item:hover { background: #ececee; }
.cgs-side .cgs-side-item.on { background: #ececee; font-weight: 600; }

.cgs-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.cgs-thread { flex: 1; padding: 26px 28px 14px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }

.cgs-msg { max-width: 78%; border-radius: 16px; padding: 12px 16px; font-size: 14.5px; line-height: 1.5; }
.cgs-msg.user { margin-left: auto; background: #f2f2f7; border-bottom-right-radius: 6px; }
.cgs-msg.ai { background: #fff; border: 1px solid rgba(0,0,0,0.08); border-bottom-left-radius: 6px; }

.cgs-att-row { display: flex; gap: 8px; flex-wrap: wrap; }

.cgs-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 11px;
  padding: 7px 12px 7px 8px;
  font-size: 12.5px;
  font-weight: 500;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: box-shadow 0.15s;
}

.cgs-chip:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

.cgs-chip .ico {
  width: 26px; height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #fff;
  flex: none;
}

.cgs-chip .ico svg { width: 14px; height: 14px; }
.cgs-chip .ext { display: block; font-size: 10px; color: #8a8a8e; font-weight: 400; margin-top: 1px; }

.ico-pdf { background: #e0443e; }
.ico-xls { background: #16804d; }
.ico-img { background: #8e5bd4; }
.ico-aud { background: #e8842c; }
.ico-vid { background: #2f7fd6; }

.cgs-chip .find {
  position: absolute;
  top: -7px; right: -7px;
  background: #d97706;
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  border-radius: 999px;
  min-width: 17px;
  height: 17px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 1px 4px rgba(217,119,6,0.4);
}

[data-stage="compact"] .cgs-chip .find,
[data-stage="details"] .cgs-chip .find { display: inline-flex; }

.cgs-chip .shieldmark { display: none; color: var(--cg-accent); }
.cgs-chip .shieldmark svg { width: 14px; height: 14px; }
.cgs-chip.protected .shieldmark { display: inline-flex; }

.cgs-composer { border-top: 1px solid rgba(0,0,0,0.07); padding: 14px 20px 16px; }
.cgs-composer .cgs-attach { margin-bottom: 12px; }

.cgs-input {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.cgs-input .txt { flex: 1; font-size: 14.5px; line-height: 1.5; color: #3a3a3c; cursor: text; }

.cgs-send {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 0;
  background: #1c1c1e;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: none;
  transition: transform 0.1s;
}

.cgs-send:active { transform: scale(0.94); }

/* stage visibility */
.cgs-flow [data-show] { display: none; }
.cgs-flow[data-stage="idle"]    [data-show~="idle"],
.cgs-flow[data-stage="compact"] [data-show~="compact"],
.cgs-flow[data-stage="details"] [data-show~="details"],
.cgs-flow[data-stage="sent"]    [data-show~="sent"] { display: block; }
.cgs-flow[data-stage="compact"] .cgs-att-row[data-show~="compact"],
.cgs-flow[data-stage="details"] .cgs-att-row[data-show~="details"],
.cgs-flow[data-stage="idle"] .cgs-att-row[data-show~="idle"] { display: flex; }

.cgs-sentline {
  font-size: 12.5px;
  color: var(--cg-accent);
  font-weight: 600;
  text-align: center;
  padding: 4px 0 0;
}

.cgs-sentline u { cursor: pointer; }

/* ---------- scan drawer (compact + details) ---------- */

.acd {
  position: absolute;
  top: 50px;
  right: 16px;
  width: 392px;
  max-width: calc(100% - 32px);
  background: #fff;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(15,20,30,0.05), 0 12px 40px rgba(15,20,30,0.22);
  z-index: 20;
  font-size: 14px;
}

.acd-grab { width: 36px; height: 4px; border-radius: 2px; background: #e3e3e6; margin: 9px auto 0; }

.acd-hd { display: flex; align-items: center; padding: 10px 18px 0; }
.acd-brand { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: #1c1c1e; }
.acd-brand svg { width: 16px; height: 16px; color: var(--cg-accent); }

.acd-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--cg-accent);
  background: var(--cg-accent-soft);
  border: 1px solid rgba(22,128,77,0.25);
  padding: 3px 9px;
  border-radius: 999px;
}

.acd-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--cg-accent); }

.acd-compact { padding: 8px 18px 16px; }

.acd-crow { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.acd-crow h4 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.3px; color: #11161c; }

.acd-review { display: inline-flex; align-items: center; gap: 3px; color: var(--cg-accent); font-weight: 600; font-size: 14px; }
.acd-review svg { width: 16px; height: 16px; }

.acd-meta { margin-top: 4px; font-size: 12.5px; color: #8a8a8e; }
.acd-meta b { color: #3a3a3c; font-weight: 600; }
.acd-meta .sp { color: var(--cg-accent); font-weight: 600; }

.acd-pills { display: flex; gap: 8px; margin-top: 13px; }

.acd-pill {
  border: 1px solid transparent;
  cursor: pointer;
  font: 600 13px/1 -apple-system, BlinkMacSystemFont, sans-serif;
  padding: 11px 0;
  border-radius: 11px;
  text-align: center;
  transition: filter 0.15s, transform 0.1s;
}

.acd-pill:active { transform: scale(0.97); }
.acd-pill:hover { filter: brightness(1.05); }
.acd-pill.go { flex: 1.5; background: var(--cg-accent); color: #fff; box-shadow: 0 1px 3px rgba(22,128,77,0.25); }
.acd-pill.cancel { flex: 1; background: #fdf4e3; color: #b67500; border-color: rgba(182,117,0,0.25); }
.acd-pill.orig { flex: 1; background: #fef2f2; color: #c2261e; border-color: rgba(194,38,30,0.22); }

/* details view */
.acd-details-view { display: flex; flex-direction: column; max-height: 560px; }

.acd-back { padding: 8px 18px 0; flex: none; }
.acd-back button {
  border: 0; background: transparent; cursor: pointer;
  font: 700 11px/1 -apple-system, sans-serif;
  color: var(--cg-accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
}

.acd-readout { padding: 6px 20px 2px; flex: none; }
.acd-readout h4 { margin: 0 0 8px; font-size: 20px; font-weight: 600; letter-spacing: -0.4px; color: #11161c; }
.acd-rrow { display: flex; align-items: baseline; gap: 10px; font-size: 13px; padding: 1px 0; }
.acd-rrow .k { color: var(--cg-accent); font-weight: 700; width: 88px; flex: none; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.acd-rrow .v { color: #3a3a3c; font-weight: 500; }
.acd-rrow .v.sp { color: var(--cg-accent); font-weight: 600; }

.acd-mode {
  margin: 12px 18px 4px;
  background: #ececee;
  border-radius: 12px;
  padding: 3px;
  display: flex;
  gap: 3px;
  position: relative;
  flex: none;
}

.acd-mode button {
  flex: 1; border: 0; background: transparent; cursor: pointer;
  font: 600 13px/1 -apple-system, sans-serif;
  color: #3a3a3c;
  padding: 9px 0;
  border-radius: 9px;
  z-index: 1;
  transition: color 0.18s;
}

.acd-mode button.active { color: #fff; }

.acd-glider {
  position: absolute;
  top: 3px; bottom: 3px; left: 3px;
  width: calc(50% - 4px);
  background: var(--cg-accent);
  border-radius: 9px;
  transition: transform 0.22s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 1px 3px rgba(22,128,77,0.28);
}

.acd-mode.rewrite .acd-glider { transform: translateX(calc(100% + 3px)); }

.acd-groups {
  margin: 8px 14px 4px;
  background: #fbfbfd;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 14px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  max-height: 264px;
}

.acd-groups::-webkit-scrollbar { width: 6px; }
.acd-groups::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 6px; }

.acd-group { border-bottom: 1px solid rgba(0,0,0,0.06); }
.acd-group:last-child { border-bottom: 0; }

.acd-ghead { display: flex; align-items: center; gap: 11px; padding: 12px 15px; cursor: pointer; user-select: none; }
.acd-ghead:active { background: #f4f4f6; }

.acd-gicon {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--cg-accent-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cg-accent);
  flex: none;
}

.acd-gicon svg { width: 16px; height: 16px; }
.acd-gicon.amber { background: #fdf4e3; color: #b67500; }

.acd-glabel { font-size: 14px; font-weight: 600; color: #11161c; min-width: 0; }
.acd-glabel small { display: block; font-size: 11px; font-weight: 500; color: #8a8a8e; margin-top: 1px; }

.acd-gcount { margin-left: auto; display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: #8a8a8e; flex: none; }
.acd-chev { width: 15px; height: 15px; color: #aeaeb2; transition: transform 0.2s; }
.acd-group.open .acd-chev { transform: rotate(90deg); }

.acd-gitems { max-height: 0; overflow: hidden; transition: max-height 0.28s ease; background: #fff; }
.acd-group.open .acd-gitems { max-height: 900px; }

.acd-item { display: flex; align-items: center; gap: 10px; padding: 10px 15px 10px 21px; border-top: 1px solid rgba(0,0,0,0.05); }
.acd-loc { font-size: 11px; color: #aeaeb2; }
.acd-vals { font-size: 12.5px; display: flex; align-items: center; gap: 7px; margin-top: 1px; flex-wrap: wrap; }
.acd-val { font-family: "SF Mono", ui-monospace, Menlo, monospace; color: #8a8a8e; font-size: 11.5px; text-decoration: line-through; }
.acd-arrow { color: #aeaeb2; font-size: 11px; }
.acd-repl { font-family: "SF Mono", ui-monospace, Menlo, monospace; color: var(--cg-accent); font-size: 11.5px; }
.acd-repl.rw { font-family: -apple-system, BlinkMacSystemFont, sans-serif; font-style: italic; color: #3a3a3c; }

.acd-seg { margin-left: auto; flex: none; display: inline-flex; background: #ececee; border-radius: 8px; padding: 2px; }
.acd-seg button { border: 0; background: transparent; cursor: pointer; font: 600 11px/1 -apple-system, sans-serif; color: #3a3a3c; padding: 6px 10px; border-radius: 6px; }
.acd-seg button.keep.on { background: var(--cg-accent); color: #fff; }
.acd-seg button.allow.on { background: #c2261e; color: #fff; }

.acd-more {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer;
  color: var(--cg-accent);
  font-size: 12px; font-weight: 600;
  padding: 10px 15px;
  border-top: 1px solid rgba(0,0,0,0.05);
  background: #fff;
  user-select: none;
}

.acd-more:hover { background: #f5f5f7; }

.acd-foot { padding: 13px 18px 16px; flex: none; }

.acd-hero {
  width: 100%;
  border: 0;
  cursor: pointer;
  background: var(--cg-accent);
  color: #fff;
  font: 600 15px/1 -apple-system, sans-serif;
  padding: 14px 0;
  border-radius: 13px;
  box-shadow: 0 1px 3px rgba(22,128,77,0.25);
  transition: filter 0.15s, transform 0.1s;
}

.acd-hero:hover { filter: brightness(1.06); }
.acd-hero:active { transform: scale(0.985); }

.acd-sec { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 11px; }

.acd-secpill {
  border: 1px solid transparent;
  cursor: pointer;
  font: 600 12.5px/1 -apple-system, sans-serif;
  padding: 9px 20px;
  border-radius: 999px;
  transition: filter 0.15s, transform 0.1s;
}

.acd-secpill:active { transform: scale(0.97); }
.acd-secpill.caution { background: #fdf4e3; color: #b67500; border-color: rgba(182,117,0,0.25); }
.acd-secpill.danger { background: #fef2f2; color: #c2261e; border-color: rgba(194,38,30,0.22); }

/* ---------- popup accordion sub-rows ---------- */

.cgm-subrow { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; background: #fbfbfd; }
.cgm-subrow.open { max-height: 420px; }
.cgm-row[data-acc] .cgm-arrow { transition: transform 0.2s var(--ease); display: inline-block; }
.cgm-row.acc-open .cgm-arrow { transform: rotate(90deg); }
.cgm-subrow .sr { display: flex; align-items: baseline; gap: 10px; padding: 8px 14px 8px 49px; font-size: 12.5px; border-top: 1px solid rgba(60,60,67,0.10); cursor: pointer; }
.cgm-subrow .sr:hover { background: #f4f4f6; }
.cgm-subrow .sr .k { color: #8a8a8e; width: 74px; flex: none; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.cgm-subrow .sr .v { color: #1c1c1e; font-weight: 500; }
.cgm-subrow .sr .v.green { color: var(--cg-accent); }

/* ---------- settings: actual size + detail sheets ---------- */

.cgm-setwrap { position: relative; width: 600px; max-width: 100%; margin: 0 auto; }
.cgm-set.actual { width: 100%; max-height: 640px; }

.cgm-sheet-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.28);
  border-radius: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  z-index: 5;
}

.cgm-sheet {
  position: absolute;
  left: 10px; right: 10px; bottom: 10px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.25);
  transform: translateY(108%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 82%;
  overflow-y: auto;
  padding: 4px 16px 16px;
  z-index: 6;
  text-align: left;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  color: #1c1c1e;
}

.cgm-setwrap.sheet-open .cgm-sheet { transform: none; }
.cgm-setwrap.sheet-open .cgm-sheet-scrim { opacity: 1; pointer-events: auto; }

.cgm-sheet .grab { width: 36px; height: 4px; border-radius: 2px; background: #e3e3e6; margin: 8px auto 10px; }
.cgm-sheet h4 { font-size: 17px; font-weight: 700; letter-spacing: -0.2px; margin: 0 4px 4px; }
.cgm-sheet .sub { font-size: 12.5px; color: #8a8a8e; margin: 0 4px 12px; }
.cgm-sheet .grp { background: #f2f2f7; border-radius: 12px; overflow: hidden; margin-bottom: 10px; }
.cgm-sheet .srow { display: flex; align-items: center; gap: 11px; padding: 11px 14px; cursor: pointer; position: relative; font-size: 14.5px; }
.cgm-sheet .srow + .srow::before { content: ""; position: absolute; top: 0; left: 14px; right: 0; height: 1px; background: rgba(60,60,67,0.12); }
.cgm-sheet .srow .t { flex: 1; min-width: 0; font-weight: 500; }
.cgm-sheet .srow .t small { display: block; font-size: 11.5px; color: #8a8a8e; font-weight: 400; margin-top: 1px; }
.cgm-sheet .srow .val { font-size: 13px; color: #8a8a8e; }
.cgm-sheet .sheet-close {
  display: block;
  width: 100%;
  border: 0;
  background: #ececee;
  color: #3a3a3c;
  font: 600 14px/1 -apple-system, sans-serif;
  padding: 12px 0;
  border-radius: 999px;
  cursor: pointer;
  margin-top: 4px;
}

.cgm-sheet .sheet-cta {
  display: block;
  width: 100%;
  border: 0;
  background: var(--cg-accent);
  color: #fff;
  font: 600 14px/1 -apple-system, sans-serif;
  padding: 12px 0;
  border-radius: 999px;
  cursor: pointer;
  margin-bottom: 9px;
}

/* iOS switch */
.cgm-sw { width: 44px; height: 26px; border-radius: 13px; background: #e3e3e6; position: relative; cursor: pointer; transition: background 0.25s; flex: none; }
.cgm-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.3); transition: transform 0.25s; }
.cgm-sw.on { background: var(--cg-accent); }
.cgm-sw.on::after { transform: translateX(18px); }

/* details drawer keeps its flex column despite stage display rules */
.cgs-flow[data-stage="details"] .acd-details-view[data-show~="details"] { display: flex; }

/* ---------- end-to-end flow steps ---------- */

.cgs-steps { display: flex; justify-content: center; gap: 7px; margin: 0 0 20px; flex-wrap: wrap; }

.cgs-step {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  background: #e9e9ec;
  padding: 6px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.25s var(--ease);
}

.cgs-step i { width: 6px; height: 6px; border-radius: 50%; background: #c5c5c7; transition: background 0.25s; }

.cgs-flow[data-stage="idle"]    .cgs-step[data-s="1"],
.cgs-flow[data-stage="compact"] .cgs-step[data-s="2"],
.cgs-flow[data-stage="details"] .cgs-step[data-s="3"],
.cgs-flow[data-stage="sent"]    .cgs-step[data-s="4"] { background: var(--ink); color: #fff; }

.cgs-flow[data-stage="idle"]    .cgs-step[data-s="1"] i,
.cgs-flow[data-stage="compact"] .cgs-step[data-s="2"] i,
.cgs-flow[data-stage="details"] .cgs-step[data-s="3"] i,
.cgs-flow[data-stage="sent"]    .cgs-step[data-s="4"] i { background: #30d158; }

/* ---------- plan switcher + tier badges ---------- */

.cgm-plans { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 40px 0 6px; }

.cgm-plans button {
  border: 1px solid rgba(0,0,0,0.10);
  background: #fff;
  color: var(--ink-soft);
  font: 600 13.5px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  padding: 9px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.cgm-plans button:hover { border-color: rgba(0,0,0,0.25); color: var(--ink); }
.cgm-plans button.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.cgm-plans-hint { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 8px; }

.cgm-badge.tier-plus { background: #0a84ff; color: #fff; }
.cgm-badge.tier-premium { background: #8e5bd4; color: #fff; }
.cgm-badge.tier-enterprise { background: #1c1c1e; color: #fff; }

.cgm-lock { display: none; color: #aeaeb2; flex: none; }
.cgm-lock svg { width: 14px; height: 14px; }
.cgm-row.locked .cgm-lock { display: inline-flex; }
.cgm-row.locked .cgm-set-rowval, .cgm-row.locked .cgm-rtitle { opacity: 0.5; }

/* ---------- plan cards ---------- */

.plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 60px; }

.plan-card {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 22px;
  padding: 30px 24px 26px;
  text-align: left;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.plan-card:hover { transform: translateY(-4px); box-shadow: 0 16px 44px rgba(0,0,0,0.10); }

.plan-card .plan-name { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.plan-card .plan-sub { font-size: 12.5px; color: var(--ink-soft); margin: 4px 0 16px; }

.plan-card ul { list-style: none; margin: 0 0 22px; padding: 0; flex: 1; }
.plan-card ul li { font-size: 13px; line-height: 1.45; color: var(--ink-soft); padding: 6px 0 6px 20px; position: relative; }
.plan-card ul li::before { content: "\2713"; position: absolute; left: 0; color: var(--cg-accent); font-weight: 700; }

.plan-card .plan-try {
  border: 0;
  background: #ececee;
  color: var(--ink);
  font: 600 13.5px/1 -apple-system, sans-serif;
  padding: 11px 0;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}

.plan-card .plan-try:hover { background: #dededf; }
.plan-card.featured { border-color: var(--accent); box-shadow: 0 12px 36px rgba(46,134,222,0.12); }
.plan-card.featured .plan-try { background: var(--accent); color: #fff; }

@media (max-width: 920px) {
  .cgs-side { display: none; }
  .acd { width: calc(100% - 24px); right: 12px; }
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .plan-grid { grid-template-columns: 1fr; }
}

/* ---------------- Responsive ---------------- */

@media (max-width: 820px) {
  .grid-3, .grid-2, .stats { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .layer { grid-template-columns: 1fr; gap: 12px; }
  .nav-links { gap: 16px; }
  .nav-links .hide-sm { display: none; }
  .hero { padding: 150px 0 110px; }
  .section { padding: 90px 0; }
}
