:root {
  color-scheme: light dark;
  --bg: #fbfbfa;
  --surface: #ffffff;
  --text: #1a1d21;
  --muted: #5d6570;
  --border: #e3e5e8;
  --accent: #0f62d6;
  --warn-bg: #fff6e0;
  --warn-border: #e9c46a;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1013;
    --surface: #16191e;
    --text: #e8eaed;
    --muted: #9aa3ae;
    --border: #272c33;
    --accent: #5aa2ff;
    --warn-bg: #2a2210;
    --warn-border: #6b5518;
  }
}

* {
  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", "Helvetica Neue", Arial, sans-serif;
}

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

/* Header and footer */

.site-header {
  padding: 1.5rem 0;
}

.site-header a {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.site-header a:hover {
  color: var(--accent);
}

.site-footer {
  margin-top: 4rem;
  padding: 1.5rem 0 3rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

/* Home */

.hero {
  padding: 2.5rem 0 1rem;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 6vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.section-title {
  margin: 3rem 0 1rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.card {
  display: block;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

a.card {
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s;
}

a.card:hover {
  border-color: var(--accent);
}

.card h2 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.3;
}

.card p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

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

.app-head {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.app-icon {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 22.5%;
  border: 1px solid var(--border);
}

.app-shots {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.5rem 0 0.5rem;
}

.app-shots img {
  display: block;
  height: auto;
  border: 1px solid var(--border);
}

.app-shots .iphone {
  width: min(48%, 220px);
  border-radius: 24px;
}

.app-shots .watch {
  width: min(30%, 130px);
  border-radius: 20px;
}

.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.link-list a {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

.link-list a:hover {
  border-color: var(--accent);
}

/* Document pages */

.doc-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 0 0.5rem;
}

.doc-head .app-icon {
  width: 56px;
  height: 56px;
}

.doc-head h1 {
  margin: 0;
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.doc-head p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.doc h2 {
  margin: 2.5rem 0 0.5rem;
  font-size: 1.35rem;
  line-height: 1.3;
}

.doc h3 {
  margin: 1.75rem 0 0.25rem;
  font-size: 1.05rem;
}

.doc p,
.doc ul {
  margin: 0.75rem 0;
}

.doc ul {
  padding-left: 1.25rem;
}

.doc li {
  margin: 0.3rem 0;
}

.doc address {
  font-style: normal;
}

.doc table {
  width: 100%;
  margin: 0.75rem 0;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.doc th,
.doc td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.doc th {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.doc code {
  font-family: var(--mono);
  font-size: 0.9em;
}

.doc pre {
  margin: 0.75rem 0;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow-x: auto;
}

.doc pre code {
  font-size: 0.9rem;
}

.notice {
  margin: 1.5rem 0;
  padding: 0.9rem 1.1rem;
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: 10px;
  font-size: 0.95rem;
}

.contact {
  margin: 1.5rem 0;
}

.contact .email {
  font-size: 1.15rem;
  font-weight: 600;
}

.tag {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 0.05em 0.35em;
  border: 1px solid var(--border);
  border-radius: 5px;
  white-space: nowrap;
}
