/* ==========================================================================
   ANTI-DESIGN — Build with it (Design Completion Campaign, 2026-09-29).
   The board is set the way the room's rule cards are: blocks dropped on the
   cream, each with its own column start and placed angle, one overlapping
   the next. Face is the room's own ("WorkSansX", declared in
   x-anti-design.css). Every class is gad- or scoped to .gm--anti-design.
   The page's "Straighten this page" (.nd-page--calm) and the board's own
   switch (#gad-calm) remove every transform.
   ========================================================================== */
.gm--anti-design {
  --gm-tag-inverse: var(--gm-color-ground);
  max-width: 1100px; margin: 110px auto 0; padding: 0 clamp(16px, 4vw, 48px);
  background: transparent; color: var(--gm-color-ink);
  font: 400 1.0625rem/1.5 var(--gm-font); font-synthesis: weight style;
}
.gm--anti-design .gm__head { display: block; max-width: 900px; margin-left: 12%; }
.gm--anti-design .gm__title { margin: 0 0 18px; font-size: clamp(46px, 9vw, 130px); line-height: 0.82; letter-spacing: -0.05em; font-weight: 900; color: var(--gm-color-blue); }
.gm--anti-design .gm__lede { font-size: 19px; font-weight: 500; max-width: 46ch; }
.gm--anti-design .gm__key, .gm--anti-design .gm__get { font-size: 15px; max-width: 60ch; margin-left: 8%; }
.gm--anti-design a { color: var(--gm-color-blue); text-decoration-thickness: 3px; text-underline-offset: 2px; }
.gm--anti-design a:hover { background: var(--gm-color-pink); color: var(--gm-color-ink); }
.gm--anti-design :focus-visible { outline: 4px dashed var(--gm-color-pink); outline-offset: 4px; }
.gm--anti-design .gm-t[data-g="record"] { background: var(--gm-color-blue); color: var(--gm-color-ground); border-color: var(--gm-color-blue); }
.gm--anti-design .gm-more summary { color: var(--gm-color-ink); }
.gad-cap { margin: 0.7rem 0 0; font-size: 14px; font-weight: 600; line-height: 1.4; }

/* ---- the field: twelve columns that exist only to be missed ---------- */
.gad-field { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 26px 18px; align-items: start; margin-top: 60px; }
.gad-f { position: relative; padding: 20px; border: 3px solid var(--gm-color-ink); background: #EFEDF3; }
.gad-f .gm-f__n { font-size: 44px; font-weight: 100; font-style: italic; line-height: 0.8; }
.gad-f .gm-f__name { font-size: 30px; font-weight: 900; letter-spacing: -0.03em; line-height: 1; }
.gad-f.gm-f--colour { grid-column: 1 / 7; transform: rotate(-1.5deg); }
.gad-f.gm-f--type { grid-column: 6 / 13; margin-top: 70px; background: var(--gm-color-lilac); }
.gad-f.gm-f--layout { grid-column: 2 / 7; margin-top: -30px; background: var(--gm-color-lime); transform: rotate(2deg); }
.gad-f.gm-f--shape { grid-column: 8 / 12; transform: rotate(-2.5deg); }
.gad-f.gm-f--img { grid-column: 3 / 10; background: var(--gm-color-ground); transform: rotate(1deg); }
.gad-f.gm-f--ui { grid-column: 1 / 13; margin-top: 30px; }
.gad-f.gm-f--motion { grid-column: 1 / 6; background: var(--gm-color-pink); transform: rotate(-2deg); }
.gad-f.gm-f--friction { grid-column: 6 / 13; margin-top: 50px; background: var(--gm-color-ink); color: #EFEDF3; }
.gad-f.gm-f--friction .gm-t[data-g="record"] { background: var(--gm-color-lime); color: var(--gm-color-ink); border-color: var(--gm-color-lime); }
.gad-f.gm-f--friction .gm-t[data-g="translation"] { color: var(--gm-color-lilac); }
.gad-f.gm-f--friction .gm-more summary, .gad-f.gm-f--friction .gm-f__note { color: #EFEDF3; }
.gad-f.gm-f--friction { --gm-tag-inverse: var(--gm-color-ink); }

/* 1 colour: swatches that overlap and refuse a row */
.gad-sws { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; }
.gad-sws li { width: 96px; height: 84px; display: flex; flex-direction: column; justify-content: flex-end; padding: 5px; margin: -6px 0 0 -8px; border: 2px solid var(--gm-color-ink); font-size: 12px; line-height: 1.25; }
.gad-sws li:nth-child(1) { margin-left: 0; }
.gad-sws li:nth-child(even) { transform: translateY(14px) rotate(6deg); }
.gad-sws li:nth-child(2), .gad-sws li:nth-child(3) { color: var(--gm-color-ground); }
.gad-sws code { font-size: 11px; }
.gad-f.gm-f--colour .gad-cap { margin-top: 24px; }

/* 2 type */
.gad-disp { margin: 0; font-size: clamp(34px, 4.6vw, 58px); line-height: 0.9; letter-spacing: -0.04em; }
.gad-disp b { font-weight: 900; }
.gad-disp i { font-weight: 100; }
.gad-row { margin: 18px 0 10px; font-size: 24px; font-weight: 800; }
.gad-row span { display: inline-block; }
.gad-row span:nth-child(2) { transform: translateY(12px); font-weight: 200; font-style: italic; }
.gad-row span:nth-child(3) { transform: translateY(-8px) rotate(-3deg); color: var(--gm-color-blue); }
.gad-row span:nth-child(4) { transform: translateY(18px); }
.gad-row span:nth-child(5) { transform: rotate(4deg); background: var(--gm-color-lime); padding: 0 4px; }
.gad-text { margin: 18px 0 0; font-size: 17px; }

/* 3 layout */
.gad-lay { position: relative; height: 150px; border: 3px solid var(--gm-color-ink); background: var(--gm-color-ground) repeating-linear-gradient(to right, transparent 0 calc(100% / 12 - 1px), rgba(23, 20, 27, 0.12) calc(100% / 12 - 1px) calc(100% / 12)); overflow: hidden; }
.gad-lay i { position: absolute; border: 2px solid var(--gm-color-ink); }
.gad-lay i:nth-child(1) { left: 6%; top: 14px; width: 38%; height: 44px; background: var(--gm-color-blue); transform: rotate(-4deg); }
.gad-lay i:nth-child(2) { left: 39%; top: 48px; width: 30%; height: 60px; background: var(--gm-color-pink); transform: rotate(3deg); }
.gad-lay i:nth-child(3) { left: 71%; top: 8px; width: 22%; height: 90px; background: var(--gm-color-lilac); }
.gad-lay i:nth-child(4) { left: 14%; top: 96px; width: 20%; height: 38px; background: var(--gm-color-ink); transform: rotate(-9deg); }
.gad-lay s { position: absolute; right: 10px; bottom: 2px; font-size: 38px; font-weight: 900; line-height: 1; text-decoration-color: var(--gm-color-pink); text-decoration-thickness: 5px; }

/* 4 shape */
.gad-tilts { display: flex; flex-wrap: wrap; gap: 16px; padding: 10px 0 4px; }
.gad-tilts span { display: grid; place-items: center; width: 64px; height: 64px; border: 3px solid var(--gm-color-ink); background: var(--gm-color-ground); font-weight: 800; transform: rotate(var(--t)); }
.gad-tilts span:last-child { background: var(--gm-color-ink); color: var(--gm-color-lime); text-shadow: 3px 0 var(--gm-color-pink), -3px 0 var(--gm-color-blue); clip-path: polygon(0 0, 100% 0, 100% 38%, 88% 42%, 100% 47%, 100% 100%, 0 100%); }

/* 5 imagery */
.gad-img { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 18px; align-items: center; }
.gad-pat { display: block; height: 120px; border: 3px solid var(--gm-color-ink); background: repeating-radial-gradient(circle at 30% 40%, var(--gm-color-ink) 0 3px, var(--gm-color-lime) 3px 7px), var(--gm-color-lime); }
.gad-stretch { display: grid; place-items: center; height: 70px; border: 3px solid var(--gm-color-ink); background: repeating-linear-gradient(90deg, var(--gm-color-blue) 0 18px, var(--gm-color-lilac) 18px 30px); color: var(--gm-color-ground); font-weight: 900; font-size: 24px; letter-spacing: 0.1em; transform: scaleX(1.18) translateX(6%); transform-origin: left center; }

/* 6 components */
.gad-nav { display: flex; flex-wrap: wrap; gap: 8px 30px; align-items: flex-start; padding: 10px 0 26px; }
.gad-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; font-weight: 800; font-size: 20px; }
.gad-nav a:nth-child(1) { transform: rotate(-3deg); }
.gad-nav a:nth-child(2) { transform: translateY(14px) rotate(2deg); }
.gad-nav a:nth-child(3) { transform: translateY(-6px); }
.gad-nav a:nth-child(4) { transform: translateY(22px) rotate(-1deg); }
.gad-nav a[aria-current] { background: var(--gm-color-lime); color: var(--gm-color-ink); text-decoration: none; }
.gad-ui { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: start; }
.gad-card { grid-column: 1 / 6; display: block; padding: 18px; border: 3px solid var(--gm-color-ink); background: var(--gm-color-lilac); color: var(--gm-color-ink); text-decoration: none; transform: rotate(-2deg); }
.gad-f .gad-card { color: var(--gm-color-ink); text-decoration: none; }
.gad-card b { display: block; font-size: 30px; font-weight: 900; letter-spacing: -0.03em; line-height: 1; }
.gad-card__k { display: inline-block; margin: 8px 0; padding: 3px 7px; background: var(--gm-color-blue); color: var(--gm-color-ground); font-size: 13px; font-weight: 800; }
.gad-card span:last-child { display: block; }
.gad-f .gad-card:hover { background: var(--gm-color-pink); }
.gad-form { grid-column: 6 / 12; margin-top: 40px; }
.gad-form label { display: block; margin: 0 0 4px 2rem; font-size: 22px; font-weight: 100; font-style: italic; }
.gad-form input { display: block; width: 100%; height: 2.75rem; padding: 0 12px; border: 3px solid var(--gm-color-ink); border-radius: 0; background: var(--gm-color-ground); color: var(--gm-color-ink); }
.gad-err { display: inline-block; margin: 8px 0 0; padding: 3px 8px; background: var(--gm-color-pink); color: var(--gm-color-ink); font-size: 15px; font-weight: 700; }
.gad-btn { display: block; margin: 22px 0 8px auto; min-height: 44px; padding: 0 18px; border: 3px solid var(--gm-color-ink); border-radius: 0; background: var(--gm-color-lime); color: var(--gm-color-ink); font-weight: 800; cursor: pointer; transform: rotate(-4deg); box-shadow: -8px 8px 0 var(--gm-color-pink); }
.gad-btn:hover { background: var(--gm-color-ink); color: var(--gm-color-lime); }
.gad-btn:active { transform: none; }

/* 7 motion: a weird cursor, a stepped flip */
.gad-mo { display: grid; place-items: center; height: 110px; border: 3px solid var(--gm-color-ink); background: var(--gm-color-ground); font-size: 24px; font-weight: 900;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Crect x='3' y='3' width='26' height='26' fill='%23D6FF3F' stroke='%2317141B' stroke-width='3' transform='rotate(18 16 16)'/%3E%3C/svg%3E") 16 16, crosshair; }
.gad-mo span { display: inline-block; transition: transform 0.5s steps(4); }
.gad-mo:hover span, .gad-mo:focus span { transform: rotate(180deg); }

/* 8 friction: the switch */
.gad-swatch { display: flex; align-items: center; gap: 12px; margin: 4px 0 0; }
.gad-swatch input { width: 28px; height: 28px; margin: 0; accent-color: var(--gm-color-lime); }
.gad-swatch label { font-size: 22px; font-weight: 800; color: var(--gm-color-lime); cursor: pointer; }

/* ---- straightened: the page's switch, or the board's own -------------- */
.nd-page--calm .gm--anti-design *, .gm--anti-design:has(#gad-calm:checked) * { transform: none !important; }
.nd-page--calm .gad-f, .gm--anti-design:has(#gad-calm:checked) .gad-f { grid-column: 1 / -1 !important; margin-top: 0 !important; }
.nd-page--calm .gm--anti-design .gm__head, .nd-page--calm .gm--anti-design .gm__key, .nd-page--calm .gm--anti-design .gm__get { margin-left: 0; }
.nd-page--calm .gad-nav a, .gm--anti-design:has(#gad-calm:checked) .gad-nav a { transform: none; }

@media (max-width: 900px) {
  .gm--anti-design .gm__head, .gm--anti-design .gm__key, .gm--anti-design .gm__get { margin-left: 0; }
  .gad-f, .gad-card, .gad-form { grid-column: 1 / -1 !important; margin-top: 0 !important; }
  .gad-form { margin-top: 10px !important; }
  .gad-img { grid-template-columns: 1fr; }
  .gad-stretch { transform: scaleX(1.08); }
}
@media (max-width: 480px) {
  .gad-f { padding: 16px; }
  .gad-sws li { width: 80px; height: 72px; }
  .gad-row { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { .gm--anti-design * { transition: none !important; animation: none !important; } }
