:root {
  --bg: #fbfaf8;
  --bg-2: #ffffff;
  --ink: #1b1a18;
  --muted: #6b6660;
  --line: #e6e1d9;
  --accent: #1a3a4a;
  --accent-2: #c9a96e;
  --ok: #2f6b4f;
  --warn: #8a6d1f;
  --bad: #9c3b2e;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(24, 22, 20, 0.04), 0 12px 32px -18px rgba(24, 22, 20, 0.25);
  color-scheme: light;
}
[data-brand='wd'] {
  --accent: #8c5b46;
  --accent-2: #c58a72;
  --line: #eadfd4;
  --bg: #fcf9f5;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: 'Playfair Display', Georgia, serif; font-weight: 500; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(34px, 5vw, 54px); }
h2 { font-size: clamp(26px, 3.2vw, 36px); }
h3 { font-size: 22px; }
p { margin: 0 0 14px; }
a { color: inherit; }
code, .mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13px; }

.wrap { max-width: 1220px; margin: 0 auto; padding: 0 24px; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .row { display: flex; align-items: center; gap: 22px; height: 62px; }
.brandmark { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; }
.brandmark .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-2); }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  text-decoration: none; font-size: 14px; color: var(--muted);
  padding: 8px 12px; border-radius: 999px;
}
.nav a:hover { background: var(--bg-2); color: var(--ink); }
.nav a[aria-current='page'] { background: var(--accent); color: #fff; }

.hero { padding: 64px 0 34px; border-bottom: 1px solid var(--line); }
.hero .eyebrow { font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent-2); font-weight: 600; }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 70ch; margin-top: 18px; }
.stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 30px; }
.stat .n { font-family: 'Playfair Display', serif; font-size: 32px; }
.stat .l { font-size: 13px; color: var(--muted); }

section { padding: 52px 0; border-bottom: 1px solid var(--line); }
section > .wrap > header { margin-bottom: 26px; max-width: 78ch; }
section > .wrap > header p { color: var(--muted); margin-top: 10px; }

.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500;
  padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted);
  background: var(--bg);
}
.chip.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 32%, var(--line)); }
.chip.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 32%, var(--line)); }
.chip.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 32%, var(--line)); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; }
.filters button {
  font: inherit; font-size: 14px; cursor: pointer; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--muted);
}
.filters button[aria-pressed='true'] { background: var(--accent); border-color: var(--accent); color: #fff; }

.items { display: grid; gap: 26px; grid-template-columns: repeat(auto-fill, minmax(430px, 1fr)); }
@media (max-width: 900px) { .items { grid-template-columns: 1fr; } }
.item {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.item .head { padding: 18px 20px 0; display: flex; gap: 12px; align-items: flex-start; }
.item .head .t { flex: 1; }
.item .head h3 { font-size: 20px; }
.item .head .goal { font-size: 13px; color: var(--muted); margin-top: 4px; }
.item .body { padding: 16px 20px 20px; display: grid; gap: 16px; }

.preview { background: linear-gradient(180deg, #f3efe9, #e9e3da); padding: 22px; display: flex; justify-content: center; }
[data-brand='wd'] .preview { background: linear-gradient(180deg, #f6ece2, #efe0d3); }
.phone {
  width: 268px; border-radius: 26px; overflow: hidden; background: #000;
  box-shadow: 0 18px 44px -20px rgba(0, 0, 0, 0.5); position: relative;
}
.phone img, .phone video { display: block; width: 100%; height: auto; }
.phone.wide { width: 340px; border-radius: 14px; }
.swipe { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.swipe img { flex: 0 0 100%; scroll-snap-align: center; }
.dots { display: flex; gap: 5px; justify-content: center; padding: 8px 0 10px; background: #111; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.35); display: block; }
.dots i.on { background: #fff; }

.caption {
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  font-size: 14.5px; white-space: pre-wrap; position: relative;
}
.caption .copy {
  position: absolute; top: 10px; right: 10px; font: inherit; font-size: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg-2); border-radius: 8px; padding: 4px 9px; color: var(--muted);
}
.caption .copy:hover { color: var(--ink); }
.meta { display: grid; gap: 10px; font-size: 14px; }
.meta .k {
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
button.copy {
  font: inherit; font-size: 12px; letter-spacing: 0; text-transform: none; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg-2); border-radius: 8px;
  padding: 3px 9px; color: var(--muted);
}
button.copy:hover { color: var(--ink); }
.meta a[download] { color: var(--accent); }
.meta .hash { color: var(--accent); font-size: 13.5px; word-spacing: 4px; }
details.alt summary { cursor: pointer; font-size: 13px; color: var(--muted); }
details.alt p { font-size: 14px; margin: 10px 0 0; }

.rule { border-left: 3px solid var(--line); padding: 2px 0 2px 16px; margin: 0 0 18px; }
.rule.red { border-color: var(--bad); }
.rule.green { border-color: var(--ok); }
.rule .rule-t { font-size: 17px; font-weight: 600; color: var(--ink); margin: 0 0 4px; }
.rule p { font-size: 15px; color: var(--muted); margin: 0; }
.rule .src { font-size: 12.5px; color: var(--muted); opacity: .85; margin-top: 6px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
tbody tr:hover { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.scroll-x { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); }
.scroll-x table { min-width: 720px; }
td .chip { white-space: nowrap; }

footer.site { padding: 40px 0 70px; color: var(--muted); font-size: 14px; }
footer.site a { color: var(--accent); }

.callout {
  border: 1px solid color-mix(in srgb, var(--accent-2) 45%, var(--line));
  background: color-mix(in srgb, var(--accent-2) 8%, var(--bg-2));
  border-radius: 14px; padding: 16px 18px; font-size: 15px;
}
.callout strong { font-weight: 600; }
.grid-2 { display: grid; gap: 22px; grid-template-columns: 1fr 1fr; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }
.hidden { display: none !important; }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141614; --bg-2: #1b1e1c; --ink: #f2efe9; --muted: #a8a29a;
    --line: #2b302d; --accent: #cfe0e6; --accent-2: #c9a96e;
    color-scheme: dark;
  }
  [data-brand='wd'] { --bg: #171412; --bg-2: #1e1a17; --line: #322a25; --accent: #f0d9cd; --accent-2: #c58a72; }
  .nav a[aria-current='page'], .filters button[aria-pressed='true'] { color: #141614; }
  .preview { background: linear-gradient(180deg, #22201d, #191715); }
  [data-brand='wd'] .preview { background: linear-gradient(180deg, #241d19, #1a1512); }
}
