:root {
  --bg: #f7f8fc;
  --surface: #ffffff;
  --surface-2: #eef0f7;
  --text: #1a1c22;
  --muted: #5b5f6b;
  --accent: #4a5c92;
  --accent-soft: #dbe1ff;
  --border: #e0e3ec;
  --radius: 20px;
  --max: 960px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111318;
    --surface: #1a1c22;
    --surface-2: #23262e;
    --text: #e3e4ea;
    --muted: #a3a7b4;
    --accent: #b4c4ff;
    --accent-soft: #2c3a63;
    --border: #2d3039;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

header.site {
  border-bottom: 1px solid var(--border);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; gap: 16px;
}
.brand {
  font-weight: 700; font-size: 20px; letter-spacing: -0.01em;
  color: var(--text); text-decoration: none;
}
nav a { color: var(--muted); text-decoration: none; margin-left: 20px; font-size: 15px; }
nav a:hover { color: var(--text); }

main { padding: 48px 0 72px; }

h1 { font-size: clamp(32px, 6vw, 48px); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 16px; }
h2 { font-size: 24px; letter-spacing: -0.01em; margin: 48px 0 12px; }
h3 { font-size: 18px; margin: 28px 0 6px; }
p.lead { font-size: 20px; color: var(--muted); max-width: 640px; margin: 0 0 28px; }

.badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 14px; font-weight: 600; margin-bottom: 16px;
}

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
a.card { display: block; color: inherit; text-decoration: none; transition: border-color .15s; }
a.card:hover { border-color: var(--accent); }
a.card.app-card, .app-card { display: flex; gap: 20px; align-items: center; }
.app-card img { width: 96px; border-radius: 50%; flex-shrink: 0; }
.app-card h3 { margin: 0 0 4px; }
.app-card p { margin: 0; color: var(--muted); }

.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.watches { display: flex; gap: 16px; justify-content: center; }
.watches img { width: 46%; border-radius: 50%; border: 6px solid var(--surface-2); }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 24px; }
.features .card h3 { margin-top: 0; }
.features .card p { margin: 0; color: var(--muted); }

.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; margin-top: 24px; }
.shots .phone img { border-radius: 24px; border: 1px solid var(--border); max-width: 300px; margin: 0 auto; }
.shots .watch img { border-radius: 50%; max-width: 260px; margin: 0 auto; border: 6px solid var(--surface-2); }

.note { color: var(--muted); font-size: 15px; }

.prose { max-width: 720px; }
.prose li { margin-bottom: 6px; }

footer.site { border-top: 1px solid var(--border); padding: 24px 0; color: var(--muted); font-size: 14px; }
footer.site a { color: var(--muted); }

@media (max-width: 720px) {
  main { padding: 32px 0 56px; }
  .hero, .shots, .features { grid-template-columns: 1fr; }
  .app-card img { width: 72px; }
  nav a { margin-left: 14px; }
}

/* --- Added Nov 2026: home app list + web-app pages (alxwhere, leg.pub) --- */
.apps { display: grid; gap: 16px; }
.app-card .meta { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.cta {
  display: inline-block; padding: 10px 20px; border-radius: 999px;
  background: var(--accent); color: var(--surface); text-decoration: none; font-weight: 600;
}
.cta:hover { filter: brightness(1.08); }
.hero-shot img { max-width: 300px; margin: 0 auto; border-radius: 24px; border: 1px solid var(--border); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 24px; }
.stats .card { padding: 18px 20px; }
.stats b { display: block; font-size: 30px; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stats span { color: var(--muted); font-size: 14px; line-height: 1.4; display: block; margin-top: 6px; }
.screens { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; align-items: start; }
.screens figure { margin: 0; min-width: 0; }
.screens img { border-radius: 16px; border: 1px solid var(--border); }
.screens .phone img { max-width: 300px; margin: 0 auto; border-radius: 24px; }
figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; }
table.score { border-collapse: collapse; width: 100%; max-width: 420px; font-variant-numeric: tabular-nums; }
table.score th, table.score td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); }
table.score th { color: var(--muted); font-weight: 600; font-size: 14px; }
table.score td:last-child, table.score th:last-child { text-align: right; }
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .screens { grid-template-columns: 1fr; }
}

/* --- Added Nov 2026: About page (publications, patents) --- */
.pubs { display: grid; gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.pub { padding: 18px 22px; }
.pub h3 { margin: 0 0 4px; }
.pub h3 a { color: inherit; text-decoration: none; }
.pub h3 a:hover { color: var(--accent); text-decoration: underline; }
.pub p { margin: 0; }
.pub p + p { margin-top: 10px; color: var(--muted); }
.pub .meta { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); font-weight: 400; }
.pub details > summary { cursor: pointer; list-style: none; }
.pub details > summary::-webkit-details-marker { display: none; }
.pub details > summary::after { content: "Abstract"; display: block; margin-top: 6px; font-size: 14px; color: var(--accent); }
.pub details[open] > summary::after { content: "Hide abstract"; }
.pub details > p { margin-top: 12px; color: var(--muted); }
h3.year { margin: 32px 0 0; color: var(--muted); font-size: 15px; text-transform: uppercase; letter-spacing: .08em; }
h3.year + .pubs { margin-top: 10px; }
