/* Vibecoding 101 — glass design system. Light and dark themes. */
:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --text: #1d1d1f;
  --muted: #4b4b52;
  --accent: #5a35a8;
  --accent-ink: #ffffff;
  --accent-hover: #47288a;
  --focus: #3d1f8a;
  --glass: rgba(255, 255, 255, 0.46);
  --glass-hover: rgba(255, 255, 255, 0.64);
  --glass-strong: rgba(255, 255, 255, 0.58);
  --glass-border: rgba(255, 255, 255, 0.9);
  --hairline: rgba(0, 0, 0, 0.14);
  --control-border: #6e6e78;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 4px 12px rgba(31, 22, 70, 0.045);
  --chip: rgba(0, 0, 0, 0.07);
  --sheen: rgba(255, 255, 255, 0.38);
  --edge: rgba(255, 255, 255, 0.85);
  --blob1: #bdd9ff;
  --blob2: #ffcbdd;
  --blob3: #dccffb;
  --blob4: #c8f0d6;
  --tag-neutral-bg: #e6e6ec; --tag-neutral: #2f2f37;
  --tag-easy-bg: #d3f1df; --tag-easy: #0a5230;
  --tag-google-bg: #fdebc0; --tag-google: #5e3c00;
  --tag-special-bg: #e6dcfb; --tag-special: #43258a;
  --good-bg: #dcf5e6; --good: #0a5230; --good-border: #1c7a4a;
  --bad-bg: #fde4e4; --bad: #8a1c1c; --bad-border: #b53030;
  --x-bg: #ffffff; --x-text: #0f1419; --x-meta: #536471; --x-line: #cfd9de;
  --x-like: #c3125f; --x-mark: #0f6cbd; --x-badge: #0f6cbd;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a10;
  --text: #f5f5f7;
  --muted: #c3c3cf;
  --accent: #cbb6ff;
  --accent-ink: #1a1033;
  --accent-hover: #e0d3ff;
  --focus: #e0d3ff;
  --glass: rgba(34, 34, 48, 0.42);
  --glass-hover: rgba(58, 58, 80, 0.5);
  --glass-strong: rgba(26, 26, 38, 0.56);
  --glass-border: rgba(255, 255, 255, 0.14);
  --hairline: rgba(255, 255, 255, 0.18);
  --control-border: #b0b0be;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.2);
  --chip: rgba(255, 255, 255, 0.12);
  --sheen: rgba(255, 255, 255, 0.05);
  --edge: rgba(255, 255, 255, 0.16);
  --blob1: #1d3170;
  --blob2: #561f4e;
  --blob3: #382573;
  --blob4: #0f4541;
  --tag-neutral-bg: #34343f; --tag-neutral: #ececf3;
  --tag-easy-bg: #123f2a; --tag-easy: #a6f2c9;
  --tag-google-bg: #4a3608; --tag-google: #ffdd8f;
  --tag-special-bg: #33235e; --tag-special: #dacbff;
  --good-bg: #0f3423; --good: #b4f5d2; --good-border: #4fc48a;
  --bad-bg: #3d1414; --bad: #ffc9c9; --bad-border: #e57373;
  --x-bg: #000000; --x-text: #e7e9ea; --x-meta: #8b98a5; --x-line: #2f3336;
  --x-like: #f91880; --x-mark: #1d9bf0; --x-badge: #1d9bf0;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(70vmax 60vmax at 0% 0%, var(--blob1), transparent 62%),
    radial-gradient(60vmax 55vmax at 100% 8%, var(--blob2), transparent 60%),
    radial-gradient(70vmax 60vmax at 90% 100%, var(--blob3), transparent 62%),
    radial-gradient(60vmax 55vmax at 0% 95%, var(--blob4), transparent 60%),
    var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 50; background: var(--accent); color: var(--accent-ink); padding: 12px 18px; border-radius: 12px; font-weight: 600; }
.skip:focus { top: 12px; color: var(--accent-ink); }

.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(800px, 100% - 40px); }

/* Glass surface */
.glass {
  background: var(--glass);
  background-image: linear-gradient(135deg, var(--sheen), transparent 45%);
  -webkit-backdrop-filter: blur(36px) saturate(200%);
  backdrop-filter: blur(36px) saturate(200%);
  transition: background-color 0.2s ease, transform 0.2s ease;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow), inset 0 1px 0 var(--edge);
  border-radius: 24px;
}

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; padding: 10px 0; }
.bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 16px; border-radius: 999px; background: var(--glass-strong); }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: -0.01em; color: var(--text); text-decoration: none; min-height: 44px; margin-right: auto; white-space: nowrap; }
.brand:hover { color: var(--text); }
.nav { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.97rem; white-space: nowrap; }
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] { color: var(--accent); font-weight: 700; }

/* Type */
h1, h2, h3 { letter-spacing: -0.022em; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(2.2rem, 6.4vw, 4rem); font-weight: 700; }
h1 .hl { color: var(--accent); }
h2 { font-size: clamp(1.55rem, 3.6vw, 2.1rem); font-weight: 700; margin: 0 0 8px; }
h3 { font-size: 1.2rem; font-weight: 650; line-height: 1.25; }
p { margin: 0 0 12px; text-wrap: pretty; }
h1, h2, h3, .lede, .note, .tagline { text-wrap: balance; }
.eyebrow { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.lede + .lede { margin-top: 12px; }
.card .plain { color: var(--muted); }
.card.define h3 { font-size: 1.45rem; margin-bottom: 8px; }
.lede { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--muted); max-width: 38em; margin: 16px 0 0; }
.note { color: var(--muted); margin: 0 0 20px; max-width: 44em; }
section { margin-top: 64px; }
section:first-child { margin-top: 0; }

/* Hero */
.hero { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 32px; padding: 44px 0 8px; margin-top: 0; }
.hero-art.lg { width: clamp(220px, 34vw, 400px); }
.hero-art.md { width: clamp(150px, 22vw, 250px); }
.hero-art.sm { width: clamp(120px, 16vw, 190px); }
.meta { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 20px 0 0; }
.meta li { background: var(--glass); border: 1px solid var(--glass-border); border-radius: 999px; padding: 6px 14px; font-size: 0.9rem; font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--control-border); }
.btn.ghost:hover { background: var(--chip); color: var(--text); }
.btn.small { min-height: 44px; padding: 0 18px; font-size: 0.95rem; }

/* Cards and grids */
.panel { padding: clamp(20px, 3.4vw, 32px); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.cols.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { padding: 22px; }
.card h3 { margin-bottom: 6px; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--muted); }
.plain { margin: 0; padding-left: 22px; }
.plain li { margin-bottom: 6px; }

/* Theme toggle: icon only */
.theme { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid var(--control-border); background: transparent; color: var(--text); cursor: pointer; }
.theme:hover { background: var(--chip); }
.theme svg { width: 20px; height: 20px; }
.menu-btn { display: none; flex: none; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid var(--control-border); background: transparent; color: var(--text); cursor: pointer; }
.menu-btn:hover { background: var(--chip); }
.menu-btn svg { width: 20px; height: 20px; }

/* X-style post (always dark, like X) */
.xpost { margin: 0 auto; max-width: 640px; background: #000; color: #fff; border: 1px solid #2f3336; border-radius: 40px; padding: 30px 34px 26px; box-shadow: var(--shadow); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.xhead { display: flex; align-items: center; gap: 16px; }
.xavatar { flex: none; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.xname { font-size: 1.3rem; font-weight: 500; display: flex; align-items: center; gap: 8px; line-height: 1.3; }
.xname svg { flex: none; width: 26px; height: 26px; }
.xname .seal { fill: #1d9bf0; }
.xhandle { display: inline-flex; align-items: center; min-height: 28px; color: #c4cfd6; font-size: 1.15rem; text-underline-offset: 4px; }
.xhandle:hover { color: #fff; }
.xpost blockquote { margin: 22px 0 18px; text-align: center; font-size: clamp(1.2rem, 3.2vw, 1.5rem); line-height: 1.4; }
.xpost blockquote p { margin: 0; }
.xpost figcaption { text-align: center; color: #aab4bd; font-size: 0.92rem; }
.xpost figcaption a { color: #6cc0ff; }
.xpost a:focus-visible { outline-color: #fff; }

/* Home doors */
.doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.door { display: block; padding: 28px; color: var(--text); text-decoration: none; transition: transform 0.2s ease; }
.door:hover { transform: translateY(-3px); color: var(--text); }
.door .num { font-weight: 700; font-size: 0.85rem; letter-spacing: 0.1em; color: var(--accent); }
.door h2 { margin: 6px 0 8px; }
.door p { color: var(--muted); margin: 0 0 16px; }
.door .go { font-weight: 650; color: var(--accent); }
.h3 { font-size: 1.2rem; }
.sub { font-size: clamp(1.35rem, 3vw, 1.7rem); margin: 44px 0 8px; }
.tips-head { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.tips-head img { width: clamp(140px, 20vw, 210px); }

/* Tools */
.filter { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px; border-radius: 999px; font-weight: 600; font-size: 0.97rem; cursor: pointer; }
.filter input { width: 20px; height: 20px; accent-color: var(--accent); }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 18px; }
.count { color: var(--muted); font-size: 0.95rem; margin: 0; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tool { display: flex; flex-direction: column; gap: 4px; height: 100%; min-height: 104px; padding: 18px 20px; border-radius: 20px; color: var(--text); text-decoration: none; transition: transform 0.2s ease; }
.tool:hover { transform: translateY(-3px); color: var(--text); }
.tool .name { font-weight: 650; font-size: 1.14rem; letter-spacing: -0.015em; display: flex; justify-content: space-between; gap: 8px; }
.tool .name svg { flex: none; width: 16px; height: 16px; margin-top: 6px; stroke: var(--muted); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tool .url { color: var(--muted); font-size: 0.9rem; overflow-wrap: anywhere; }
.tool .desc { color: var(--muted); font-size: 0.95rem; margin-top: 4px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 10px; }
.tag { font-size: 0.78rem; font-weight: 650; padding: 3px 10px; border-radius: 999px; background: var(--tag-neutral-bg); color: var(--tag-neutral); }
.tag.easy { background: var(--tag-easy-bg); color: var(--tag-easy); }
.tag.google { background: var(--tag-google-bg); color: var(--tag-google); }
.tag.special { background: var(--tag-special-bg); color: var(--tag-special); }
[hidden] { display: none !important; }
.source { margin: 18px 0 0; font-size: 0.95rem; color: var(--muted); }

/* Steps */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps > li { counter-increment: step; position: relative; padding: 22px 22px 18px 76px; }
.steps > li::before { content: counter(step); position: absolute; left: 22px; top: 20px; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; display: grid; place-items: center; }
.steps h3 { margin: 4px 0 8px; }
.steps ol, .steps ul { margin: 0 0 12px; padding-left: 22px; }
.steps li li { margin-bottom: 5px; }
.ui, kbd { color: var(--text); display: inline-block; background: var(--chip); border: 1px solid var(--hairline); border-radius: 7px; padding: 0 7px; font: inherit; font-size: 0.92em; font-weight: 600; white-space: nowrap; }
code { color: var(--text); background: var(--chip); border-radius: 6px; padding: 1px 6px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.9em; overflow-wrap: anywhere; }
.prompt { background: #15151d; color: #f5f5f7; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 18px; padding: 14px 18px 18px; margin: 12px 0; }
.prompt-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.prompt-label { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #c9c9d6; }
.prompt p { margin: 0; font-size: 0.99rem; }
.copy { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #ffffff; cursor: pointer; }
.copy:hover { background: rgba(255, 255, 255, 0.14); }
.go-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 1.1rem; font-weight: 650; color: var(--accent); text-decoration: none; }
.go-link:hover { text-decoration: underline; color: var(--accent-hover); }
.copy svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.copy .i-done, .copy.copied .i-copy { display: none; }
.copy.copied .i-done { display: block; }
.prompt .copy:focus-visible { outline-color: #ffffff; }
.callout { background: var(--chip); border-radius: 14px; padding: 12px 16px; margin: 12px 0; }
.bulb { margin-right: 2px; }
.callout p:last-child { margin: 0; }

/* Quiz */
.quiz { display: grid; gap: 16px; }
.q { margin: 0; padding: clamp(18px, 3vw, 26px); min-width: 0; }
.q legend { float: left; width: 100%; padding: 0; margin-bottom: 14px; font-weight: 650; font-size: 1.1rem; line-height: 1.35; }
.q legend .qn { display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.opts { clear: both; display: grid; gap: 8px; }
.opt { display: flex; align-items: flex-start; gap: 12px; min-height: 48px; padding: 11px 14px; border: 1px solid var(--control-border); border-radius: 14px; cursor: pointer; }
.opt:hover { background: var(--chip); }
.opt input { flex: none; width: 20px; height: 20px; margin-top: 3px; accent-color: var(--accent); }
.opt:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.q .btn { margin-top: 14px; }
.feedback { margin: 14px 0 0; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--bad-border); background: var(--bad-bg); color: var(--bad); }
.feedback.ok { border-color: var(--good-border); background: var(--good-bg); color: var(--good); }
.feedback:empty { display: none; }
.feedback strong { display: block; }

/* Core concepts glossary */
.concepts h3 { font-size: 1.35rem; margin-bottom: 4px; }
.concepts h4 { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 22px 0 4px; }
.concepts dl { margin: 0; }
.concept { display: grid; grid-template-columns: 120px 1fr; gap: 4px 20px; padding: 14px 0; border-top: 1px solid var(--hairline); }
.concept dt { font-weight: 700; font-size: 1.08rem; }
.concept dt .full { display: block; font-weight: 500; font-size: 0.85rem; color: var(--muted); }
.concept dd { margin: 0; min-width: 0; }
.concept dd p { margin: 0; }
.concept .like { color: var(--muted); font-size: 0.97rem; margin-top: 6px; }
.like-tag { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 1px 8px; margin-right: 4px; border-radius: 999px; background: var(--tag-special-bg); color: var(--tag-special); }
.tree { margin: 10px 0 0; padding: 12px 16px; border-radius: 12px; background: #15151d; color: #f5f5f7; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.9rem; line-height: 1.5; overflow-x: auto; }
.steps + .sub, .concepts + .sub { margin-top: 32px; }

.callout.tip { margin-top: 18px; }

.tagline { font-size: clamp(1.25rem, 3vw, 1.7rem); font-weight: 650; letter-spacing: -0.02em; margin: 10px 0 0; }
.tagline .hl { color: var(--accent); }
.ideas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 40px; }
.ideas > li { border-top: 2px solid var(--accent); padding: 16px 0 18px; }
.ideas h3 { margin: 0 0 6px; }
.ideas p { margin: 0; color: var(--muted); }
.idea-n { display: block; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 6px; }

/* Link lists */
.group { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 30px 0 12px; }
.links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
.links li { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 14px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--hairline); }
.links a, .links strong { font-weight: 650; }
.links a { display: inline-block; padding: 4px 0; }
.links span { color: var(--muted); font-size: 0.97rem; }

/* Reference tables */
.reftable { width: 100%; border-collapse: collapse; margin-top: 30px; }
.reftable caption { text-align: left; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); padding-bottom: 8px; border-bottom: 2px solid var(--accent); }
.reftable th, .reftable td { text-align: left; vertical-align: top; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.reftable th { width: 32%; padding-right: 20px; font-weight: 650; }
.reftable th a { display: inline-block; }
.reftable td { color: var(--muted); }
.terms h3 { color: var(--accent); font-size: 1.35rem; }
.terms .plain { color: var(--muted); margin-top: 4px; }
.terms .plain li { margin-bottom: 4px; }

/* Slop section */
h2 .hl { color: var(--accent); }
.slop-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 18px; }
.slop-card { padding: clamp(24px, 3.4vw, 40px); border-radius: 24px; }
.slop-card h3 { font-size: clamp(1.5rem, 3vw, 2rem); color: var(--accent); margin-bottom: 12px; }
.slop-card .n { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.04em; margin-right: 6px; vertical-align: baseline; }
.slop-card p { margin: 0; font-size: 1.12rem; line-height: 1.5; }
.slop-card.solid { background: var(--tag-special-bg); color: var(--text); border: 1px solid var(--glass-border); box-shadow: var(--shadow); }
.slop-card.solid h3 { color: var(--tag-special); }
.mono-label { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); margin: 40px 0 14px; }
.spot-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.spot-cols h3 { color: var(--accent); font-size: 1.4rem; margin-bottom: 4px; }
.spot { list-style: none; margin: 0; padding: 0; counter-reset: spot; }
.spot li { counter-increment: spot; display: grid; grid-template-columns: 40px 1fr; align-items: baseline; padding: 15px 0; border-bottom: 1px solid var(--hairline); font-size: 1.08rem; }
.spot li:last-child { border-bottom: 0; }
.spot li::before { content: counter(spot, lower-alpha); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.8rem; color: var(--muted); }

/* Reference cards */
.rule { font-size: clamp(1.3rem, 2.6vw, 1.6rem); padding-bottom: 14px; border-bottom: 2px solid var(--accent); margin: 36px 0 22px; }
.refgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.refgrid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.refgrid.one { grid-template-columns: 1fr; }
.ref { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 24px; border-radius: 22px; color: var(--text); text-decoration: none; transition: transform 0.2s ease; }
.ref:hover { transform: translateY(-3px); color: var(--text); }
.ref .name { display: flex; justify-content: space-between; gap: 10px; font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; color: var(--accent); }
.ref .name svg { flex: none; width: 17px; height: 17px; margin-top: 5px; stroke: var(--muted); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ref .desc { font-size: 1rem; line-height: 1.45; }
.ref .dom { margin-top: auto; padding-top: 8px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.8rem; color: var(--muted); overflow-wrap: anywhere; }
.ref-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 12px; }
@media (max-width: 1000px) { .refgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ref-groups { grid-template-columns: 1fr; gap: 0; } }

/* Items separated by short vertical lines */
.vwrap { overflow: hidden; padding: 6px; margin: -6px; }
.vgrid { list-style: none; margin: 0 0 0 -25px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 30px; }
.vgrid li { display: flex; flex-direction: column; gap: 4px; padding: 2px 24px; border-left: 1px solid var(--control-border); }
.vgrid a { font-size: 1.12rem; font-weight: 650; letter-spacing: -0.01em; text-decoration: none; }
.vgrid a:hover { text-decoration: underline; }
.vgrid span { color: var(--muted); font-size: 0.97rem; line-height: 1.45; }
@media (max-width: 1000px) { .vgrid, .vgrid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Definition box */
.define-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin: 0 0 4px; }
.define h2 { margin-bottom: 8px; }
.define-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 40px; margin-top: 18px; }
.define-cols h3 { font-size: 1.05rem; margin-bottom: 8px; }

/* Collapsible Vibecheck */
details.vibe summary { min-height: 56px; gap: 14px; }
details.vibe summary h2 { margin: 0; }
details.vibe summary::before { width: 32px; height: 32px; background-size: 13px 1.5px, 1.5px 13px; }
details.vibe[open] summary::before { background-size: 13px 1.5px; }
details.vibe .quiz { margin-top: 14px; }

.plainbox { margin-top: 8px; }
.plainbox .concept:last-child { border-bottom: 1px solid var(--hairline); }

/* Core concepts flashcards */
.cc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.cc-head h3 { margin: 0; }
.cc-toggle { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--chip); border: 1px solid var(--hairline); }
.cc-toggle button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--text); font: inherit; font-size: 0.92rem; font-weight: 600; cursor: pointer; }
.cc-toggle button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.cc-flow { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px; }
.cc-flow li { position: relative; }
.cc-flow li:not(:last-child)::after { content: "\2192"; position: absolute; right: -26px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 1.2rem; font-weight: 700; }
.cc-set { display: flex; flex-direction: column; gap: 2px; width: 100%; height: 100%; min-height: 84px; padding: 12px 16px; text-align: left; border: 1px solid var(--hairline); border-radius: 18px; background: var(--glass); background-image: linear-gradient(135deg, var(--sheen), transparent 45%); -webkit-backdrop-filter: blur(24px) saturate(190%); backdrop-filter: blur(24px) saturate(190%); box-shadow: var(--shadow), inset 0 1px 0 var(--edge); color: var(--text); font: inherit; cursor: pointer; transition: background-color 0.2s ease; }
.cc-set:hover { background-color: var(--glass-hover); }
.cc-set .k { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.cc-set .t { font-weight: 650; line-height: 1.25; }
.cc-set .c { font-size: 0.86rem; color: var(--muted); }
.cc-set[aria-pressed="true"] { border-color: var(--accent); background: var(--tag-special-bg); }
.cc-set[aria-pressed="true"]:hover { background-color: var(--tag-special-bg); }
.cc-set[aria-pressed="true"] .k, .cc-set[aria-pressed="true"] .t, .cc-set[aria-pressed="true"] .c { color: var(--tag-special); }
.flashcard { display: block; margin-top: 18px; perspective: 1400px; cursor: pointer; border-radius: 24px; }
.fc-inner { display: grid; transition: transform 0.5s ease; transform-style: preserve-3d; }
.flashcard.flipped .fc-inner { transform: rotateY(180deg); }
.fc-face { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 240px; padding: 28px clamp(20px, 5vw, 48px); border-radius: 24px; text-align: center; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.fc-front { background: var(--glass-strong); border: 1px solid var(--glass-border); box-shadow: var(--shadow); }
.fc-back { background: #4b2e9c; color: #fff; transform: rotateY(180deg); box-shadow: var(--shadow); }
.fc-label { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin: 0; }
.fc-back .fc-label { color: #e0d3ff; }
.fc-term { font-size: clamp(2rem, 6vw, 3rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin: 0; }
.fc-term .full { display: block; font-size: 1rem; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-top: 6px; }
.fc-def { font-size: clamp(1.1rem, 2.6vw, 1.35rem); font-weight: 600; line-height: 1.4; margin: 0; max-width: 34em; }
.fc-back .like { color: #f0eaff; font-size: 1rem; margin: 0; max-width: 36em; }
.fc-back kbd { color: #fff; background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.35); }
.fc-back .tree { text-align: left; margin: 4px 0 0; }
.fc-hint { font-size: 0.86rem; color: var(--muted); margin: 6px 0 0; }
.fc-back .fc-hint { color: #e0d3ff; }
.fc-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.fc-nav p { margin: 0; font-size: 0.95rem; font-weight: 600; color: var(--muted); text-align: center; }
.fc-btn { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid var(--control-border); background: transparent; color: var(--text); cursor: pointer; }
.fc-btn:hover { background: var(--chip); }
.fc-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 760px) {
  .cc-flow { grid-template-columns: 1fr; gap: 30px; }
  .cc-flow li:not(:last-child)::after { content: "\2193"; right: auto; left: 50%; top: auto; bottom: -29px; transform: translateX(-50%); }
  .cc-set { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) { .fc-inner { transition: none; } }

.vgrid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; }
.ideas .vgrid li { padding: 2px 16px 2px 24px; }
.ideas .vgrid a { font-size: 1.02rem; line-height: 1.3; }
.ideas .vgrid span { font-size: 0.92rem; }
.ideas .ex-label { margin: 16px 0 10px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.examples { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 22px; }
.examples a { display: inline-flex; align-items: center; min-height: 36px; font-weight: 600; }

/* Example pop-up */
dialog.demo { width: min(980px, calc(100% - 24px)); height: min(760px, calc(100% - 48px)); max-width: none; max-height: none; padding: 0; border: 1px solid var(--glass-border); border-radius: 24px; background: var(--bg); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); overflow: hidden; }
dialog.demo[open] { display: flex; flex-direction: column; }
dialog.demo::backdrop { background: rgba(10, 10, 16, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.demo-bar { display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 20px; border-bottom: 1px solid var(--hairline); }
.demo-bar h2 { margin: 0 auto 0 0; }
.demo-bar a { font-size: 0.92rem; font-weight: 600; white-space: nowrap; }
dialog.demo iframe { flex: 1; width: 100%; border: 0; background: #0b0c10; }
@media (max-width: 560px) { .demo-bar a { display: none; } }

/* Details */
details.glass { padding: 4px 22px; }
details summary { min-height: 48px; display: flex; align-items: center; font-weight: 650; cursor: pointer; list-style: none; gap: 10px; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: ""; flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--control-border); background: linear-gradient(currentColor, currentColor) center / 11px 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 11px no-repeat; }
details[open] summary::before { background: linear-gradient(currentColor, currentColor) center / 11px 1.5px no-repeat; }
details .inner { padding: 0 0 16px 36px; color: var(--muted); }
details .inner p:last-child, details .inner ul:last-child { margin-bottom: 0; }
.stack { display: grid; gap: 10px; }

footer { text-align: center; margin-top: 72px; padding: 26px 0 44px; border-top: 1px solid var(--hairline); color: var(--muted); font-size: 0.92rem; }

@media (max-width: 900px) {
  .doors { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .cols.two, .cols.three, .ideas, .links, .define-cols { grid-template-columns: 1fr; }
  .links li { grid-template-columns: 1fr; gap: 0; }
  .slop-cards, .spot-cols, .refgrid, .refgrid.three { grid-template-columns: 1fr; }
  .reftable th { width: 40%; }
  .nav { flex-wrap: wrap; }
  .nav a { padding: 0 9px; }
  .bar { flex-wrap: wrap; border-radius: 26px; padding: 8px 10px 8px 14px; }
  .bar nav { order: 3; width: 100%; }
  .nav { justify-content: flex-start; }
  .nav a { padding: 0 10px; font-size: 0.93rem; }
  .hero { grid-template-columns: 1fr; padding-top: 24px; gap: 8px; }
  .hero-art, .hero-art.lg, .hero-art.md, .hero-art.sm { order: -1; margin-inline: auto; width: 190px; height: 170px; object-fit: contain; }
  .steps > li { padding: 70px 18px 16px 18px; }
  .concept { grid-template-columns: 1fr; }
  .tips-head { grid-template-columns: 1fr; }
  .tips-head img { order: -1; width: min(40vw, 170px); }
  .doors { grid-template-columns: 1fr; }
  .steps > li::before { left: 18px; top: 18px; }
  section { margin-top: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .glass, .bar, .progress { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--bg); }
}
@media (forced-colors: active) {
  .glass, .opt, .tool, .btn { border: 1px solid CanvasText; }
}

.nav-ico { display: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* Navigation after scrolling: side panel on desktop, menu icon on smaller screens */
@media (min-width: 1000px) {
  .wrap { width: min(1080px, 100% - 250px); }
  .narrow { width: min(800px, 100% - 250px); }
}
@keyframes navIn { from { opacity: 0; } to { opacity: 1; } }
html.scrolled .bar { position: fixed; z-index: 30; margin: 0; animation: navIn 0.25s ease; }
html.scrolled .brand { display: none; }
@media (min-width: 1000px) {
  html.scrolled .bar { top: 50%; right: 14px; transform: translateY(-50%); flex-direction: column; align-items: stretch; gap: 4px; padding: 12px 8px; border-radius: 26px; }
  html.scrolled .nav { flex-direction: column; gap: 0; }
  html.scrolled .nav a { justify-content: center; padding: 0 14px; }
  html.scrolled .theme { align-self: center; margin-top: 4px; }
}
@media (max-width: 999.98px) {
  html.scrolled .bar { top: 10px; right: 12px; left: auto; width: auto; flex-direction: column; flex-wrap: nowrap; align-items: flex-end; gap: 4px; padding: 6px; border-radius: 28px; }
  html.scrolled .menu-btn { display: inline-grid; }
  html.scrolled .bar nav, html.scrolled .bar .theme { display: none; }
  html.scrolled .bar.open nav { display: block; width: auto; order: 0; }
  html.scrolled .bar.open .nav { flex-direction: column; align-items: stretch; flex-wrap: nowrap; }
  html.scrolled .bar.open .nav a { justify-content: center; width: 44px; min-width: 0; padding: 0; }
  html.scrolled .bar.open .nav-ico { display: block; }
  html.scrolled .bar.open .nav-txt { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  html.scrolled .bar.open .nav a[aria-current="page"] .nav-ico { stroke-width: 2.6; }
  html.scrolled .bar.open .theme { display: inline-grid; align-self: flex-end; margin: 2px 0 0; }
}

.vgrid.one { grid-template-columns: 1fr; }
@media (max-width: 760px) {
  .ideas .vgrid, .ideas .vgrid.three { grid-template-columns: 1fr; row-gap: 14px; }
}

/* Example flow: numbered circles joined by arrows */
.flowline { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ideas .flowline li, .flowline li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0; border: 0; text-align: center; }
.flowline .dot { position: relative; z-index: 1; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--glass); background-image: linear-gradient(135deg, var(--sheen), transparent 60%); -webkit-backdrop-filter: blur(20px) saturate(190%); backdrop-filter: blur(20px) saturate(190%); border: 1px solid var(--glass-border); box-shadow: var(--shadow), inset 0 1px 0 var(--edge); color: var(--accent); font-weight: 700; font-size: 1.05rem; }
.flowline li:not(:last-child)::after { content: "\2192"; position: absolute; top: 9px; left: calc(50% + 23px); width: calc(100% - 46px + 14px); text-align: center; color: var(--accent); font-size: 1.25rem; font-weight: 700; line-height: 28px; }
.flowline .lbl { font-size: 0.92rem; line-height: 1.4; color: var(--text); }
.flowline .tag { display: inline-block; margin-top: 8px; }
.flowline .lbl { display: flex; flex-direction: column; align-items: center; }
@media (max-width: 760px) {
  .flowline { grid-template-columns: 1fr; gap: 26px; }
  .ideas .flowline li, .flowline li { flex-direction: row; align-items: center; gap: 14px; text-align: left; }
  .flowline .dot { flex: none; }
  .flowline .lbl { align-items: flex-start; }
  .flowline li:not(:last-child)::after { content: "\2193"; top: 100%; left: 0; width: 46px; line-height: 26px; }
}

/* Subtle hover tint on interactive glass surfaces */
a.glass:hover, .opt:hover, label.filter:hover, details.glass > summary:hover { background-color: var(--glass-hover); }
.opt:hover { background: var(--glass-hover); }
a.glass:hover { transform: translateY(-2px); }

/* Home ideas: one quiet row per idea, example revealed on request */
.idea-list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--hairline); }
.idea-list > li { border-top: 1px solid var(--hairline); }
.idea-row { display: grid; grid-template-columns: 44px minmax(0, 260px) minmax(0, 1fr) auto; align-items: baseline; column-gap: 20px; padding: 20px 0; min-height: 0; }
.idea-list summary.idea-row { cursor: pointer; list-style: none; font-weight: inherit; }
.idea-list summary.idea-row::before { content: none; }
.idea-list summary.idea-row:hover h3 { color: var(--accent); }
.idea-row .idea-n { margin: 0; }
.idea-row h3 { margin: 0; font-size: 1.15rem; }
.idea-row p { margin: 0; color: var(--muted); }
.idea-more { display: inline-grid; place-items: center; width: 28px; height: 28px; align-self: center; color: var(--muted); }
.idea-more svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s ease; }
details[open] > summary .idea-more svg { transform: rotate(180deg); }
.idea-list summary.idea-row:hover .idea-more { color: var(--accent); }
.idea-ex { padding: 4px 0 28px 64px; }
.idea-ex .flowline { max-width: 760px; margin-top: 4px; }
.idea-ex .vgrid li { padding: 2px 20px 2px 24px; }
.idea-ex .vgrid a { font-size: 1.02rem; }
.idea-ex .vgrid span { font-size: 0.94rem; }
@media (max-width: 760px) {
  .idea-row { grid-template-columns: 34px minmax(0, 1fr) auto; row-gap: 4px; column-gap: 12px; padding: 16px 0; }
  .idea-row p { grid-column: 2 / -1; grid-row: 2; }
  .idea-more { grid-column: 3; grid-row: 1; }
  .idea-ex { padding: 2px 0 22px 0; }
  .idea-ex .vgrid, .idea-ex .vgrid.three { grid-template-columns: 1fr; row-gap: 14px; }
}

.takeaways { padding: 10px 0 0 46px; }
.mini-label { margin: 0 0 6px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.checks { list-style: none; margin: 0 0 20px; padding: 0; }
.checks li { position: relative; padding: 13px 0 13px 34px; border-bottom: 1px solid var(--hairline); }
.checks li:last-child { border-bottom: 0; }
.checks li::before { content: ""; position: absolute; left: 4px; top: 50%; width: 12px; height: 6px; margin-top: -6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.callout.up-next { margin: 0; padding: 16px 18px; }
.callout.up-next p:last-child { margin: 0; }
.callout.up-next .tag { font-size: 0.82rem; vertical-align: 1px; }
.soon { margin: 0; color: var(--muted); font-style: italic; }
@media (max-width: 760px) { .takeaways { padding-left: 0; } }

.stack + .callout.tip { margin-top: 22px; }
