/* Motivf Identity Guidelines: layout + component styles */
:root {
  --margin: 40px;
  --gutter: 20px;
  --doc-bg: #f2f2f2;
  --tip-bg: #ffc85a;
  --tip-fg: #5548ff;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--doc-bg);
  color: #000;
  font-family: 'f23bd338e8fe6ce76539ff6c71912f34f', system-ui, sans-serif;
  /* no font-smoothing override: the original renders with browser defaults,
     and "antialiased" makes Overpass look a weight lighter on macOS */
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

/* ---------- grid ---------- */
.group { display: flex; flex-direction: column; gap: var(--group-gap, 0); }
.sec { position: relative; }
.wrap {
  container-type: inline-size;
  padding: 0 var(--margin);
  display: flex;
  flex-direction: column;
}
.wrap > * { --col: calc((100cqw - 11 * var(--gutter)) / 12); }
.row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: start;
}
.col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  align-self: stretch;
}

/* ---------- text ---------- */
.txt { margin-top: var(--mt, 0); margin-bottom: var(--mb, 0); }
.txt p { margin: 0; }
.txt p.hb:not(:first-child) { margin-top: 1lh; }
.txt strong { font-weight: 700; }
.txt a { text-decoration: none; }
.txt a:hover { text-decoration: underline; text-decoration-color: #ffc85a; }
.sec-header .txt a:hover { text-decoration-color: currentColor; }

/* ---------- media ---------- */
.media { position: relative; }
.media img { width: 100%; height: auto; }
.media-box { display: flex; align-items: center; justify-content: center; }
.media-box img.fit { width: 100%; height: 100%; }
.media-link { display: block; position: relative; text-decoration: none; }
a.media-link .media { transition: opacity .2s ease; }
a.media-link:hover .media { opacity: .85; }

/* ---------- do / don't ---------- */
.dont {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.dont-art { display: flex; align-items: center; justify-content: center; }
.dont-art img.fit { width: 100%; height: 100%; object-fit: contain; }
.dont-x { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .45; pointer-events: none; }

/* ---------- color ---------- */
.swatch {
  all: unset;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  padding: 20px;
  cursor: pointer;
  position: relative;
}
.swatch:focus-visible { outline: 2px solid #5548ff; outline-offset: 3px; }
.spec {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 10px;
  margin: 0;
}
.spec dt, .spec dd { margin: 0; }
.prop { display: flex; gap: var(--gutter); width: 100%; }
.prop-tile { position: relative; min-width: 0; }
.prop-label { position: absolute; top: 20px; left: 20px; right: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- typography ---------- */
.specimen { font-size: 37px; line-height: 1; white-space: nowrap; margin: -0.05em 0 -0.25em; }
.specimen > div { overflow: hidden; text-overflow: clip; }
.tester { padding: 40px; overflow: hidden; }
.tester-input { width: 100%; height: 100%; outline: none; white-space: pre-wrap; overflow-wrap: break-word; cursor: text; }
.tester-input:empty::before { content: attr(data-placeholder); color: var(--ph); white-space: normal; pointer-events: none; }

/* ---------- buttons ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: var(--bg);
  color: var(--fg);
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.btn:hover { background: var(--hbg); color: var(--hfg); }

/* ---------- tooltips ---------- */
[data-tip] { position: relative; }
.tip {
  position: fixed;
  z-index: 50;
  max-width: 260px;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--tip-bg);
  color: var(--tip-fg);
  font: 11px/16px 'f23bd338e8fe6ce76539ff6c71912f34f', system-ui, sans-serif;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .12s ease, transform .12s ease;
}
.tip.on { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  :root { --margin: 20px; --gutter: 16px; }
  .row { row-gap: 16px; }
  .col { grid-column: 1 / -1 !important; }
  .row-small { grid-template-columns: 1fr 1fr; }
  .row-small > .col { grid-column: auto !important; padding-top: 0 !important; }
  .wrap > .row-small + .row-small { margin-top: 16px; }
  .media[style*="var(--col)"] { width: 100% !important; }
  .media[data-small] { width: 50% !important; }
  .sec-header .row { grid-template-columns: 1fr 1fr; }
  .sec-header .col { grid-column: auto !important; }
  .tester { padding: 20px; }
  .prop { gap: 8px; }
  .prop-label { top: 12px; left: 12px; }
}
