/* =====================================================================
   AdGeeks brand book - page layout
   Builds on css/adgeeks.css (tokens and components). Layout only lives
   here; colors, type and radii come from the --ag-* tokens.
   ===================================================================== */

@font-face { font-family: "Google Sans"; src: url("../brand/fonts/GoogleSans-VF.woff2") format("woff2"), url("../brand/fonts/GoogleSans-VF.ttf") format("truetype"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Google Sans"; src: url("../brand/fonts/GoogleSans-Italic-VF.woff2") format("woff2"), url("../brand/fonts/GoogleSans-Italic-VF.ttf") format("truetype"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Google Sans Flex"; src: url("../brand/fonts/GoogleSansFlex-VF.woff2") format("woff2"), url("../brand/fonts/GoogleSansFlex-VF.ttf") format("truetype"); font-weight: 300 700; font-style: normal; font-display: swap; }

:root {
  --bk-page: var(--ag-paper-card);
  --bk-frame: 12px;
  --bk-max: 1320px;
  --bk-gutter: clamp(16px, 4vw, 56px);
  --bk-section: clamp(64px, 9vw, 120px);
  --bk-ease: cubic-bezier(.22, 1, .36, 1);
  --bk-ok: #16804A;
  --bk-bad: #C8323F;
  --bk-line: #DCDCDC;
  --bk-pink-card: radial-gradient(140% 120% at 0% 0%, #F8A9CB 0%, #EE5C9A 30%, #E0187A 62%, #C8005A 100%);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background-color: var(--bk-page); }
body.ag-light { background-color: var(--bk-page); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ag-pink-ink); outline-offset: 3px; }
.ag-dark :focus-visible, .bk-dark-zone :focus-visible { outline-color: var(--ag-pink); }
.bk-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bk-skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 12px 16px; border-radius: 12px; background: var(--ag-ink); color: var(--ag-paper); text-decoration: none; }
.bk-skip:focus { top: 16px; }

/* ---- Frame: every big block is an inset rounded card on the page ---- */
.bk-frame { padding: var(--bk-frame); }
.bk-frame + .bk-frame { padding-top: 0; }
.bk-wrap { width: 100%; max-width: var(--bk-max); margin: 0 auto; padding: 0 var(--bk-gutter); }

/* ---- Hero card ---- */
.bk-hero {
  border-radius: var(--ag-radius-card); overflow: hidden;
  display: grid; grid-template-rows: auto 1fr auto;
  min-height: clamp(520px, calc(100svh - 2 * var(--bk-frame)), 900px);
  padding: clamp(18px, 2.4vw, 28px);
}
.bk-hero--sub { min-height: clamp(420px, 66svh, 640px); }
.bk-hero-top { display: flex; align-items: center; gap: 12px; min-height: 48px; padding-right: 150px; }
.bk-hero-top .ag-lockup, .bk-footer-brand .ag-lockup { min-height: 44px; }
.bk-hero-top .ag-lockup { --ag-fs-lockup: 20px; }
.bk-version {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 8px;
  font-size: 12px; line-height: 1; color: var(--ag-on-night); background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
}
.bk-hero-stage { display: grid; place-items: center; padding: clamp(24px, 5vw, 64px) 0; min-width: 0; }
.bk-hero-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.bk-hero-intro { max-width: 30em; margin: 0; font-size: 17px; line-height: 1.4; color: var(--ag-on-night-muted); }
.bk-hero-intro strong { font-weight: 400; color: var(--ag-on-night); }
.bk-hero-meta { margin: 0; font-size: 14px; color: var(--ag-on-night-muted); }
.bk-back {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px;
  font-size: 15px; color: var(--ag-on-night); text-decoration: none; opacity: .86;
  transition: opacity .2s var(--bk-ease);
}
.bk-back:hover { opacity: 1; }
.bk-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--bk-ease); }
.bk-back:hover svg { transform: translateX(-3px); }

/* Home title: the one gradient moment on the page */
.bk-title-wrap { display: flex; flex-direction: column; align-items: center; text-align: center; gap: clamp(10px, 1.6vw, 18px); }
.bk-kicker { margin: 0; font-size: clamp(16px, 1.6vw, 22px); color: var(--ag-on-night); font-weight: 400; }
.bk-mega {
  display: inline-block; margin: 0; padding: 0 .04em .08em;
  font-family: var(--ag-font-display); font-weight: 500;
  font-size: clamp(64px, 13vw, 196px); line-height: 1; letter-spacing: -.035em;
}
.bk-mega.ag-glow-text::after { content: attr(data-text); content: attr(data-text) / ""; }
.bk-tagline { margin: 0; font-size: 15px; color: var(--ag-on-night-muted); }

/* ---- Contents button + panel (fixed, top right) ---- */
.bk-contents { position: fixed; top: calc(var(--bk-frame) + 18px); right: calc(var(--bk-frame) + 18px); z-index: 50; }
.bk-contents-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 18px 0 15px; border-radius: 14px;
  border: 1px solid var(--ag-paper-line); background: var(--ag-paper); color: var(--ag-ink);
  font-size: 15px; cursor: pointer; box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .35);
  transition: transform .2s var(--bk-ease), box-shadow .2s var(--bk-ease);
}
.bk-contents-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 34px -14px rgba(0, 0, 0, .4); }
.bk-contents-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }
.bk-panel {
  position: absolute; top: calc(100% + 10px); right: 0; width: min(340px, calc(100vw - 2 * var(--bk-frame) - 36px));
  padding: 10px; border-radius: 22px; background: var(--ag-paper); color: var(--ag-ink);
  border: 1px solid var(--ag-paper-line); box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .35);
  opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top right; visibility: hidden;
  transition: opacity .18s var(--bk-ease), transform .18s var(--bk-ease), visibility 0s linear .18s;
}
.bk-panel[data-open="true"] { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
.bk-panel-head { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 12px 8px; }
.bk-panel ol { list-style: none; margin: 0; padding: 0; }
.bk-contents .bk-panel a { color: var(--ag-ink);
  display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 12px;
  border-radius: 12px; text-decoration: none; font-size: 17px; transition: background-color .15s var(--bk-ease);
}
.bk-contents .bk-panel a:hover, .bk-contents .bk-panel a[aria-current="page"] { background: var(--ag-paper-card); }
.bk-panel a[aria-current="page"] .bk-num { color: var(--ag-pink-ink); }
.bk-num { font-size: 14px; color: var(--ag-ink-muted); font-variant-numeric: tabular-nums; }
.bk-panel-home { border-top: 1px solid var(--ag-paper-line); margin-top: 6px; padding-top: 6px; }

/* ---- Home: section bento ---- */
.bk-sections { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--bk-frame); }
.bk-tile {
  position: relative; display: flex; flex-direction: column; min-height: clamp(300px, 30vw, 420px);
  border-radius: var(--ag-radius-card); overflow: hidden; text-decoration: none;
  background: var(--ag-paper); border: 1px solid var(--ag-paper-line); color: var(--ag-ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03), 0 14px 32px -22px rgba(0, 0, 0, .14);
  transition: transform .25s var(--bk-ease), box-shadow .25s var(--bk-ease);
}
.bk-tile:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(0, 0, 0, .03), 0 24px 40px -22px rgba(0, 0, 0, .22); }
.bk-tile-art { flex: 1; display: grid; place-items: center; padding: 28px; min-height: 0; }
.bk-tile-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 0 24px 22px; }
.bk-tile-name { font-size: 18px; }
.bk-tile-line { display: block; margin-top: 4px; font-size: 14px; color: var(--ag-ink-muted); }

/* Tile art */
.bk-art-quote { font-family: var(--ag-font-display); font-weight: 300; font-size: clamp(28px, 3vw, 40px); line-height: 1.1; text-align: center; color: var(--ag-ink); }
.bk-art-quote em { font-family: var(--ag-font); font-style: italic; font-weight: 500; }
.bk-art-logo { width: min(78%, 280px); }
.bk-art-swatches { position: relative; width: 220px; height: 170px; }
.bk-art-swatches span {
  position: absolute; top: 10px; width: 92px; height: 140px; border-radius: 18px;
  box-shadow: 0 18px 30px -16px rgba(0, 0, 0, .35); border: 1px solid rgba(0, 0, 0, .05);
  transition: transform .3s var(--bk-ease);
}
.bk-art-swatches span:nth-child(1) { left: 0; background: var(--ag-paper-card); transform: rotate(-12deg); }
.bk-art-swatches span:nth-child(2) { left: 42px; background: var(--ag-night); transform: rotate(-4deg); }
.bk-art-swatches span:nth-child(3) { left: 84px; background: var(--ag-gradient); transform: rotate(4deg); }
.bk-art-swatches span:nth-child(4) { left: 126px; background: var(--ag-pink); transform: rotate(12deg); }
.bk-tile:hover .bk-art-swatches span:nth-child(1) { transform: rotate(-16deg) translateX(-8px); }
.bk-tile:hover .bk-art-swatches span:nth-child(4) { transform: rotate(16deg) translateX(8px); }
.bk-art-type { display: flex; align-items: baseline; gap: .12em; font-family: var(--ag-font-display); font-size: clamp(88px, 10vw, 140px); line-height: 1; letter-spacing: -.04em; color: var(--ag-ink); }
.bk-art-type span:first-child { font-weight: 300; }
.bk-art-type span:last-child { font-weight: 500; color: var(--ag-pink); }
.bk-art-photos { position: relative; width: 250px; height: 170px; }
.bk-art-photos img {
  position: absolute; top: 20px; width: 170px; aspect-ratio: 16 / 9; height: auto; object-fit: cover; border-radius: 12px;
  border: 4px solid var(--ag-paper); box-shadow: 0 18px 30px -14px rgba(0, 0, 0, .35);
  transition: transform .3s var(--bk-ease);
}
.bk-art-photos img:nth-child(1) { left: 0; transform: rotate(-9deg); }
.bk-art-photos img:nth-child(2) { left: 40px; top: 0; z-index: 2; transform: rotate(2deg); }
.bk-art-photos img:nth-child(3) { left: 80px; top: 34px; z-index: 3; transform: rotate(8deg); }
.bk-tile:hover .bk-art-photos img:nth-child(1) { transform: rotate(-12deg) translateX(-10px); }
.bk-tile:hover .bk-art-photos img:nth-child(3) { transform: rotate(11deg) translateX(10px); }
.bk-art-icons { display: grid; grid-template-columns: repeat(3, 56px); gap: 14px; }
.bk-art-icons .ag-icon-tile { width: 56px; height: 56px; border-radius: 16px; }
.bk-art-icons .ag-icon-tile:nth-child(5) { background: var(--ag-pink-ink); border-color: var(--ag-pink-ink); color: var(--ag-paper); }

/* ---- Quick reference ---- */
.bk-quick { border-radius: var(--ag-radius-card); background: var(--ag-paper); border: 1px solid var(--ag-paper-line); padding: clamp(28px, 4vw, 56px) clamp(20px, 3vw, 40px); }
.bk-quick-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 40px; flex-wrap: wrap; margin-bottom: clamp(24px, 3vw, 36px); }
.bk-quick-head .ag-body { max-width: 26em; }
.bk-quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--bk-frame); }
.bk-quick-card { display: flex; flex-direction: column; gap: 16px; padding: 22px; border-radius: 22px; background: var(--ag-paper-card); }
.bk-quick-card h3 { margin: 0; font-size: 19px; font-weight: 500; color: var(--ag-ink-strong); }
.bk-quick-use { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ag-ink-muted); }
.bk-quick-use b { font-weight: 500; color: var(--ag-ink); }
.bk-quick-colors, .bk-quick-rules { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.bk-quick-colors li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: 15px; color: var(--ag-ink); }
.bk-quick-colors b { font-weight: 500; }
.bk-dot { width: 32px; height: 32px; border-radius: 10px; border: 1px solid rgba(0, 0, 0, .06); }
.bk-quick-colors .bk-copy { background: var(--ag-paper); }
.bk-quick-type { margin: 0; font-size: clamp(24px, 2vw, 30px); line-height: 1.1; color: var(--ag-ink); }
.bk-quick-logos { display: grid; gap: 6px; }
.bk-quick-logos > span { display: grid; place-items: center; height: 52px; border-radius: 12px; }
.bk-quick-logos img { height: 18px; width: auto; }
.bk-quick-rules li { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 6px 0; font-size: 14px; line-height: 1.4; color: var(--ag-ink); }
.bk-quick-rules .bk-badge { position: static; flex: none; width: 22px; height: 22px; }
.bk-quick-rules .bk-badge svg { width: 13px; height: 13px; }
.bk-quick-more { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: auto; font-size: 14px; color: var(--ag-pink-ink); text-decoration: none; }
.bk-quick-more svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--bk-ease); }
.bk-quick-more:hover svg { transform: translateX(3px); }

.bk-onpage { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: clamp(28px, 4vw, 48px); }
.bk-onpage-label { margin-right: 8px; font-size: 14px; color: var(--ag-ink-muted); }
.bk-head .bk-onpage a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 12px; background: var(--ag-paper); border: 1px solid var(--ag-paper-line); font-size: 14px; color: var(--ag-ink); text-decoration: none; transition: background-color .15s var(--bk-ease); }
.bk-head .bk-onpage a:hover { background: var(--ag-paper-card); }
.bk-block { scroll-margin-top: 16px; }

/* ---- Statement + showcase on home ---- */
.bk-statement-card { border-radius: var(--ag-radius-card); background: var(--ag-paper); border: 1px solid var(--ag-paper-line); padding: var(--bk-section) var(--bk-gutter); }
.bk-statement { max-width: 1100px; margin: 0 auto; }
.bk-statement .ag-statement { font-size: clamp(30px, 4.4vw, 64px); line-height: 1.32; }
.bk-statement-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: clamp(28px, 4vw, 48px); }
.bk-showcase {
  position: relative; border-radius: var(--ag-radius-card); overflow: hidden; min-height: clamp(380px, 52vw, 720px);
  display: grid; place-items: center; text-align: center; padding: 48px var(--bk-gutter);
  background: var(--ag-night) url("../brand/backgrounds/bg-dark-1920x1080.png") center top / cover no-repeat;
}
.ag-app-icon { background: linear-gradient(180deg, rgb(255 255 255 / 86%) 0%, rgb(255 232 242) 48%, rgb(215 120 225 / 97%) 100%); }
.bk-showcase .ag-app-icon { --size: clamp(150px, 22vw, 300px); margin: 0 auto clamp(28px, 4vw, 44px); }
.bk-showcase-eyebrow { margin: 0 0 14px; font-size: 13px; letter-spacing: .02em; text-transform: uppercase; color: var(--ag-pink); }
.bk-showcase-line { margin: 0; font-family: var(--ag-font-display); font-size: clamp(32px, 4.4vw, 60px); font-weight: 300; line-height: 1.08; letter-spacing: -.015em; color: var(--ag-on-night); }
.bk-showcase-line em { font-family: var(--ag-font); font-style: italic; font-weight: 500; }
.bk-showcase-sub { max-width: 30em; margin: 18px auto 0; font-size: clamp(16px, 1.4vw, 18px); line-height: 1.45; color: var(--ag-on-night-muted); }
.bk-showcase-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 18px; margin-top: clamp(24px, 3vw, 32px); }
.bk-btn-light { background: var(--ag-paper); color: var(--ag-ink); box-shadow: 0 14px 34px -14px rgba(245, 37, 96, .55); }
.bk-btn-light:hover { background: var(--ag-paper-card); }
.bk-showcase-meta { font-size: 14px; color: var(--ag-on-night-muted); }

/* ---- Footer ---- */
.bk-footer { border-radius: var(--ag-radius-card); overflow: hidden; padding: clamp(28px, 4vw, 48px); }
.bk-footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(32px, 5vw, 80px); }
.bk-footer-brand .ag-lockup { --ag-fs-lockup: 22px; }
.bk-footer-brand p { margin: 16px 0 0; max-width: 24em; font-size: 15px; color: var(--ag-on-night-muted); }
.bk-footer-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.bk-footer .bk-footer-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .12); font-size: 14px; text-decoration: none; color: var(--ag-on-night); transition: background-color .15s var(--bk-ease); }
.bk-footer-links a:hover { background: rgba(255, 255, 255, .06); }
.bk-footer-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; margin: 0; padding: 0; list-style: none; }
.bk-footer .bk-footer-index a { display: flex; align-items: center; gap: 16px; min-height: 56px; border-top: 1px solid rgba(255, 255, 255, .1); text-decoration: none; font-size: 17px; color: var(--ag-on-night); }
.bk-footer-index a:hover .bk-footer-label { color: var(--ag-pink); }
.bk-footer-index .bk-num { color: var(--ag-on-night-muted); min-width: 2.4em; }
.bk-footer-label { transition: color .15s var(--bk-ease); }
.bk-footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: clamp(36px, 5vw, 64px); padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 14px; color: var(--ag-on-night-muted); }

/* ---- Sub-page title row ---- */
.bk-head { padding: clamp(40px, 6vw, 88px) 0 clamp(24px, 3vw, 40px); }
.bk-head-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px clamp(32px, 6vw, 96px); align-items: start; }
.bk-page-num { margin: 0 0 12px; font-size: 15px; color: var(--ag-ink-muted); font-variant-numeric: tabular-nums; }
.bk-h1 { margin: 0; font-family: var(--ag-font-display); font-weight: 300; font-size: clamp(52px, 8vw, 120px); line-height: .98; letter-spacing: -.035em; color: var(--ag-ink); }
.bk-intro { margin: 0 0 28px; max-width: 30em; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.4; color: var(--ag-ink); }
.bk-hl { color: var(--ag-pink-ink); }
.bk-head-grid > div:last-child { padding-top: clamp(0px, 2.6vw, 34px); }

/* ---- Content blocks ---- */
.bk-block { padding: clamp(36px, 5vw, 64px) 0; }
.bk-block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-top: 18px; margin-bottom: clamp(18px, 2.4vw, 28px); border-top: 1px solid var(--bk-line); }
.bk-block-head h2 { margin: 0; font-size: clamp(20px, 1.9vw, 26px); font-weight: 400; color: var(--ag-ink); }
.bk-block-head .bk-count { font-size: 15px; color: var(--ag-ink-muted); white-space: nowrap; }
.bk-block-lead { margin: -8px 0 24px; max-width: 62ch; font-size: 17px; line-height: 1.45; color: var(--ag-ink-muted); }
.bk-grid { display: grid; gap: var(--bk-frame); }
.bk-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bk-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bk-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bk-grid--auto { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.bk-grid--5 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.bk-grid--5 > :nth-child(-n+3) { grid-column: span 2; }
.bk-grid--5 > :nth-child(n+4) { grid-column: span 3; }
.bk-grid--icons { grid-template-columns: repeat(10, minmax(0, 1fr)); }

/* Generic white panel */
.bk-panel-card { border-radius: var(--ag-radius-card); background: var(--ag-paper); border: 1px solid var(--ag-paper-line); padding: clamp(22px, 2.4vw, 32px); }
.bk-panel-card h3 { margin: 0 0 10px; font-size: clamp(19px, 1.7vw, 24px); font-weight: 400; color: var(--ag-ink-strong); }
.bk-panel-card p { margin: 0; font-size: 16px; line-height: 1.45; color: var(--ag-ink-muted); }
.bk-panel-card p + p { margin-top: 12px; }
.bk-panel-card .bk-example { margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: var(--ag-paper-card); font-size: 15px; color: var(--ag-ink); }
.bk-panel-card .bk-step { display: block; margin-bottom: 18px; font-size: 14px; color: var(--ag-pink-ink); font-variant-numeric: tabular-nums; }

/* Specimen card (logo, mark, lockups) */
.bk-spec { position: relative; display: flex; flex-direction: column; border-radius: var(--ag-radius-card); overflow: hidden; border: 1px solid var(--ag-paper-line); background: var(--ag-paper); }
.bk-spec-stage { display: grid; place-items: center; aspect-ratio: 16 / 10; padding: 12%; }
.bk-spec-stage--square { aspect-ratio: 1; padding: 22%; }
.bk-spec-stage img, .bk-spec-stage svg { width: 100%; height: auto; max-height: 100%; }
.bk-spec-cap { display: flex; justify-content: space-between; gap: 12px; padding: 14px 20px 18px; border-top: 1px solid var(--ag-paper-line); font-size: 14px; color: var(--ag-ink-muted); background: var(--ag-paper); }
.bk-spec-cap b { font-weight: 500; color: var(--ag-ink); }
.bk-files { display: flex; flex-wrap: wrap; gap: 6px; flex: none; }
.bk-file { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--ag-paper-line); background: var(--ag-paper); color: var(--ag-pink-ink); font-size: 14px; text-decoration: none; white-space: nowrap; transition: background-color .15s var(--bk-ease); }
.bk-file:hover { background: var(--ag-paper-card); }
.bk-spec-cap { align-items: center; }
.bk-on-dark { background: var(--ag-night); }
.bk-on-mist { background: var(--ag-paper-card); }
.bk-on-pink { background: var(--bk-pink-card); }
.bk-on-grid { background-color: var(--ag-paper); background-image: linear-gradient(90deg, rgba(0,0,0,.045) 1px, transparent 1px), linear-gradient(180deg, rgba(0,0,0,.045) 1px, transparent 1px); background-size: 24px 24px; }
.bk-badge { position: absolute; top: 14px; right: 14px; z-index: 2; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--ag-paper); }
.bk-badge svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.bk-badge--ok { background: var(--bk-ok); }
.bk-badge--no { background: var(--bk-bad); }

/* Clear space diagram */
.bk-clear { position: relative; display: inline-block; padding: var(--cs); --cs: clamp(18px, 3vw, 34px); outline: 1px dashed var(--ag-pink-ink); outline-offset: 0; }
.bk-clear::before { content: ""; position: absolute; inset: var(--cs); outline: 1px solid rgba(214, 16, 74, .35); }
.bk-clear img { width: clamp(180px, 26vw, 300px); }
.bk-clear-x { position: absolute; top: 4px; left: calc(var(--cs) / 2); transform: translateX(-50%); font-size: 13px; color: var(--ag-pink-ink); }

/* Lockups */
.bk-lockup-row { display: flex; align-items: center; justify-content: center; padding: clamp(32px, 5vw, 56px) 20px; }
.bk-lockup-row .ag-lockup { --ag-fs-lockup: clamp(17px, 1.6vw, 22px); color: var(--ag-ink-logo); }
.bk-spec-stage .ag-lockup > svg { width: auto; height: 1.15em; }

/* Incorrect use demos */
.bk-wrong-recolor { filter: hue-rotate(150deg) saturate(1.3); }
.bk-wrong-glow { filter: drop-shadow(0 0 14px rgba(245, 0, 233, .9)) drop-shadow(0 6px 10px rgba(0, 0, 0, .35)); }
.bk-spec-stage .bk-wrong-stretch { width: 72%; transform: scaleX(1.3) scaleY(.82); }

/* Color swatches */
.bk-swatch { display: flex; flex-direction: column; padding: 8px; border-radius: 24px; background: var(--ag-paper); border: 1px solid var(--ag-paper-line); }
.bk-swatch-chip { position: relative; aspect-ratio: 1; border-radius: 18px; border: 1px solid rgba(0, 0, 0, .06); }
.bk-swatch-chip--wide { aspect-ratio: auto; height: clamp(120px, 14vw, 180px); }
.bk-swatch-body { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; padding: 14px 8px 6px; }
.bk-swatch-name { display: block; font-size: 16px; color: var(--ag-ink); }
.bk-swatch-meta { display: block; margin-top: 4px; font-size: 13px; line-height: 1.4; color: var(--ag-ink-muted); }
.bk-swatch-hex { font-variant-numeric: tabular-nums; }
.bk-copy {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; height: 44px; padding: 0 12px;
  border-radius: 12px; border: 1px solid var(--ag-paper-line); background: var(--ag-paper); color: var(--ag-ink);
  font-size: 13px; cursor: pointer; transition: background-color .15s var(--bk-ease), color .15s var(--bk-ease);
}
.bk-copy:hover { background: var(--ag-paper-card); }
.bk-copy svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.bk-copy[data-copied="true"] { background: var(--ag-ink); border-color: var(--ag-ink); color: var(--ag-paper); }

.bk-balance { display: flex; height: 76px; border-radius: 18px; overflow: hidden; border: 1px solid var(--ag-paper-line); }
.bk-balance span { display: flex; align-items: flex-end; padding: 10px 14px; font-size: 13px; }
.bk-balance-legend { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 14px; font-size: 14px; color: var(--ag-ink-muted); }

.bk-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.bk-table th { text-align: left; font-weight: 400; color: var(--ag-ink-muted); font-size: 13px; padding: 0 12px 10px 0; }
.bk-table td { padding: 14px 12px 14px 0; border-top: 1px solid var(--ag-paper-line); vertical-align: middle; color: var(--ag-ink); }
.bk-table td:last-child, .bk-table th:last-child { padding-right: 0; }
.bk-pair { display: inline-flex; align-items: center; justify-content: center; min-width: 76px; height: 40px; padding: 0 12px; border-radius: 10px; font-size: 15px; border: 1px solid rgba(0, 0, 0, .06); }
.bk-pass { color: var(--bk-ok); }
.bk-limit { color: var(--ag-ink-muted); }
.bk-scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Type specimens */
.bk-type { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--bk-frame); }
.bk-type-hero { display: grid; place-items: center; min-height: clamp(280px, 34vw, 460px); border-radius: var(--ag-radius-card); background: var(--ag-paper); border: 1px solid var(--ag-paper-line); overflow: hidden; }
.bk-type-hero span { font-size: clamp(140px, 20vw, 300px); line-height: 1; letter-spacing: -.04em; color: var(--ag-ink); }
.bk-type-info { display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: clamp(8px, 2vw, 24px) clamp(0px, 2vw, 24px); }
.bk-type-label { margin: 0; font-size: 13px; color: var(--ag-ink-muted); }
.bk-type-name { margin: 4px 0 0; font-size: clamp(22px, 2.2vw, 30px); font-weight: 400; color: var(--ag-ink); }
.bk-weights { display: flex; flex-wrap: wrap; gap: 8px; }
.bk-glyphs { margin: 0; font-size: clamp(24px, 2.8vw, 40px); line-height: 1.2; color: var(--ag-ink); overflow-wrap: anywhere; }
.bk-scale-row { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 24px; align-items: baseline; padding: 22px 0; border-top: 1px solid var(--ag-paper-line); }
.bk-scale-meta { font-size: 14px; line-height: 1.5; color: var(--ag-ink-muted); }
.bk-scale-meta b { display: block; font-weight: 400; font-size: 16px; color: var(--ag-ink); }
.bk-scale-sample { min-width: 0; color: var(--ag-ink); overflow-wrap: anywhere; }

/* Imagery */
.bk-shot { margin: 0; border-radius: 20px; overflow: hidden; background: var(--ag-paper); border: 1px solid var(--ag-paper-line); }
.bk-shot img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.bk-shot figcaption { padding: 12px 16px 14px; font-size: 14px; color: var(--ag-ink-muted); }
.bk-shot figcaption b { font-weight: 400; color: var(--ag-ink); }
.bk-bg-thumb img { aspect-ratio: auto; height: 220px; object-fit: cover; }

/* Hero visuals for sub-pages */
.bk-hero-logo { width: clamp(220px, 34vw, 460px); }
.bk-hero-display { text-align: center; color: var(--ag-on-night); }
.bk-hero-display .ag-display { font-size: clamp(40px, 6.4vw, 88px); }
.bk-hero-swatches { display: flex; gap: clamp(8px, 1.4vw, 16px); align-items: flex-end; }
.bk-hero-swatches span { width: clamp(44px, 7vw, 92px); border-radius: 18px; border: 1px solid rgba(255, 255, 255, .1); }
.bk-hero-aa { font-family: var(--ag-font-display); font-size: clamp(140px, 22vw, 300px); line-height: .9; letter-spacing: -.05em; color: var(--ag-on-night); }
.bk-hero-aa span:first-child { font-weight: 300; }
.bk-hero-aa span:last-child { font-weight: 500; color: var(--ag-pink); }
.bk-hero-shots { position: relative; width: min(640px, 82vw); aspect-ratio: 16 / 9; }
.bk-hero-shots img { position: absolute; width: 62%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 40px 60px -30px rgba(0, 0, 0, .8); }
.bk-hero-shots img:nth-child(1) { left: 0; top: 22%; }
.bk-hero-shots img:nth-child(2) { left: 19%; top: 0; z-index: 2; }
.bk-hero-shots img:nth-child(3) { right: 0; top: 30%; z-index: 3; }
.bk-hero-iso { display: grid; grid-template-columns: repeat(3, clamp(56px, 7vw, 92px)); gap: clamp(12px, 1.6vw, 22px); transform: rotateX(55deg) rotateZ(-45deg); transform-style: preserve-3d; }
.bk-hero-iso .ag-icon-tile { width: 100%; height: auto; aspect-ratio: 1; border-radius: 22%; box-shadow: 0 18px 30px -12px rgba(0, 0, 0, .8); }
.bk-hero-iso .ag-icon-tile > svg { width: 44%; height: 44%; transform: rotateZ(45deg); }
.bk-hero-iso .ag-icon-tile.is-pink { background: var(--ag-pink); border-color: var(--ag-pink); box-shadow: 0 18px 40px -10px rgba(245, 37, 96, .6); }

/* Icons grid */
.bk-icon-cell { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px 10px 16px; border-radius: 20px; background: var(--ag-paper); border: 1px solid var(--ag-paper-line); font-size: 13px; color: var(--ag-ink-muted); text-align: center; }

/* Component demo stage */
.bk-demo { border-radius: var(--ag-radius-card); padding: clamp(24px, 3vw, 40px); display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.bk-demo--light { background: var(--ag-paper); border: 1px solid var(--ag-paper-line); }
.bk-demo--col { flex-direction: column; align-items: stretch; }
.bk-demo-label { width: 100%; margin: 0 0 4px; font-size: 13px; color: var(--ag-ink-muted); }
.ag-dark .bk-demo-label { color: var(--ag-on-night-muted); }
.bk-surface { min-height: 180px; justify-content: flex-end; gap: 6px; }
.bk-surface .bk-surface-name { font-size: 18px; }
.bk-surface .bk-surface-use { font-size: 14px; color: var(--ag-muted); }
.bk-surface .bk-surface-use--lg { font-size: 24px; line-height: 1.2; color: var(--ag-on-night); }

.bk-list { margin: 0; padding: 0; list-style: none; }
.bk-list li { position: relative; padding: 12px 0 12px 28px; border-top: 1px solid var(--ag-paper-line); font-size: 16px; line-height: 1.45; color: var(--ag-ink); }
.bk-list li::before { content: ""; position: absolute; left: 4px; top: 21px; width: 8px; height: 8px; border-radius: 2px; background: var(--ag-pink); }
.bk-list--no li::before { background: transparent; border: 1.5px solid var(--ag-ink-muted); }
.bk-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* Next page link at the bottom of each sub-page */
.bk-next { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 120px; padding: 28px clamp(24px, 3vw, 40px); border-radius: var(--ag-radius-card); background: var(--ag-paper); border: 1px solid var(--ag-paper-line); text-decoration: none; color: var(--ag-ink); transition: transform .25s var(--bk-ease); }
.bk-next:hover { transform: translateY(-2px); }
.bk-next-title { font-family: var(--ag-font-display); font-weight: 300; font-size: clamp(32px, 4vw, 56px); line-height: 1; letter-spacing: -.02em; }
.bk-next svg { width: 32px; height: 32px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--bk-ease); }
.bk-next:hover svg { transform: translateX(6px); }

/* Buttons and chips are pills */
:root { --bk-pill: 999px; --ag-radius-btn: var(--bk-pill); }
.ag-chip, .bk-copy, .bk-contents-btn, .bk-version, .bk-file, .bk-head .bk-onpage a, .bk-footer .bk-footer-links a { border-radius: var(--bk-pill); }
.bk-file, .bk-head .bk-onpage a, .bk-footer .bk-footer-links a { padding-inline: 18px; }
.bk-copy { padding-inline: 14px; }

.ag-btn svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ag-btn { min-height: 44px; }

/* ---- Responsive ---- */
@media (max-width: 1080px) {
  .bk-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bk-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bk-grid--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bk-grid--5 > :nth-child(n) { grid-column: auto; }
  .bk-grid--5 > :last-child { grid-column: 1 / -1; }
  .bk-grid--icons { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .bk-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  :root { --bk-frame: 8px; }
  .bk-sections, .bk-grid--2, .bk-grid--3, .bk-grid--5, .bk-type, .bk-head-grid, .bk-footer-grid { grid-template-columns: minmax(0, 1fr); }
  .bk-grid--5 > :last-child { grid-column: auto; }
  .bk-grid--icons { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .bk-head-grid > div:last-child { padding-top: 0; }
  .bk-footer-index { grid-template-columns: minmax(0, 1fr); }
  .bk-scale-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .bk-hero-foot { flex-direction: column; align-items: flex-start; }
  .bk-tile { min-height: 300px; }
  .bk-version { display: none; }
  .bk-quick-grid { grid-template-columns: minmax(0, 1fr); }
  /* Contents moves to a bottom pill so it never covers labels */
  .bk-contents { top: auto; right: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(50%); }
  .bk-panel { top: auto; bottom: calc(100% + 10px); right: 50%; transform-origin: bottom center; transform: translate(50%, 6px) scale(.98); }
  .bk-panel[data-open="true"] { transform: translate(50%, 0); }
  .bk-hero-top { padding-right: 0; }
  .bk-hero { min-height: min(640px, 82svh); }
  .bk-hero--sub { min-height: 0; }
  .bk-hero-stage { padding: 40px 0; }
  .bk-onpage-label { width: 100%; }
  body { padding-bottom: 76px; }
}
@media (max-width: 420px) {
  .bk-grid--4 { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bk-tile, .bk-next, .ag-btn, .bk-contents-btn, .bk-art-swatches span, .bk-art-photos img, .bk-back svg, .bk-next svg, .bk-quick-more svg { transition-property: background-color, box-shadow, opacity, color; }
  .bk-tile:hover, .bk-next:hover, .ag-btn:hover, .bk-contents-btn:hover, .bk-back:hover svg, .bk-next:hover svg, .bk-quick-more:hover svg { transform: none; }
  .bk-tile:hover .bk-art-swatches span, .bk-tile:hover .bk-art-photos img { transform: none !important; }
  .bk-panel { transition-property: opacity, visibility; }
}

/* ---- Voice rules: not this / write this ---- */
.bk-rules { margin: 0; padding: 0; list-style: none; border-radius: var(--ag-radius-card); background: var(--ag-paper); border: 1px solid var(--ag-paper-line); overflow: hidden; }
.bk-rule { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr) minmax(0, 1fr); gap: clamp(16px, 2.4vw, 32px); align-items: start; padding: clamp(22px, 2.6vw, 32px); }
.bk-rule + .bk-rule { border-top: 1px solid var(--ag-paper-line); }
.bk-rule-head .bk-step { display: block; margin-bottom: 10px; font-size: 14px; color: var(--ag-pink-ink); font-variant-numeric: tabular-nums; }
.bk-rule-head h3 { margin: 0 0 6px; font-size: clamp(19px, 1.7vw, 24px); font-weight: 400; color: var(--ag-ink-strong); }
.bk-rule-head p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ag-ink-muted); }
.bk-say { height: 100%; padding: 16px 18px 18px; border-radius: 18px; }
.bk-say--no { background: var(--ag-paper-card); }
.bk-say--yes { background: var(--ag-paper); border: 1px solid var(--ag-paper-line); box-shadow: 0 10px 24px -18px rgba(0, 0, 0, .25); }
.bk-say-label { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; color: var(--ag-ink-muted); }
.bk-say-label .bk-badge { position: static; width: 20px; height: 20px; }
.bk-say-label .bk-badge svg { width: 12px; height: 12px; }
.bk-say-where { margin-left: auto; padding: 3px 10px; border-radius: var(--bk-pill); background: var(--ag-paper); font-size: 12px; color: var(--ag-ink-muted); }
.bk-say--no .bk-say-where { border: 1px solid var(--ag-paper-line); }
.bk-say p { margin: 0; font-size: 16px; line-height: 1.45; }
.bk-say--no p { color: var(--ag-ink-muted); text-decoration: line-through; text-decoration-color: rgba(200, 50, 63, .45); text-decoration-thickness: 1px; }
.bk-say--yes p { color: var(--ag-ink); font-weight: 500; }
@media (max-width: 900px) {
  .bk-rule { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .bk-rule-head { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .bk-rule { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

/* ---- Mynaui icons keep their native 1.5px stroke ---- */
svg.mn { stroke-width: 1.5; }
.bk-badge svg.mn { stroke-width: 2.25; }

/* Trend arrows (Mynaui-style up/down) inline with a number */
.bk-trend { display: inline-flex; align-items: center; gap: .2em; white-space: nowrap; }
.bk-trend > svg.mn { width: 1.15em; height: 1.15em; flex: none; }

/* ---- Motion: hidden start state, only when js/motion.js will reveal it ---- */
.motion :is(.bk-hero-stage, .bk-hero-foot > *, .bk-tile, .bk-quick-head, .bk-quick-grid > *, .bk-statement, .bk-showcase > div, .bk-head-grid > div, .bk-onpage, .bk-block-head, .bk-block-lead, .bk-grid > *, .bk-rules > li, .bk-type > *, .bk-block > .bk-demo, .bk-block > .bk-panel-card, .bk-next, .bk-footer):not(.is-in) { opacity: 0; }
@media print { .motion :is(.bk-hero-stage, .bk-hero-foot > *, .bk-tile, .bk-quick-head, .bk-quick-grid > *, .bk-statement, .bk-showcase > div, .bk-head-grid > div, .bk-onpage, .bk-block-head, .bk-block-lead, .bk-grid > *, .bk-rules > li, .bk-type > *, .bk-block > .bk-demo, .bk-block > .bk-panel-card, .bk-next, .bk-footer) { opacity: 1 !important; transform: none !important; } }
.bk-panel-card .bk-card-for { margin-top: 12px; font-size: 14px; color: var(--ag-ink); }
