:root {
  color-scheme: light dark;
  --bg: #0f1115;
  --panel: #171a21;
  --border: #2a2e37;
  --text: #e8eaed;
  --muted: #9aa1ac;
  --accent: #5b8cff;
  --warn-bg: #2a2111;
  --warn-border: #5c4a1a;
  --warn-text: #e8c468;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

header.page-head {
  margin-bottom: 32px;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.logo-mark {
  height: 36px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

header.page-head h1 {
  margin: 0;
  font-size: 1.6rem;
}

.lede {
  color: var(--muted);
  max-width: 640px;
}

.notice {
  margin: 20px 0 36px;
  padding: 14px 16px;
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: 8px;
  color: var(--warn-text);
  font-size: 0.92rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card h2 {
  margin: 0;
  font-size: 1.1rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  flex-grow: 1;
}

.card .tag {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--warn-text);
  margin-bottom: -4px;
}

.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.btn {
  display: inline-block;
  text-decoration: none;
  font-size: 0.88rem;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn.secondary {
  color: var(--text);
}

footer {
  margin-top: 56px;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

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

/* install.html */

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.back-link:hover {
  color: var(--text);
}

section.platform {
  margin-bottom: 44px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}

section.platform:last-of-type {
  border-bottom: none;
}

section.platform h2 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

ol {
  padding-left: 22px;
}

ol li {
  margin-bottom: 10px;
}

code {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.88em;
}

pre {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 0.85rem;
}

pre code {
  background: none;
  border: none;
  padding: 0;
}

.caveat {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: 8px;
  color: var(--warn-text);
  font-size: 0.88rem;
}

/* ---- Cross-app switcher (see ../switcher.js) ---- */
.app-switcher {
  margin-left: auto;
}

.sp-switcher {
  position: relative;
  display: inline-block;
}

.sp-switcher__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.sp-switcher__button:hover,
.sp-switcher__button[aria-expanded="true"] {
  background: var(--panel);
  color: var(--text);
}

.sp-switcher__button:focus-visible,
.sp-switcher__tile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sp-switcher__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1000;
  width: min(300px, calc(100vw - 24px));
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.sp-switcher__panel[hidden] {
  display: none;
}

.sp-switcher__heading {
  padding: 2px 6px 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.sp-switcher__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.sp-switcher__tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
}

a.sp-switcher__tile:hover {
  background: var(--bg);
}

.sp-switcher__icon {
  display: inline-flex;
  margin-bottom: 6px;
  color: var(--accent);
}

.sp-switcher__name {
  font-size: 14px;
  font-weight: 600;
}

.sp-switcher__desc {
  font-size: 11px;
  color: var(--muted);
}

.sp-switcher__tile.is-current {
  border-color: var(--accent);
  background: var(--bg);
}
