@charset "UTF-8";

:root {
  color-scheme: light;
  --brand-blue: #0054A6;
  --brand-red: #E62129;
  --charcoal: #242424;
  --ink: #242424;
  --muted: #626262;
  --line: #DEDEDE;
  --line-strong: #CECECE;
  --silver: #F3F3F3;
  --page: #F9F9F9;
  --surface: #FFFFFF;
  --blue-tint: #F3F3F3;
  --red-tint: #F5F5F5;
  --sidebar-width: 256px;
  --topbar-height: 72px;
  --content-width: 1400px;
  --radius: 4px;
  --shadow: 0 12px 36px rgb(36 36 36 / 5%);
  --font: "Inter", "Aptos", "Segoe UI", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, select, input[type="checkbox"], input[type="radio"] { cursor: pointer; }
button { color: inherit; }
a { color: var(--brand-blue); text-underline-offset: 3px; }
a:hover { color: var(--charcoal); }
button, a, input, select, textarea, summary { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #0054A6;
  outline-offset: 3px;
}
button:disabled, input:disabled, select:disabled {
  cursor: not-allowed;
  opacity: .58;
}
button, a { transition: color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
img, svg, video, canvas { max-width: 100%; }
img { height: auto; }
figure { margin: 0; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { color: var(--charcoal); font-weight: 650; line-height: 1.35; }
h1 { font-size: clamp(32px, 3.5vw, 46px); letter-spacing: -.035em; }
h2 { font-size: 28px; letter-spacing: -.025em; }
h3 { font-size: 20px; letter-spacing: -.012em; }
p { margin-bottom: 16px; }
p:last-child { margin-bottom: 0; }
ul, ol { padding-left: 22px; }
code, pre { font-family: var(--mono); font-size: .9em; }
code { overflow-wrap: anywhere; }
pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
strong { font-weight: 650; }
small { font-size: 12px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
::selection { background: #E4E4E4; color: var(--charcoal); }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 120;
  top: 12px;
  left: 12px;
  transform: translateY(-160%);
  background: var(--charcoal);
  padding: 10px 20px;
  color: white;
  border-radius: var(--radius);
}
.skip-link:focus { transform: translateY(0); color: white; }
.shell { min-height: 100vh; }

/* Fixed navigation, visually quieter than the working content. */
.sidebar {
  position: fixed;
  z-index: 50;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 30px 20px 20px;
  background: #fff;
  border-right: 1px solid var(--line);
  border-top: 4px solid var(--brand-red);
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.brand-logo { display: block; width: 200px; max-width: 100%; height: auto; }
.sidebar .brand-logo { margin: 0 6px; }
.brand-caption {
  margin: 16px 6px 30px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.55;
  text-transform: uppercase;
  letter-spacing: .17em;
}
.sidebar nav { flex: 1; min-width: 0; }
.nav-tool, .nav-child {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 3px;
  color: #585858;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  text-decoration: none;
  background: transparent;
  overflow-wrap: break-word;
}
.nav-tool { margin: 3px 0; font-weight: 550; }
.nav-tool svg, .nav-child svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-tool:hover, .nav-child:hover { color: var(--brand-blue); background: #F6F6F6; }
.nav-tool.is-active, .nav-child.is-active,
.sidebar [aria-current="page"] {
  color: var(--brand-blue);
  background: var(--blue-tint);
  border-color: #E5E5E5;
  font-weight: 650;
}
.nav-group { margin-top: 18px; }
.nav-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 6px 12px;
  color: #888888;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .13em;
  line-height: 1.6;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: "+"; font-size: 16px; font-weight: 400; }
.nav-group[open] summary::after { content: "−"; }
.nav-group summary:hover { color: var(--brand-blue); }
.nav-child { padding-left: 15px; font-size: 13px; }
.sidebar-footer {
  margin-top: 28px;
  padding: 18px 10px 0;
  border-top: 1px solid var(--line);
  color: #828282;
  font-size: 11px;
  line-height: 1.7;
}
.sidebar-footer a { text-decoration: none; }
.sidebar-footer p { margin-bottom: 8px; }

.topbar {
  position: fixed;
  z-index: 45;
  top: 0;
  right: 0;
  left: var(--sidebar-width);
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 40px;
  background: rgb(255 255 255 / 97%);
  border-bottom: 1px solid var(--line);
}
.mobile-menu {
  display: none;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  background: white;
  border-radius: 3px;
  font-size: 20px;
}
.breadcrumb { min-width: 0; color: #7C7C7C; font-size: 12px; line-height: 1.5; }
.breadcrumb span, .breadcrumb strong { color: var(--charcoal); }
.top-actions { display: flex; align-items: center; gap: 14px; }
.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  min-width: 220px;
  padding: 7px 12px;
  color: #818181;
  background: #F8F8F8;
  border: 1px solid var(--line);
  border-radius: 3px;
  text-align: left;
  font-size: 12px;
  margin-left: auto;
}
.search-trigger:hover { background: var(--blue-tint); border-color: #C3C3C3; color: var(--brand-blue); }
.search-trigger svg { width: 16px; height: 16px; }
.search-trigger kbd {
  margin-left: auto;
  padding: 0 5px;
  color: #898989;
  background: white;
  border: 1px solid var(--line);
  border-radius: 2px;
  font: 10px/1.8 var(--mono);
}
.version-chip {
  flex-shrink: 0;
  padding: 4px 9px;
  border: 1px solid var(--line);
  color: #808080;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.6;
  white-space: nowrap;
}
.main {
  width: calc(100% - var(--sidebar-width));
  max-width: var(--content-width);
  margin-left: calc(var(--sidebar-width) + max(0px, (100% - var(--sidebar-width) - var(--content-width)) / 2));
  padding: 116px 40px 72px;
  min-width: 0;
}
.main > * { min-width: 0; }
.page-head { margin-bottom: 34px; }
.eyebrow, .mini-label, .hero-kicker {
  display: block;
  color: var(--brand-blue);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.6;
  text-transform: uppercase;
  letter-spacing: .17em;
}
.eyebrow { margin-bottom: 10px; }
.page-head h1 { margin-bottom: 16px; }
.lede { max-width: 850px; color: var(--muted); font-size: 16px; line-height: 1.85; }
.head-actions, .page-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.head-actions { margin-top: 20px; }
.page-actions { margin: 24px 0; justify-content: flex-end; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--charcoal);
  background: white;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
}
.btn:hover { background: #F2F2F2; border-color: #A9A9A9; color: var(--brand-blue); }
.btn.primary { color: white; background: var(--brand-blue); border-color: var(--brand-blue); }
.btn.primary:hover { color: white; background: #0054A6; border-color: #0054A6; }
.btn.subtle { color: var(--brand-blue); background: transparent; border-color: transparent; }
.btn.subtle:hover { background: var(--blue-tint); border-color: #E5E5E5; }
.btn.small { min-height: 36px; padding: 7px 12px; font-size: 12px; }
.btn.danger { color: #E62129; border-color: #C0C0C0; background: #fff; }
.btn.danger:hover { color: #E62129; border-color: #E62129; background: var(--red-tint); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Brand overview: editorial scale, with an instrument occupying real space. */
.hero {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  min-height: 420px;
  margin-bottom: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand-red);
  border-radius: var(--radius);
  background: white;
}
.hero-copy { align-self: center; min-width: 0; padding: 42px 36px 46px; }
.hero-kicker { margin-bottom: 20px; }
.hero-copy h1 { max-width: 620px; margin-bottom: 22px; font-size: clamp(32px, 3.5vw, 48px); line-height: 1.3; }
.hero-copy h2 { font-size: 34px; margin-bottom: 20px; }
.hero-copy p { max-width: 570px; color: var(--muted); font-size: 15px; line-height: 1.9; }
.hero-copy .head-actions { margin-top: 28px; }
.hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 360px;
  padding: 38px;
  background: #F3F3F3;
  border-left: 1px solid #E7E7E7;
}
.hero-visual > img { position: relative; z-index: 1; width: 100%; max-width: 330px; max-height: 330px; object-fit: contain; background: white; }
.hero-measure {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  width: 100%;
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px solid #C6C6C6;
  color: #7D7D7D;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: .04em;
}
.hero-code { color: var(--brand-blue); font: 10px/1.65 var(--mono); letter-spacing: .1em; overflow-wrap: anywhere; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 28px 0 40px; border: 1px solid var(--line); background: var(--line); }
.stat { min-width: 0; padding: 20px 24px; background: white; }
.stat strong { display: block; color: var(--charcoal); font-size: 27px; font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums; }
.stat span, .stat p { display: block; margin-top: 7px; margin-bottom: 0; color: var(--muted); font-size: 12px; }
.section-title { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin: 36px 0 20px; }
.section-title h2 { margin: 0; font-size: 24px; }
.section-title p { margin: 0; color: var(--muted); font-size: 13px; }
.section-title .mini-label { margin-bottom: 5px; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 28px; }
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 192px;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: inherit;
  text-decoration: none;
}
a.card:hover, button.card:hover { border-color: #B4B4B4; background: #FDFDFD; box-shadow: var(--shadow); color: inherit; }
.card-icon { display: grid; align-items: center; width: 32px; height: 32px; margin-bottom: 18px; color: var(--brand-blue); font-size: 22px; }
.card-icon svg { width: 26px; height: 26px; }
.card-index { margin-bottom: 14px; color: #8E8E8E; font: 10px/1.5 var(--mono); letter-spacing: .13em; }
.card-title { margin: 0 0 10px; color: var(--charcoal); font-size: 18px; font-weight: 650; line-height: 1.5; }
.card-description { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.card .pill { align-self: flex-start; margin-top: auto; }
.foundation-strip { display: flex; min-width: 0; margin: 26px 0 36px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.color-segment { display: flex; flex-direction: column; justify-content: flex-end; flex: 1; min-width: 0; min-height: 106px; padding: 20px; color: white; font: 11px/1.6 var(--mono); letter-spacing: .07em; }
.color-segment strong { display: block; margin-bottom: 9px; font-size: 14px; }
.color-segment span, .color-segment code { display: block; font-family: var(--mono); font-size: 11px; overflow-wrap: anywhere; }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 20px 0 30px; }
.quick-card { display: block; min-width: 0; padding: 20px 22px; color: var(--charcoal); background: white; border: 1px solid var(--line); border-left: 3px solid var(--brand-blue); border-radius: 3px; text-decoration: none; }
.quick-card:hover { border-color: #A7A7A7; color: var(--brand-blue); }
.quick-card h3 { margin-bottom: 6px; font-size: 16px; }
.quick-card p { margin: 0; color: var(--muted); font-size: 13px; }

.notice { margin: 24px 0; padding: 18px 22px; border: 1px solid #E3E3E3; border-left: 3px solid var(--brand-blue); border-radius: 3px; background: #F5F5F5; color: #4A4A4A; font-size: 13px; line-height: 1.85; }
.notice strong { color: var(--charcoal); }
.notice.info { border-color: #E3E3E3; border-left-color: var(--brand-blue); background: #F5F5F5; }
.notice.warning { border-color: #D9D9D9; border-left-color: #626262; background: #F8F8F8; color: #545454; }
.notice.warning strong { color: #4C4C4C; }
.notice h3 { margin-bottom: 8px; font-size: 16px; }
.pill { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 3px 8px; color: #646464; background: #F2F2F2; border: 1px solid #E4E4E4; border-radius: 3px; font-size: 10px; font-weight: 550; line-height: 1.55; }
.two-column { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin-bottom: 26px; }
.panel { min-width: 0; margin-bottom: 24px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.two-column > .panel { margin-bottom: 0; }
.panel-title { margin: 0 0 20px; color: var(--charcoal); font-size: 19px; font-weight: 650; }
.panel > .mini-label { margin-bottom: 10px; }
.panel > p { color: var(--muted); }
.principle-list { margin: 0; padding-left: 20px; }
.principle-list li { padding-left: 5px; margin-bottom: 13px; color: #515151; line-height: 1.85; }
.principle-list li::marker { color: var(--brand-blue); }
.principle-list li:last-child { margin-bottom: 0; }
.rule-list { display: grid; gap: 0; margin-bottom: 32px; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.rule { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; padding: 26px 28px; border-bottom: 1px solid var(--line); }
.rule:last-child { border-bottom: 0; }
.rule-num { padding-top: 2px; color: var(--brand-blue); font: 12px/1.8 var(--mono); }
.rule-body { min-width: 0; }
.rule-body h3 { margin-bottom: 11px; font-size: 18px; }
.rule-body p { margin-bottom: 14px; color: #606060; font-size: 14px; line-height: 1.95; overflow-wrap: break-word; }
.rule-body p:last-child { margin-bottom: 0; }
.rule-values { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.value { display: inline-flex; gap: 8px; align-items: center; max-width: 100%; padding: 6px 10px; background: #F5F5F5; border: 1px solid #E7E7E7; border-radius: 3px; color: #505050; font-size: 12px; overflow-wrap: anywhere; }
.value code { font-size: 11px; }
.checklist { display: grid; gap: 0; margin: 20px 0; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.check-row { display: flex; align-items: flex-start; gap: 13px; margin: 0; padding: 16px 20px; border-bottom: 1px solid var(--line); color: #555555; font-size: 14px; line-height: 1.8; cursor: pointer; }
.check-row:last-child { border-bottom: 0; }
.check-row:hover { background: #FAFAFA; }
.check-row:has(input:checked) { color: var(--brand-blue); background: #F5F5F5; }
.check-row input { flex: 0 0 18px; width: 18px; height: 18px; margin: 4px 0 0; accent-color: var(--brand-blue); }
.check-row > span { min-width: 0; }
.check-progress { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 16px 0; color: #636363; font-size: 12px; font-variant-numeric: tabular-nums; }
.check-progress progress { width: 180px; height: 7px; accent-color: var(--brand-blue); }
.guide-toc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 20px 0 32px; }
.toc-item { display: block; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 3px; color: #5F5F5F; background: #fff; font-size: 13px; text-decoration: none; }
.toc-item:hover { color: var(--brand-blue); border-color: #BABABA; background: var(--blue-tint); }

/* Colour, logo and asset workspaces. */
.swatch-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 30px; }
.swatch { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.swatch-color { position: relative; display: flex; align-items: flex-end; min-height: 142px; padding: 18px; border-bottom: 1px solid rgb(36 36 36 / 8%); }
.swatch-color code { font-size: 11px; }
.swatch-info { padding: 18px 20px 20px; }
.swatch-name { margin-bottom: 5px; color: var(--charcoal); font-size: 16px; font-weight: 650; }
.swatch-code { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; color: #6F6F6F; font-family: var(--mono); font-size: 11px; line-height: 1.7; }
.swatch-info p { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.copy-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; min-width: 34px; padding: 4px 8px; color: var(--brand-blue); background: white; border: 1px solid var(--line); border-radius: 3px; font-size: 10px; line-height: 1.5; }
.copy-btn:hover { border-color: #A7A7A7; background: var(--blue-tint); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 20px 0; }
.field { min-width: 0; margin-bottom: 18px; }
.form-grid > .field { margin-bottom: 0; }
.field label { display: block; margin-bottom: 8px; color: #535353; font-size: 12px; font-weight: 650; line-height: 1.7; }
.field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: white;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
}
.field input::placeholder, .field textarea::placeholder { color: #929292; opacity: 1; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #9A9A9A; }
.field input[type="color"] { padding: 5px !important; height: 46px; }
.field input[type="checkbox"], .field input[type="radio"] { width: 18px; height: 18px; accent-color: var(--brand-blue); }
.field textarea { min-height: 130px; resize: vertical; }
.field small { display: block; margin-top: 6px; color: var(--muted); line-height: 1.7; }
.field.full { grid-column: 1 / -1; }
.contrast-preview { margin: 20px 0; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.contrast-sample { min-height: 190px; padding: 30px; }
.contrast-sample h2 { color: inherit; margin-bottom: 12px; }
.contrast-sample p { max-width: 580px; margin: 0; }
.contrast-results { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.result { min-width: 0; padding: 17px; background: #F5F5F5; border: 1px solid var(--line); border-radius: 3px; font-size: 12px; }
.result strong { display: block; color: var(--charcoal); font-size: 23px; font-variant-numeric: tabular-nums; }
.result p { margin: 6px 0 0; color: #6D6D6D; font-size: 12px; }
.result.pass { border-color: #C1C1C1; background: #F4F4F4; }
.result.fail { border-color: #C3C3C3; background: #F6F6F6; }
.tab-bar { display: flex; gap: 2px; flex-wrap: wrap; margin: 22px 0; padding-bottom: 1px; border-bottom: 1px solid var(--line); }
.tab { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 17px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #787878; font-size: 13px; font-weight: 550; }
.tab:hover { color: var(--brand-blue); background: #F3F3F3; }
.tab.is-active, .tab[aria-selected="true"] { color: var(--brand-blue); border-bottom-color: var(--brand-blue); background: #F3F3F3; }
.logo-preview { display: grid; place-items: center; min-width: 0; min-height: 220px; margin: 18px 0; padding: 40px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.logo-preview img { display: block; width: min(100%, 430px); max-height: 170px; object-fit: contain; }
.logo-preview.dark { background: var(--charcoal); border-color: var(--charcoal); }
.logo-preview.grid { background-color: #fff; background-image: linear-gradient(#EDEDED 1px, transparent 1px), linear-gradient(90deg, #EDEDED 1px, transparent 1px); background-size: 20px 20px; }
.logo-preview.silver { background: #EBEBEB; }
.asset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 22px 0 30px; }
.asset-card { min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.asset-preview { display: grid; place-items: center; min-width: 0; height: 180px; padding: 28px; background: #F4F4F4; border-bottom: 1px solid var(--line); }
.asset-preview img { display: block; max-height: 128px; object-fit: contain; }
.asset-preview.dark { background: var(--charcoal); }
.asset-body { flex: 1; min-width: 0; padding: 20px; }
.asset-body h3 { margin-bottom: 8px; font-size: 16px; }
.asset-body p { color: var(--muted); font-size: 12px; line-height: 1.8; }
.asset-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 0 20px 20px; }
.asset-body .asset-actions { padding: 12px 0 0; }
.badge-preview { display: grid; place-items: center; min-height: 300px; padding: 30px; background: #F4F4F4; border: 1px solid var(--line); border-radius: var(--radius); }
.badge-preview img { width: min(100%, 340px); max-height: 310px; object-fit: contain; }

/* Live templates and export tools. */
.template-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 24px; align-items: start; margin: 24px 0; }
.template-sidebar { min-width: 0; padding: 23px; border: 1px solid var(--line); background: white; border-radius: var(--radius); }
.template-sidebar .form-grid { grid-template-columns: 1fr; gap: 16px; }
.template-sidebar .field label { font-size: 12px; }
.template-sidebar h3 { font-size: 17px; margin-bottom: 16px; }
.template-stage { min-width: 0; }
.canvas-frame { display: grid; place-items: center; min-width: 0; min-height: 420px; padding: 28px; background: #EDEDED; border: 1px solid #DDDDDD; border-radius: var(--radius); }
.canvas-frame > img, .canvas-frame > svg { display: block; width: 100%; max-width: 100%; max-height: 740px; height: auto; object-fit: contain; box-shadow: 0 10px 30px rgb(36 36 36 / 9%); }
.canvas-frame > svg { background: #fff; }
.canvas-meta { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; margin-top: 13px; color: #7F7F7F; font-size: 11px; line-height: 1.8; }
.canvas-meta code { font-size: 10px; }
.preset-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 22px 0 30px; }
.preset-card { display: block; min-width: 0; min-height: 100px; padding: 17px; border: 1px solid var(--line); border-radius: 3px; color: var(--charcoal); background: white; text-align: left; text-decoration: none; }
.preset-card:hover { border-color: #ADADAD; background: #F8F8F8; }
.preset-card.is-active { border-color: var(--brand-blue); background: var(--blue-tint); box-shadow: inset 0 0 0 1px var(--brand-blue); }
.preset-card strong { display: block; margin-bottom: 6px; font-size: 14px; }
.preset-card span, .preset-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.filter-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.filter-row label { color: var(--muted); font-size: 12px; }
.filter-row select, .filter-row input { min-width: 0; max-width: 100%; min-height: 40px; padding: 7px 11px; border: 1px solid var(--line-strong); border-radius: 3px; background: white; color: var(--ink); font-size: 13px; }
.export-code { min-width: 0; margin-top: 22px; }
.export-code textarea, .export-code pre { display: block; width: 100%; min-width: 0; min-height: 220px; margin: 0; padding: 20px; border: 1px solid #D7D7D7; border-radius: 3px; background: #F1F1F1; color: #0054A6; font: 12px/1.8 var(--mono); overflow-wrap: anywhere; white-space: pre-wrap; }
.export-code textarea { resize: vertical; }
.data-table { max-width: 100%; margin: 24px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.data-table table { width: 100%; border-collapse: collapse; min-width: 580px; text-align: left; font-size: 13px; }
.data-table th { padding: 13px 17px; background: #F1F1F1; color: #585858; font-size: 11px; font-weight: 650; line-height: 1.65; letter-spacing: .03em; }
.data-table td { padding: 14px 17px; border-top: 1px solid var(--line); color: #646464; vertical-align: top; line-height: 1.85; }
.data-table th, .data-table td { overflow-wrap: break-word; }
.data-table tbody tr:hover { background: #FAFAFA; }
.data-table td strong { color: var(--charcoal); }
.version-timeline { margin: 26px 0; padding-left: 22px; border-left: 1px solid #C8C8C8; }
.timeline-item { position: relative; padding: 0 0 28px 10px; }
.timeline-item::before { position: absolute; top: 7px; left: -28px; content: ""; width: 9px; height: 9px; border: 2px solid white; background: var(--brand-blue); box-shadow: 0 0 0 1px #AFAFAF; border-radius: 50%; }
.timeline-item h3 { margin-bottom: 10px; font-size: 17px; }
.timeline-item p { color: #6D6D6D; font-size: 13px; }
.timeline-item time { display: block; margin-bottom: 8px; color: #8C8C8C; font: 11px/1.6 var(--mono); }
.timeline-item:last-child { padding-bottom: 0; }

/* Search is an actual dialog, not a decorative search field. */
.search-dialog {
  width: min(760px, calc(100% - 40px));
  max-height: min(76vh, 740px);
  margin: min(12vh, 100px) auto auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #B1B1B1;
  border-top: 3px solid var(--brand-red);
  border-radius: 5px;
  background: white;
  color: var(--ink);
  box-shadow: 0 28px 100px rgb(36 36 36 / 22%);
}
.search-dialog[open] { display: flex; flex-direction: column; }
.search-dialog::backdrop { background: rgb(36 36 36 / 46%); backdrop-filter: blur(2px); }
.search-input-wrap { display: flex; align-items: center; flex-shrink: 0; gap: 14px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.search-input-wrap input { flex: 1; min-width: 0; width: 100%; min-height: 40px; padding: 5px 0; border: 0; background: white; color: var(--ink); font-size: 17px; }
.search-input-wrap input:focus-visible { outline-offset: 4px; }
.search-input-wrap button { flex-shrink: 0; min-width: 40px; min-height: 40px; padding: 5px 10px; border: 1px solid var(--line); background: #F7F7F7; border-radius: 3px; color: #7A7A7A; font-size: 12px; }
.search-input-wrap button:hover { color: var(--brand-blue); background: var(--blue-tint); }
.search-results { min-height: 120px; overflow-y: auto; overscroll-behavior: contain; padding: 12px; }
.search-result { display: block; width: 100%; padding: 17px 18px; border: 1px solid transparent; border-radius: 3px; background: white; color: inherit; text-decoration: none; text-align: left; }
.search-result:hover { background: #F5F5F5; color: inherit; border-color: #E4E4E4; }
.search-result h3, .search-result strong { display: block; margin: 0 0 5px; color: var(--charcoal); font-size: 15px; }
.search-result p, .search-result span { display: block; margin: 0; color: #7C7C7C; font-size: 12px; line-height: 1.75; }
.search-result small { display: block; margin-bottom: 5px; color: var(--brand-blue); font: 10px/1.6 var(--mono); text-transform: uppercase; }
.search-result mark { padding: 0 2px; color: var(--brand-blue); background: #E8E8E8; }
.toast { position: fixed; z-index: 130; bottom: 28px; left: calc(50% + 128px); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; max-width: calc(100% - 40px); padding: 12px 20px; border: 1px solid #636363; border-radius: 4px; background: var(--charcoal); color: white; box-shadow: 0 9px 30px rgb(36 36 36 / 16%); font-size: 13px; line-height: 1.65; }
.empty-state { padding: 48px 24px; text-align: center; color: #7E7E7E; background: white; border: 1px dashed #D7D7D7; border-radius: var(--radius); font-size: 14px; }
.empty-state h3 { margin-bottom: 10px; font-size: 19px; }
.empty-state p { max-width: 520px; margin: 0 auto 16px; }
.footer-note { margin-top: 38px; padding-top: 20px; border-top: 1px solid var(--line); color: #8C8C8C; font-size: 11px; line-height: 1.9; }
.source-links { display: flex; align-items: baseline; flex-wrap: wrap; gap: 9px 20px; margin-top: 20px; color: #8A8A8A; font-size: 11px; line-height: 1.8; }
.source-links a { color: #767676; }
.source-links a:hover { color: var(--brand-blue); }

/* Structure-specific finishing for the working portal. */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.nav-scrim { display: none; }
.brand-logo img { display: block; width: 100%; height: auto; }
.brand-caption span { display: block; margin-top: 6px; font-size: 10px; letter-spacing: .09em; }
.nav-group summary > span { margin-left: auto; margin-right: 10px; font: 10px/1.6 var(--mono); color: #919191; }
.search-trigger > span:first-child { color: var(--brand-blue); font-size: 20px; line-height: 1; }
.hero-visual { isolation: isolate; background: white; }
.hero-code { align-self: flex-start; position: relative; z-index: 2; margin-bottom: 22px; }
.hero-product-ring { position: absolute; z-index: -1; top: 50%; left: 50%; width: 88%; max-width: 410px; aspect-ratio: 1; transform: translate(-50%, -50%); border: 1px solid #E7E7E7; border-radius: 50%; }
.hero-product-ring::before, .hero-product-ring::after { content: ""; position: absolute; background: #EBEBEB; }
.hero-product-ring::before { top: -24px; bottom: -24px; left: 50%; width: 1px; }
.hero-product-ring::after { right: -24px; left: -24px; top: 50%; height: 1px; }
.hero-product-caption { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 5px 15px; width: 100%; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
.hero-product-caption b { color: var(--charcoal); font-size: 12px; font-weight: 550; }
.hero-product-caption span { color: #878787; font-size: 10px; letter-spacing: .1em; }
.hero-copy .page-actions { justify-content: flex-start; margin: 24px 0; }
.color-segment small { display: block; margin-top: 6px; font-size: 9px; letter-spacing: .03em; }
.quick-card > svg { display: block; width: 23px; height: 23px; margin-bottom: 16px; color: var(--brand-blue); }
.card > h2 { margin-bottom: 10px; font-size: 18px; font-weight: 650; letter-spacing: -.01em; line-height: 1.5; }
.card > p:not(.card-description) { color: var(--muted); font-size: 13px; line-height: 1.8; }
.card-index { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-index svg { width: 19px; height: 19px; color: var(--brand-blue); }
.card > .pill { margin-top: 0; margin-bottom: 15px; }
.card > .pill + h3 { margin-bottom: 12px; font-size: 18px; }
.main > .principle-list { margin-bottom: 28px; padding: 20px 24px 20px 40px; border: 1px solid var(--line); border-left: 3px solid var(--brand-blue); background: white; font-size: 14px; }
.guide-layout { grid-template-columns: minmax(0, 1fr) 230px; align-items: start; }
.guide-layout .rule-list { margin-bottom: 0; }
.guide-layout .guide-toc { display: block; position: sticky; top: 96px; margin: 0; padding: 20px 18px; }
.guide-toc .mini-label { margin-bottom: 16px; }
.guide-toc .toc-item { padding: 10px 11px; margin-top: 8px; font-size: 12px; line-height: 1.65; }
.guide-toc hr { margin: 20px 0; }
.guide-toc .btn { width: 100%; }
.rule-body h2 { margin-bottom: 11px; font-size: 18px; letter-spacing: -.012em; line-height: 1.5; }
.panel.checklist { display: block; }
.panel.checklist .section-title { margin: 0 0 12px; }
.panel.checklist .section-title h2 { font-size: 22px; }
.panel.checklist .check-progress { margin: 0; }
.panel.checklist .footer-note { margin: 0 0 15px; padding: 0; border: 0; }
.panel.checklist .check-row { margin: 0 -8px; padding: 14px 8px; }
.chapter-note { display: block; width: 100%; min-height: 130px; margin-top: 13px; padding: 13px 15px; border: 1px solid var(--line-strong); border-radius: 3px; background: white; color: var(--ink); font-size: 14px; line-height: 1.85; resize: vertical; }
.chapter-note::placeholder { color: #909090; }
.logo-preview { position: relative; padding-bottom: 64px; }
.logo-safe-frame { display: grid; place-items: center; width: min(100%, 570px); min-height: 180px; padding: 36px 48px; border: 1px dashed #919191; }
.logo-safe-frame img { width: 100%; max-width: 430px; max-height: 160px; }
.logo-preview.dark .logo-safe-frame { border-color: #A5A5A5; }
.logo-measure-label { position: absolute; bottom: 18px; left: 16px; right: 16px; color: #7C7C7C; text-align: center; font: 10px/1.6 var(--mono); letter-spacing: .04em; }
.logo-preview.dark .logo-measure-label { color: #BBBBBB; }
.logo-preview.dark.grid { background-color: var(--charcoal); background-image: linear-gradient(#333333 1px, transparent 1px), linear-gradient(90deg, #333333 1px, transparent 1px); }
.asset-preview img[src*="badge"] { width: 128px; height: 128px; max-width: 128px; max-height: 128px; }
.asset-preview img[src*="logo"] { width: 100%; max-width: 260px; height: auto; max-height: 72px; }
.asset-preview.template-thumb { height: 210px; padding: 20px; }
.template-thumb img { width: auto; max-width: 100%; height: auto; max-height: 170px; }
.template-stage .canvas-meta { margin: 0 0 13px; }
#template-canvas > svg { display: block; width: auto; max-width: 100%; height: auto; max-height: 620px; }
.preset-card .mini-label { font-size: 9px; }
.preset-card h3 { margin: 8px 0; font-size: 15px; }
.preset-card strong { font: 11px/1.65 var(--mono); }
.preset-card small { color: #909090; font-size: 10px; }
.field .page-actions { justify-content: flex-start; margin: 0; }
.swatch-color { width: 100%; justify-content: space-between; border: 0; border-bottom: 1px solid rgb(36 36 36 / 8%); border-radius: 0; text-align: left; font: 12px/1.6 var(--mono); }
.swatch-color:hover { box-shadow: inset 0 0 0 3px rgb(255 255 255 / 35%); }
.swatch-info .copy-btn { margin-top: 13px; }
.swatch-info small { display: block; margin-top: 10px; color: #858585; font-size: 10px; }
.contrast-preview { padding: 26px 28px; }
.contrast-preview .mini-label { color: inherit; }
.contrast-preview .contrast-sample { min-height: 0; margin: 16px 0; padding: 0; font-size: 27px; font-weight: 650; line-height: 1.5; }
.contrast-preview > p:last-child { font-size: 13px; }
.contrast-results .result strong { font-size: 18px; }
.search-result strong > span { display: inline; margin-left: 5px; color: #8F8F8F; }
.search-dialog > .footer-note { flex-shrink: 0; margin: 0; padding: 10px 22px; border-top: 1px solid var(--line); background: #FAFAFA; font-size: 10px; }
.source-links li { list-style: none; }
ul.source-links { padding: 0; }
.card-grid > .empty-state { grid-column: 1 / -1; }

@media (min-width: 1800px) {
  .main { padding-left: 44px; padding-right: 44px; }
  .hero-copy { padding: 48px 42px; }
  .hero { min-height: 450px; }
  .hero-visual > img { max-height: 370px; }
}

@media (max-width: 1280px) {
  .topbar { padding-right: 28px; padding-left: 28px; }
  .main { padding-left: 28px; padding-right: 28px; }
  .hero-copy { padding: 30px 26px; }
  .hero-visual { padding: 26px; }
  .hero-copy h1 { font-size: 36px; }
  .card { padding: 22px; }
  .template-layout { grid-template-columns: 255px minmax(0, 1fr); gap: 20px; }
  .search-trigger { min-width: 190px; }
}

@media (max-width: 1100px) {
  .sidebar {
    top: var(--topbar-height);
    transform: translateX(-102%);
    z-index: 55;
    transition: transform 180ms ease;
    box-shadow: 12px 0 40px rgb(36 36 36 / 10%);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  .nav-scrim:not([hidden]) { display: block; position: fixed; inset: var(--topbar-height) 0 0; z-index: 54; width: 100%; height: calc(100dvh - var(--topbar-height)); padding: 0; border: 0; border-radius: 0; background: rgb(36 36 36 / 35%); }
  body.nav-open { overflow: hidden; }
  .topbar { z-index: 60; left: 0; padding: 0 28px; }
  .mobile-menu { display: grid; }
  .main { width: 100%; margin: 0 auto; padding-top: 110px; }
  .toast { left: 50%; }
  .hero-copy h1 { font-size: 40px; }
  .asset-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .asset-grid, .swatch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1.12fr .88fr; min-height: 390px; }
  .hero-copy h1 { font-size: 34px; }
  .hero-copy h2 { font-size: 29px; }
  .hero-copy p { font-size: 14px; }
  .hero-visual { min-height: 330px; }
  .guide-toc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .template-layout { grid-template-columns: 245px minmax(0, 1fr); gap: 16px; }
  .template-sidebar { padding: 20px; }
  .canvas-frame { padding: 18px; min-height: 350px; }
  .preset-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat { padding: 18px; }
  .stat strong { font-size: 24px; }
  .guide-layout { grid-template-columns: minmax(0, 1fr) 210px; gap: 18px; }
  .guide-layout .guide-toc { padding: 18px 14px; }
  .contrast-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 94px; }
  body { font-size: 15px; }
  .topbar { gap: 12px; padding: 0 20px; }
  .breadcrumb { flex: 1; overflow: hidden; font-size: 11px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
  .top-actions { display: none; }
  .search-trigger { min-width: 42px; width: 42px; min-height: 42px; justify-content: center; padding: 9px; font-size: 0; }
  .search-trigger kbd { display: none; }
  .search-trigger > span:not(:first-child) { display: none; }
  .search-trigger > span:first-child { font-size: 25px; }
  .search-trigger svg { width: 18px; height: 18px; }
  .version-chip { display: none; }
  .main { padding: 102px 20px 44px; }
  .page-head { margin-bottom: 26px; }
  .page-head h1 { margin-bottom: 14px; font-size: 32px; letter-spacing: -.035em; }
  .eyebrow { font-size: 9px; }
  .lede { font-size: 15px; line-height: 1.85; }
  .hero { grid-template-columns: 1fr; min-height: 0; margin-bottom: 22px; }
  .hero-copy { padding: 28px 24px 30px; }
  .hero-copy h1 { max-width: 600px; font-size: clamp(30px, 5.8vw, 40px); }
  .hero-copy h2 { font-size: 28px; }
  .hero-copy p { font-size: 15px; line-height: 1.85; }
  .hero-kicker { margin-bottom: 16px; font-size: 9px; }
  .hero-visual { min-height: 280px; padding: 26px; border-left: 0; border-top: 1px solid #E4E4E4; }
  .hero-visual > img { max-width: 310px; max-height: 260px; }
  .hero-measure { margin-top: 18px; font-size: 9px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 22px; margin-bottom: 30px; }
  .stat { padding: 18px; }
  .stat strong { font-size: 26px; }
  .stat span, .stat p { font-size: 11px; }
  .card-grid, .asset-grid, .swatch-grid, .quick-grid, .two-column { grid-template-columns: 1fr; gap: 16px; }
  .card { min-height: 0; padding: 23px; }
  .card-icon { margin-bottom: 15px; }
  .card-title { font-size: 19px; }
  .card-description { font-size: 14px; }
  .section-title { margin-top: 28px; margin-bottom: 17px; }
  .section-title h2 { font-size: 23px; }
  .section-title p { font-size: 12px; }
  .foundation-strip { flex-wrap: wrap; margin: 22px 0 30px; }
  .color-segment { flex: 1 1 50% !important; min-height: 100px; padding: 18px; }
  .quick-card { padding: 20px; }
  .panel { padding: 22px; margin-bottom: 20px; }
  .panel-title { font-size: 18px; }
  .two-column > .panel { margin-bottom: 0; }
  .notice { padding: 17px 18px; font-size: 13px; }
  .rule { grid-template-columns: 29px minmax(0, 1fr); gap: 9px; padding: 22px 18px; }
  .rule-num { font-size: 10px; }
  .rule-body h3 { font-size: 17px; }
  .rule-body h2 { font-size: 17px; }
  .rule-body p { font-size: 14px; line-height: 1.95; }
  .check-row { padding: 15px 17px; font-size: 14px; }
  .guide-toc { grid-template-columns: 1fr; gap: 9px; }
  .guide-layout { display: flex; flex-direction: column; gap: 20px; }
  .guide-layout > .rule-list { width: 100%; }
  .guide-layout > .guide-toc { position: static; order: -1; width: 100%; }
  .toc-item { padding: 12px 15px; min-height: 44px; }
  .swatch-color { min-height: 160px; }
  .form-grid { grid-template-columns: 1fr; gap: 17px; }
  .field label { font-size: 13px; }
  .field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea { font-size: 16px; min-height: 46px; }
  .contrast-results { grid-template-columns: 1fr; gap: 10px; }
  .result { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; }
  .contrast-sample { min-height: 180px; padding: 24px; }
  .contrast-sample h2 { font-size: 26px; }
  .tab-bar { gap: 0; }
  .tab { flex: 1 1 auto; padding: 10px 12px; font-size: 12px; }
  .logo-preview { min-height: 180px; padding: 28px 22px; }
  .logo-preview:has(.logo-measure-label) { padding-bottom: 60px; }
  .logo-safe-frame { min-height: 150px; padding: 25px 22px; }
  .logo-measure-label { font-size: 9px; }
  .asset-preview { height: 180px; }
  .badge-preview { min-height: 260px; padding: 25px; }
  .template-layout { grid-template-columns: 1fr; gap: 20px; }
  .template-sidebar { padding: 22px; }
  .chapter-note { font-size: 16px; }
  .template-sidebar .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .canvas-frame { padding: 16px; min-height: 260px; }
  .canvas-frame > img, .canvas-frame > svg { max-height: 600px; }
  .preset-grid { grid-template-columns: 1fr; gap: 10px; }
  .preset-card { min-height: 0; padding: 17px; }
  .filter-row { align-items: stretch; gap: 10px; }
  .filter-row select, .filter-row input { flex: 1 1 150px; font-size: 16px; min-height: 44px; }
  .filter-row .btn { flex: 1 1 auto; }
  .export-code textarea, .export-code pre { padding: 16px; font-size: 11px; }
  .data-table { margin: 20px 0; }
  .data-table th { padding: 11px 14px; }
  .data-table td { padding: 12px 14px; }
  .page-actions { justify-content: flex-start; }
  .head-actions .btn, .page-actions .btn { flex: 1 1 auto; }
  .search-dialog { width: calc(100% - 24px); max-height: 82dvh; margin-top: 24px; }
  .search-input-wrap { gap: 10px; padding: 16px; }
  .search-input-wrap input { font-size: 16px; }
  .search-results { padding: 8px; }
  .search-result { padding: 16px 13px; }
  .toast { bottom: 20px; width: max-content; max-width: calc(100% - 40px); padding: 11px 16px; font-size: 12px; }
  .footer-note { margin-top: 28px; font-size: 11px; }
  .source-links { gap: 9px 16px; }
}

@media (max-width: 420px) {
  .topbar { gap: 9px; }
  .breadcrumb { max-width: 180px; }
  .hero-copy { padding: 25px 21px 28px; }
  .hero-copy h1 { font-size: 30px; }
  .hero-copy .head-actions { gap: 9px; }
  .hero-copy .btn { width: 100%; }
  .hero-visual { min-height: 250px; padding: 24px; }
  .hero-visual > img { max-height: 230px; }
  .template-sidebar .form-grid { grid-template-columns: 1fr; }
  .btn { padding-right: 15px; padding-left: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  @page { size: A4; margin: 16mm; }
  html { scroll-behavior: auto; }
  body { background: white; color: #111; font-size: 10.5pt; line-height: 1.65; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sidebar, .topbar, .skip-link, .search-dialog, .toast,
  .head-actions, .page-actions, .filter-row, .btn, .copy-btn, .nav-scrim,
  .template-sidebar, .tab-bar, body.nav-open::before { display: none !important; }
  .shell { min-height: 0; }
  .main { width: 100%; max-width: none; margin: 0; padding: 0; }
  .page-head { margin-bottom: 8mm; }
  .page-head h1 { font-size: 25pt; }
  h2 { font-size: 18pt; }
  h3 { font-size: 12pt; }
  h1, h2, h3, .section-title { break-after: avoid; }
  a { color: #111; }
  .lede { color: #333; font-size: 11pt; }
  .hero { grid-template-columns: 1.25fr 1fr; min-height: 0; margin-bottom: 8mm; }
  .hero-copy { padding: 6mm; }
  .hero-copy h1 { font-size: 23pt; }
  .hero-copy p { font-size: 10pt; }
  .hero-visual { min-height: 0; padding: 6mm; }
  .hero-visual > img { max-height: 65mm; }
  .card-grid, .asset-grid, .swatch-grid, .quick-grid, .guide-toc { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4mm; }
  .two-column { grid-template-columns: 1fr; }
  .card, .asset-card, .swatch, .quick-card, .rule, .check-row, .timeline-item { break-inside: avoid; box-shadow: none; }
  .card { min-height: 0; padding: 5mm; }
  .card-title { font-size: 12pt; }
  .card-description, .rule-body p, .check-row { font-size: 9.5pt; }
  .panel { padding: 6mm; border-color: #bbb; }
  .rule { grid-template-columns: 8mm minmax(0, 1fr); padding: 5mm; gap: 3mm; }
  .rule-body h3 { font-size: 12pt; }
  .rule-body h2 { font-size: 12pt; }
  .guide-layout { display: block; }
  .guide-layout > .guide-toc { display: none; }
  .guide-layout .rule-list { margin-bottom: 6mm; }
  .rule-num { font-size: 8pt; }
  .stat-grid { margin: 6mm 0; }
  .stat { padding: 4mm; }
  .stat strong { font-size: 18pt; }
  .notice { font-size: 9.5pt; padding: 4mm; }
  .color-segment { min-height: 24mm; padding: 4mm; }
  .swatch-color { min-height: 28mm; }
  .template-layout { display: block; }
  .canvas-frame { padding: 0; min-height: 0; border: 0; background: white; }
  .canvas-frame > img, .canvas-frame > svg { max-height: 225mm; box-shadow: none; }
  .export-code textarea, .export-code pre { min-height: 0; font-size: 8pt; padding: 4mm; background: #F6F6F6; }
  .data-table { overflow: visible; }
  .data-table table { min-width: 0; font-size: 8pt; }
  .data-table th, .data-table td { padding: 2.5mm; }
  .data-table tr { break-inside: avoid; }
  .source-links { display: block; font-size: 8pt; }
  .source-links a { display: block; margin-bottom: 2mm; overflow-wrap: anywhere; }
  .source-links a[href^="http"]::after { content: " (" attr(href) ")"; font-weight: 400; }
  .footer-note { margin-top: 7mm; font-size: 8pt; }
}

/* The scrim covers the exposed page, never the navigation links beneath it. */
@media screen and (max-width:1100px){
  .sidebar{pointer-events:none;}
  body.nav-open .sidebar{pointer-events:auto;}
  .nav-scrim:not([hidden]){left:var(--sidebar-width);width:calc(100% - var(--sidebar-width));}
}
.bundle-preview{display:grid;place-items:center;align-content:center;gap:12px;color:#0054A6;min-height:160px;font-size:12px;letter-spacing:.08em;}
.bundle-preview svg{width:40px;height:40px;}
