/* WMDE site. Colors follow the desktop's own theme: dark by default, light on request. */

@font-face { font-family: "Noto Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/NotoSans-Regular.woff") format("woff"); }
@font-face { font-family: "Noto Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/NotoSans-Medium.woff") format("woff"); }
@font-face { font-family: "Noto Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/NotoSans-Bold.woff") format("woff"); }
@font-face { font-family: "Noto Sans Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/NotoSansMono-Regular.woff") format("woff"); }

:root {
  color-scheme: dark light;
  --accent: #0078D7;
  --on-accent: #FFFFFF;
  --bg: #202020;
  --layer: #2C2C2C;
  --sunk: #191919;
  --line: #363638;
  --text: #FFFFFF;
  --muted: #B8B8B8;
  --hover: #323232;
  --shade: rgba(0, 0, 0, .45);
  --link: #6FB0EC;
  --warn-bg: #3A2E12;
  --warn-line: #7A5B12;
  --radius: 4px;
  --sans: "Noto Sans", system-ui, sans-serif;
  --mono: "Noto Sans Mono", ui-monospace, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #FFFFFF;
    --layer: #F3F3F3;
    --sunk: #F7F7F7;
    --line: #E0E0E0;
    --text: #1B1B1B;
    --muted: #595959;
    --hover: #E9E9E9;
    --shade: rgba(0, 0, 0, .16);
    --link: #005FB0;
    --warn-bg: #FFF4CE;
    --warn-line: #E0C060;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--on-accent); }
code, pre { font-family: var(--mono); }
code { font-size: .875em; }
h1, h2, h3 { margin: 0; font-weight: 700; }
p { margin: 0; }

.skip { position: absolute; left: -9999px; top: 8px; }
.skip:focus { left: 16px; z-index: 10; background: var(--accent); color: var(--on-accent); padding: 8px 12px; border-radius: var(--radius); }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 480px) { .wrap { padding: 0 16px; } }

/* Header */

.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 20px; letter-spacing: .02em; }
.brand:hover { text-decoration: none; }
.brand svg { color: var(--accent); }
.nav-links { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 auto; margin: 0; padding: 0; list-style: none; }
.nav-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: var(--radius); color: var(--text); font-size: 15px; }
.nav-link:hover, .nav-link[aria-current="page"] { text-decoration: none; background: var(--hover); }
@media (max-width: 720px) { .nav-links { display: none; } }

/* Buttons */

.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: var(--radius); font-weight: 500; border: 1px solid transparent; }
.btn:hover { text-decoration: none; filter: brightness(1.12); }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-secondary { background: var(--layer); border-color: var(--line); color: var(--text); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Shared section pieces */

.section { padding-top: 112px; }
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 720px; margin-bottom: 40px; }
.h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.15; }
.lead { color: var(--muted); font-size: 18px; }
.muted { color: var(--muted); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 8px; height: 8px; background: var(--accent); }
.eyebrow--plain::before { display: none; }
.eyebrow--accent { color: var(--link); }
.shot { margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--layer); }

/* Hero */

.hero { padding-top: 88px; }
.hero-text { max-width: 820px; display: flex; flex-direction: column; gap: 22px; }
.hero h1 { font-size: clamp(38px, 5.4vw, 66px); line-height: 1.06; letter-spacing: -.015em; }
.hero .lead { font-size: clamp(17px, 1.6vw, 20px); max-width: 680px; }
.hero .btn-row { padding-top: 6px; }
.hero-meta { font-size: 14px; color: var(--muted); }
.hero-shot { margin-top: 64px; box-shadow: 0 40px 90px var(--shade); }

/* Stats strip */

.stats { padding-top: 56px; }
.stats dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats div { padding: 24px 0; display: flex; flex-direction: column-reverse; gap: 2px; }
.stats dt { color: var(--muted); font-size: 15px; }
.stats dd { margin: 0; font-size: 32px; font-weight: 700; line-height: 1.3; }

/* Cards */

.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.grid-apps { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.card--filled { background: var(--layer); padding: 28px; gap: 12px; }
.card--row { flex-direction: row; gap: 20px; align-items: flex-start; padding: 28px; }
.card--row > div { display: flex; flex-direction: column; gap: 8px; }
.card h3 { font-size: 20px; }
.card p { color: var(--muted); font-size: 15px; line-height: 1.6; }
.card .icon { color: var(--link); flex-shrink: 0; }
.app-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.app-title h3 { font-size: 18px; }
.app-title code { font-size: 13px; color: var(--muted); }
.icon-tile { width: 44px; height: 44px; border-radius: var(--radius); background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; }

/* Gallery */

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tab { min-height: 44px; padding: 0 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--layer); color: var(--text); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; }
.tab:hover { background: var(--hover); }
.tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tabpanel { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.tabpanel[hidden] { display: none; }
.tabpanel figcaption { color: var(--muted); font-size: 15px; }
.tabpanel .shot img { width: 100%; aspect-ratio: 1080 / 745; object-fit: cover; }

/* Snap band */

.band { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; background: var(--layer); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 56px); }
.band-text { flex: 1 1 340px; display: flex; flex-direction: column; gap: 16px; }
.band-text p:last-child { color: var(--muted); font-size: 17px; }
.band .shot { flex: 1.4 1 460px; min-width: 0; border-radius: var(--radius); }

.pair { padding-top: 16px; }

/* Install block and code */

.split { display: flex; flex-wrap: wrap; gap: 48px; }
.split-text { flex: 1 1 320px; display: flex; flex-direction: column; gap: 16px; }
.split-text > p { color: var(--muted); font-size: 17px; }
.split-code { flex: 1.3 1 440px; min-width: 0; }
.steps { margin: 8px 0 0; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 14px; }
.steps li { display: flex; gap: 14px; align-items: baseline; counter-increment: step; }
.steps li::before { content: counter(step); flex-shrink: 0; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--on-accent); border-radius: var(--radius); font-weight: 700; font-size: 14px; }
.more { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-weight: 500; }

.code { background: var(--sunk); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.code-head { min-height: 40px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 16px; border-bottom: 1px solid var(--line); background: var(--layer); }
.code-head span { font-size: 13px; color: var(--muted); }
.copy { min-height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; background: transparent; border: 0; border-radius: var(--radius); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.copy:hover { background: var(--hover); }
.code pre, pre.code { margin: 0; padding: 18px 20px; overflow-x: auto; font-size: 14px; line-height: 1.75; color: var(--text); }
.code .c { color: var(--muted); }

/* Closing statement */

.closing { border-top: 1px solid var(--line); padding-top: 48px; display: flex; flex-wrap: wrap; gap: 32px 64px; }
.closing h2 { flex: 1 1 280px; }
.closing div { flex: 2 1 480px; display: flex; flex-direction: column; gap: 14px; color: var(--muted); }

/* Footer */

.site-footer { margin-top: 112px; border-top: 1px solid var(--line); background: var(--layer); }
.footer-in { padding-top: 40px; padding-bottom: 40px; display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: flex-start; justify-content: space-between; }
.footer-in > div { display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.footer-in p { color: var(--muted); font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 15px; margin: 0; padding: 0; list-style: none; }
.footer-links a { display: inline-block; padding: 10px 0; }
.site-footer--slim .footer-in { padding-top: 28px; padding-bottom: 28px; align-items: center; font-size: 14px; color: var(--muted); }

/* Docs page */

.docs { padding-top: 48px; padding-bottom: 96px; display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.toc { flex: 1 1 220px; max-width: 280px; display: flex; flex-direction: column; gap: 2px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--layer); }
.toc p { padding: 8px 12px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.toc a { display: block; padding: 8px 12px; border-radius: var(--radius); color: var(--text); font-size: 15px; }
.toc a:hover { text-decoration: none; background: var(--hover); }
@media (max-width: 860px) { .toc { max-width: none; } }
.doc { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 56px; line-height: 1.6; }
.doc-head { display: flex; flex-direction: column; gap: 14px; }
.doc-head h1 { font-size: clamp(34px, 4vw, 48px); line-height: 1.1; }
.crumbs { font-size: 14px; color: var(--muted); }
.doc section { display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 16px; }
.doc h2 { font-size: 28px; }
.doc h3 { font-size: 20px; margin-top: 16px; }
.doc ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.doc p code, .doc li code { color: var(--text); }
.quick { padding: 28px; background: var(--layer); border: 1px solid var(--line); border-radius: var(--radius); }
.quick-title { display: flex; align-items: center; gap: 12px; }
.quick-title svg { color: var(--link); }
.quick-title h2 { font-size: 22px; }
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; min-width: 420px; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
thead tr { background: var(--layer); }
tbody tr:last-child td { border-bottom: 0; }
td.muted { color: var(--muted); }
.note { display: flex; gap: 14px; padding: 16px 18px; background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--radius); font-size: 15px; }
.note svg { flex-shrink: 0; margin-top: 2px; }
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.pkg-grid div { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; gap: 6px; }
.pkg-grid p:first-child { font-weight: 700; }
.pkg-grid p:last-child { color: var(--muted); font-size: 14px; font-family: var(--mono); }
.next { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); }
