/* Motive brand guide
   Tokens come from the theme block in index.html. Nothing here hardcodes a color
   or size the theme already names.
   Fonts load from Motive's hosted font bucket. To self-host, change the url()
   paths below and FONT_BASE in script.js. */

@font-face { font-family: "GT Walsheim"; font-weight: 400; font-style: normal; font-display: swap;
  src: local("GT Walsheim Regular"), local("GTWalsheim-Regular"),
       url("https://storage.googleapis.com/wackk-images-production-4f204ab/motive-brand-fonts/GT-Walsheim-Regular.woff2") format("woff2"); }
@font-face { font-family: "GT Walsheim"; font-weight: 400; font-style: italic; font-display: swap;
  src: local("GT Walsheim Regular Oblique"), local("GTWalsheim-RegularOblique"),
       url("https://storage.googleapis.com/wackk-images-production-4f204ab/motive-brand-fonts/GT-Walsheim-Regular-Oblique.woff2") format("woff2"); }
@font-face { font-family: "GT Walsheim"; font-weight: 500; font-style: normal; font-display: swap;
  src: local("GT Walsheim Medium"), local("GTWalsheim-Medium"),
       url("https://storage.googleapis.com/wackk-images-production-4f204ab/motive-brand-fonts/GT-Walsheim-Medium.woff2") format("woff2"); }
@font-face { font-family: "GT Walsheim"; font-weight: 700; font-style: normal; font-display: swap;
  src: local("GT Walsheim Bold"), local("GTWalsheim-Bold"),
       url("https://storage.googleapis.com/wackk-images-production-4f204ab/motive-brand-fonts/GT-Walsheim-Bold.woff2") format("woff2"); }
@font-face { font-family: "Berkeley Mono"; font-weight: 400; font-style: normal; font-display: swap;
  src: local("Berkeley Mono"), local("BerkeleyMono-Regular"),
       url("https://storage.googleapis.com/wackk-images-production-4f204ab/motive-brand-fonts/BerkeleyMono-Regular.otf") format("opentype"); }
@font-face { font-family: "Berkeley Mono"; font-weight: 400; font-style: italic; font-display: swap;
  src: local("Berkeley Mono Oblique"), local("BerkeleyMono-Oblique"),
       url("https://storage.googleapis.com/wackk-images-production-4f204ab/motive-brand-fonts/BerkeleyMono-Oblique.otf") format("opentype"); }
@font-face { font-family: "Berkeley Mono"; font-weight: 700; font-style: normal; font-display: swap;
  src: local("Berkeley Mono Bold"), local("BerkeleyMono-Bold"),
       url("https://storage.googleapis.com/wackk-images-production-4f204ab/motive-brand-fonts/BerkeleyMono-Bold.otf") format("opentype"); }

:root {
  --font-stack: var(--font), "Google Sans", "Avenir Next", "Century Gothic", system-ui, sans-serif;
  --font-data: "Berkeley Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --side: 16.5rem;
}

/* Dark sections use the theme's dark values so components behave as they do in dark mode. */
.band, .footer {
  --text-primary: #fcefe2;
  --text-secondary: #fcefe2e6;
  --text-tertiary: #fcefe266;
  --surface: #2a152b;
  --elevated-level-one: #452347;
  --elevated-level-two: #31162e;
  --border-strong: 1px solid #593154;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--text-primary);
  font-family: var(--font-stack);
  font-size: var(--font-body-md);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-regular);
  letter-spacing: var(--letter-spacing-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-kerning: normal;
  font-variant-alternates: normal;
  font-feature-settings: "ss01";
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
h1, h2, h3, h4 { font-weight: var(--font-weight-medium); letter-spacing: var(--letter-spacing-tight); line-height: var(--line-height-tight); }
button { font: inherit; letter-spacing: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 0.125rem solid var(--primary); outline-offset: 0.125rem; }


/* Berkeley Mono is for numbers and values only. Words never get this class. */
.num { font-family: var(--font-data); font-size: 0.92em; letter-spacing: var(--letter-spacing-none); font-feature-settings: normal; }

.meta { font-size: var(--font-body-sm); color: var(--text-secondary); }
.icon { width: 1.125rem; height: 1.125rem; max-width: none; flex: none; fill: currentColor; }
.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap-lg) var(--size-7); }
.row--tight { gap: var(--gap-md); }
.skip { position: absolute; left: -999px; top: var(--size-3); z-index: 100; padding: var(--size-4) var(--size-6); background: var(--secondary); color: var(--text-on-primary); border-radius: var(--radius-sm); }
.skip:focus { left: var(--size-3); }

/* ------------------------------------------------------------ Button
   A straight port of Button.module.scss. */
.button {
  --hover-scale: 0.98;
  --active-scale: 0.94;
  --button-radius: var(--radius-xsm); /* shape: square */

  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 0;
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--font-body-sm);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
  text-decoration: none;
  background: transparent;
  border: none;
  border-radius: var(--button-radius);
  outline-offset: 0.125rem;
  transition: var(--transition-fast);
  cursor: pointer;
  user-select: none;
}
.button:focus-visible, .button.is-focus { outline: 0.125rem solid var(--primary); }

/* Background layer. Lets the fill scale without moving the label. */
.button::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  transition: transform 140ms ease-in-out;
  content: "";
}
.button::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--surface);
  border-radius: inherit;
  transform: scale(0.75);
  transition: transform 140ms ease-in-out, opacity 140ms ease-in-out;
  opacity: 0;
  content: "";
}
.button > * { position: relative; z-index: 1; }
.button span { line-height: 0.9; text-box: trim-both cap alphabetic; }

.button.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.button.isLoading { opacity: 0.5; pointer-events: none; }
.button.is-static { cursor: default; pointer-events: none; }

@media (hover: hover) {
  .button:hover:not(.disabled) { z-index: 1; }
  .button:hover:not(.disabled)::before { transform: scale(var(--hover-scale)); }
  .button:hover:not(.disabled)::after { transform: scale(var(--hover-scale)); opacity: 0.3; }
}
.button.is-hover::before { transform: scale(var(--hover-scale)); }
.button.is-hover::after { transform: scale(var(--hover-scale)); opacity: 0.3; }
.button:active:not(.disabled)::before, .button:active:not(.disabled)::after,
.button.is-active::before, .button.is-active::after { transform: scale(var(--active-scale)); }
.button.is-active::after { opacity: 0.3; }

/* Shape */
.button--square { --button-radius: var(--radius-xsm); }
.button--pill { --button-radius: var(--radius-full); }

/* Size */
.button--default { gap: var(--gap-md); height: 2rem; padding: var(--button-padding-xs); }
.button--medium { gap: var(--gap-md); height: 2.5rem; padding: 0.875rem 1.25rem; }
.button--large { gap: var(--gap-md); height: 3rem; padding: var(--button-padding-md); font-size: var(--font-body-md); font-weight: var(--font-weight-regular); }
.button--large .icon { width: 1.25rem; height: 1.25rem; }

/* Variant */
.button--primary, .button--dangerRed { color: var(--text-on-primary); }
.button--primary::before { background: var(--primary-gradient); box-shadow: none; }
.button--dangerRed::before { background: var(--danger-red); box-shadow: none; }
.button--secondary::before { background: var(--elevated-level-one); border: var(--border-strong); }
.button--transparent::before { background: transparent; box-shadow: none; transform: scale(0.8); }
@media (hover: hover) {
  .button--transparent:hover:not(.disabled)::before { background: var(--elevated-level-two); transform: scale(0.98); }
}
.button--transparent:active:not(.disabled)::before { background: var(--elevated-level-two); transform: scale(0.94); }

/* Icon padding */
.iconLeft.button--default { padding-right: 1rem; padding-left: 0.875rem; }
.iconRight.button--default { padding-right: 0.875rem; padding-left: 1rem; }
.iconLeft.button--medium { padding-right: 1.1875rem; padding-left: 1.0625rem; }
.iconRight.button--medium { padding-right: 1.0625rem; padding-left: 1.1875rem; }
.iconLeft.button--large { padding-right: 1.375rem; padding-left: 1.25rem; }
.iconRight.button--large { padding-right: 1.25rem; padding-left: 1.375rem; }

/* Icon only */
.noText { flex-direction: column; gap: 0; }
.noText.button--default { width: 2rem; min-width: 2rem; max-width: 2rem; height: 2rem; padding: var(--button-padding-xs); }
.noText.button--medium { width: 2.5rem; min-width: 2.5rem; max-width: 2.5rem; height: 2.5rem; padding: 0.875rem; }
.noText.button--large { width: 3rem; min-width: 3rem; max-width: 3rem; height: 3rem; padding: var(--padding-sm); }

/* Width */
.width--full { width: 100%; }
.width--fit { width: fit-content; }

/* ------------------------------------------------------------ Layout
   A fixed sidebar for finding things, one column for reading them. */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.content { min-width: 0; }
main, .footer__in { max-width: 80rem; margin-inline: auto; padding-inline: var(--gutter); }
main { container-type: inline-size; } /* lets the big specimens size to the column: cqw units */

.side {
  position: sticky; top: 0; z-index: 50;
  display: flex; flex-direction: column; gap: var(--size-10);
  height: 100vh; padding: var(--size-11) var(--size-9) var(--size-9);
  overflow-y: auto; scrollbar-width: thin;
  border-right: var(--border-strong);
}
.side__brand { display: block; padding-inline: var(--size-5); text-decoration: none; }
.side__brand img { width: 6.25rem; }
.side__nav a {
  display: block; padding: var(--size-3) var(--size-5); border-radius: var(--radius-xsm);
  font-weight: var(--font-weight-medium); text-decoration: none; color: var(--text-secondary);
  transition: var(--transition-fast);
}
.side__nav a:hover { color: var(--text-primary); background: var(--elevated-level-two); }
.side__nav a.is-current { color: var(--text-primary); }
.side__nav ul ul { display: none; margin: var(--size-1) 0 var(--size-5) var(--size-5); border-left: var(--border-strong); }
.side__nav a.is-current + ul { display: block; }
.side__nav ul ul a { margin-left: -1px; padding: var(--size-2) var(--size-5); border-left: 1px solid transparent; border-radius: 0 var(--radius-xsm) var(--radius-xsm) 0; font-size: var(--font-body-sm); font-weight: var(--font-weight-regular); }
.side__nav ul ul a.is-here { color: var(--text-primary); border-left-color: var(--secondary); }
.side__cta { margin-top: auto; width: 100%; }

/* ------------------------------------------------------------ Hero */
.hero { padding-block: var(--gutter) clamp(3rem, 6vw, 5.5rem); }
.hero__panel {
  position: relative; overflow: hidden;
  display: grid; place-items: center;
  padding: clamp(3rem, 8vw, 7.5rem) clamp(2rem, 11vw, 11rem) clamp(3.75rem, 9vw, 8.5rem);
  background: var(--secondary); border-radius: var(--radius-xl);
}
.hero__panel img { width: 100%; }
.hero__stripes { position: absolute; inset: auto 0 0 0; display: grid; grid-template-columns: repeat(4, 1fr); height: clamp(0.5rem, 1vw, 0.875rem); }
.hero__stripes i:nth-child(1) { background: var(--primary); }
.hero__stripes i:nth-child(2) { background: var(--accent-orange); }
.hero__stripes i:nth-child(3) { background: var(--accent-yellow); }
.hero__stripes i:nth-child(4) { background: var(--accent-green); }
.hero__copy { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--size-10); margin-top: clamp(2rem, 4vw, 3.5rem); }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 5.25rem); line-height: 0.95; }

/* ------------------------------------------------------------ Sections
   Every section opens the same way: a rule, a title, and the one line to remember. */
.section { padding-block: clamp(3rem, 6vw, 5.5rem) clamp(3.5rem, 7vw, 6.5rem); border-top: 1px solid var(--secondary); }
.band { margin-bottom: clamp(3.5rem, 7vw, 6.5rem); padding: clamp(2rem, 5vw, 4.5rem); background: var(--secondary); color: var(--text-primary); border-radius: var(--radius-xl); }
.band + .section { border-top: 0; padding-top: 0; }
#downloads { margin-bottom: var(--gutter); }
.section__title { font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 0.95; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.head { display: grid; grid-template-columns: minmax(10rem, 1fr) 3.4fr; gap: var(--size-5) var(--size-12); align-items: start; margin-block: clamp(3rem, 5vw, 4.75rem) clamp(1.25rem, 2.4vw, 2rem); }
.section__title + .head { margin-top: 0; }
.head h3 { font-size: 1.375rem; line-height: 1.2; letter-spacing: -0.04em; }
.head p, .head ul { max-width: 64ch; }
.head--stack { display: block; margin-block: 0 var(--size-7); }
.head--spaced { margin-top: clamp(4rem, 7vw, 6.5rem); }

/* ------------------------------------------------------------ At a glance
   Same shape as the rest of the page: a name on the left, what to know on the right. */
.glance { background: var(--elevated-level-one); border: var(--border-strong); border-radius: var(--radius-xl); padding: var(--size-3) var(--size-10); }
.glance__group { display: grid; grid-template-columns: minmax(9rem, 1fr) 3.4fr; gap: var(--size-3) var(--size-12); padding: var(--size-9) 0; }
.glance__group + .glance__group { border-top: var(--border-strong); }
.glance__group h3 { font-size: 1.375rem; line-height: 1.2; letter-spacing: -0.04em; }
.glance__group h3 a { text-decoration: none; }
.glance__group h3 a:hover { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.glance__group li { position: relative; padding: var(--size-2) 0 var(--size-2) var(--size-9); max-width: 64ch; }
.glance__group li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: var(--size-3); height: var(--size-3); border-radius: 50%; background: var(--primary); }

/* ------------------------------------------------------------ Logo
   One card per mark. The dots switch its color. */
.logo-cards { display: grid; gap: var(--size-7); }
.logo-cards--two { grid-template-columns: 1fr 1fr; }
.logo-card { border: var(--border-strong); border-radius: var(--radius-xl); overflow: hidden; background: var(--elevated-level-one); }
.logo-tile__stage { position: relative; aspect-ratio: 3 / 1; transition: background-color 140ms ease-in-out; }
.logo-cards--two .logo-tile__stage { aspect-ratio: 16 / 10; }
.logo-cards--tall .logo-tile__stage { aspect-ratio: 5 / 4; }
.logo-tile__stage img { position: absolute; inset: 0; margin: auto; width: auto; height: auto; max-width: 34%; max-height: 62%; }
.logo-cards--short .logo-tile__stage { aspect-ratio: 4 / 1; }
.logo-cards--short .logo-tile__stage img { max-width: 22%; }
.logo-cards--two .logo-tile__stage img { max-width: 46%; }
.logo-cards--tall .logo-tile__stage img { max-height: 74%; }
.logo-tile__stage--light { background: var(--surface); border-bottom: var(--border-strong); }
.logo-tile__stage--dark { background: var(--secondary); }
.logo-tile__stage--white { background: #fff; border-bottom: var(--border-strong); }
.logo-tile__stage--black { background: #000; }
.logo-card__body { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--size-7); padding: var(--size-9); }
.logo-card__info { flex: 1 1 11rem; }
.logo-card__info h4 { font-size: var(--font-heading-sm); margin-bottom: var(--size-1); }
/* Color swatch picker. A straight port of ColorSwatchPicker.module.scss. */
.colorSwatchPicker {
  /* These two are used by the component but are not in the theme file. */
  --border-strong-color: #d8cdd1;
  --border-shadow-soft: 0 0 0 1px var(--border-strong-color);

  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-md);
}
.colorSwatchPicker--row { flex-direction: row; }
.colorSwatchPicker--column { flex-direction: column; }

.colorSwatch {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: none;
  border: 0;
  transition: var(--transition-bounce-sm);
  cursor: pointer;
}
.colorSwatch:focus-visible { outline: 1px dotted var(--color-swatch-color); outline-offset: 2px; }
.colorSwatch.bordered:focus-visible { outline-color: var(--text-secondary); }

.colorSwatch::before {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-swatch-color);
  border-radius: inherit;
  transition: var(--transition-bounce-sm);
  content: "";
}
@media (hover: hover) {
  .colorSwatch:not(.selected):hover::before { transform: scale(1.1); }
}

/* The ring that pops out around the selected swatch. */
.colorSwatch::after {
  position: absolute;
  inset: -4px;
  border: 2px solid var(--color-swatch-color);
  border-radius: calc(var(--border-radius) + 4px);
  transform: scale(0.85);
  transition: var(--transition-bounce-sm);
  opacity: 0;
  content: "";
}
.colorSwatch.selected::after { transform: scale(1); opacity: 1; }

.colorSwatch.bordered::before { box-shadow: var(--border-shadow-soft) inset; }
.colorSwatch.bordered::after { border-color: var(--border-strong-color); }

.colorSwatch--circle { --border-radius: var(--radius-full); border-radius: var(--border-radius); }
.colorSwatch--square { --border-radius: var(--radius-sm); border-radius: var(--border-radius); }
.colorSwatch--tiny { width: 24px; height: 24px; }
.colorSwatch--small { width: 32px; height: 32px; }
.colorSwatch--medium { width: 36px; height: 36px; }
.colorSwatch--large { width: 42px; height: 42px; }

.colorSwatch .checkIcon {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  max-width: none;
  fill: var(--color-swatch-contrast-color);
  transform: scale(0);
  transition: var(--transition-bounce-sm);
}
.colorSwatch.selected .checkIcon { transform: scale(1); opacity: 1; }

.marks__note { margin-top: var(--size-7); }
.order { display: flex; flex-wrap: wrap; gap: var(--size-3) var(--size-10); margin: var(--size-7) 0 0; padding: 0; list-style: none; counter-reset: order; }
.order li { display: flex; align-items: center; gap: var(--size-3); font-size: var(--font-body-sm); counter-increment: order; }
.order li::before { content: counter(order); font-family: var(--font-data); font-size: 0.8125rem; color: var(--text-secondary); }
.order i { width: 1.25rem; height: 1.25rem; border-radius: 50%; box-shadow: inset 0 0 0 1px #45234733; }

.donts { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--size-7); margin-bottom: clamp(2rem, 4vw, 3rem); }
.donts__stage { display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; background: var(--elevated-level-one); border: var(--border-strong); border-radius: var(--radius-lg); }
.donts__stage img { max-width: none; }
.donts__stage img { width: 52%; }
.donts__stage img.is-stretched { transform: scale(1.45, 0.7); }
.donts__stage img.has-effects { transform: rotate(-8deg); filter: drop-shadow(5px 6px 0 var(--accent-yellow)) drop-shadow(0 10px 10px rgb(0 0 0 / 35%)); }
.donts p { display: flex; gap: var(--gap-md); align-items: flex-start; margin-top: var(--size-5); font-size: 0.9375rem; }
.donts p .icon { color: var(--accent-orange); }

/* ------------------------------------------------------------ Color */
/* The palette as one chart: a block of the color, then its values in columns.
   Purple and Surface get taller rows because they carry the brand. */
.chart { border: var(--border-strong); border-radius: var(--radius-xl); overflow: hidden; background: var(--elevated-level-one); }
.chart__head, .chart__row { display: grid; grid-template-columns: minmax(11rem, 1.5fr) repeat(4, minmax(0, 1fr)); align-items: stretch; }
.chart__head { font-size: var(--font-body-sm); color: var(--text-secondary); }
.chart__head span { padding: var(--size-5) var(--size-9); }
.chart__row { min-height: 5.5rem; border-top: var(--border-strong); }
.chart__row--major { min-height: 9rem; }
.chart__color { display: flex; flex-direction: column; justify-content: center; gap: var(--size-1); padding: var(--size-7) var(--size-9); color: var(--secondary); border-right: var(--border-strong); }
.chart__color.is-dark { color: var(--text-on-primary); }
.chart__color h4 { font-size: var(--font-heading-sm); }
.chart__row--major .chart__color h4 { font-size: var(--font-heading-md); }
.chart__color p { font-size: var(--font-body-sm); opacity: 0.85; }
.chart__cell { display: flex; align-items: center; padding: var(--size-5) var(--size-9); min-width: 0; }
.value { padding: 0; border: 0; background: none; text-align: left; }
.value .num { font-size: 0.8125rem; border-bottom: 1px dashed transparent; transition: var(--transition-fast); }
.value:hover .num { border-bottom-color: currentColor; }

.token-group { margin-bottom: var(--size-12); }
.token-group:last-child { margin-bottom: 0; }
.token-group h4 { font-size: var(--font-body-md); letter-spacing: var(--letter-spacing-regular); color: var(--text-secondary); margin-bottom: var(--size-5); }
.tokens { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: var(--gap-md); }
.token {
  display: flex; gap: var(--size-5); align-items: center; text-align: left;
  padding: var(--size-4); border: var(--border-strong); border-radius: var(--radius-md);
  background: var(--elevated-level-one); color: var(--text-primary);
  transition: var(--transition-fast);
}
.token:hover { border-color: var(--text-secondary); }
.token i { flex: none; width: 2.25rem; height: 2.25rem; border-radius: var(--radius-xsm); box-shadow: inset 0 0 0 1px #45234726; background-color: #fff; }
.token b { display: block; font-weight: var(--font-weight-medium); font-size: var(--font-body-sm); overflow-wrap: anywhere; }
.token .num { font-size: 0.75rem; color: var(--text-secondary); }

/* ------------------------------------------------------------ Type */
.tester { border: var(--border-strong); border-radius: var(--radius-xl); background: var(--elevated-level-one); overflow: hidden; }
.tester__controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap-sm); padding: var(--size-5); border-bottom: var(--border-strong); }
.tester__line {
  padding: clamp(1.75rem, 5vw, 4.5rem) clamp(1.25rem, 4vw, 3.5rem);
  font-size: clamp(2.75rem, 10.5cqw, 8.5rem); font-weight: var(--font-weight-medium); line-height: 0.95; letter-spacing: var(--letter-spacing-tight);
  outline: none; overflow-wrap: anywhere;
}
.alphabets { display: grid; grid-template-columns: 1fr 1fr; gap: var(--size-10) var(--size-15); margin-top: clamp(2rem, 4vw, 3.5rem); font-size: clamp(1.625rem, 3.6vw, 3.25rem); line-height: 1.22; overflow-wrap: anywhere; }
.alphabets .is-oblique { font-style: italic; }
.alphabets + .dodont { margin-top: clamp(2rem, 4vw, 3.5rem); }
.alphabets--mono { font-family: var(--font-data); letter-spacing: var(--letter-spacing-none); font-size: clamp(1.5rem, 3.3vw, 3rem); }
.numerals { font-family: var(--font-data); font-weight: var(--font-weight-bold); letter-spacing: -0.02em; line-height: 1; font-size: clamp(2.25rem, 16cqw, 14.5rem); white-space: nowrap; margin-block: clamp(1rem, 3vw, 2.5rem); }

/* Spec lists: a name, a value, and what it's for. */
.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--size-12) clamp(1.5rem, 4vw, 4rem); }
.spec-grid--two { grid-template-columns: repeat(2, 1fr); }
.spec-grid > * { min-width: 0; }
.spec h4 { font-size: var(--font-body-md); letter-spacing: var(--letter-spacing-regular); color: var(--text-secondary); padding-bottom: var(--size-4); border-bottom: 1px solid var(--secondary); }
.spec li { display: grid; grid-template-columns: 1fr auto; gap: var(--size-1) var(--size-7); align-items: baseline; padding: var(--size-5) 0; border-bottom: var(--border-strong); }
.spec__name { font-size: var(--font-body-lg); }
.spec__use { font-size: var(--font-body-sm); color: var(--text-secondary); }
.spec__token { font-size: var(--font-body-xsm); color: var(--text-secondary); text-align: right; white-space: nowrap; }
.spec .num { white-space: nowrap; }
/* A name and a value. They share a line when they fit; the value drops below when they don't. */
.spec--plain li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--size-1) var(--size-9); }
.spec--plain .spec__name { white-space: nowrap; }
.spec--plain .spec__value { white-space: nowrap; }
/* Long values (the motion curves) always sit under their name, so every row matches. */
.spec--stack li { flex-direction: column; }
.spec--stack .spec__value { white-space: normal; }

.scale { border-top: 1px solid var(--secondary); }
.scale__row { display: grid; grid-template-columns: 1fr auto; gap: var(--size-3) var(--size-12); align-items: baseline; padding: var(--size-8) 0; border-bottom: var(--border-strong); }
.scale__sample { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scale__meta { display: flex; gap: var(--size-7); align-items: baseline; font-size: var(--font-body-sm); color: var(--text-secondary); white-space: nowrap; }
.scale__meta .num { color: var(--text-primary); }

.dodont { display: grid; grid-template-columns: 1fr 1fr; gap: var(--size-7); }
.dodont__cell { padding: var(--size-9); border: var(--border-strong); border-radius: var(--radius-lg); background: var(--elevated-level-one); }
.dodont__tag { display: flex; align-items: center; gap: var(--gap-md); font-weight: var(--font-weight-medium); margin-bottom: var(--size-7); }
.pairs dd { text-align: right; }
.dodont__tag--do .icon { color: var(--accent-green); }
.dodont__tag--dont .icon { color: var(--accent-orange); }
.dodont__wrong { font-family: var(--font-data); font-size: var(--font-body-sm); letter-spacing: var(--letter-spacing-none); line-height: var(--line-height-tall); color: var(--text-secondary); }
.alt { font-size: clamp(4.5rem, 11vw, 9rem); font-weight: var(--font-weight-medium); line-height: 1; letter-spacing: var(--letter-spacing-tight); margin-bottom: var(--size-5); }
.alt--on { font-feature-settings: "ss01" 1; }
.alt--off { font-feature-settings: "ss01" 0; }
.alt-how { margin-top: var(--size-10); }
.pairs > div { display: flex; justify-content: space-between; gap: var(--size-7); padding: var(--size-3) 0; border-bottom: var(--border-strong); font-size: var(--font-body-sm); }
.pairs > div:last-child { border-bottom: 0; }
.pairs dt { color: var(--text-secondary); }

.fonts { display: grid; gap: var(--size-7); }
.font-card { border: var(--border-strong); border-radius: var(--radius-xl); background: var(--elevated-level-one); padding: var(--size-10); box-shadow: var(--shadow-tiny); }
.font-card__top { display: flex; flex-wrap: wrap; gap: var(--size-7); justify-content: space-between; align-items: flex-start; padding-bottom: var(--size-9); margin-bottom: var(--size-3); border-bottom: var(--border-strong); }
.font-card h4 { font-size: var(--font-heading-md); margin-bottom: var(--size-2); }
/* Rows fill as many columns as fit. Lines are drawn above each row and the
   first line is clipped away, so no row ever ends on a stray border. */
.font-list { container-type: inline-size; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr)); column-gap: var(--size-14); clip-path: inset(1px -1rem -1rem -1rem); }
.font-list li { display: flex; align-items: center; justify-content: space-between; gap: var(--size-3) var(--size-5); padding: var(--size-4) 0; border-top: var(--border-strong); }
/* Too narrow for a name and two buttons on one line: stack every row the same way. */
@container (max-width: 24rem) {
  .font-list li { flex-direction: column; align-items: flex-start; }
}
.font-list li > span { font-weight: var(--font-weight-medium); white-space: nowrap; }
.font-list li small { margin-left: var(--size-2); font-size: var(--font-body-xsm); font-weight: var(--font-weight-regular); color: var(--text-secondary); }
.font-list .row { flex: none; flex-wrap: nowrap; }

/* ------------------------------------------------------------ Spacing */
.sizes { columns: 2; column-gap: clamp(1.5rem, 5vw, 5rem); border-top: 1px solid var(--secondary); }
.sizes__row { display: grid; grid-template-columns: 5rem 1fr 4.5rem 3rem; gap: var(--size-7); align-items: center; padding: var(--size-4) 0; border-bottom: var(--border-strong); break-inside: avoid; }
.sizes__row b { font-weight: var(--font-weight-medium); }
.sizes__row span:not(.num) { min-width: 0; }
.sizes__row i { display: block; max-width: 100%; height: var(--size-5); background: var(--secondary); border-radius: 2px; }
.sizes__row .num { text-align: right; }
.sizes__row .num + .num { color: var(--text-secondary); }
.sizes--one { columns: 1; border-top: 0; }
.sizes--alias .sizes__row { grid-template-columns: 7rem 1fr 4.5rem 3rem; }
.sizes__alias { font-size: var(--font-body-sm); color: var(--text-secondary); text-align: right; white-space: nowrap; }

.radii { display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--size-7); }
.radii__shape { aspect-ratio: 1; max-width: 7.5rem; background: var(--secondary-10); border: 1px solid var(--secondary); margin-bottom: var(--size-5); }
.radii li.is-full .radii__shape { aspect-ratio: 2 / 1; margin-top: 25%; }
.radii b, .shadows b { display: block; font-weight: var(--font-weight-medium); }

.shadows { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--size-10); }
.shadows__card { height: 6.5rem; background: var(--elevated-level-one); border-radius: var(--radius-lg); margin-bottom: var(--size-9); }

/* ------------------------------------------------------------ Buttons section */
.demo { display: flex; flex-wrap: wrap; gap: var(--size-12) var(--size-14); padding: var(--size-12); border: var(--border-strong); border-radius: var(--radius-xl); background: var(--elevated-level-one); }
.demo--cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--size-12); }
.demo--three { grid-template-columns: repeat(3, 1fr); }
.demo--states { display: grid; grid-template-columns: repeat(6, auto); justify-content: space-between; }
.demo__item { min-width: 0; }
.demo__item h4 { font-size: var(--font-body-lg); letter-spacing: var(--letter-spacing-regular); margin-top: var(--size-9); }
.demo__item p { font-size: var(--font-body-sm); color: var(--text-secondary); margin-top: var(--size-1); max-width: 28ch; }
.demo__item .pairs { margin-top: var(--size-3); max-width: 15rem; }

.table-scroll { overflow-x: auto; }
.props { width: 100%; min-width: 34rem; border-collapse: collapse; text-align: left; }
.props th { font-weight: var(--font-weight-medium); font-size: var(--font-body-sm); color: var(--text-secondary); padding: 0 var(--size-7) var(--size-4) 0; border-bottom: 1px solid var(--secondary); }
.props td { padding: var(--size-5) var(--size-7) var(--size-5) 0; border-bottom: var(--border-strong); vertical-align: top; }
.props td:first-child { font-weight: var(--font-weight-medium); white-space: nowrap; }
.props td:nth-child(2) { color: var(--text-secondary); white-space: nowrap; }
.props--two { min-width: 0; }
.props--two td:first-child { white-space: normal; width: 30%; }
.props--two td:nth-child(2) { color: inherit; white-space: normal; }

/* ------------------------------------------------------------ Voice */
.traits { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--secondary); }
.traits li { padding: var(--size-9) var(--size-10) var(--size-3) 0; }
.traits li + li { padding-left: var(--size-10); border-left: var(--border-strong); }
.traits h4 { font-size: clamp(1.625rem, 2.8vw, 2.5rem); margin-bottom: var(--size-5); }
.traits p { color: var(--text-secondary); max-width: 26ch; }
.voice-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--size-15) clamp(2rem, 6vw, 6rem); margin-top: clamp(3.5rem, 7vw, 6rem); }
.words { width: 100%; border-collapse: collapse; text-align: left; }
.words th { font-weight: var(--font-weight-medium); font-size: var(--font-body-sm); color: var(--text-secondary); padding: 0 var(--size-7) var(--size-4) 0; border-bottom: 1px solid var(--secondary); }
.words td { padding: var(--size-5) var(--size-7) var(--size-5) 0; border-bottom: var(--border-strong); vertical-align: top; }
.words td:first-child { font-weight: var(--font-weight-medium); font-size: var(--font-body-lg); white-space: nowrap; }
.words td:last-child { color: var(--text-secondary); text-decoration: line-through; text-decoration-color: var(--text-tertiary); }
.rules { margin-bottom: var(--size-14); border-top: 1px solid var(--secondary); }
.rules li { padding: var(--size-5) 0; border-bottom: var(--border-strong); }
.banned { display: flex; flex-wrap: wrap; gap: var(--gap-md); }
.banned li { padding: var(--size-2) var(--size-5); border: var(--border-strong); border-radius: var(--radius-full); background: var(--surface); color: var(--text-secondary); font-size: var(--font-body-sm); text-decoration: line-through; text-decoration-color: var(--accent-orange); }

/* ------------------------------------------------------------ For agents */
.files { border-top: 1px solid var(--secondary); }
.files li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--size-7); padding: var(--size-9) 0; border-bottom: var(--border-strong); }
.files h4 { font-size: var(--font-heading-sm); margin-bottom: var(--size-2); }
.files h4 a { text-underline-offset: 0.2em; text-decoration-thickness: 1px; }

/* ------------------------------------------------------------ Downloads */
.dl { border-top: var(--border-strong); }
.dl li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--size-7); padding: var(--size-10) 0; border-bottom: var(--border-strong); }
.dl h3 { font-size: clamp(1.5rem, 2.6vw, 2.25rem); margin-bottom: var(--size-3); }
.dl__all { display: flex; justify-content: flex-end; margin-top: clamp(2rem, 4vw, 3.5rem); }

/* ------------------------------------------------------------ Footer, toast */
.footer { background: var(--secondary-dark); color: var(--text-primary); padding-block: var(--size-10); }
.footer__in { display: flex; flex-wrap: wrap; gap: var(--size-7); align-items: center; justify-content: space-between; }
.footer img { width: 5.25rem; }

.toast {
  position: fixed; left: 50%; bottom: var(--size-10); z-index: 100;
  max-width: min(35rem, calc(100vw - 2rem));
  padding: var(--size-6) var(--size-8); border-radius: var(--radius-lg);
  background: var(--secondary-dark); color: var(--text-on-primary);
  box-shadow: var(--shadow-md);
  font-weight: var(--font-weight-medium); font-size: 0.9375rem; text-align: center;
  opacity: 0; transform: translate(-50%, 0.75rem); pointer-events: none;
  transition: opacity 0.18s ease, transform 240ms cubic-bezier(0.175, 0.885, 0.32, 1.1);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------ Responsive */
@media (max-width: 1320px) {
  .donts { grid-template-columns: repeat(2, 1fr); }
  .radii { grid-template-columns: repeat(4, 1fr); }
  .shadows { grid-template-columns: repeat(3, 1fr); }
  .demo--cols { grid-template-columns: repeat(2, 1fr); }
  .demo--three { grid-template-columns: repeat(3, 1fr); }
  .demo--states { grid-template-columns: repeat(3, auto); }
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
}
/* Sidebar becomes a top bar. */
@media (max-width: 1060px) {
  html { scroll-padding-top: 7.75rem; }
  .shell { display: block; }
  .side {
    flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--size-3) var(--size-7);
    height: auto; padding: var(--size-5) var(--gutter); overflow: visible;
    border-right: 0; border-bottom: var(--border-strong);
    background: rgb(252 239 226 / 90%); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  }
  .side__brand { padding: 0; }
  .side__brand img { width: 5.5rem; }
  .side__nav { order: 3; width: 100%; margin-inline: calc(var(--size-5) * -1); overflow-x: auto; scrollbar-width: none; }
  .side__nav > ul { display: flex; gap: var(--gap-sm); }
  .side__nav a { white-space: nowrap; }
  .side__nav a.is-current { background: var(--elevated-level-two); }
  .side__nav a.is-current + ul { display: none; }
  .side__cta { margin: 0 0 0 auto; width: fit-content; }
}
/* --mobile-width */
@media (max-width: 768px) {
  .hero__copy, .head, .glance__group, .logo-cards--two, .voice-grid, .dodont, .spec-grid, .spec-grid--two { grid-template-columns: 1fr; }
  .glance { padding-inline: var(--size-9); }
  .head { gap: var(--size-3); }
  /* Palette chart: the color block on top, its values in a labelled grid below. */
  .chart__head { display: none; }
  .chart__row, .chart__row--major { grid-template-columns: repeat(4, 1fr); min-height: 0; }
  .chart__color { grid-column: 1 / -1; min-height: 5rem; border-right: 0; border-bottom: var(--border-strong); }
  .chart__row--major .chart__color { min-height: 7.5rem; }
  .chart__cell { display: block; }
  .chart__cell:empty { display: none; }
  .chart__cell::before { content: attr(data-label); display: block; font-size: var(--font-body-xsm); color: var(--text-secondary); }
  .traits { grid-template-columns: 1fr 1fr; }
  .traits li, .traits li + li { padding: var(--size-9) var(--size-7) var(--size-9) 0; border-left: 0; border-bottom: var(--border-strong); }
  .alphabets { grid-template-columns: 1fr; }
  .sizes { columns: 1; }
  .demo--three { grid-template-columns: 1fr; }
  .scale__row { grid-template-columns: 1fr; }
  .logo-tile__stage { aspect-ratio: 16 / 10; }
  .logo-tile__stage img { max-width: 56%; }
}
@media (max-width: 560px) {
  .spec--plain .spec__value { white-space: normal; }
  .chart__row, .chart__row--major { grid-template-columns: 1fr 1fr; }
  .font-card { padding: var(--size-7); }
  .donts { gap: var(--size-5); }
  .words td:first-child { white-space: normal; }
  .radii { grid-template-columns: repeat(2, 1fr); }
  .shadows { grid-template-columns: repeat(2, 1fr); }
  .demo { padding: var(--size-9); }
  .demo--cols, .demo--states { grid-template-columns: 1fr 1fr; }
  .demo--three { grid-template-columns: 1fr; }
  .scale__meta { flex-wrap: wrap; gap: var(--size-3) var(--size-5); }
  .band { padding: var(--size-9); border-radius: var(--radius-lg); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 2s !important; }
}
