@font-face {
  font-family: 'Archivo';
  src: url('/assets/font/archivo-latin.woff2') format('woff2-variations');
  font-weight: 300 800;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #eceef1;
  --plate: #e4e7ec;
  --plate-deep: #d6dae2;
  --ink: #12161a;
  --ink-2: #4a535e;
  --ink-3: #6f7883;
  --rule: #bcc3cd;
  --rule-fine: #cfd5dd;

  --h-r: #c8102e;
  --h-ro: #d9531d;
  --h-o: #e07d0a;
  --h-yo: #efa505;
  --h-y: #d6c414;
  --h-gy: #86a80b;
  --h-g: #12805f;
  --h-bg: #0a8496;
  --h-b: #0b6bcb;
  --h-bv: #3f4bb5;
  --h-v: #6b3fa0;
  --h-rv: #a3206b;

  --gut: clamp(1rem, 3.2vw, 2.5rem);
  --measure: 68ch;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
  accent-color: var(--h-b);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Archivo', ui-sans-serif, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--h-yo); color: var(--ink); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--plate-deep); }
::-webkit-scrollbar-thumb { background: var(--ink-3); border: 3px solid var(--plate-deep); }
::-webkit-scrollbar-thumb:hover { background: var(--ink); }
* { scrollbar-color: var(--ink-3) var(--plate-deep); scrollbar-width: thin; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--h-r); }

img, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  font-weight: 700;
  font-stretch: 118%;
  letter-spacing: -0.025em;
  line-height: 1.04;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
h3 { font-size: 1.05rem; letter-spacing: -0.01em; }

p { margin: 0 0 1em; max-width: var(--measure); }

.lbl {
  font-size: 0.6875rem;
  font-weight: 600;
  font-stretch: 108%;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.num { font-variant-numeric: tabular-nums lining-nums; }

.wrap { padding-inline: var(--gut); }

.shell { min-height: 100vh; }

/* ---------- hue rail : the chromatic circle as navigation ---------- */

.rail {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: var(--plate);
  border-bottom: 1px solid var(--ink);
}

.rail__chip {
  flex: 1 1 8.333%;
  min-width: 0;
  height: 2.25rem;
  border: 0;
  border-right: 1px solid var(--paper);
  padding: 0;
  cursor: pointer;
  position: relative;
  transition: flex-basis 420ms var(--ease);
}
.rail__chip:last-child { border-right: 0; }
.rail__chip[aria-pressed='true']::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 5px;
  background: var(--ink);
}
.rail__chip:hover { filter: brightness(1.09); }

@media (max-width: 48rem) {
  .rail__chip { height: 2.9rem; }
  .rail__reset { height: 2.9rem; }
}

.rail__reset {
  display: none;
  flex: 0 0 auto;
  height: 2.25rem;
  padding-inline: 0.9rem;
  border: 0;
  border-left: 1px solid var(--ink);
  background: var(--plate);
  color: var(--ink-2);
  cursor: pointer;
  font: inherit;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.rail__reset:hover { color: var(--ink); background: var(--plate-deep); }
html[data-try] .rail__reset { display: block; }

.rail__now {
  display: none;
  flex: 1 1 100%;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.4rem var(--gut);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
html[data-try] .rail__now { display: flex; }
.rail__now b { font-weight: 700; }
.rail__chip[aria-pressed='true'] { outline: 3px solid var(--ink); outline-offset: -3px; }

/* ---------- masthead ---------- */

.mast {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 1.1rem 0.9rem;
  border-bottom: 1px solid var(--ink);
}

.mast__name {
  font-size: 1rem;
  font-weight: 800;
  font-stretch: 122%;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
}
.mast__name span { color: var(--h-r); }

.mast__nav { display: flex; gap: 1.4rem; }
.mast__nav a { text-decoration: none; }
.mast__nav a:hover { text-decoration: underline; }

/* ---------- specimen : one design, at scale ---------- */

.specimen {
  display: grid;
  gap: 0;
  grid-template-columns: 1fr;
  border-bottom: 1px solid var(--ink);
}

@media (min-width: 60rem) {
  .specimen { grid-template-columns: minmax(0, 1fr) 20rem; }
}

.specimen__plate {
  position: relative;
  background: #fff;
  border-bottom: 1px solid var(--ink);
  padding: clamp(0.75rem, 2.4vw, 2rem);
  display: grid;
  align-items: center;
  justify-items: stretch;
  overflow: hidden;
}

.specimen__plate > * { display: block; width: 100%; }
.specimen__plate svg {
  width: 100%;
  max-width: min(46rem, 62vh);
  height: auto;
  margin-inline: auto;
}

@media (max-width: 48rem) {
  .specimen__plate svg { max-width: min(100%, 36vh); }
  .specimen__meta { gap: 0.9rem; }
  .mast { padding-block: 0.7rem 0.6rem; }
}

@media (min-width: 60rem) {
  .specimen__plate { border-bottom: 0; border-right: 1px solid var(--ink); }
}

.specimen__meta {
  padding: clamp(1rem, 3vw, 1.75rem);
  background: var(--plate);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.specimen__meta h1 {
  font-size: clamp(1.6rem, 2.6vw, 2.25rem);
  font-stretch: 108%;
  letter-spacing: -0.015em;
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
}
.pager a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
}
.ico {
  width: 0.85em;
  height: 0.85em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.pager a:hover { color: var(--h-r); }

.dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  margin: 0;
  font-size: 0.875rem;
}
.dl dt { color: var(--ink-2); }
.dl dd { margin: 0; font-weight: 600; }

/* ---------- actions ---------- */

.acts { display: grid; gap: 0.5rem; }

.btn {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 180ms var(--ease), color 180ms var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn__hint { font-weight: 400; font-size: 0.75rem; opacity: 0.72; margin-left: auto; }
.btn--go { background: var(--ink); color: var(--paper); }
.btn--go:hover { background: var(--h-r); border-color: var(--h-r); color: #fff; }

/* ---------- grid of specimens ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.5rem), 1fr));
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.cell {
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: #fff;
  text-decoration: none;
  display: block;
  position: relative;
}
.cell svg { width: 100%; height: auto; }
.cell__tag {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 0.2rem 0.45rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.cell:hover { background: var(--plate); }
.cell:hover .cell__tag { background: var(--h-r); }

/* ---------- try-a-hue : the authored moment ---------- */

.ly {
  fill: var(--try, transparent);
  fill-opacity: 0;
  transition: fill-opacity 520ms var(--ease);
}
[data-try] .ly-core { fill-opacity: 0.14; }
[data-try] .ly-hub,
[data-try] .ly-innerRings { fill-opacity: 0.28; }
[data-try] .ly-fill1,
[data-try] .ly-fill2,
[data-try] .ly-fill3,
[data-try] .ly-fill4,
[data-try] .ly-fill5 { fill-opacity: 0.34; }
[data-try] .ly-pinstripe,
[data-try] .ly-corona { fill-opacity: 0.42; }
[data-try] .ly-medallion,
[data-try] .ly-borderband { fill-opacity: 0.5; }
[data-try] .ly-dotwork { fill-opacity: 0.9; }

@media (prefers-reduced-motion: reduce) {
  .ly, .rail__chip { transition: none; }
}

/* ---------- sections ---------- */

.sec { padding-block: clamp(2.25rem, 5vw, 4rem); border-bottom: 1px solid var(--ink); }
.sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }

.scale { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--ink); }
.scale a {
  flex: 1 1 8rem;
  padding: 0.85rem 1rem;
  border-right: 1px solid var(--ink);
  text-decoration: none;
  background: var(--plate);
  transition: background 180ms var(--ease);
}
.scale a:last-child { border-right: 0; }
.scale a:hover { background: #fff; }
.scale strong { display: block; font-stretch: 112%; }
.scale span { font-size: 0.8125rem; color: var(--ink-2); }

.foot {
  padding-block: 2rem 3rem;
  font-size: 0.8125rem;
  color: var(--ink-2);
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: space-between;
}
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }

/* ---------- print : the terminal action ---------- */

@media print {
  @page { margin: 8mm; }
  .rail, .mast, .specimen__meta, .foot, .sec--browse, .noprint { display: none !important; }
  body { background: #fff; }
  .specimen, .specimen__plate { border: 0; padding: 0; display: block; }
  .specimen__plate svg { width: 100%; height: auto; }
  .ly { fill: none !important; }
}

/* ---------- utilities ---------- */

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 99;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
}
.skip:focus { left: 0; }
