/* Smart Living landing — tokens mirror docs/design.md §2.1 (light + dark). System font only. */
:root {
  --canvas: #f5f4ef;
  --surface: #ffffff;
  --divider: #d8d6d0;
  --text: #1c1c1e;
  --text2: #5a5a5e;
  --accent: #9a4f32;
  --on-accent: #ffffff;
  --decor: #b87352;
  --info: #2a5b8c;
  --tint: rgba(154, 79, 50, 0.08);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #141416;
    --surface: #242426;
    --divider: #3a3a3d;
    --text: #f5f4ef;
    --text2: #b4b4b8;
    --accent: #c87855;
    --on-accent: #141416;
    --info: #6fa8dc;
    --tint: rgba(200, 120, 85, 0.12);
    --shadow: none;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--text);
  font: 400 16px/22px system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.skip { position: absolute; left: -9999px; top: 8px; }
.skip:focus { left: 16px; z-index: 10; background: var(--surface); padding: 8px 12px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* ---------- header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 18px; min-height: 44px; }
.brand img { width: 28px; height: 28px; }
.lang {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--divider); border-radius: 999px;
  color: var(--text); text-decoration: none; font-family: inherit; font-weight: 500; font-size: 14px; line-height: 20px;
}
.lang:hover { background: var(--tint); }

/* ---------- hero ---------- */
main { flex: 1; }
.hero { display: grid; gap: 24px; padding: 16px 0 32px; align-items: start; }
@media (min-width: 920px) { .hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; padding: 48px 0 56px; } }
h1 { margin: 0; font-size: 32px; line-height: 38px; font-weight: 600; letter-spacing: -0.01em; }
@media (min-width: 720px) { h1 { font-size: 44px; line-height: 50px; } }
.tagline { margin: 12px 0 0; font-size: 18px; line-height: 26px; color: var(--text2); max-width: 36em; }
.states { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.states li {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--divider);
  font-size: 14px; line-height: 20px; color: var(--text);
}
.states li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--decor); }

/* ---------- download card ---------- */
.card { background: var(--surface); border: 1px solid var(--divider); border-radius: 16px; box-shadow: var(--shadow); }
.dl { padding: 20px; display: grid; gap: 12px; }
.dl h2 { margin: 0; font-size: 18px; line-height: 24px; font-weight: 600; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 20px; border-radius: 12px;
  font-family: inherit; font-weight: 500; font-size: 16px; line-height: 20px; text-decoration: none; text-align: center;
  border: 1px solid transparent;
}
.btn .ic { width: 22px; height: 22px; flex: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(0.92); }
.btn-secondary { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-secondary:hover { background: var(--tint); }
.btn[aria-disabled="true"] { color: var(--text2); border-color: var(--divider); border-style: dashed; cursor: not-allowed; background: transparent; }
.qr-row { display: flex; align-items: center; gap: 16px; padding-top: 12px; border-top: 1px solid var(--divider); }
.qr { width: 104px; height: 104px; flex: none; padding: 6px; background: #ffffff; border-radius: 10px; border: 1px solid var(--divider); }
.qr svg { display: block; width: 100%; height: 100%; }
.qr-row p { margin: 0; font-size: 14px; line-height: 20px; color: var(--text2); }
@media (max-width: 380px) { .qr { width: 88px; height: 88px; } }

/* ---------- "i" (details) ---------- */
.i { margin-top: 8px; }
.i summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin: -10px 0 -10px -10px; border-radius: 50%;
}
.i summary::-webkit-details-marker { display: none; }
.i summary span {
  display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px;
  border-radius: 50%; border: 1.5px solid var(--info); color: var(--info);
  font: 600 13px/1 Georgia, "Times New Roman", serif; font-style: italic;
}
.i[open] summary span { background: var(--info); color: var(--surface); }
.i p { margin: 8px 0 0; font-size: 14px; line-height: 20px; color: var(--text2); }

/* ---------- features ---------- */
.features { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 0 0 40px; padding: 0; list-style: none; }
@media (min-width: 560px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .features { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.feature { padding: 16px; }
.feature .ic { width: 28px; height: 28px; color: var(--accent); }
.feature h3 { margin: 12px 0 0; font-size: 16px; line-height: 22px; font-weight: 600; }
.feature .val { margin: 2px 0 0; font-size: 14px; line-height: 20px; color: var(--text2); }
.features-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--divider); padding: 20px 0 28px; font-size: 13px; line-height: 18px; color: var(--text2); }
.foot { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.foot nav a, .foot .mail { color: var(--text); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.foot nav a:hover, .foot .mail:hover { text-decoration: underline; }
.foot .admin { color: var(--text2); }
.legal { margin: 4px 0 0; }

@media (prefers-reduced-motion: no-preference) {
  .btn, .lang, .i summary span { transition: background-color 0.2s ease-out, filter 0.2s ease-out; }
}

/* Phones: one dense row per feature (icon · title/value · "i" top-right). */
@media (max-width: 559px) {
  .feature { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 14px; padding: 14px 52px 14px 16px; }
  .feature .ic { grid-row: 1 / span 2; margin-top: 2px; }
  .feature h3 { margin: 0; }
  .feature .i { grid-column: 1 / -1; margin: 0; }
  .feature .i summary { position: absolute; top: 6px; right: 6px; margin: 0; }
  .feature .i[open] p { margin-top: 10px; }
}

/* Desktop: phone-frame mockup of the app home screen under the hero text. */
.phone { display: none; }
@media (min-width: 920px) {
  .phone {
    display: block; margin: 32px 0 0; width: 284px; padding: 12px;
    border-radius: 40px; background: #1c1c1e; border: 1px solid var(--divider); box-shadow: var(--shadow);
  }
  .phone img { display: block; width: 260px; height: auto; border-radius: 28px; }
}

/* Static legal pages (/privacy, /terms, /delete-account): readable long-form text. */
.doc { margin: 8px 0 40px; padding: 24px 20px; max-width: 760px; font-size: 16px; line-height: 26px; overflow-wrap: anywhere; }
.doc h1 { font-size: 28px; line-height: 34px; }
.doc h2 { margin: 32px 0 8px; font-size: 20px; line-height: 28px; font-weight: 600; scroll-margin-top: 16px; }
.doc h3 { margin: 24px 0 6px; font-size: 17px; line-height: 24px; font-weight: 600; }
.doc p { margin: 10px 0; }
.doc ul, .doc ol { margin: 10px 0; padding-left: 22px; }
.doc li { margin: 4px 0; }
.doc .updated { margin: 8px 0 20px; color: var(--text2); font-size: 14px; }
.doc .updated strong { font-weight: 500; }
.doc code { font: 14px/1 ui-monospace, "SF Mono", Consolas, monospace; padding: 2px 5px; border-radius: 6px; background: var(--tint); }
.doc .table { overflow-x: auto; margin: 12px 0; border: 1px solid var(--divider); border-radius: 12px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.doc th, .doc td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--divider); }
.doc tr:last-child td { border-bottom: 0; }
.doc th { font-weight: 600; background: var(--tint); }
.doc .btn { display: inline-flex; width: auto; padding: 0 18px; text-decoration: none; }
.foot nav a[aria-current="page"] { color: var(--accent); }
@media (min-width: 720px) { .doc { padding: 40px 48px; } }
