/* District Living — Brand Hub
   base.css: tokens, type, layout shell, shared components.
   Section-specific styles live in css/sections/*.css */

@font-face { font-family: "Britti Sans"; src: url("../assets/fonts/BrittiSans-Light.ttf") format("truetype"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Britti Sans"; src: url("../assets/fonts/BrittiSans-Medium.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Britti Sans"; src: url("../assets/fonts/BrittiSans-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* brand colours (from the SVG masters) */
  --navy: #163E54;
  --blue: #76B4C5;
  --sand: #E8E3D8;
  --white: #FFFFFF;

  /* derived tints — UI only, not brand colours */
  --navy-deep: #103142;
  --navy-70: rgba(22, 62, 84, .7);
  --navy-45: rgba(22, 62, 84, .45);
  --navy-15: rgba(22, 62, 84, .15);
  --navy-08: rgba(22, 62, 84, .08);
  --blue-soft: #C4DEE6;
  --sand-soft: #F3F0EA;
  --sand-deep: #D6CFC0;
  --stage: #C9C9C7;          /* neutral backdrop used in the guideline for layouts */
  --alert: #D5676A;          /* "incorrect usage" marker from the guideline */

  --font: "Britti Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --fs-display: clamp(2.75rem, 1.2rem + 5.2vw, 5.5rem);
  --fs-h2: clamp(2.1rem, 1.3rem + 2.8vw, 3.75rem);
  --fs-h3: clamp(1.4rem, 1.15rem + .9vw, 1.9rem);
  --fs-h4: 1.1875rem;
  --fs-lead: clamp(1.125rem, 1rem + .5vw, 1.375rem);
  --fs-body: 1.0625rem;
  --fs-small: .875rem;
  --fs-micro: .75rem;

  --r-s: 8px;
  --r-m: 14px;
  --r-l: 24px;
  --r-pill: 999px;

  --side: 264px;
  --bar: 64px;
  --pad: clamp(20px, 4.2vw, 72px);
  --gap: clamp(16px, 2vw, 28px);
  --sec-y: clamp(72px, 9vw, 136px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + 16px); }
body {
  margin: 0; font-family: var(--font); font-weight: 300; font-size: var(--fs-body); line-height: 1.55;
  color: var(--navy); background: var(--sand); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
strong, b { font-weight: 500; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.on-blue :focus-visible, .sec--blue :focus-visible { outline-color: var(--navy); }
::selection { background: var(--blue); color: var(--navy); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ───────── Shell ───────── */
.main { min-height: 100vh; display: flex; flex-direction: column; }
#main { flex: 1; }

.bar {
  position: sticky; top: 0; z-index: 30; height: var(--bar); display: flex; align-items: center; gap: clamp(12px, 2vw, 28px);
  padding: 0 var(--pad); background: var(--navy); color: var(--sand);
}
.bar__logo { display: block; flex: none; width: clamp(132px, 14vw, 168px); color: var(--blue); }
.bar__logo svg { width: 100%; height: auto; }
.bar__nav { display: flex; gap: 4px; height: 100%; }
.bar__nav a {
  display: flex; align-items: center; padding: 0 14px; border-top: 2px solid transparent; border-bottom: 2px solid transparent;
  text-decoration: none; font-size: var(--fs-small); font-weight: 500; color: rgba(232, 227, 216, .78); transition: color .15s, border-color .15s;
}
.bar__nav a:hover { color: var(--sand); }
.bar__nav a[aria-current="true"] { color: var(--blue); border-bottom-color: var(--blue); }
.bar__spacer { flex: 1; }
.bar .btn { background: var(--blue); color: var(--navy); }
.bar .btn:hover { background: #8ac2d1; }
.bar .bar__menu { display: none; background: transparent; color: var(--sand); border-color: rgba(232, 227, 216, .6); }
.bar .bar__menu:hover { background: rgba(118, 180, 197, .16); }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding: 22px var(--pad); background: var(--navy); color: rgba(232, 227, 216, .78); font-size: var(--fs-small); }
.foot a { color: var(--sand); }

/* Small-screen menu: covers the whole screen */
.menu { position: fixed; inset: 0; z-index: 70; display: none; flex-direction: column; background: var(--navy); color: var(--sand); overflow-y: auto; }
.menu.is-on { display: flex; }
.menu__head { flex: none; height: var(--bar); display: flex; align-items: center; justify-content: space-between; padding: 0 var(--pad); }
.menu__logo { display: block; width: 132px; color: var(--blue); }
.menu__logo svg { width: 100%; height: auto; }
.menu__nav { display: grid; padding: 12px var(--pad) 32px; }
.menu__nav a, .menu__nav button {
  display: flex; align-items: center; min-height: 68px; padding: 0; border: 0; border-bottom: 1px solid rgba(118, 180, 197, .3);
  background: none; color: var(--sand); font-size: var(--fs-h3); font-weight: 300; text-decoration: none; text-align: left;
}
.menu__nav .menu__small { min-height: 56px; border-bottom: 0; font-size: var(--fs-small); opacity: .78; }

/* ───────── Pages ─────────
   One page is visible at a time; js/core.js shows the page whose data-route matches the address. */
.page { padding: clamp(20px, 3vw, 40px) var(--pad) var(--sec-y); }
.page--flush { padding: 0; }
.page h1:focus { outline: none; }
.page--navy { background: var(--navy); color: var(--sand); }
.page__head { display: grid; gap: 14px; max-width: 900px; margin-bottom: clamp(24px, 3vw, 40px); }
.crumbs { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: var(--fs-small); color: var(--navy-70); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.page .sub { margin-top: clamp(36px, 4.5vw, 64px); }
.page__panel > .sub:first-child, .page__panel > :first-child { margin-top: 0; }

/* Page tabs: one underlined row, scrolls sideways when it does not fit */
.ptabs { display: flex; gap: 4px; border-bottom: 1px solid var(--navy-15); overflow-x: auto; scrollbar-width: none; }
.ptabs::-webkit-scrollbar { display: none; }
.ptabs button {
  flex: none; height: 48px; margin-bottom: -1px; padding: 0 18px; border: 0; border-bottom: 3px solid transparent; background: none;
  font-size: var(--fs-small); font-weight: 500; letter-spacing: .03em; white-space: nowrap; color: var(--navy-70); transition: color .15s, border-color .15s;
}
.ptabs button:hover { color: var(--navy); }
.ptabs button[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--navy); }
.page__panel { margin-top: clamp(24px, 3vw, 44px); }

/* Previous / next chapter */
.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin-top: clamp(40px, 6vw, 80px); padding-top: 16px; border-top: 1px solid var(--navy-15); font-size: var(--fs-small); font-weight: 500; }
.pager a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; }
.pager a:hover { text-decoration: underline; }
.pager__all { justify-self: center; opacity: .72; }
.pager__next { justify-self: end; text-align: right; }

/* Grey zone: content that does not exist yet */
.ph { display: grid; place-items: center; min-height: 120px; padding: 16px; border-radius: var(--r-m); background: var(--stage); color: var(--navy-70); font-size: var(--fs-micro); font-weight: 500; letter-spacing: .1em; text-transform: uppercase; text-align: center; }

/* Contents and tool lists */
.toc { display: grid; gap: clamp(32px, 4vw, 56px); }
.toc__group { display: grid; gap: 16px; }
.toc__card { display: grid; gap: 6px; align-content: start; padding: 14px 14px 20px; border-radius: var(--r-m); background: var(--white); text-decoration: none; transition: transform .15s var(--ease), box-shadow .15s; }
a.toc__card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(16, 49, 66, .12); }
.toc__card .ph { min-height: 0; aspect-ratio: 16 / 9; margin-bottom: 8px; }
.toc__card .caps { opacity: .6; }
.toc__card--soon { background: transparent; border: 1px dashed var(--navy-45); }

/* Carousel: a row that scrolls sideways in whole screens */
.carousel { --per: 3; display: grid; gap: 14px; }
.carousel[data-per="1"] { --per: 1; } .carousel[data-per="2"] { --per: 2; } .carousel[data-per="4"] { --per: 4; }
.carousel__track { display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > * { flex: 0 0 calc((100% - (var(--per) - 1) * var(--gap)) / var(--per)); min-width: 0; scroll-snap-align: start; }
.carousel__nav { display: flex; align-items: center; justify-content: flex-end; gap: 12px; font-size: var(--fs-small); font-weight: 500; font-variant-numeric: tabular-nums; }
.carousel__nav .icon-btn[disabled] { opacity: .35; cursor: default; }

/* Popup */
.modal { position: fixed; inset: 0; z-index: 70; display: none; place-items: center; padding: clamp(12px, 3vw, 40px); }
.modal.is-on { display: grid; }
.modal__box { display: flex; flex-direction: column; width: min(860px, 100%); max-height: 100%; border-radius: var(--r-l); background: var(--sand); overflow: hidden; box-shadow: 0 24px 80px rgba(16, 49, 66, .35); }
.modal--wide .modal__box { width: min(1180px, 100%); }
.modal__head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; background: var(--navy); color: var(--blue); }
.modal__body { display: grid; gap: var(--gap); align-content: start; padding: clamp(18px, 2.5vw, 32px); overflow-y: auto; }

/* ───────── Sections ───────── */
.sec { padding: var(--sec-y) var(--pad); position: relative; }
.sec--sand { background: var(--sand); }
.sec--white { background: var(--white); }
.sec--soft { background: var(--sand-soft); }
.sec--navy { background: var(--navy); color: var(--sand); }
.sec--blue { background: var(--blue); color: var(--navy); }
.sec--navy .eyebrow, .sec--navy .h2, .sec--navy .h3 { color: var(--blue); }
.wrap { max-width: 1240px; margin: 0 auto; }
.wrap--narrow { max-width: 820px; }

.sec__head { display: grid; gap: 18px; max-width: 900px; margin-bottom: clamp(36px, 5vw, 72px); }
.sub { margin-top: clamp(56px, 7vw, 104px); }
.sub__head { display: grid; gap: 10px; max-width: 760px; margin-bottom: clamp(22px, 3vw, 40px); }

.eyebrow { font-size: var(--fs-micro); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--navy-70); display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.display { font-size: var(--fs-display); font-weight: 300; line-height: 1.02; letter-spacing: -.02em; }
.h2 { font-size: var(--fs-h2); font-weight: 300; line-height: 1.06; letter-spacing: -.018em; }
.h3 { font-size: var(--fs-h3); font-weight: 300; line-height: 1.18; letter-spacing: -.01em; }
.h4 { font-size: var(--fs-h4); font-weight: 500; line-height: 1.3; }
.lead { font-size: var(--fs-lead); line-height: 1.45; max-width: 46em; }
.small { font-size: var(--fs-small); }
.micro { font-size: var(--fs-micro); letter-spacing: .02em; }
.muted { opacity: .68; }
.mono { font-family: var(--mono); font-size: .9em; font-weight: 400; }
.caps { font-size: var(--fs-micro); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.prose > * + * { margin-top: .9em; }
.prose { max-width: 42em; }

/* ───────── Grid ───────── */
.grid { display: grid; gap: var(--gap); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-side { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.cols-main { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.stack { display: grid; gap: 14px; align-content: start; }
.stack--l { gap: 28px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; }
.align-start { align-items: start; }

/* ───────── Cards ───────── */
.card { background: var(--white); border-radius: var(--r-m); padding: clamp(18px, 2vw, 28px); display: grid; gap: 12px; align-content: start; }
.sec--white .card { background: var(--sand-soft); }
.card--navy { background: var(--navy) !important; color: var(--sand); }
.card--navy .h3, .card--navy .h4 { color: var(--blue); }
.card--blue { background: var(--blue) !important; color: var(--navy); }
.card--sand { background: var(--sand) !important; }
.card--white { background: var(--white) !important; }
.card--line { background: transparent !important; border: 1px solid var(--navy-15); }
.sec--navy .card--line { border-color: rgba(118, 180, 197, .3); }
.card--flush { padding: 0; overflow: hidden; }
.card__num { font-size: var(--fs-micro); font-weight: 500; letter-spacing: .12em; opacity: .55; }

/* ───────── Buttons ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 20px;
  border: 1px solid transparent; border-radius: var(--r-pill); background: var(--navy); color: var(--sand);
  font-size: var(--fs-micro); font-weight: 500; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, transform .15s var(--ease);
}
.btn:hover { background: var(--navy-deep); }
.btn:active { transform: translateY(1px); }
.btn--blue { background: var(--blue); color: var(--navy); }
.btn--blue:hover { background: #8ac2d1; }
.btn--sand { background: var(--sand); color: var(--navy); }
.btn--sand:hover { background: var(--white); }
.btn--ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn--ghost:hover { background: var(--navy-08); }
.sec--navy .btn--ghost:hover, .card--navy .btn--ghost:hover { background: rgba(118, 180, 197, .16); }
.btn--s { min-height: 32px; padding: 0 14px; font-size: .6875rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn svg { width: 14px; height: 14px; flex: none; }
.btn--arrow::after { content: "›"; font-size: 1.3em; line-height: 0; transform: translateY(-1px); }
.link { background: none; border: 0; padding: 0; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ───────── Chips, tags ───────── */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: var(--r-pill); background: var(--navy-08); font-size: var(--fs-micro); font-weight: 500; letter-spacing: .04em; white-space: nowrap; }
.chip--navy { background: var(--navy); color: var(--sand); }
.chip--blue { background: var(--blue); color: var(--navy); }
.chip--line { background: transparent; border: 1px solid currentColor; }
.sec--navy .chip, .card--navy .chip { background: rgba(118, 180, 197, .18); color: var(--sand); }
.tag-soon { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); border: 1px dashed currentColor; font-size: .6875rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.tag-draft { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 6px; background: var(--navy); color: var(--sand); font-size: .6875rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }

/* ───────── Segmented control & tabs ───────── */
.seg { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--navy-08); gap: 2px; max-width: 100%; overflow-x: auto; }
.seg button { border: 0; background: transparent; height: 32px; padding: 0 14px; border-radius: var(--r-pill); font-size: var(--fs-micro); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; color: var(--navy-70); transition: background .15s, color .15s; }
.seg button:hover { color: var(--navy); }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--navy); color: var(--sand); }
.sec--navy .seg, .card--navy .seg { background: rgba(118, 180, 197, .16); }
.sec--navy .seg button, .card--navy .seg button { color: rgba(232, 227, 216, .7); }
.sec--navy .seg button[aria-pressed="true"], .sec--navy .seg button[aria-selected="true"],
.card--navy .seg button[aria-pressed="true"], .card--navy .seg button[aria-selected="true"] { background: var(--blue); color: var(--navy); }
.tabs__panel { margin-top: var(--gap); }

/* ───────── Forms ───────── */
.field { display: grid; gap: 6px; }
.field > span, .label { font-size: var(--fs-micro); font-weight: 500; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--navy-15); border-radius: var(--r-s);
  background: var(--white); color: var(--navy); font-weight: 300; transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--navy-45); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(118, 180, 197, .45); }
.select { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(135deg, var(--navy) 50%, transparent 50%); background-position: calc(100% - 19px) 19px, calc(100% - 14px) 19px; background-size: 5px 5px; background-repeat: no-repeat; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 24px; background: transparent; }
.range::-webkit-slider-runnable-track { height: 2px; background: var(--navy-45); border-radius: 2px; }
.range::-moz-range-track { height: 2px; background: var(--navy-45); border-radius: 2px; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -8px; border-radius: 50%; background: var(--navy); border: 3px solid var(--sand); box-shadow: 0 0 0 1px var(--navy); }
.range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--navy); border: 3px solid var(--sand); box-shadow: 0 0 0 1px var(--navy); }
.card--navy .range::-webkit-slider-runnable-track, .sec--navy .range::-webkit-slider-runnable-track { background: rgba(118, 180, 197, .5); }
.card--navy .range::-webkit-slider-thumb, .sec--navy .range::-webkit-slider-thumb { background: var(--blue); border-color: var(--navy); box-shadow: 0 0 0 1px var(--blue); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-small); }
.check input { width: 18px; height: 18px; accent-color: var(--navy); }

/* ───────── Media ───────── */
.stage { background: var(--stage); border-radius: var(--r-m); padding: clamp(20px, 4vw, 56px); display: grid; place-items: center; overflow: hidden; }
.stage--sand { background: var(--sand); }
.stage--white { background: var(--white); }
.stage--navy { background: var(--navy); }
.stage--blue { background: var(--blue); }
.figure { display: grid; gap: 10px; }
.figure img { width: 100%; border-radius: var(--r-m); }
.caption { font-size: var(--fs-small); opacity: .7; }
.photo { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-m); }
.ratio { position: relative; overflow: hidden; border-radius: var(--r-m); }
.ratio > img, .ratio > svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ratio--16x9 { aspect-ratio: 16 / 9; } .ratio--4x3 { aspect-ratio: 4 / 3; } .ratio--1x1 { aspect-ratio: 1; } .ratio--3x4 { aspect-ratio: 3 / 4; }

/* Brand shape host: js/plate.js injects an SVG that fills the element */
.plate { position: relative; overflow: hidden; isolation: isolate; }
.plate > .plate__svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }

/* ───────── Do / don't ───────── */
.rule { display: grid; gap: 12px; }
.rule__box { border-radius: var(--r-m); background: var(--white); padding: 22px; display: grid; place-items: center; min-height: 150px; position: relative; overflow: hidden; }
.sec--white .rule__box { background: var(--sand-soft); }
.rule__mark { position: absolute; top: 12px; right: 12px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; line-height: 1; }
.rule--do .rule__mark { background: var(--navy); color: var(--sand); }
.rule--dont .rule__mark { background: var(--alert); color: var(--white); }
.rule__text { font-size: var(--fs-small); }

/* ───────── Copyable values ───────── */
.copy { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 2px 0; text-align: left; font-family: var(--mono); font-size: .875rem; font-weight: 400; border-bottom: 1px dashed transparent; transition: border-color .15s; }
.copy:hover { border-bottom-color: currentColor; }
.copy::after { content: "copy"; font-family: var(--font); font-size: .625rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; opacity: 0; transition: opacity .15s; }
.copy:hover::after, .copy:focus-visible::after { opacity: .6; }
.code { font-family: var(--mono); font-size: .8125rem; font-weight: 400; line-height: 1.6; background: var(--navy); color: var(--sand); border-radius: var(--r-s); padding: 16px 18px; overflow-x: auto; white-space: pre; tab-size: 2; }
.code-wrap { position: relative; }
.code-wrap .btn { position: absolute; top: 10px; right: 10px; }

/* ───────── Table ───────── */
.table-wrap { position: relative; overflow-x: auto; border-radius: var(--r-m); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); min-width: 560px; }
.table th { text-align: left; font-size: var(--fs-micro); font-weight: 500; letter-spacing: .1em; text-transform: uppercase; opacity: .7; padding: 12px 16px; border-bottom: 1px solid var(--navy-45); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--navy-15); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }

/* ───────── Notes ───────── */
.note { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 14px 16px; border-radius: var(--r-s); background: var(--navy-08); font-size: var(--fs-small); align-items: start; }
.note::before { content: "i"; width: 20px; height: 20px; border-radius: 50%; border: 1px solid currentColor; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.sec--navy .note, .card--navy .note { background: rgba(118, 180, 197, .14); }
.divider { height: 1px; background: var(--navy-15); border: 0; margin: 0; }
.sec--navy .divider { background: rgba(118, 180, 197, .3); }
.source { font-size: var(--fs-micro); opacity: .65; }
.source a { text-decoration: underline; }

/* ───────── Toast ───────── */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px); background: var(--navy); color: var(--sand); padding: 11px 18px; border-radius: var(--r-pill); font-size: var(--fs-small); font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s var(--ease); z-index: 100; box-shadow: 0 8px 28px rgba(16, 49, 66, .28); display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast i { width: 14px; height: 14px; border-radius: 3px; flex: none; border: 1px solid rgba(232, 227, 216, .5); }

/* ───────── Drawer (Downloads) ───────── */
.scrim { position: fixed; inset: 0; background: rgba(16, 49, 66, .5); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 60; }
.scrim.is-on { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: var(--sand); z-index: 70; transform: translateX(100%); transition: transform .2s var(--ease); display: flex; flex-direction: column; visibility: hidden; }
.drawer.is-on { transform: none; visibility: visible; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px; background: var(--navy); color: var(--blue); }
.drawer__body { flex: 1; overflow-y: auto; padding: 22px 26px 32px; display: grid; gap: 26px; align-content: start; }
.drawer__foot { padding: 16px 26px; border-top: 1px solid var(--navy-15); display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid currentColor; background: transparent; display: grid; place-items: center; font-size: 18px; line-height: 1; }
.icon-btn:hover { background: rgba(118, 180, 197, .18); }

/* ───────── Role filter ───────── */
body[data-role="marketing"] [data-roles]:not([data-roles~="marketing"]),
body[data-role="print"] [data-roles]:not([data-roles~="print"]),
body[data-role="developer"] [data-roles]:not([data-roles~="developer"]) { display: none !important; }
.role-only { display: none; }
body[data-role="marketing"] .role-only[data-roles~="marketing"],
body[data-role="print"] .role-only[data-roles~="print"],
body[data-role="developer"] .role-only[data-roles~="developer"] { display: revert; }

/* ───────── Responsive ───────── */
@media (max-width: 1080px) {
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-side, .cols-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  :root { --bar: 56px; }
  .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .carousel:not([data-per]), .carousel[data-per="3"], .carousel[data-per="4"] { --per: 2; }
}
@media (max-width: 760px) {
  .bar__nav, .bar .bar__downloads { display: none; }
  .bar .bar__menu { display: inline-flex; }
}
@media (max-width: 640px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: minmax(0, 1fr); }
  .carousel, .carousel[data-per] { --per: 1; }
  .pager { grid-template-columns: 1fr 1fr; }
  .pager__all { grid-column: 1 / -1; grid-row: 2; }
  .toc__card { grid-template-columns: 96px minmax(0, 1fr); column-gap: 16px; align-items: center; padding: 12px; }
  .toc__card .ph { grid-row: 1 / span 3; aspect-ratio: 1; margin: 0; }
  .toc__card .small { display: none; }
  .modal { padding: 0; place-items: end stretch; }
  .modal__box { width: 100%; max-height: 92vh; border-radius: var(--r-l) var(--r-l) 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media print {
  .bar, .foot, .menu, .drawer, .scrim, .toast { display: none !important; }
}

/* ───────── Downloads list ───────── */
.dl-group { display: grid; gap: 10px; }
.dl-group__head { display: grid; gap: 2px; }
.dl-list { display: grid; gap: 6px; }
.dl-item { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: var(--r-s); background: var(--white); text-decoration: none; font-size: var(--fs-small); transition: background .15s, color .15s; }
.dl-item:hover { background: var(--navy); color: var(--sand); }
.dl-item__type { height: 26px; display: grid; place-items: center; border-radius: 6px; background: var(--navy-08); font-size: .625rem; font-weight: 700; letter-spacing: .08em; }
.dl-item:hover .dl-item__type { background: var(--blue); color: var(--navy); }
.dl-item__go { font-size: 1rem; opacity: .6; }
