:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --text: #1a2230;
  --muted: #5a6678;
  --line: #d9dfe8;
  --accent: #0b7fa6;
  --accent-ink: #ffffff;
  --note-bg: #e8f3f8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1522;
    --surface: #151e2f;
    --text: #e6ebf3;
    --muted: #9aa8bd;
    --line: #26324a;
    --accent: #4cc3e8;
    --accent-ink: #08121f;
    --note-bg: #12283a;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

header.site {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}

header.site a.brand {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}

header.site a.brand-logo { line-height: 0; flex: none; }

header.site a.brand-logo img {
  display: block;
  height: 44px;
  width: auto;
}

@media (max-width: 420px) {
  header.site .wrap { flex-wrap: wrap; }
  header.site a.brand-logo img { height: 34px; }
  header.site nav a { margin-left: 12px; }
}

header.site nav a {
  margin-left: 16px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

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

main { padding: 32px 0 56px; }

h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 6px;
  text-wrap: balance;
}

h1.logo { margin: 0 0 10px; line-height: 0; }

/* The DeepSleep logo, drawn as a mask so it takes the theme's text colour. */
h1.logo a { display: inline-block; width: min(100%, 200px); }

h1.logo .logo-mark {
  display: block;
  width: min(100%, 200px);
  aspect-ratio: 500 / 470;
  background: var(--text);
  -webkit-mask: url("deepsleep-logo.png") left center / contain no-repeat;
          mask: url("deepsleep-logo.png") left center / contain no-repeat;
}

img.hero {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin: 0 0 20px;
}

h2 {
  font-size: 1.25rem;
  margin: 36px 0 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  text-wrap: balance;
}

h3 { font-size: 1.05rem; margin: 22px 0 4px; }

p, ul { margin: 0 0 14px; }

ul { padding-left: 22px; }

li { margin-bottom: 6px; }

a { color: var(--accent); }

.meta { color: var(--muted); margin: 0 0 24px; }

.note {
  background: var(--note-bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  margin: 0 0 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 18px;
  font-size: 0.95rem;
}

.table-scroll { overflow-x: auto; }

th, td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

th { color: var(--muted); font-weight: 600; white-space: nowrap; }

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}

/* Roadmap: version buttons on the left, one panel visible at a time on the right.
   On narrow screens the buttons move to a row above the panel. */
.roadmap-body {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  margin: 12px 0 18px;
}

.roadmap-tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 560px) {
  .roadmap-body { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .roadmap-tabs { flex-direction: row; flex-wrap: wrap; }
}

.roadmap-tabs button {
  text-align: left;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
}

.roadmap-tabs button span { font-weight: 400; opacity: 0.8; }

.roadmap-tabs button:hover { color: var(--accent); border-color: var(--accent); }

.roadmap-tabs button[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.roadmap-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px 4px;
  min-width: 0;
}

.roadmap-panel[hidden] { display: none; }

.roadmap-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  margin: 0 0 10px;
}

.status {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 2px 10px;
}

.status-live { background: #dcf3e4; color: #17603a; }
.status-soon { background: #fdf0d6; color: #7a5208; }

@media (prefers-color-scheme: dark) {
  .status-live { background: #173a28; color: #8fe0b0; }
  .status-soon { background: #3d2f12; color: #f5cf7c; }
}

.roadmap-extra { color: var(--muted); font-size: 0.95rem; }

footer.site {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 20px 0 32px;
}

footer.site a { color: var(--muted); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
