/* Make the Point: a design rulebook for Power BI.
   Look: antigravity.google layout (white canvas, big centered headlines, black pills, large rounded panels),
   Google Sans Flex (bundled), one accent from the BA315 Power BI theme (#2a78d6). */

@font-face {
  font-family: "Google Sans Flex";
  font-style: normal;
  font-display: swap;
  font-weight: 1 1000;
  src: url(../fonts/google-sans-flex.woff2) format("woff2-variations"), url(../fonts/google-sans-flex.woff2) format("woff2");
}

:root {
  --canvas: #FFFFFF;
  --panel: #F7F8F9;
  --panel-2: #EFF1F3;
  --ink: #121317;
  --ink-muted: #5F6368;      /* 6.1:1 on white */
  --ink-soft: #80868B;       /* large text only */
  --line: #E8EAED;
  --pill: #121317;
  --pill-hover: #3C4043;
  --accent: #2a78d6;         /* chart accent, from the BA315 Power BI theme */
  --accent-text: #1F64B8;    /* 5.9:1 on white */
  --accent-wash: #EAF2FC;
  --bad: #C4343A;
  --bad-wash: #FCEDEE;
  --dark: #121317;
  --dark-2: #1E1F23;
  --dark-muted: #BDC1C6;
  --dark-soft: #9AA0A6;
  --font: "Google Sans Flex", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 18px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.read p a, .read li a, .rule td a, details .a a, .head p a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 880px; margin: 0 auto; }
.read { max-width: 720px; margin: 0 auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 99; background: #fff; padding: 8px 12px; border-radius: 8px; }

/* ---------- header ---------- */
header.site { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .9); backdrop-filter: blur(12px); } /* slop-ok frosted nav */
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.brand { font-size: 18px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; }
.brand span { color: var(--ink-soft); }
.nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav ul a { display: block; font-size: 15px; color: var(--ink-muted); padding: 8px 13px; border-radius: 999px; transition: background .2s var(--ease), color .2s var(--ease); }
.nav ul a:hover, .nav ul a[aria-current="page"] { background: var(--panel); color: var(--ink); }
.nav .menu-btn { display: none; }

/* ---------- buttons ---------- */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 26px; border-radius: 999px; background: var(--pill); color: #fff; font: 500 16px/1 var(--font); border: 1px solid var(--pill); cursor: pointer; white-space: nowrap; transition: background .2s var(--ease), transform .15s var(--ease); }
.pill:hover { background: var(--pill-hover); }
.pill:active { transform: scale(.97); }
.pill.light { background: #fff; color: var(--ink); border-color: #DADCE0; }
.pill.light:hover { background: var(--panel); }
.pill.sm { height: 40px; padding: 0 18px; font-size: 15px; }
.row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- type ---------- */
h1 { font-weight: 400; font-size: clamp(3rem, 1.6rem + 5.2vw, 6rem); line-height: 1; letter-spacing: -.045em; margin: 0 auto 28px; max-width: 13ch; }
h2 { font-weight: 400; font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.75rem); line-height: 1.04; letter-spacing: -.04em; margin: 0 auto 18px; max-width: 18ch; }
h3 { font-weight: 500; font-size: 22px; line-height: 1.3; letter-spacing: -.01em; margin: 0 0 8px; }
.q { color: var(--ink-soft); }
.lead { font-size: clamp(1.125rem, 1rem + .45vw, 1.375rem); line-height: 1.5; color: var(--ink-muted); margin: 0 auto 40px; max-width: 40ch; }
.chip { display: inline-block; font: 500 13px/1 var(--font); color: var(--ink-muted); background: var(--panel-2); padding: 7px 11px; border-radius: 999px; }
.chip.bad { background: var(--bad-wash); color: var(--bad); }
.chip.good { background: var(--accent-wash); color: var(--accent-text); }

/* ---------- home hero ---------- */
.hero { text-align: center; padding: 112px 0 64px; }
.frame { background: var(--panel); border-radius: 32px; padding: 32px; box-shadow: 0 0 0 1px var(--line); }
.frame-top { display: flex; justify-content: center; align-items: center; gap: 16px; margin-bottom: 24px; position: relative; }
.frame-top .chip { position: absolute; right: 0; }
.seg { display: inline-flex; background: #fff; border-radius: 999px; padding: 4px; box-shadow: 0 0 0 1px var(--line); }
.seg button { border: 0; background: transparent; font: 500 15px/1 var(--font); color: var(--ink-muted); padding: 11px 20px; border-radius: 999px; cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease); }
.seg button[aria-pressed="true"] { background: var(--pill); color: #fff; }
.visual { background: #fff; border-radius: 16px; overflow: hidden; max-width: 820px; margin: 0 auto; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.visual img, figure img { display: block; width: 100%; height: auto; }
.caption { text-align: center; color: var(--ink-muted); font-size: 16px; margin: 22px auto 0; max-width: 62ch; min-height: 3.2em; }
.caption b { color: var(--ink); font-weight: 500; }
.no-js .seg { display: none; }

/* ---------- home sections ---------- */
.block { padding: 152px 0 0; }
.head { text-align: center; margin-bottom: 64px; }
.head p { color: var(--ink-muted); margin: 0 auto; max-width: 50ch; }
.chapters { display: grid; grid-template-columns: 1fr 1fr; gap: 56px 32px; }
.chapters a { display: block; }
.tile { background: var(--panel); border-radius: 28px; aspect-ratio: 16 / 10; display: grid; place-items: center; padding: 28px; box-shadow: 0 0 0 1px var(--line); transition: background .25s var(--ease); overflow: hidden; }
.tile img { max-height: 100%; width: auto; max-width: 100%; border-radius: 10px; }
.chapters a:hover .tile { background: var(--panel-2); }
.chapters h3 { font-weight: 400; font-size: 28px; line-height: 1.2; letter-spacing: -.02em; margin: 4px 0 6px; }
.chapters p { margin: 0; color: var(--ink-muted); font-size: 17px; max-width: 46ch; }
.chapters .n { font-size: 14px; color: var(--ink-muted); display: block; margin-top: 24px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { border-top: 1px solid var(--line); }
.list li:last-child { border-bottom: 1px solid var(--line); }
.list a { display: grid; grid-template-columns: 72px 1fr auto; gap: 20px; align-items: baseline; padding: 24px 8px; border-radius: 12px; transition: background .2s var(--ease); }
.list a:hover { background: var(--panel); }
.list .n { font-weight: 300; font-size: 36px; line-height: 1; letter-spacing: -.04em; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.list h3 { font-size: 20px; margin: 0 0 4px; }
.list p { margin: 0; color: var(--ink-muted); font-size: 16px; }
.list .k { font-size: 13px; color: var(--ink-muted); white-space: nowrap; }
.js .list li.hide { display: none; }
.more { display: flex; justify-content: center; margin-top: 40px; }
.no-js .more { display: none; }

.twin { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.tw { border-radius: 28px; padding: 44px; background: var(--panel); box-shadow: 0 0 0 1px var(--line); }
.tw.dk { background: var(--dark); color: #fff; box-shadow: none; }
.tw h3 { font-weight: 400; font-size: 32px; letter-spacing: -.03em; line-height: 1.1; margin: 0 0 8px; }
.tw .s { color: var(--ink-muted); margin: 0 0 28px; }
.tw.dk .s { color: var(--dark-muted); }
.tw dl { margin: 0; }
.tw dl div { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 16px; }
.tw.dk dl div { border-color: rgba(255, 255, 255, .12); }
.tw dt { font-weight: 500; }
.tw dd { margin: 0; color: var(--ink-muted); }
.tw.dk dd { color: var(--dark-muted); }

.term { background: var(--dark); color: #fff; border-radius: 32px; padding: 72px 48px; text-align: center; }
.term .q { color: var(--dark-soft); }
.term p.sub { color: var(--dark-muted); margin: 0 auto 40px; max-width: 46ch; }
.opts { display: grid; gap: 12px; max-width: 720px; margin: 0 auto; text-align: left; }
.opts button { background: var(--dark-2); border: 1px solid rgba(255, 255, 255, .1); color: #fff; border-radius: 16px; padding: 20px 22px; font: 400 17px/1.4 var(--font); cursor: pointer; text-align: left; transition: border-color .2s var(--ease), background .2s var(--ease); }
.opts button:hover { border-color: rgba(255, 255, 255, .4); }
.opts button.right { border-color: #6AA9EE; background: rgba(42, 120, 214, .16); }
.opts button.wrong { opacity: .45; }
.answer { color: var(--dark-muted); max-width: 60ch; margin: 24px auto 0; min-height: 3.2em; font-size: 16px; }

/* ---------- content pages ---------- */
.page-hero { text-align: center; padding: 96px 0 56px; }
.page-hero .kick { display: block; font-size: 15px; color: var(--ink-muted); margin-bottom: 20px; }
.page-hero h1 { font-size: clamp(2.75rem, 1.6rem + 4.2vw, 5rem); max-width: 15ch; }
.toc { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 860px; margin: 0 auto; }
.toc a { font-size: 15px; padding: 8px 14px; border-radius: 999px; background: var(--panel); color: var(--ink-muted); transition: background .2s var(--ease), color .2s var(--ease); }
.toc a:hover { background: var(--panel-2); color: var(--ink); }

.rule { padding: 120px 24px 0; }
.rule > .read > .n, .rule-n { display: block; font-size: 15px; color: var(--ink-muted); margin-bottom: 14px; }
.rule h2 { font-size: clamp(2rem, 1.5rem + 1.9vw, 3rem); max-width: none; margin: 0 0 20px; }
.rule p, .rule li { color: #3C4043; }
.rule p { margin: 0 0 18px; }
.rule ul, .rule ol { margin: 0 0 18px; padding-left: 22px; }
.rule li { margin-bottom: 8px; }
.rule strong { color: var(--ink); font-weight: 600; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 40px 0; background: var(--panel); border-radius: 28px; padding: 24px; box-shadow: 0 0 0 1px var(--line); }
.pair.stack { grid-template-columns: 1fr; }
.pair figure, .single figure { margin: 0; }
.side .lab { display: flex; align-items: center; gap: 10px; margin: 0 4px 12px; font-size: 15px; font-weight: 500; }
.side .img { background: #fff; border-radius: 14px; overflow: hidden; }
.side figcaption, .single figcaption { margin: 14px 4px 0; font-size: 15px; color: var(--ink-muted); }
.side figcaption ul { margin: 0; padding-left: 18px; }
.side figcaption li { margin-bottom: 4px; color: var(--ink-muted); }
.single { margin: 40px 0; background: var(--panel); border-radius: 28px; padding: 24px; box-shadow: 0 0 0 1px var(--line); }
.single .img { background: #fff; border-radius: 14px; overflow: hidden; max-width: 820px; margin: 0 auto; }
.wide { max-width: 1100px; margin-left: auto; margin-right: auto; }

.how { background: var(--panel); border-radius: 20px; padding: 24px 28px; margin: 28px 0; }
.how h3 { font-size: 17px; margin: 0 0 10px; }
.how ol, .how ul { margin: 0; padding-left: 20px; }
.how li { font-size: 16px; color: #3C4043; margin-bottom: 6px; }
.how code, .rule code { font: 14px/1.5 ui-monospace, Consolas, monospace; background: #fff; padding: 2px 6px; border-radius: 6px; }
pre.dax { font: 14px/1.55 ui-monospace, Consolas, monospace; background: var(--dark); color: #E8EAED; padding: 20px 22px; border-radius: 16px; overflow-x: auto; margin: 16px 0 28px; }

.key { border-radius: 20px; padding: 26px 28px; margin: 28px 0; background: var(--accent-wash); }
.key p { margin: 0; color: var(--ink); font-size: 19px; line-height: 1.5; }
.key b { color: var(--accent-text); font-weight: 600; }

.ladder { display: grid; gap: 10px; margin: 28px 0; }
.ladder > div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: baseline; background: var(--panel); border-radius: 16px; padding: 18px 22px; }
.ladder .lv { font-size: 14px; font-weight: 500; color: var(--ink-muted); }
.ladder .t { font: 17px/1.4 "Segoe UI", system-ui, sans-serif; color: #252423; }
.ladder .t s { color: #8A8886; }
.ladder .best .t { font-weight: 600; }
.ladder .why { grid-column: 2; font-size: 15px; color: var(--ink-muted); }

table.simple { width: 100%; border-collapse: collapse; margin: 24px 0 32px; font-size: 16px; }
table.simple th, table.simple td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.simple thead th { font-weight: 500; color: var(--ink-muted); font-size: 14px; border-bottom: 1px solid var(--ink); }
table.simple td { color: #3C4043; }

details.check { background: var(--panel); border-radius: 18px; margin: 12px 0; }
details.check summary { cursor: pointer; padding: 20px 56px 20px 24px; font-weight: 500; list-style: none; position: relative; }
details.check summary::-webkit-details-marker { display: none; }
details.check summary::after { content: "+"; position: absolute; right: 24px; top: 16px; font-size: 24px; font-weight: 300; color: var(--ink-muted); transition: transform .2s var(--ease); }
details.check[open] summary::after { transform: rotate(45deg); }
details.check .a { padding: 0 24px 20px; color: #3C4043; font-size: 16px; }
details.check .a p { margin: 0 0 10px; }
details.check img { border-radius: 12px; background: #fff; display: block; width: 100%; height: auto; margin: 0 0 14px; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 140px 0 0; }
.pager a { display: block; background: var(--panel); border-radius: 22px; padding: 24px 28px; transition: background .2s var(--ease); }
.pager a:hover { background: var(--panel-2); }
.pager small { display: block; color: var(--ink-muted); font-size: 14px; margin-bottom: 4px; }
.pager span { font-size: 20px; }
.pager .next { text-align: right; grid-column: 2; }

/* ---------- footer ---------- */
footer.site { padding: 160px 0 48px; text-align: center; }
.word { font-weight: 400; font-size: clamp(3.5rem, 13vw, 12rem); line-height: .9; letter-spacing: -.06em; margin: 0 0 48px; }
.flinks { display: flex; justify-content: center; gap: 8px 26px; flex-wrap: wrap; color: var(--ink-muted); font-size: 15px; margin: 0 auto 28px; max-width: 900px; }
.flinks a:hover { color: var(--ink); }
footer.site small { color: var(--ink-muted); font-size: 13px; }

/* ---------- motion ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .nav ul { display: none; }
  .nav .menu-btn { display: inline-flex; }
  .nav.open ul { display: flex; flex-direction: column; position: absolute; top: 72px; left: 0; right: 0; background: #fff; padding: 8px 16px 20px; box-shadow: 0 12px 24px rgba(0, 0, 0, .06); }
  .nav.open ul a { padding: 12px 14px; font-size: 17px; }
}
@media (max-width: 900px) {
  .chapters, .twin, .pair { grid-template-columns: 1fr; }
  .chapters { gap: 48px; }
  .block { padding-top: 112px; }
  .rule { padding: 88px 16px 0; }
  .hero { padding: 64px 0 48px; }
  .page-hero { padding: 64px 0 40px; }
  .frame, .pair, .single { padding: 14px; border-radius: 24px; }
  .frame-top { flex-direction: column; gap: 12px; }
  .frame-top .chip { position: static; }
  .tw { padding: 28px; }
  .term { padding: 48px 20px; border-radius: 24px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  body { font-size: 17px; }
  .brand { font-size: 16px; }
  .brand span { display: none; }
  .list a { grid-template-columns: 44px 1fr; gap: 12px; padding: 20px 4px; }
  .list .n { font-size: 28px; }
  .list .k { grid-column: 2; }
  .tile { aspect-ratio: auto; min-height: 200px; padding: 16px; }
  .tw dl div, .ladder > div { grid-template-columns: 1fr; gap: 2px; }
  .ladder .why { grid-column: 1; }
  .seg button { padding: 11px 14px; font-size: 14px; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
  table.simple { font-size: 15px; }
  .how { padding: 20px; }
}
@media print {
  header.site, .pager, .toc, .seg { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}
