/* My2AI — "dawn" palette. Bootstrap 5.3 (CDN) + these overrides. No build step. */
:root {
  --m2-ink: #14213D;
  --m2-amber: #F2A541;
  --m2-amber-deep: #D98A1F;
  --m2-sky: #9CC5E8;
  --m2-sky-soft: #E6F0F9;
  --m2-paper: #FAFBFD;
  --m2-slate: #5B6B82;
  --m2-leaf: #2E9E6B;
  --m2-line: #DCE3EC;
  --m2-surface: #FFFFFF;
  --m2-text: #14213D;
  --m2-muted: #5B6B82;
  --m2-head: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --m2-body: 'Atkinson Hyperlegible', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --bs-body-font-family: var(--m2-body);
  --bs-body-bg: var(--m2-paper);
  --bs-body-color: var(--m2-text);
  --bs-primary: #14213D;
  --bs-primary-rgb: 20, 33, 61;
  --bs-link-color: #1F4C8F;
  --bs-link-color-rgb: 31, 76, 143;
  --bs-link-hover-color: #14213D;
  --bs-border-color: var(--m2-line);
  --bs-secondary-color: var(--m2-slate);
  --bs-border-radius: .5rem;
  --bs-focus-ring-color: rgba(242, 165, 65, .45);
}

[data-bs-theme="dark"] {
  --m2-paper: #0E1729;
  --m2-surface: #16223A;
  --m2-text: #E8EEF7;
  --m2-muted: #9AA8BD;
  --m2-line: #26344F;
  --m2-sky-soft: #1B2B47;
  --bs-body-bg: #0E1729;
  --bs-body-color: #E8EEF7;
  --bs-primary: #F2A541;
  --bs-primary-rgb: 242, 165, 65;
  --bs-link-color: #9CC5E8;
  --bs-link-color-rgb: 156, 197, 232;
  --bs-link-hover-color: #F2A541;
  --bs-border-color: #26344F;
  --bs-secondary-color: #9AA8BD;
  --bs-secondary-bg: #16223A;
  --bs-tertiary-bg: #13203A;
}

body { font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, .display-4, .m2-head { font-family: var(--m2-head); letter-spacing: -0.02em; line-height: 1.12; }
h1 { font-weight: 700; }
h2, h3 { font-weight: 650; }
.text-muted, .text-body-secondary { color: var(--m2-muted) !important; }
.measure { max-width: 68ch; }
.small-print { font-size: .875rem; color: var(--m2-muted); }
a { text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--m2-amber); outline-offset: 2px; }
.skip-link { position: absolute; left: -999px; top: 0; z-index: 2000; background: var(--m2-amber); color: #14213D; padding: .5rem 1rem; }
.skip-link:focus { left: 1rem; top: 1rem; }

/* Buttons */
.btn { font-weight: 700; border-radius: .5rem; padding: .6rem 1.1rem; }
.btn-ink { background: var(--m2-ink); color: #FAFBFD; border: 2px solid var(--m2-ink); }
.btn-ink:hover, .btn-ink:focus { background: #0B1426; color: #fff; border-color: #0B1426; }
.btn-sun { background: var(--m2-amber); color: #14213D; border: 2px solid var(--m2-amber); }
.btn-sun:hover, .btn-sun:focus { background: var(--m2-amber-deep); border-color: var(--m2-amber-deep); color: #14213D; }
.btn-line { background: transparent; color: var(--m2-text); border: 2px solid var(--m2-line); }
.btn-line:hover { border-color: var(--m2-text); color: var(--m2-text); }
[data-bs-theme="dark"] .btn-ink { background: var(--m2-amber); border-color: var(--m2-amber); color: #14213D; }
[data-bs-theme="dark"] .btn-ink:hover { background: var(--m2-amber-deep); border-color: var(--m2-amber-deep); }

/* Navigation */
.site-nav { background: var(--m2-paper); border-bottom: 1px solid var(--m2-line); }
.site-nav .nav-link { color: var(--m2-text); font-weight: 600; }
.site-nav .nav-link:hover, .site-nav .nav-link.active { color: var(--bs-link-color); }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--m2-head); font-weight: 700; font-size: 1.35rem; color: var(--m2-text); text-decoration: none; letter-spacing: -0.03em; }
.brand:hover { color: var(--m2-text); }
.brand svg { width: 30px; height: 30px; }
.theme-toggle { border: 1px solid var(--m2-line); background: transparent; color: var(--m2-text); border-radius: .5rem; width: 40px; height: 40px; display: inline-grid; place-items: center; }
.theme-toggle .i-sun { display: none; }
[data-bs-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-bs-theme="dark"] .theme-toggle .i-moon { display: none; }

/* Hero: one memorable moment, the morning conversation */
.hero { padding: 4.5rem 0 3.5rem; background:
  radial-gradient(1200px 420px at 85% -10%, rgba(242,165,65,.22), transparent 60%),
  radial-gradient(900px 400px at 10% 110%, rgba(156,197,232,.28), transparent 60%); }
.hero h1 { font-size: clamp(2.4rem, 5.5vw, 4.1rem); max-width: 14ch; }
.hero .lede { font-size: 1.25rem; color: var(--m2-muted); max-width: 42ch; }
.demo { background: var(--m2-surface); border: 1px solid var(--m2-line); border-radius: 1.4rem; padding: 1.1rem 1.1rem 1.4rem; max-width: 420px; margin-left: auto; box-shadow: 0 30px 60px -30px rgba(20,33,61,.35); }
.demo-top { display: flex; justify-content: space-between; align-items: baseline; padding: 0 .35rem .8rem; border-bottom: 1px solid var(--m2-line); margin-bottom: .9rem; }
.demo-clock { font-family: var(--m2-head); font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.demo-where { font-size: .875rem; color: var(--m2-muted); }
.bubble { max-width: 86%; padding: .6rem .85rem; border-radius: 1rem; margin-bottom: .55rem; font-size: .98rem; line-height: 1.45; }
.bubble.ai { background: var(--m2-sky-soft); border-bottom-left-radius: .3rem; }
.bubble.me { background: var(--m2-ink); color: #FAFBFD; margin-left: auto; border-bottom-right-radius: .3rem; }
[data-bs-theme="dark"] .bubble.me { background: var(--m2-amber); color: #14213D; }
.bubble.action { background: transparent; border: 2px dashed var(--m2-amber); font-weight: 700; }
.bubble-in { animation: bubbleIn .35s ease-out both; }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Sections */
.section { padding: 4.5rem 0; }
.section-tint { background: var(--m2-sky-soft); }
.section h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-bottom: 1rem; }
.lead-muted { color: var(--m2-muted); font-size: 1.15rem; max-width: 60ch; }

/* The squares showcase: literal squares */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.tile { aspect-ratio: 1; border-radius: .6rem; border: 1px solid var(--m2-line); background: var(--m2-surface); padding: .9rem; display: flex; flex-direction: column; justify-content: space-between; text-decoration: none; color: var(--m2-text); transition: background .6s, border-color .6s, color .6s; }
.tile:hover { border-color: var(--m2-text); color: var(--m2-text); }
.tile .t-name { font-family: var(--m2-head); font-weight: 650; font-size: 1.05rem; line-height: 1.2; }
.tile .t-price { font-size: .85rem; color: var(--m2-muted); }
.tile.lit { background: var(--m2-amber); border-color: var(--m2-amber); color: #14213D; }
.tile.lit .t-price { color: #3b2a0c; }
.tile.free .t-price { color: var(--m2-leaf); font-weight: 700; }

/* How it works — a real sequence, so numbered */
.step-num { font-family: var(--m2-head); font-size: 2.6rem; font-weight: 700; color: var(--m2-amber); line-height: 1; }

/* Privacy band */
.privacy-band { background: var(--m2-ink); color: #E8EEF7; }
.privacy-band h2 { color: #FAFBFD; }
.privacy-band .lead-muted { color: #B9C6DA; }
.privacy-list li { padding: .5rem 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.privacy-list li:last-child { border-bottom: 0; }
[data-bs-theme="dark"] .privacy-band { background: #0A1222; }

/* Pricing */
.pkg { border: 2px solid var(--m2-line); border-radius: .75rem; padding: 1.25rem; background: var(--m2-surface); height: 100%; }
.pkg.featured { border-color: var(--m2-amber); }
.pkg .pkg-price { font-family: var(--m2-head); font-size: 2.2rem; font-weight: 700; }
.price-table td, .price-table th { padding: .7rem .5rem; vertical-align: top; }
.price-table tbody tr { border-bottom: 1px solid var(--m2-line); }

/* FAQ */
.faq details { border-bottom: 1px solid var(--m2-line); padding: 1rem 0; }
.faq summary { font-weight: 700; cursor: pointer; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--m2-head); font-size: 1.4rem; line-height: 1; color: var(--m2-amber-deep); }
.faq details[open] summary::after { content: '\2013'; }
.faq details p { margin: .75rem 0 0; color: var(--m2-muted); max-width: 70ch; }

/* Prose (legal, learn) */
.prose { max-width: 70ch; }
.prose h2 { font-size: 1.5rem; margin-top: 2.2rem; }
.prose h3 { font-size: 1.2rem; margin-top: 1.6rem; }
.prose p, .prose li { color: var(--m2-text); }
.draft-note { border-left: 4px solid var(--m2-amber); background: var(--m2-sky-soft); padding: .75rem 1rem; border-radius: .25rem; font-size: .95rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--m2-line); padding: 3rem 0 2rem; font-size: .95rem; }
.site-footer a { color: var(--m2-muted); text-decoration: none; }
.site-footer a:hover { color: var(--m2-text); text-decoration: underline; }
.site-footer h3 { font-size: 1rem; font-family: var(--m2-head); }

/* Dashboard */
.dash-nav { border-bottom: 1px solid var(--m2-line); overflow-x: auto; white-space: nowrap; }
.dash-nav .nav-link { color: var(--m2-muted); font-weight: 700; border-bottom: 3px solid transparent; border-radius: 0; padding: .8rem .9rem; }
.dash-nav .nav-link.active { color: var(--m2-text); border-bottom-color: var(--m2-amber); }
.summary { background: var(--m2-surface); border: 1px solid var(--m2-line); border-radius: .75rem; padding: 1.25rem; }
.summary .big { font-family: var(--m2-head); font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.sq-card { background: var(--m2-surface); border: 2px solid var(--m2-line); border-radius: .6rem; padding: 1rem; height: 100%; display: flex; flex-direction: column; }
.sq-card.on { border-color: var(--m2-amber); }
.sq-card.paused { border-style: dashed; }
.sq-card .sq-name { font-family: var(--m2-head); font-weight: 650; font-size: 1.1rem; }
.sq-status { font-size: .8rem; font-weight: 700; padding: .15rem .5rem; border-radius: .3rem; background: var(--m2-sky-soft); color: var(--m2-text); }
.sq-status.s-active, .sq-status.s-trial, .sq-status.s-granted, .sq-status.s-included, .sq-status.s-free { background: rgba(46,158,107,.15); color: var(--m2-leaf); }
.sq-status.s-paused, .sq-status.s-trial-ended { background: rgba(242,165,65,.2); color: #8A5A10; }
[data-bs-theme="dark"] .sq-status.s-paused { color: var(--m2-amber); }
.explain-btn { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--m2-line); background: transparent; color: var(--m2-muted); font-weight: 700; line-height: 1; padding: 0; }
.meter { height: 8px; background: var(--m2-sky-soft); border-radius: 4px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--m2-leaf); }
.meter.warn > span { background: var(--m2-amber); }
.meter.full > span { background: #C2412D; }
.form-switch .form-check-input { width: 2.6em; height: 1.4em; cursor: pointer; }
.form-check-input:checked { background-color: var(--m2-leaf); border-color: var(--m2-leaf); }

/* Auth */
.auth-card { max-width: 440px; margin: 3rem auto; background: var(--m2-surface); border: 1px solid var(--m2-line); border-radius: 1rem; padding: 2rem; }

/* Admin */
.admin-shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.admin-side { background: var(--m2-ink); color: #C9D5E6; padding: 1.2rem .8rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .brand { color: #FAFBFD; font-size: 1.15rem; margin: 0 .5rem 1.2rem; }
.admin-side a.side-link { display: block; color: #C9D5E6; text-decoration: none; padding: .45rem .7rem; border-radius: .4rem; font-weight: 600; font-size: .95rem; }
.admin-side a.side-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.admin-side a.side-link.active { background: var(--m2-amber); color: #14213D; }
.admin-side .side-group { font-size: .78rem; color: #8FA0BA; margin: 1rem .7rem .3rem; }
.admin-main { padding: 1.5rem 2rem; min-width: 0; }
.stat { background: var(--m2-surface); border: 1px solid var(--m2-line); border-radius: .6rem; padding: 1rem; }
.stat .v { font-family: var(--m2-head); font-size: 1.6rem; font-weight: 700; }
.table-admin { font-size: .92rem; }
.table-admin td { vertical-align: middle; }
.cell-clip { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-entry pre { white-space: pre-wrap; font-size: .8rem; max-height: 300px; overflow: auto; background: var(--bs-tertiary-bg); padding: .5rem; border-radius: .3rem; }
.lvl { font-size: .75rem; font-weight: 700; padding: .1rem .4rem; border-radius: .25rem; }
.lvl-error, .lvl-critical, .lvl-alert, .lvl-emergency { background: #C2412D; color: #fff; }
.lvl-warning { background: var(--m2-amber); color: #14213D; }
.lvl-info, .lvl-notice { background: var(--m2-sky); color: #14213D; }
.lvl-debug { background: var(--m2-line); color: var(--m2-text); }
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
  .admin-main { padding: 1rem; }
}

/* Error pages */
.error-wrap { min-height: 80vh; display: grid; place-items: center; text-align: center; padding: 2rem; }
.error-code { font-family: var(--m2-head); font-size: clamp(5rem, 16vw, 9rem); font-weight: 700; line-height: 1; color: var(--m2-amber); }

/* Impersonation banner */
.imp-banner { background: #C2412D; color: #fff; font-weight: 700; padding: .5rem 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
[x-cloak] { display: none !important; }
