@font-face {
  font-family: Severina;
  src: url("fonts/Severina.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: Sofia;
  src: url("fonts/SofiaSansSemiCondensed-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Kindentosca;
  src: url("fonts/Kindentosca.woff2") format("woff2");
  font-style: italic;
  font-display: swap;
}
:root {
  --ink: #042d50;
  --blue: #3963a8;
  --red: #ac1414;
  --gold: #edb20e;
  --paper: #fffdf4;
  --cream: #faf3e0;
  --line: #042d5030;
  --grid-line: rgba(57, 99, 168, .12);
  --grid-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  --margin-line: 3%;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  font: 18px/1.45 Sofia, Arial, sans-serif;
  background-color: var(--paper);
  background-image: var(--grid-image);
  background-size: 24px 24px;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 var(--margin-line) 0 auto;
  width: 1.5px;
  background: var(--red);
  opacity: .45;
  pointer-events: none;
  z-index: -1;
}
body { isolation: isolate; }
img { display: block; max-width: 100%; height: auto; }
p { margin: 0 0 .65em; }
p:last-child { margin-bottom: 0; }
a { color: var(--red); text-underline-offset: .16em; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.wrap { width: min(1170px, calc(100% - 48px)); margin-inline: auto; }
.masthead { background: var(--paper); border-bottom: 1px solid var(--line); }
.masthead-inner {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-block: 10px;
}
.lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font: 1.4rem/1 Severina, Impact, sans-serif;
  text-transform: uppercase;
}
.sections, .edition-switch { display: flex; flex-wrap: wrap; gap: 7px 16px; }
.sections a, .edition-switch a { color: var(--ink); text-decoration: none; font-weight: 500; }
.sections a:hover, .edition-switch a:hover { color: var(--red); }
.edition-switch { gap: 0; border: 1px solid var(--line); background: var(--paper); }
.edition-switch a { padding: 6px 10px; font-size: .89rem; }
.edition-switch a[aria-current] { color: var(--red); box-shadow: inset 0 -2px var(--red); }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(14px, 3vw, 36px);
  padding-block: clamp(42px, 7vw, 100px) clamp(34px, 5vw, 70px);
}
.hero-art img { width: 100%; }
.hero-copy { text-align: right; }
.hero-sign { margin-bottom: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.hero-wordmark { margin: 0 0 16px auto; width: min(100%, 510px); }
h1, h2, h3, h4, .display { font-family: Severina, Impact, sans-serif; text-transform: uppercase; font-weight: 400; margin: 0; line-height: 1.1; }
h1 { font-size: clamp(2.25rem, 6vw, 5rem); margin-bottom: 12px; }
h2 { font-size: clamp(1.72rem, 4vw, 3.7rem); overflow-wrap: break-word; }
h3 { font-size: clamp(1.05rem, 2.15vw, 1.55rem); margin-bottom: 10px; }
h4 { font-size: 1rem; margin-bottom: 6px; }
.label { font-weight: 700; text-transform: uppercase; font-size: .79rem; letter-spacing: .09em; color: var(--red); margin-bottom: 8px; }
.lead { max-width: 66ch; font-size: clamp(1.12rem, 1.75vw, 1.35rem); }
.hero-copy .lead { max-width: 40ch; margin-left: auto; }
.hand { font: italic clamp(1.6rem, 3vw, 2.55rem)/1.2 Kindentosca, cursive; color: var(--red); margin-block: 10px; }
.strong-hand { -webkit-text-stroke: .5px currentColor; }
figure { margin: 0; }
.actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 7px 14px;
  border: 2px solid var(--red);
  color: var(--ink);
  background: var(--paper);
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
}
.primary, .button[href]:hover { color: white; background: var(--red); }
.hero-notes { display: flex; flex-wrap: wrap; gap: 10px 24px; border-block: 1px solid var(--line); padding-block: 12px; margin-bottom: clamp(42px, 6vw, 76px); }
.hero-notes p { margin: 0; }
.chapter { margin: 0 0 clamp(46px, 7vw, 92px); scroll-margin-top: 18px; }
.chapter-heading { border-top: 2px solid var(--ink); padding: 13px 0 8px; margin-bottom: 10px; }
.sheet { padding: clamp(14px, 3vw, 26px); background: var(--paper); border: 1px solid var(--line); margin-top: 14px; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-sample { min-height: 200px; border: 1px solid var(--line); padding: clamp(14px, 3vw, 26px); }
.grid-old {
  --grid-line: rgba(4, 45, 80, .1);
  background-color: var(--cream);
  background-image: var(--grid-image);
  background-size: 40px 40px;
}
.old-title { font: 700 2.3rem/1 Impact, "Arial Narrow", sans-serif; }
.grid-current {
  background-color: var(--paper);
  background-image: linear-gradient(90deg, transparent 93%, #ac141475 93%, #ac141475 calc(93% + 1px), transparent calc(93% + 1px)), var(--grid-image);
  background-size: auto, 24px 24px, 24px 24px;
}
.grid-current p { max-width: 46ch; }
.palette { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.swatch { height: 46px; border: 1px solid var(--line); margin-bottom: 5px; }
.ink { background: var(--ink); }
.blue { background: var(--blue); }
.red { background: var(--red); }
.gold { background: var(--gold); }
.paper { background: var(--paper); }
.cream { background: var(--cream); }
.palette strong, .palette code { display: block; }
.palette p { font-size: .91rem; line-height: 1.3; margin-top: 4px; }
.type-row { display: grid; grid-template-columns: 1fr 1.4fr 1.45fr; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.type-row > * { margin: 0; }
.display { font-size: clamp(1.2rem, 3vw, 2.25rem); }
.state-examples { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.state-examples p { margin: 0; font-size: .94rem; }
.note { border-left: 2px solid var(--red); background: var(--cream); padding: 9px 12px; margin-top: 12px; }
.cover-pair { margin-block: 16px; }
.case-card { background: var(--paper); border: 1px solid var(--blue); min-width: 0; }
.case-card > a { display: block; color: var(--ink); text-decoration: none; }
.case-card > a:hover h3 { color: var(--red); }
.case-card > a > img, .preview-media img, .preview-media video {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.case-card > a > div, .case-card > div:not(.preview-media) { padding: 13px; border-top: 1px solid var(--blue); }
.subhead { margin-top: 25px; }
.preview-media { position: relative; }
.preview-media video { position: absolute; inset: 0; visibility: hidden; height: 100%; }
.preview-media.playing video { visibility: visible; }
.preview-toggle {
  position: absolute;
  right: 9px;
  bottom: 9px;
  min-width: 44px;
  min-height: 44px;
  border: 2px solid white;
  border-radius: 50%;
  color: white;
  background: #042d50db;
  cursor: pointer;
  font-size: 1.05rem;
}
.art-grid img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: var(--cream); margin-bottom: 12px; }
.art-grid article:first-child img { object-fit: cover; }
summary { cursor: pointer; font-weight: 700; color: var(--ink); }
details[open] summary { margin-bottom: 10px; }
.case-outline { margin-top: 14px; padding: clamp(14px, 3vw, 24px); border: 1px solid var(--blue); background: var(--paper); }
.case-outline nav { font-size: .92rem; margin-bottom: 16px; }
.case-outline dl { display: grid; grid-template-columns: auto 1fr; gap: 7px 12px; }
.case-outline dt { color: var(--red); font-weight: 700; }
.case-outline dd { margin: 0; }
.demo-window { border: 1px solid var(--ink); }
.demo-window > div, .demo-window a { display: block; padding: 8px 10px; }
.demo-window > div { font-weight: 700; text-transform: uppercase; background: var(--cream); }
.demo-window video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--ink); }
.outcomes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.outcomes > div { border-top: 1px solid var(--blue); padding-top: 8px; }
.page-patterns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.page-patterns article { padding: 16px; border-top: 1px solid var(--blue); background: var(--paper); }
.team-plate {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: end;
  gap: 16px;
  margin-top: 22px;
  padding: clamp(14px, 3vw, 24px);
  background: var(--paper);
  border: 1px solid var(--line);
}
.team-plate::after { content: ""; position: absolute; top: -6px; right: 22px; width: 40px; height: 11px; background: var(--red); transform: rotate(9deg); }
.team-plate img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border: 1px solid var(--line); }
.team-plate img:nth-child(2) { margin-bottom: 12px; box-shadow: 5px 5px var(--gold); }
.team-plate figcaption { grid-column: 1 / -1; }
.team-plate figcaption span { display: block; }
.schema-list { margin-bottom: 0; }
.schema-list > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); }
.schema-list dt { font-weight: 700; }
.schema-list dd { margin: 0; overflow-wrap: anywhere; }
.refs { font-size: .95rem; }
.asset-list { padding-inline-start: 1.2em; margin: 0; }
.asset-list li { margin-bottom: 6px; }
footer { border-top: 1px solid var(--line); background: var(--paper); }
footer > div { padding-block: 14px; display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; }

@media (min-width: 1024px) { :root { --margin-line: 9.375%; } }
@media (max-width: 860px) {
  .palette { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .outcomes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sections { order: 1; width: 100%; }
}
@media (max-width: 640px) {
  body::before { display: none; }
  .wrap { width: calc(100% - 28px); }
  .hero, .pair, .type-row, .team-plate, .page-patterns, .schema-list > div { grid-template-columns: minmax(0, 1fr); }
  .hero { gap: 14px; padding-top: 24px; }
  .hero-art { order: 1; }
  .hero-copy { text-align: left; }
  .hero-copy .lead, .hero-wordmark { margin-left: 0; }
  .actions { justify-content: flex-start; }
  .palette, .outcomes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .type-row, .schema-list > div { gap: 4px; }
}
@media print {
  body { background: white; font-size: 11pt; }
  body::before, .masthead nav, .actions, .preview-toggle { display: none; }
  .wrap { width: 100%; }
  .chapter { margin-bottom: 28px; }
  .sheet, .case-card { break-inside: avoid; }
  .swatch { print-color-adjust: exact; }
}
.schema-example { border-top: 1px solid var(--line); padding-top: 10px; }
.schema-example pre { background: var(--cream); padding: 10px; overflow-x: auto; font-size: .84rem; }

.case-breakdown {
  margin-top: 28px;
  border-top: 1px solid var(--blue);
  padding-top: 14px;
  scroll-margin-top: 18px;
}
.decision-steps {
  list-style: decimal-leading-zero;
  padding-left: 2em;
  margin-block: 16px;
}
.decision-steps li {
  padding-left: .4em;
  margin-bottom: 12px;
}
.decision-steps li::marker {
  color: var(--red);
  font-weight: 700;
}
.case-example-title {
  font-size: clamp(1.25rem, 2.5vw, 1.9rem);
}
.method-steps { margin-block: 14px; }
#yamck-cover, #schema-example { scroll-margin-top: 18px; }
@media (min-width: 900px) {
  .method-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.case-evidence {
  margin-block: 12px;
  font-size: .95em;
}
.case-evidence dt {
  color: var(--red);
  font-weight: 700;
  margin-bottom: 4px;
}
.case-evidence dd { margin: 0; }

.example-gallery, .logo-task { scroll-margin-top: 18px; }
.example-gallery { margin: 22px 0; }
.gallery-controls:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 10px 0;
}
.gallery-controls .button {
  justify-content: center;
  min-width: 44px;
  padding-inline: 8px;
  cursor: pointer;
}
.gallery-controls .button:disabled {
  opacity: .42;
  cursor: default;
}
.gallery-status {
  min-width: 48px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.gallery-track {
  position: relative;
  display: flex;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  border: 1px solid var(--blue);
  background: var(--paper);
  margin: 0;
  padding: 0;
  list-style: none;
}
.gallery-slide {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  flex: 0 0 100%;
  scroll-snap-align: start;
}
.gallery-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--cream);
}
.gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-collage .gallery-image {
  background-color: var(--paper);
  background-image: var(--grid-image);
  background-size: 24px 24px;
}
.gallery-collage .gallery-image img { object-fit: contain; }
.gallery-caption { padding: clamp(14px, 4vw, 42px); }
.gallery-caption h4 { font-size: clamp(1.2rem, 2.4vw, 2rem); }
.logo-file-label {
  display: block;
  font-weight: 700;
  margin-top: 12px;
}
.logo-task input { max-width: 100%; font: inherit; }
#logo-status { margin-top: 8px; }
.logo-previews { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.logo-sample {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  min-height: 120px;
  padding: 12px 8px;
  border: 1px solid var(--line);
  background: var(--cream);
  text-align: center;
}
.logo-sample.dark { background: var(--ink); color: var(--paper); }
.logo-sample img { max-width: 100%; width: auto; max-height: 110px; }
.logo-sample img[hidden] { display: none; }
@media (max-width: 640px) {
  .gallery-slide { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; align-items: start; }
}
.logo-task input::file-selector-button {
  margin: 6px 8px 0 0;
  border: 1px solid var(--red);
  padding: 6px 9px;
  color: var(--ink);
  background: var(--paper);
  font: inherit;
  cursor: pointer;
}
