html, body { margin: 0; background: #161616; }

@font-face {
  font-family: Inter;
  src: url("assets/inter.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("assets/space-grotesk.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("assets/instrument-serif.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("assets/instrument-serif-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --font-sans: Inter, system-ui, sans-serif;
  --font-display: "Space Grotesk", Inter, system-ui, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --preview-height: 58px;
}

*, *::before, *::after { box-sizing: border-box; }
body { font-family: var(--font-sans); color: #f3f1ee; }
h1, h2, h3, h4, p, figure, dl, dd, ol, ul { margin: 0; }
img, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.concept { min-height: calc(100svh - var(--preview-height)); }
.concept:focus { outline: none; }
.concept [id] { scroll-margin-top: calc(var(--preview-height) + 16px); }
.concept noscript { display: block; padding: 2rem; }

.skip-link {
  position: fixed;
  z-index: 101;
  inset: 7px auto auto 7px;
  transform: translateY(-140%);
  padding: 12px 16px;
  background: #fdf9f3;
  color: #1e1b19;
}

.skip-link:focus { transform: translateY(0); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.preview-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto minmax(170px, 1fr);
  align-items: center;
  min-height: var(--preview-height);
  padding-inline: clamp(18px, 3vw, 46px);
  background: #161616;
  border-bottom: 1px solid #363432;
  color: #f5f2ed;
}

.preview-label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #e8e3dc;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: -.015em;
  white-space: nowrap;
}

.preview-label img { flex: none; }

.preview-nav {
  display: flex;
  gap: 4px;
  align-items: center;
  min-width: 0;
}

.preview-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: clamp(9px, 1.25vw, 18px);
  border: 1px solid transparent;
  border-radius: 5px;
  color: #c1bcb5;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: background 160ms, color 160ms;
}

.preview-nav a:hover { background: #252422; color: #fff; }
.preview-nav a:active { background: #3e352e; }
.preview-nav a[aria-current="page"] {
  background: #2b2723;
  border-color: #514337;
  color: #ffc69b;
}

.preview-nav a:focus-visible { outline-offset: -3px; }

@media (max-width: 900px) {
  .preview-bar { grid-template-columns: auto minmax(0, 1fr); gap: 18px; }
  .preview-nav { justify-self: end; }
}

@media (max-width: 700px) {
  :root { --preview-height: 78px; }
  .preview-bar {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 7px 0 3px;
  }
  .preview-label { padding-inline: 13px; }
  .preview-label img { width: 18px; height: 18px; }
  .preview-nav {
    display: grid;
    grid-template-columns: .78fr 1.14fr .86fr .93fr 1.16fr;
    gap: 2px;
    width: 100%;
    justify-self: stretch;
    padding-inline: 8px;
  }
  .preview-nav a {
    justify-content: center;
    padding-inline: 3px;
    font-size: 11px;
    text-align: center;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
