/* Nav: sticky, translucent, solid on scroll */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 70%, transparent); border-bottom: 1px solid transparent; transition: background .2s, border-color .2s, box-shadow .2s; }
.nav.solid { background: var(--bg); border-bottom-color: var(--border); box-shadow: var(--shadow-card); }
.nav-in { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; color: var(--primary); text-decoration: none; min-height: var(--touch); }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; background: #fff; display: grid; place-items: center; flex: none; overflow: hidden; }
.brand-mark img { width: 88%; height: 88%; object-fit: contain; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { display: inline-flex; align-items: center; min-height: var(--touch); padding: 0 12px; border-radius: var(--radius-chip); color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav-links a:hover { background: var(--card-alt); }
.nav-links a[aria-current="page"], .nav-links a.active { background: var(--gradient-brand); color: var(--on-gradient); }
.burger { display: none; min-width: var(--touch); min-height: var(--touch); border: 1px solid var(--border); background: var(--card); border-radius: 12px; color: var(--text); cursor: pointer; align-items: center; justify-content: center; }
@media (max-width: 859px) {
  .burger { display: inline-flex; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch; background: var(--bg); padding: 12px 16px 16px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-card); }
  .nav-links.open { display: flex; }
}

/* Buttons: 48 high, radius 14, brand gradient for primary (src/components/Button.tsx) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--button-h); padding: 0 22px; border-radius: var(--radius-button);
  font: 600 .95rem var(--font); text-decoration: none; cursor: pointer; border: 1px solid var(--border); background: var(--card); color: var(--text); transition: transform .15s, box-shadow .15s, opacity .15s; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.btn:active { transform: scale(.98); opacity: .85; }
.btn-primary { background: var(--gradient-brand); color: var(--on-gradient); border-color: transparent; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-block: 1.2em; }
.store { display: inline-flex; flex-direction: column; min-width: 150px; flex: 1 1 150px; max-width: 240px; min-height: 56px; padding: 8px 20px; border-radius: var(--radius-button); background: var(--text); color: var(--bg); text-decoration: none; justify-content: center; }
.store small { font-size: .75rem; font-weight: 600; }
.store strong { font-size: 1.05rem; }
.store[aria-disabled="true"] { cursor: default; }

/* Cards (src/components/Card.tsx) */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 20px; box-shadow: var(--shadow-card); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-tile { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--track); color: var(--primary); margin-bottom: 12px; }

/* Hero: one gradient */
.hero { background: linear-gradient(180deg, var(--bg-top), var(--bg)); overflow: hidden; padding-block: clamp(40px, 7vw, 88px) clamp(48px, 8vw, 96px); position: relative; }
.hero-grid { display: grid; gap: 40px; align-items: center; position: relative; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr .85fr; } }
.shape { position: absolute; border-radius: 50%; background: var(--gradient-brand); opacity: .12; pointer-events: none; }
.shape.a { width: 360px; height: 360px; top: -120px; right: -80px; }
.shape.b { width: 220px; height: 220px; bottom: -80px; left: -60px; }
.grad-text { background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.def { font-weight: 600; color: var(--text); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.fact { text-align: center; }
.fact .num { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; color: var(--primary); line-height: 1; }
.fact .lbl { color: var(--text-muted); font-size: .95rem; margin-top: 6px; }

.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps li { counter-increment: s; }
.steps li::before { content: counter(s); width: 36px; height: 36px; border-radius: 12px; background: var(--gradient-brand); color: var(--on-gradient); display: grid; place-items: center; font-weight: 800; margin-bottom: 10px; }

.faq details { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); margin-bottom: 12px; overflow: hidden; }
.faq summary { cursor: pointer; padding: 14px 20px; min-height: var(--touch); font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .25s; flex: none; }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq .ans { padding: 0 20px 18px; color: var(--text-muted); }
.faq details[open] .ans { animation: fade-in .3s ease-out; }

.band { background: var(--gradient-brand); color: var(--on-gradient); border-radius: var(--radius-card); padding: clamp(28px, 5vw, 56px); text-align: center; }
.band h2, .band p { color: var(--on-gradient); }
.band .btn-row { justify-content: center; }
.band .store { background: var(--on-gradient); color: var(--device-frame); }

.footer { padding-block: 48px; border-top: 1px solid var(--border); background: var(--card-alt); }
.footer-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer a { display: inline-flex; min-height: var(--touch); align-items: center; }
.footer ul { list-style: none; padding: 0; margin: 0; }

/* Phone mockup: recreated from the app's Home screen (src/app/(tabs)/index.tsx) */
.phone { width: min(300px, 78vw); margin-inline: auto; border-radius: 38px; padding: 10px; background: var(--device-frame); box-shadow: 0 24px 60px rgba(43, 58, 140, .35); }
.phone-screen { border-radius: 30px; background: var(--bg); padding: 16px 14px 0; overflow: hidden; min-height: 540px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: var(--text); }
.app-top { display: flex; align-items: center; gap: 8px; color: var(--primary); font-weight: 700; font-size: 15px; }
.app-top .brand-mark { width: 26px; height: 26px; border-radius: 9px; }
.greet { font-weight: 800; font-size: 17px; line-height: 1.2; }
.app-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 12px; box-shadow: var(--shadow-card); }
.quote-card { background: var(--gradient-brand); color: var(--on-gradient); border-radius: var(--radius-card); padding: 12px; font-size: 12.5px; }
.quote-card small { opacity: .95; display: block; margin-top: 4px; }
.ring-row { display: flex; align-items: center; gap: 12px; }
.ring { width: 64px; height: 64px; flex: none; }
.ring .trk { stroke: var(--track); }
.ring .val { stroke: var(--primary); stroke-linecap: round; transition: stroke-dashoffset .6s ease-out; }
.ring-num { font-weight: 800; font-size: 14px; fill: var(--text); }
.habit { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); min-height: 44px; }
.habit:first-child { border-top: 0; }
.tile { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.tile .icon { width: 17px; height: 17px; }
.habit .nm { flex: 1; font-weight: 600; }
.habit .tg { font-size: 11.5px; color: var(--text-muted); display: block; font-weight: 500; }
.check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; flex: none; background: transparent; }
.check.on { background: var(--success); border-color: var(--success); color: var(--on-success); }
.check .icon { width: 14px; height: 14px; stroke-width: 3; }
.tabbar { display: flex; justify-content: space-around; margin: auto -14px 0; padding: 8px 6px; background: var(--card); border-top: 1px solid var(--border); }
.tab { min-width: 56px; padding: 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 600; color: var(--text-muted); border-radius: var(--radius-pill); }
.tab .icon { width: 20px; height: 20px; }
.tab.on { background: var(--gradient-brand); color: var(--on-gradient); }
.tag-note { font-size: .85rem; color: var(--text-muted); text-align: center; margin-top: 12px; }

.screens { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.screens figure { margin: 0; }
.screens figcaption { text-align: center; margin-top: 12px; font-weight: 700; }
.screens .phone { width: 100%; max-width: 280px; }
.screens .phone-screen { min-height: 400px; }
.focus-ring { width: 150px; height: 150px; margin: 8px auto; display: block; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal span { aspect-ratio: 1; border-radius: 8px; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.cal .h { background: var(--level-high); color: var(--level-high-text); }
.cal .g { background: var(--level-good); color: var(--level-good-text); }
.cal .m { background: var(--level-mid); color: var(--level-mid-text); }
.cal .l { background: var(--level-low); color: var(--level-low-text); }
.legend { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11px; color: var(--text-muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 110px; }
.bars b { flex: 1; border-radius: 6px 6px 0 0; background: var(--gradient-brand); transform-origin: bottom; }

.demo { display: grid; gap: 24px; }
@media (min-width: 900px) { .demo { grid-template-columns: 1fr 1fr; align-items: start; } }
.days { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip { min-height: var(--touch); min-width: var(--touch); padding: 0 14px; border-radius: var(--radius-chip); border: 1px solid var(--border); background: var(--card); color: var(--text); font: 600 .9rem var(--font); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--gradient-brand); color: var(--on-gradient); border-color: transparent; }
.demo-habit { display: flex; width: 100%; align-items: center; gap: 12px; min-height: 56px; padding: 8px 4px; border: 0; border-top: 1px solid var(--border); background: none; color: var(--text); font: 600 1rem var(--font); text-align: left; cursor: pointer; }
.demo-habit:first-child { border-top: 0; }
.band-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: .85rem; }
.comparison { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.comparison ul { padding-left: 1.1em; margin: 0; }

.hero-grid > *, .grid > * { min-width: 0; }
.hero-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr .85fr; } }
/* Legal pages: wide tables, long addresses and the deletion e-mail template */
.legal .table-scroll table { width: 100%; }
.legal td, .legal th { vertical-align: top; }
.legal pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.legal a, .legal .gap { overflow-wrap: anywhere; }
