body:has(.design-guide) {
  --guide-type-display: 3rem;
  --guide-type-heading: 1.5rem;
  --guide-type-body: 1rem;
  --guide-type-label: 0.875rem;
  --guide-type-caption: 0.8125rem;
}

body:has(.design-guide) > .container.is-max-desktop > .title {
  --title-size: var(--guide-type-display);
}

body:has(.design-guide) a:any-link { text-decoration: none; }

.content.pb-5:has(.design-guide) > .columns.content.is-mobile {
  display: none;
}

body:has(.design-guide) > .container > .content > .view > .design-guide {
  --guide-border: #2a2a2a;
  --guide-muted: #aaa;
  --guide-orange: #be4706;
  --guide-green: #06be47;
  --guide-purple: #4706be;
  --guide-red: #a72946;
  --guide-orange-hue: 21.195652deg;
  color: var(--site-text);
  font-size: var(--guide-type-body);
  line-height: 1.5;
  max-width: none;
  width: 100%;
}

.design-guide .guide-intro {
  color: var(--guide-muted);
  font-size: 1.25rem;
  margin: 0 0 2rem;
}

.design-guide .guide-section {
  margin: 0;
  padding: 2rem 0 2.5rem;
  border-top: 0.0625rem solid var(--guide-border);
}

.content .view .design-guide :is(h2, h3) { margin: 0 0 0.5rem; }
.content .view .design-guide h2 { font-size: var(--guide-type-heading); line-height: 2rem; }
.content .view .design-guide h3 { font-size: 1.125rem; }
.design-guide p { color: #dedede; max-width: 64ch; }
.design-guide code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-family: var(--site-mono);
}

.design-guide .guide-mark {
  font-family: "KMFC Mark", sans-serif;
  font-size: 4rem;
  font-weight: 750;
  line-height: 1;
}

.design-guide .guide-marks,
.design-guide .guide-neutrals,
.design-guide .guide-accents {
  display: grid;
  gap: 0.75rem;
}

.design-guide .guide-marks {
  grid-template-columns: repeat(2, minmax(0, 12rem));
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.content .view .design-guide .guide-marks > figure {
  margin: 0;
  min-width: 0;
  text-align: left;
}

.design-guide .guide-mark-art {
  display: grid;
  place-items: center;
  min-height: 10rem;
  border-bottom: 0.0625rem solid var(--guide-border);
}

.design-guide .guide-mark-art img {
  display: block;
  width: min(100%, 10rem);
  height: auto;
  object-fit: contain;
}

.content .view .design-guide .guide-marks figcaption {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  padding: 0.5rem 0 0;
  color: #dedede;
  font-size: var(--guide-type-label);
  font-style: normal;
  text-align: left;
}

.design-guide .guide-marks figcaption :is(code, span) {
  color: var(--guide-muted);
  font-size: var(--guide-type-caption);
}

.design-guide .guide-neutrals { grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 1.25rem 0 1.5rem; }
.design-guide .guide-accents { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.design-guide .guide-color-card {
  min-width: 0;
  overflow: hidden;
  border: 0.0625rem solid var(--guide-border);
  border-radius: 0.25rem;
  background: #141414;
}

.design-guide .guide-chip {
  display: block;
  height: 2.25rem;
  background: var(--chip);
  border-bottom: 0.0625rem solid var(--guide-border);
}

.design-guide .guide-color-details { padding: 0.625rem; font-size: var(--guide-type-label); }
.design-guide .guide-color-values {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.125rem 0.3125rem;
  margin: 0.375rem 0 0;
}

.design-guide .guide-color-values dt {
  color: var(--guide-muted);
  font: 400 0.6875rem/1.5 var(--site-mono);
}

.design-guide .guide-color-values dd { margin: 0; font-size: 0.75rem; }
.design-guide .guide-color-values code { font-size: inherit; white-space: normal; }
.design-guide .guide-color-details small {
  display: block;
  margin-top: 0.375rem;
  font-size: var(--guide-type-caption);
  color: var(--guide-muted);
}

.design-guide .guide-color-panel {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
  margin-top: 1rem;
}

.design-guide .guide-wheel {
  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(
    hsl(0 95% 53%),
    hsl(60 95% 53%) 60deg,
    hsl(120 95% 53%) 120deg,
    hsl(180 95% 53%) 180deg,
    hsl(240 95% 53%) 240deg,
    hsl(300 95% 53%) 300deg,
    hsl(0 95% 53%)
  );
}

.design-guide .guide-wheel::before {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: var(--site-bg);
}

.design-guide .guide-wheel-node {
  --angle: calc(var(--guide-orange-hue) + var(--turn));
  position: absolute;
  left: calc(50% + 38% * sin(var(--angle)));
  top: calc(50% - 38% * cos(var(--angle)));
  width: 65.8179%;
  height: 0.0625rem;
  transform: rotate(calc(var(--angle) + 60deg));
  transform-origin: left center;
  background: #fff9;
}

.design-guide .guide-wheel-node::after {
  content: "";
  position: absolute;
  inset: -0.375rem auto auto -0.375rem;
  width: 0.8125rem;
  height: 0.8125rem;
  border: 0.0625rem solid white;
  border-radius: 50%;
  background: var(--dot);
}

.content .view .design-guide .guide-type-table {
  --bulma-table-striped-row-even-background-color: transparent;
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin: 1.25rem 0 0;
  background: transparent;
}

.design-guide :is(.guide-type-size, .guide-type-family) { width: 20%; }

.content .view .design-guide .guide-type-table :is(th, td) {
  padding: 0.75rem 1rem 0.75rem 0;
  border: 0;
  background: transparent;
  text-align: left;
  vertical-align: middle;
}

.design-guide .guide-type-table :is(th, td):last-child { padding-inline-end: 0; }
.design-guide .guide-type-table thead th {
  color: var(--guide-muted);
  font-size: var(--guide-type-label);
  font-weight: 600;
}

.design-guide .guide-type-table tbody th { font-size: var(--guide-type-label); }
.design-guide .guide-type-table tbody th code {
  display: block;
  margin-top: 0.25rem;
  color: var(--guide-muted);
  font-size: 0.75rem;
  font-weight: 400;
}

.design-guide .guide-type-table tbody td:last-child {
  color: var(--guide-muted);
  font-size: var(--guide-type-label);
}

.design-guide .guide-type-sample {
  display: block;
  color: var(--site-text);
  font-family: var(--bulma-family-primary);
  overflow-wrap: anywhere;
}

.design-guide .guide-mono { font-family: var(--site-mono); }
.design-guide .guide-type-display .guide-type-sample { font-size: var(--guide-type-display); line-height: 3.25rem; font-weight: 800; }
.design-guide .guide-type-section .guide-type-sample { font-size: var(--guide-type-heading); line-height: 2rem; font-weight: 800; }
.design-guide .guide-type-body .guide-type-sample { font-size: var(--guide-type-body); line-height: 1.5; }
.design-guide .guide-type-label .guide-type-sample { font-size: var(--guide-type-label); line-height: 1.25rem; font-weight: 700; }
.design-guide .guide-type-caption .guide-type-sample { font-size: var(--guide-type-caption); line-height: 1.25rem; color: var(--guide-muted); }
.design-guide .guide-type-code .guide-type-sample { font-size: var(--guide-type-label); line-height: 1.25rem; }

@media (max-width: 62rem) {
  .design-guide .guide-accents { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 45rem) {
  .design-guide .guide-color-panel { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .design-guide .guide-wheel { width: min(11.5rem, 100%); }
  .design-guide .guide-accents { width: 100%; }
  .design-guide .guide-neutrals { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .design-guide .guide-mark-art { min-height: 8rem; }
  .design-guide .guide-mark-art img { width: min(100%, 8rem); }
  .design-guide .guide-mark { font-size: 3.25rem; }
}

@media (max-width: 54rem) {
  .design-guide .guide-type-table,
  .design-guide .guide-type-table :is(tbody, tr, th, td) { display: block; }

  .design-guide .guide-type-table colgroup { display: none; }
  .design-guide .guide-type-table thead {
    position: absolute;
    width: 0.0625rem;
    height: 0.0625rem;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .design-guide .guide-type-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.25rem 1rem;
    align-items: start;
  }

  .design-guide .guide-type-table tbody tr + tr { margin-top: 1.5rem; }
  .content .view .design-guide .guide-type-table tbody :is(th, td) { padding: 0; }
  .design-guide .guide-type-table tbody td:nth-child(2) { grid-area: 2 / 1 / 3 / -1; }
  .design-guide .guide-type-table tbody td:last-child { grid-area: 1 / 2 / 2 / 3; }
}

@media (max-width: 26.25rem) {
  .design-guide .guide-neutrals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
