:root {
  --bg: #f7f5ed;
  --bg-panel: #efebdf;
  --text-primary: #292419;
  --text-secondary: #54503f;
  --text-tertiary: #72695a;
  --accent: #80591a;
  --accent-dim: #a37c3a;
  --hairline: rgba(41, 36, 25, 0.16);
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent);
}
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--bg-panel);
  padding: 8px 14px;
  z-index: 10;
}
.skip:focus { left: 8px; }

.wrap { max-width: 680px; margin: 0 auto; padding: 0 28px; }

/* Header */
.site-header { padding: 36px 0 20px; border-bottom: 1px solid var(--hairline); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--text-primary);
}
.brand-mark { width: 26px; height: 26px; flex-shrink: 0; }
.brand-word { font-size: 1.1875rem; letter-spacing: 0.04em; }

nav.site-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 0.9375rem; }
nav.site-nav a { color: var(--text-secondary); text-decoration: none; letter-spacing: 0.02em; }
nav.site-nav a[aria-current="page"] { color: var(--text-primary); }
nav.site-nav a:hover, nav.site-nav a:focus-visible { color: var(--accent); }

/* Hero */
.hero { padding: 90px 0 70px; text-align: center; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.28em; font-size: 0.75rem;
  color: var(--text-tertiary); margin-bottom: 22px;
}
h1 { font-size: 2.5rem; font-weight: 400; letter-spacing: 0.01em; line-height: 1.35; margin: 0 0 24px; }
.lede { font-size: 1.1875rem; color: var(--text-secondary); max-width: 520px; margin: 0 auto; }

/* Sections */
section { padding: 56px 0; border-bottom: 1px solid var(--hairline); }
section:last-of-type { border-bottom: none; }

h2 {
  font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.22em;
  color: var(--text-tertiary); font-weight: 400; margin: 0 0 26px;
}
h3 { font-size: 1.375rem; font-weight: 400; margin: 0 0 12px; line-height: 1.4; }

p { margin: 0 0 18px; color: var(--text-secondary); }
p:last-child { margin-bottom: 0; }
strong { color: var(--text-primary); font-weight: 400; }

.feature-list { list-style: none; margin: 0; padding: 0; }
.feature-list li { padding: 18px 0; border-top: 1px solid var(--hairline); color: var(--text-secondary); }
.feature-list li:first-child { border-top: none; padding-top: 0; }

.faq-item { padding: 22px 0; border-top: 1px solid var(--hairline); }
.faq-item:first-child { border-top: none; padding-top: 0; }
.faq-item h3 { font-size: 1.125rem; color: var(--text-primary); margin-bottom: 8px; }

/* Buttons and status */
.downloads { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.download-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border: 1px solid var(--hairline); border-radius: 8px;
  color: var(--text-primary); text-decoration: none; font-size: 0.9375rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.download-btn:hover, .download-btn:focus-visible {
  border-color: var(--accent-dim); color: var(--accent);
}
.download-btn .platform { color: var(--text-tertiary); font-size: 0.8125rem; }
.status {
  display: inline-block; padding: 6px 14px; border: 1px solid var(--accent-dim);
  border-radius: 999px; color: var(--accent); font-size: 0.8125rem; letter-spacing: 0.08em;
  text-transform: uppercase; margin-bottom: 18px;
}
.note { margin-top: 18px; font-size: 0.875rem; color: var(--text-tertiary); }

.panel { background: var(--bg-panel); border-radius: 10px; padding: 30px 32px; }

/* App cards (home) */
.app-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--hairline); border: 1px solid var(--hairline);
  border-radius: 12px; overflow: hidden;
}
.app-card {
  background: var(--bg); padding: 30px 26px; display: flex; flex-direction: column;
  text-decoration: none; color: var(--text-primary); transition: background 0.2s ease;
}
.app-card:hover, .app-card:focus-visible { background: var(--bg-panel); }
.app-card .tagline {
  text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.75rem;
  color: var(--accent); margin-bottom: 14px;
}
.app-card h3 { margin-bottom: 10px; }
.app-card p { flex-grow: 1; font-size: 0.9375rem; margin-bottom: 18px; }
.app-card .open { font-size: 0.875rem; color: var(--text-tertiary); }
.app-card:hover .open, .app-card:focus-visible .open { color: var(--accent); }

/* Simple pages */
.page-header { padding-top: 60px; padding-bottom: 10px; }
.page-header .eyebrow { margin-bottom: 14px; }
.page-header h1 { font-size: 2rem; }
.updated { color: var(--text-tertiary); font-size: 0.875rem; }
.prose h2 {
  text-transform: none; letter-spacing: 0; font-size: 1.375rem;
  color: var(--text-primary); margin-bottom: 18px;
}
.prose h3 { font-size: 1.125rem; color: var(--text-primary); margin-top: 26px; }
.prose section { padding: 40px 0; }

/* Footer */
.site-footer { padding: 40px 0 60px; text-align: center; }
.site-footer p { color: var(--text-tertiary); font-size: 0.875rem; }
.site-footer nav {
  margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 20px;
  justify-content: center; font-size: 0.875rem;
}
.site-footer nav a { color: var(--text-tertiary); }

@media (max-width: 640px) {
  h1 { font-size: 1.875rem; }
  .hero { padding: 60px 0 50px; }
  .app-grid { grid-template-columns: 1fr; }
  .panel { padding: 26px 22px; }
}

/* Respect "increase contrast" */
@media (prefers-contrast: more) {
  :root {
    --text-secondary: #292419;
    --text-tertiary: #3d372a;
    --accent: #5e410f;
    --hairline: rgba(41, 36, 25, 0.5);
  }
}

/* Icons and screenshots */
.app-icon {
  display: block;
  width: 88px;
  height: 88px;
  margin: 0 auto 28px;
  border-radius: 22%;
  box-shadow: 0 1px 2px rgba(41, 36, 25, 0.25), 0 10px 28px rgba(41, 36, 25, 0.14);
}

.card-icon {
  display: block;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border-radius: 22%;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 22px 18px;
  margin: 0 0 22px;
  padding: 0;
}

.gallery figure { margin: 0; }

.gallery img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--hairline);
}

.gallery figcaption {
  margin-top: 10px;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--text-tertiary);
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
