.hacker-demo {
  --hacker-ink: #253746;
  --hacker-accent: #365c75;
  --hacker-line: #dde4e9;
  display: grid;
  gap: 12px;
  max-width: 360px;
  padding: 15px;
  color: var(--hacker-ink);
  border-color: var(--hacker-line);
}

.hacker-demo h4,
.hacker-demo p,
.hacker-demo figure {
  margin: 0;
}

.hacker-demo h4 {
  font-size: 16px;
}

.hacker-control {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  width: fit-content;
  font-size: 11px;
  cursor: pointer;
}

.hacker-demo input:not([type="checkbox"]) {
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--hacker-line);
  border-radius: 4px;
  color: inherit;
  background: white;
}

.hacker-demo input[type="checkbox"] {
  accent-color: var(--hacker-accent);
}

.hacker-product,
.hacker-product label {
  display: grid;
  gap: 6px;
}

.hacker-product {
  gap: 10px;
}

.hacker-product .mock-button {
  background: var(--hacker-accent);
}

.hacker-product p,
.hacker-disclosure p {
  font-size: 11px;
}

.hacker-product-decoration {
  border-radius: 5px;
  padding: 9px;
  background: #e5deef;
  color: #4f3964;
  font-weight: 700;
}

.hacker-case.initial .hacker-product .mock-button {
  background: #7e5296;
}

.visual-purpose.initial .hacker-product-decoration,
.wireframe-purpose.initial .hacker-product-decoration {
  min-height: 65px;
  background: linear-gradient(145deg, #eee6fa, #dde7ff);
}

.design-purpose.initial .hacker-product label,
.semantic-search.initial .hacker-product label {
  order: 1;
}

.aqua-material.initial
  .hacker-product
  :is(.mock-button, .hacker-product-decoration, input) {
  color: #273444;
  background: linear-gradient(#fff, #91b1d3);
  box-shadow:
    inset 0 1px 3px #fff,
    0 2px 5px #516f8a42;
}

.hacker-disclosure {
  min-width: 0;
}

.hacker-disclosure summary {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 5px 7px;
  border: 1px solid var(--hacker-line);
  border-radius: 5px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
  list-style: none;
}

.hacker-disclosure summary::-webkit-details-marker {
  display: none;
}

.hacker-disclosure summary:hover,
.hacker-disclosure[open] summary {
  background: #edf3f8;
}

.hacker-disclosure p {
  padding: 8px 4px 3px;
}

.hacker-feed {
  display: grid;
  gap: 6px;
}

.hacker-feed .hacker-disclosure {
  border: 1px solid var(--hacker-line);
  border-radius: 6px;
  padding: 5px;
}

.hacker-feed summary {
  width: 100%;
  border: 0;
}

.timeline-context.initial .hacker-feed:has(details[open]) details:not([open]) {
  display: none;
}

.timeline-context.improved .hacker-feed details[open] {
  border-color: #7693a8;
  background: #f8fbfd;
}

.scan-path.initial .hacker-feed > details:first-child {
  order: 2;
}

.scan-path.improved .hacker-feed > details:first-child {
  background: #e7eef4;
  border-color: #a8bccc;
}

.hacker-type-sample {
  min-width: 0;
  padding: 10px;
  border-radius: 5px;
  background: #f3f5f8;
  color: #243744;
  overflow-wrap: anywhere;
}

.hacker-type-sample strong {
  display: block;
  margin-bottom: 5px;
  font-size: 22px;
  line-height: 1.25;
}

.hacker-type-sample p {
  font-size: 13px;
  line-height: 1.6;
}

.hacker-demo:has(.hacker-type-toggle:checked) .hacker-type-sample strong {
  font-size: 29px;
}

.hacker-demo:has(.hacker-type-toggle:checked) .hacker-type-sample p {
  font-size: 16px;
}

.comic-texture.initial .hacker-type-sample {
  font-family: "Comic Sans MS", "Marker Felt", cursive;
  word-spacing: 0.18em;
}

.comic-texture.improved .hacker-type-sample {
  font-family: Arial, sans-serif;
}

.comic-texture:has(.hacker-type-toggle:checked) .hacker-type-sample {
  word-spacing: 0;
}

.small-screen-type.initial .hacker-type-sample {
  font-family: Georgia, serif;
  letter-spacing: -0.045em;
}

.small-screen-type.improved .hacker-type-sample {
  font-family: Verdana, sans-serif;
}

.small-screen-type .hacker-type-sample strong {
  font-size: 16px;
}

.small-screen-type
  .hacker-demo:has(.hacker-type-toggle:checked)
  .hacker-type-sample
  :is(strong, p) {
  font-size: 11px;
}

.type-medium.initial .hacker-type-sample strong {
  font:
    650 22px / 1.35 "Courier New",
    monospace;
}

.type-medium.improved .hacker-type-sample strong {
  font:
    650 22px / 1.35 Georgia,
    serif;
  letter-spacing: 0.07em;
}

.font-pair.initial .hacker-type-sample {
  font-family: Georgia, serif;
  font-weight: 700;
}

.font-pair.improved .hacker-type-sample strong {
  font-family: Georgia, serif;
}

.font-pair.improved .hacker-type-sample p {
  font-family: Arial, sans-serif;
  font-weight: 400;
}

.real-italic.initial .hacker-type-sample strong {
  font-family: Georgia, serif;
  transform: skewX(-13deg);
}

.real-italic.improved .hacker-type-sample strong {
  font-family: Georgia, serif;
  font-style: italic;
}

.no-stretch.initial .hacker-type-sample strong {
  transform: scaleX(0.66);
  transform-origin: left center;
}

.no-stretch.improved .hacker-type-sample strong {
  font-size: 20px;
  letter-spacing: 0.025em;
}

.left-align.initial .hacker-type-sample p {
  text-align: justify;
  text-align-last: justify;
}

.left-align .hacker-demo:has(.hacker-type-toggle:checked) .hacker-type-sample {
  max-width: 170px;
}

.punctuation-proof .hacker-type-sample p + p {
  margin-top: 6px;
}

.punctuation-proof.initial .hacker-type-sample {
  background: #f6e9e8;
}

.punctuation-proof.improved .hacker-type-sample {
  background: #e7f1ec;
}

.hacker-crop img {
  display: block;
  width: min(100%, 200px);
  aspect-ratio: 1;
  object-fit: cover;
}

.ratio-crop.improved .hacker-crop img {
  aspect-ratio: 3 / 2;
}

.hacker-crop figcaption {
  margin-top: 5px;
  font-size: 11px;
}

.hacker-columns {
  display: grid;
  grid-template-columns: 1.618fr 1fr;
  gap: 6px;
}

.golden-ratio.improved .hacker-columns {
  grid-template-columns: minmax(0, 1fr) minmax(90px, 0.4fr);
}

.hacker-columns > :is(div, aside) {
  min-width: 0;
  padding: 8px;
  background: #edf2f6;
}

.hacker-columns aside {
  background: #e0eaf1;
}

.hacker-folio {
  border: 1px solid var(--hacker-line);
  min-height: 165px;
  padding: 5px;
  background: #f7f6f0;
}

.hacker-folio p {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.65;
}

.page-margins.improved .hacker-folio {
  padding: 15px 24px 30px 29px;
}

.hacker-demo:has(.hacker-narrow:checked)
  :is(.hacker-crop, .hacker-columns, .hacker-folio) {
  max-width: 185px;
}

.hacker-shapes {
  position: relative;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  background: #edf1f3;
  border: 1px solid var(--hacker-line);
  border-radius: 5px;
}

.hacker-shapes i {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: var(--size, 16%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--shape, #59849b);
  transform: translate(-50%, -50%);
}

.hacker-shapes i:nth-child(1) {
  --x: 15%;
  --y: 70%;
}
.hacker-shapes i:nth-child(2) {
  --x: 34%;
  --y: 24%;
  --size: 12%;
}
.hacker-shapes i:nth-child(3) {
  --x: 49%;
  --y: 58%;
  --shape: #a38d79;
}
.hacker-shapes i:nth-child(4) {
  --x: 68%;
  --y: 29%;
  --size: 9%;
}
.hacker-shapes i:nth-child(5) {
  --x: 82%;
  --y: 70%;
  --shape: #8aa9aa;
}

.grid-direction.improved .hacker-shapes i:nth-child(1) {
  --x: 16%;
  --y: 75%;
}
.grid-direction.improved .hacker-shapes i:nth-child(2) {
  --x: 33%;
  --y: 62%;
}
.grid-direction.improved .hacker-shapes i:nth-child(3) {
  --x: 50%;
  --y: 49%;
}
.grid-direction.improved .hacker-shapes i:nth-child(4) {
  --x: 66%;
  --y: 36%;
}
.grid-direction.improved .hacker-shapes i:nth-child(5) {
  --x: 82%;
  --y: 23%;
}

.visual-loop.improved .hacker-shapes i:nth-child(1) {
  --x: 18%;
  --y: 50%;
}
.visual-loop.improved .hacker-shapes i:nth-child(2) {
  --x: 40%;
  --y: 20%;
}
.visual-loop.improved .hacker-shapes i:nth-child(3) {
  --x: 69%;
  --y: 25%;
}
.visual-loop.improved .hacker-shapes i:nth-child(4) {
  --x: 81%;
  --y: 62%;
}
.visual-loop.improved .hacker-shapes i:nth-child(5) {
  --x: 44%;
  --y: 75%;
}

.similarity-rhythm.initial .hacker-shapes i:nth-child(even) {
  border-radius: 2px;
}

.similarity-rhythm.improved .hacker-shapes i {
  --y: 50%;
  --size: 12%;
  --shape: #59849b;
}

.similarity-rhythm.improved .hacker-shapes i:nth-child(5) {
  --size: 19%;
  --shape: #284c61;
}

.logo-dominance.improved .hacker-shapes i {
  --shape: #638a9e;
}

.logo-dominance.improved .hacker-shapes i:nth-child(1) {
  --x: 40%;
  --y: 35%;
}
.logo-dominance.improved .hacker-shapes i:nth-child(2) {
  --x: 60%;
  --y: 35%;
}
.logo-dominance.improved .hacker-shapes i:nth-child(3) {
  --x: 50%;
  --y: 53%;
  --size: 22%;
  --shape: #284c61;
}
.logo-dominance.improved .hacker-shapes i:nth-child(4) {
  --x: 36%;
  --y: 70%;
}
.logo-dominance.improved .hacker-shapes i:nth-child(5) {
  --x: 64%;
  --y: 70%;
}

.hacker-demo:has(.hacker-grid-toggle:checked) .hacker-shapes {
  background:
    repeating-linear-gradient(0deg, transparent 0 19px, #d1dce3 19px 20px),
    repeating-linear-gradient(90deg, transparent 0 19px, #d1dce3 19px 20px),
    #f3f6f7;
}

.hacker-ground {
  padding: 10px;
  background: #e8edf0;
}

.hacker-ground p {
  margin-bottom: 10px;
}

.figure-ground.initial .hacker-disclosure summary {
  color: #66717a;
  border-color: transparent;
}

.figure-ground.improved .hacker-disclosure summary {
  color: white;
  background: #355a71;
}

.figure-ground.improved .hacker-disclosure summary:hover,
.figure-ground.improved .hacker-disclosure summary:focus-visible {
  background: #24465b;
}

.hacker-reading {
  display: grid;
  gap: 8px;
  font-size: 12px;
}

.hacker-reading small {
  color: #586b79;
  font-size: 10px;
}

.hierarchy-space .hacker-reading :is(strong, small, p) {
  font-size: 12px;
  font-weight: 400;
}

.hierarchy-space.initial .hacker-reading {
  gap: 13px;
}

.hierarchy-space.improved .hacker-reading {
  gap: 2px;
}

.hierarchy-space.improved .hacker-reading p:first-of-type {
  margin-top: 23px;
}

.hacker-demo:has(.hacker-space-guides:checked) .hacker-reading {
  background: #e3edf5;
}

.hacker-demo:has(.hacker-space-guides:checked) .hacker-reading > * {
  background: #fff;
  outline: 1px dashed #829aaf;
  outline-offset: -1px;
}

.hierarchy-weight.initial .hacker-reading strong {
  font-size: 14px;
  font-weight: 550;
}

.hierarchy-weight.improved .hacker-reading strong {
  font-size: 23px;
  font-weight: 800;
}

.hierarchy-weight
  .hacker-demo:has(.hacker-weight-zoom:checked)
  .hacker-reading {
  font-size: 15px;
}

.hierarchy-weight
  .hacker-demo:has(.hacker-weight-zoom:checked)
  .hacker-reading
  small {
  font-size: 13px;
}

.hierarchy-weight.initial
  .hacker-demo:has(.hacker-weight-zoom:checked)
  .hacker-reading
  strong {
  font-size: 18px;
}

.hierarchy-weight.improved
  .hacker-demo:has(.hacker-weight-zoom:checked)
  .hacker-reading
  strong {
  font-size: 30px;
}

.hierarchy-rule.initial .hacker-reading > * {
  border: 1px solid #c3d1dd;
  padding: 3px;
}

.hierarchy-rule.improved .hacker-reading strong {
  padding-top: 6px;
  border-top: 3px solid #3b6179;
}

.hierarchy-rule.initial
  .hacker-demo:has(.hacker-rule-guides:checked)
  .hacker-reading
  > * {
  border-color: #ad5d49;
}

.hierarchy-rule.improved
  .hacker-demo:has(.hacker-rule-guides:checked)
  .hacker-reading
  strong {
  border-top-color: #ad5d49;
}

.hacker-table {
  border-collapse: collapse;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.hacker-table :is(th, td) {
  padding: 6px;
}

.table-alignment.initial .hacker-table :is(th, td) {
  border: 1px solid #acbdca;
  text-align: center;
}

.table-alignment.improved .hacker-table :is(th, td) {
  border-bottom: 1px solid var(--hacker-line);
  text-align: right;
}

.table-alignment.improved .hacker-table th:first-child {
  text-align: left;
}

.hacker-demo:has(.hacker-column-guides:checked)
  .hacker-table
  :is(th, td):not(:first-child) {
  position: relative;
}

.hacker-demo:has(.hacker-column-guides:checked)
  .hacker-table
  :is(th, td):not(:first-child)::after {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 5px;
  border-inline-end: 1px dashed #829aaf;
  pointer-events: none;
  content: "";
}

.hacker-table tr:has(input:checked) {
  background: #e4eef6;
}

.hacker-demo:has(.hacker-gray:checked) .hacker-color-preview {
  filter: grayscale(1);
}

.hacker-luminance,
.hacker-media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hacker-luminance > div {
  display: grid;
  place-items: center;
  min-height: 118px;
  background: #c4c4c4;
}

.color-constancy.improved .hacker-luminance > div:first-child {
  background: #eee;
}
.color-constancy.improved .hacker-luminance > div:last-child {
  background: #282828;
}

.hacker-luminance span {
  display: grid;
  place-items: center;
  width: 48px;
  aspect-ratio: 1;
  background: #808080;
}

.hacker-luminance small {
  visibility: hidden;
  color: white;
  font-size: 9px;
}

.hacker-demo:has(.hacker-reveal-ink:checked) .hacker-luminance small {
  visibility: visible;
}

.hacker-media {
  gap: 8px;
}
.hacker-media > div {
  display: grid;
  gap: 5px;
  font-size: 11px;
}
.hacker-media i {
  display: block;
  height: 66px;
  background: #245dec;
}
.screen-print.improved .hacker-media > div:last-child i {
  background: #325491;
}

.hacker-status,
.hacker-swatch-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 5px;
}

.hacker-status div,
.hacker-swatch-strip div {
  display: grid;
  justify-items: center;
  gap: 4px;
  font-size: 10px;
}

.hacker-status i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  background: var(--sample);
}

.hacker-status-symbol {
  display: block;
  width: 14px;
  height: 14px;
}

.hacker-status-symbol--success {
  background: currentColor;
  clip-path: polygon(7% 39%, 35% 65%, 88% 12%, 100% 23%, 35% 88%, 0 51%);
}

.hacker-status-symbol--caution {
  background:
    linear-gradient(currentColor, currentColor) center 1px / 2px 8px no-repeat,
    radial-gradient(circle, currentColor 1.15px, transparent 1.3px) center
      11px / 3px 3px no-repeat;
}

.hacker-status-symbol--failure {
  background:
    linear-gradient(
      45deg,
      transparent 43%,
      currentColor 44% 56%,
      transparent 57%
    ),
    linear-gradient(
      -45deg,
      transparent 43%,
      currentColor 44% 56%,
      transparent 57%
    );
}

.color-shape.improved .hacker-status div:nth-child(2) i {
  border-radius: 6px;
}

.color-shape.improved .hacker-status div:nth-child(3) i {
  border-radius: 0;
}

.hacker-swatch-strip i {
  width: 100%;
  height: 54px;
  border-radius: 3px;
  border: 1px solid var(--hacker-line);
  background: var(--sample);
}

.hacker-channel-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hacker-channel-view {
  --r: 0;
  --g: 0;
  --b: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.hacker-demo:has(.hacker-red:checked) .hacker-channel-view {
  --r: 255;
}
.hacker-demo:has(.hacker-green:checked) .hacker-channel-view {
  --g: 255;
}
.hacker-demo:has(.hacker-blue:checked) .hacker-channel-view {
  --b: 255;
}

.hacker-channel-view i {
  height: 40px;
  border-radius: 4px;
}

.hacker-channel-view i:nth-child(1) {
  background: rgb(var(--r) 0 0);
}
.hacker-channel-view i:nth-child(2) {
  background: rgb(0 var(--g) 0);
}
.hacker-channel-view i:nth-child(3) {
  background: rgb(0 0 var(--b));
}

.hacker-mix {
  grid-column: 1 / -1;
  height: 50px;
  border: 1px solid #6d8292;
  border-radius: 5px;
  background: rgb(var(--r) var(--g) var(--b));
}

.hacker-palette {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 5px;
  color: var(--sample-ink);
  background: var(--paper);
}

.hacker-palette p {
  padding: 5px 6px;
  background: var(--panel);
}

.hacker-palette .hacker-disclosure summary {
  border-color: transparent;
  background: var(--sample-accent);
  color: #fff;
}

.hacker-palette .hacker-disclosure summary:hover {
  filter: brightness(0.87);
}

.comparison:has(.hacker-case) .stage {
  align-items: start;
  padding-block: 16px;
}

@media (max-width: 540px) {
  .pair:has(.hacker-case) {
    grid-template-columns: 1fr;
  }

  .pair:has(.hacker-case) .panel + .panel {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

.hacker-demo .hacker-compare-note,
.hacker-mix-label {
  color: #536774;
  font-size: 11px;
  line-height: 1.45;
}

.hacker-column-example .hacker-compare-note {
  margin-top: 7px;
}

.real-italic .hacker-type-sample strong,
.no-stretch .hacker-type-sample strong {
  width: fit-content;
  max-width: 100%;
  padding-block: 5px;
  border-bottom: 1px dashed #a2b5c1;
  font-size: clamp(24px, 3.5vw, 34px);
}

.real-italic
  .hacker-demo:has(.hacker-type-toggle:checked)
  .hacker-type-sample
  strong,
.no-stretch
  .hacker-demo:has(.hacker-type-toggle:checked)
  .hacker-type-sample
  strong {
  font-size: clamp(29px, 4vw, 42px);
}

.small-screen-type .hacker-type-sample strong {
  padding-block: 5px;
  border-bottom: 1px solid #becad3;
}

.small-screen-type.improved .hacker-type-sample strong {
  letter-spacing: 0.07em;
}

.font-pair.improved .hacker-type-sample strong {
  font-size: clamp(24px, 3.4vw, 31px);
}

.hacker-proof {
  font-family: Georgia, serif;
}

.hacker-proof mark {
  padding: 1px 2px;
  border-radius: 2px;
  background: #f5d1cd;
  color: #553232;
  font-size: 1.35em;
  line-height: 1;
}

.punctuation-proof.improved .hacker-proof mark {
  background: #cfe6d9;
  color: #224739;
}

.hacker-folio-text {
  border: 1px dashed #a9a091;
  padding: 5px;
}

.page-margins.improved .hacker-folio-text {
  max-width: 28ch;
}

.golden-ratio .hacker-demo:has(.hacker-narrow:checked) .hacker-column-example {
  max-width: 165px;
}

.golden-ratio.improved
  .hacker-demo:has(.hacker-narrow:checked)
  .hacker-columns {
  grid-template-columns: 1fr;
}

.hacker-ground {
  min-height: 133px;
}

.figure-ground.improved .hacker-ground .hacker-disclosure summary {
  box-shadow: 0 3px 7px #29455845;
}

.hierarchy-space.improved .hacker-reading p + p {
  margin-top: 4px;
}

.hierarchy-ink .hacker-reading strong {
  font-size: 22px;
}

.hierarchy-ink.improved .hacker-reading strong {
  color: #98412d;
}

.color-constancy .hacker-luminance span {
  width: 56px;
}

.hacker-luminance small {
  color: #171717;
  background: #efefef;
  padding-inline: 2px;
}

.hacker-media i {
  height: 91px;
}

.hacker-mix-label {
  grid-column: 1 / -1;
}

.hacker-palette > header {
  display: grid;
  gap: 3px;
  padding: 8px;
}

.hacker-palette > header strong,
.hacker-tone > strong {
  font-size: clamp(17px, 2.3vw, 22px);
}

.hacker-palette > header small,
.hacker-tone > small {
  font-size: 10px;
}

.hacker-case.initial .hacker-palette > header {
  background: var(--sample-accent);
  color: white;
}

.hacker-case.initial .hacker-palette > p {
  padding: 12px 8px;
}

.hacker-case.improved .hacker-palette > header {
  padding: 4px 1px;
}

.hacker-case.improved .hacker-palette > p {
  border-inline-start: 2px solid var(--sample-accent);
}

.hacker-palette-key {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 7px;
  font-size: 10px;
}

.hacker-palette-key span::before {
  display: block;
  height: 10px;
  margin-bottom: 3px;
  border: 1px solid var(--hacker-line);
  border-radius: 2px;
  background: var(--sample-accent);
  content: "";
}

.hacker-palette-key span:first-child::before {
  background: var(--paper);
}
.hacker-palette-key span:nth-child(2)::before {
  background: var(--panel);
}

.hacker-tone {
  display: grid;
  gap: 7px;
  padding: 12px;
  background: #f8f5ef;
  color: #1d1d1d;
}

.warm-ink.initial .hacker-tone :is(p, small, summary) {
  font-weight: 700;
  color: inherit;
}

.warm-ink.improved .hacker-tone {
  color: #4b3c31;
}

.warm-ink.improved .hacker-tone :is(small, summary) {
  color: #4d5b63;
}
