/* MidGuide main styles. Mobile first, RTL first. Patterns follow mockups.html. */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--navy);
  font-family: var(--he);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.mono { font-family: var(--mono); }
mark { background: linear-gradient(transparent 58%, var(--yellow) 58%); color: inherit; padding: 0 2px; }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* focus: Navy 2px, offset 3px, on every interactive element */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.skip { position: absolute; top: -60px; inset-inline-start: 16px; background: var(--white); border: 2px solid var(--navy); border-radius: var(--r-pill); padding: 8px 16px; font-weight: 700; z-index: 10; text-decoration: none; }
.skip:focus { top: 8px; }

.wrap { width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
main { flex: 1 0 auto; }

/* under construction strip, shared across the four sites (Eyal, 1.11.2026) */
.wip-strip{
  display:flex;align-items:center;justify-content:center;gap:10px;
  padding:8px 16px;
  background:#FFE94A;color:#1B2D6B;
  border-bottom:2px dashed #1B2D6B;
  font:500 14px/1.45 "Heebo","Poppins",system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  text-align:center;
}
.wip-strip strong{font-weight:700}
.wip-strip svg{width:22px;height:22px;flex:none;transform-origin:50% 90%}
@media (prefers-reduced-motion: no-preference){
  .wip-strip svg{animation:wip-wobble 4s ease-in-out infinite}
  @keyframes wip-wobble{
    0%,80%,100%{transform:rotate(0)}
    85%{transform:rotate(-8deg)}
    90%{transform:rotate(7deg)}
    95%{transform:rotate(-4deg)}
  }
}
@media print{.wip-strip{display:none}}

/* header */
.hdr { background: var(--white); border-bottom: 1.5px dashed var(--line); }
.hdr .wrap { display: flex; flex-direction: column; }
.hdr-top { height: 52px; display: flex; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 8px; direction: ltr; text-decoration: none; color: var(--navy); border-radius: 8px; }
.brand img, .brand svg { width: 28px; height: 28px; flex: none; }
.word { font-family: var(--en); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; line-height: 1; white-space: nowrap; }
.word small { font-weight: 500; font-size: 12.5px; color: var(--ink); letter-spacing: 0; margin-left: 5px; }
.nav { height: 42px; display: flex; align-items: stretch; gap: 22px; }
.nav a { display: flex; align-items: center; font-size: 15px; font-weight: 500; color: var(--navy); text-decoration: none; border-bottom: 3px solid transparent; padding-top: 3px; }
.nav a[aria-current="page"] { font-weight: 700; border-bottom-color: var(--coral); }
.nav a:hover { border-bottom-color: var(--line); }
.nav a[aria-current="page"]:hover { border-bottom-color: var(--coral); }

/* page heads */
.page { padding-top: 14px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 12px; }
h1 { font-size: 22px; line-height: 1.25; font-weight: 800; }
h2 { font-size: 16.5px; line-height: 1.3; font-weight: 700; }
.sub { color: var(--ink); font-size: 14px; line-height: 1.5; margin-top: 4px; max-width: 70ch; }
.p { font-size: 14.5px; line-height: 1.55; max-width: 72ch; }
.back { font-size: 14px; font-weight: 500; color: var(--navy); text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 5px; align-self: flex-start; border-radius: 4px; }
.link { color: var(--navy); font-weight: 500; text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 4px; border-radius: 4px; }
.sec { display: flex; flex-direction: column; gap: 6px; }

/* image slots: real image or flat brand placeholder art, corners 0 */
.art { position: relative; overflow: hidden; background: var(--mist); width: 100%; }
.art > svg.ph { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.art > img { width: 100%; height: 100%; object-fit: cover; }
.art.contain > img { object-fit: contain; }
.cap { position: absolute; bottom: 8px; inset-inline-start: 8px; background: var(--white); color: var(--navy); font-size: 11px; font-weight: 500; line-height: 1; padding: 4px 8px; border-radius: var(--r-pill); border: 1px solid var(--navy); white-space: nowrap; display: flex; gap: 4px; align-items: center; }
.cap svg.i { width: 12px; height: 12px; stroke-width: 2.2; }
/* illustration badge: images made in Higgsfield, not real Midjourney results (source "illustration") */
.badge-illus { position: absolute; bottom: 8px; inset-inline-start: 8px; background: rgba(255, 255, 255, 0.9); color: var(--navy); font-size: 11px; font-weight: 700; line-height: 1; padding: 4px 8px; border-radius: var(--r-pill); border: 1px dashed var(--navy); white-space: nowrap; pointer-events: auto; }
.thumbs .badge-illus { font-size: 10px; padding: 3px 6px; bottom: 5px; inset-inline-start: 5px; }
.illus-note { font-size: 13px; line-height: 1.5; color: var(--ink); max-width: 72ch; }
.illus-note b { color: var(--navy); font-weight: 700; }
.illus-note .ltr, .cmp-method .flag { white-space: nowrap; }
.cfig { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.cfig .illus-note { background: var(--white); border: 1.5px dashed var(--line); border-radius: var(--r-field); padding: 8px 12px; }
.art.missing { display: flex; align-items: center; justify-content: center; padding: 12px; border: 1.5px dashed var(--line); background: var(--white); }
.art.missing p { font-size: 13px; color: var(--ink); text-align: center; line-height: 1.4; }
.art.missing b { display: block; color: var(--navy); font-size: 14px; }

/* controls */
.controls { display: flex; flex-direction: column; gap: 10px; }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld-label { font-size: 13.5px; font-weight: 500; }
.input { height: 42px; border: 1.5px solid var(--ink); border-radius: var(--r-field); background: var(--white); display: flex; align-items: center; gap: 8px; padding: 0 14px; color: var(--ink); }
.input:focus-within { border: 2px solid var(--navy); outline: 2px solid var(--navy); outline-offset: 3px; padding: 0 13.5px; }
.input input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 15px; color: var(--navy); height: 100%; }
.input input::placeholder { color: var(--ink); opacity: 1; }
.input input:focus-visible { outline: none; }
.input input::-webkit-search-cancel-button { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips .k { font-size: 13px; font-weight: 700; margin-left: 2px; }
.chip { min-height: 30px; display: inline-flex; align-items: center; gap: 6px; padding: 0 13px; border: 1.5px dashed var(--navy); border-radius: var(--r-pill); font-size: 13.5px; font-weight: 500; background: var(--white); color: var(--navy); white-space: nowrap; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--yellow); border-style: solid; font-weight: 700; }
.chip:hover { border-style: solid; }
.ghost { background: transparent; border: 0; padding: 4px 2px; font-size: 13.5px; font-weight: 500; color: var(--navy); text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 5px; cursor: pointer; border-radius: 4px; }
.meta-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; color: var(--ink); font-weight: 500; }

/* tags */
.tags { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.tag { display: inline-flex; align-items: center; gap: 4px; min-height: 23px; padding: 0 8px; border: 1.5px dashed var(--line); border-radius: var(--r-pill); font-size: 12.5px; font-weight: 500; background: var(--white); color: var(--navy); white-space: nowrap; }
.tag.ver { border-color: var(--navy); border-style: solid; font-weight: 700; direction: ltr; unicode-bidi: isolate; }
.tag.old { border-color: var(--navy); }
.tag.old svg.i { width: 14px; height: 14px; color: var(--coral); }
.tag.pending { border-color: var(--ink); color: var(--ink); }
.tag.pending svg.i { width: 14px; height: 14px; }
.tag.soft { color: var(--ink); }
a.tag { text-decoration: none; border-color: var(--navy); }
a.tag:hover { border-style: solid; }
.tag code { padding: 0 5px; font-size: 11.5px; }

/* buttons */
.btn { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 18px; border: 2px solid var(--navy); border-radius: var(--r-pill); background: var(--white); font-family: var(--he); font-size: 14.5px; font-weight: 700; color: var(--navy); white-space: nowrap; cursor: pointer; text-decoration: none; }
.btn svg.i { width: 17px; height: 17px; }
.btn.primary { background: var(--navy); color: var(--white); }
.btn.copy.ok { background: var(--success-tint); color: var(--success); border-color: var(--success); }

/* library grid and cards */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; list-style: none; }
.grid > li { display: flex; min-width: 0; }
.grid > li > .card { flex: 1; }
.related, .thumbs, .entries, .steps, .cgrid { list-style: none; }
.card { background: var(--white); border: 2px dashed var(--navy); border-radius: var(--r-card); padding: 6px; display: flex; flex-direction: column; min-width: 0; text-decoration: none; color: var(--navy); }
.card:hover { border-style: solid; }
.card .art { aspect-ratio: 4 / 3; }
.card-b { padding: 7px 4px 4px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.card .type { font-size: 12px; color: var(--ink); font-weight: 500; }
.card .t { font-size: 14px; font-weight: 700; line-height: 1.3; }
.card .m { font-size: 12px; color: var(--ink); }
.card .tags { margin-top: auto; padding-top: 5px; }

/* states */
.state-box { background: var(--white); border: 2px dashed var(--navy); border-radius: var(--r-card); padding: 24px 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.state-box h2 { display: flex; gap: 8px; align-items: center; }
.state-box p { color: var(--ink); font-size: 14.5px; }
.state-box.err { border-color: var(--error); }
.state-box.err h2 svg.i { color: var(--error); }
.loading { color: var(--ink); font-size: 14px; padding: 24px 0; }

/* item pages */
.item-head { display: flex; flex-direction: column; gap: 8px; }
.item-grid { display: flex; flex-direction: column; gap: 16px; }
.item-grid > .col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.media { display: flex; flex-direction: column; gap: 8px; }
.media .hero { aspect-ratio: var(--ar, 4 / 5); max-height: 60vh; }
.media .hero > img { object-fit: contain; }
.thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.thumbs .art { aspect-ratio: 1 / 1; }
.thumbs .cap { font-size: 10px; padding: 3px 6px; bottom: 5px; inset-inline-start: 5px; }
.pblock { background: var(--white); border: 1.5px solid var(--ink); border-radius: var(--r-field); overflow: hidden; }
.pblock-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 6px 6px 6px; padding-inline-start: 12px; }
.pblock-h h2, .pblock-h h3 { font-size: 15px; font-weight: 700; }
.ptext { font-family: var(--mono); padding: 10px 12px; font-size: 13px; line-height: 1.6; direction: ltr; text-align: left; unicode-bidi: isolate; overflow-wrap: anywhere; white-space: pre-wrap; background: var(--mist); color: var(--navy); }
.ptext .flag, .ex .flag { white-space: nowrap; }
.copy-help { display: flex; gap: 6px; align-items: center; font-size: 13.5px; font-weight: 500; color: var(--error); padding: 8px 12px; border-top: 1.5px dashed var(--line); }
.copy-help svg.i { width: 16px; height: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { border-bottom: 1.5px dashed var(--line); padding: 7px 2px; text-align: right; vertical-align: middle; }
th { font-size: 12.5px; color: var(--ink); font-weight: 500; }
td.pc { width: 1%; padding-left: 12px; }
td.pc a { text-decoration: none; border-radius: 8px; display: inline-block; }
td .note { display: block; font-size: 12.5px; color: var(--ink); }
td .none { color: var(--ink); }
code { font-family: var(--mono); font-size: 12.5px; background: var(--mist); color: var(--navy); border-radius: 8px; padding: 2px 7px; direction: ltr; unicode-bidi: isolate; display: inline-block; overflow-wrap: anywhere; white-space: normal; }
td.pc code { white-space: nowrap; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.related { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mini { display: flex; gap: 8px; align-items: center; background: var(--white); border: 1.5px dashed var(--navy); border-radius: var(--r-field); padding: 6px; text-decoration: none; color: var(--navy); min-width: 0; }
.mini:hover { border-style: solid; }
.mini .art { width: 44px; height: 44px; flex: none; }
.mini b { font-size: 13px; line-height: 1.3; min-width: 0; }

/* workflow */
.steps { display: flex; flex-direction: column; gap: 12px; list-style: none; }
.step { background: var(--white); border: 2px dashed var(--navy); border-radius: var(--r-card); padding: 12px; display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.step-h { display: flex; align-items: center; gap: 8px; }
.num { width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: var(--white); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: none; }
.step-body { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.step-main { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.step-body > .art { order: 2; }
.step-body > .tip { order: 3; }
.step .art { aspect-ratio: var(--ar, 16 / 9); max-height: 420px; max-width: calc(420px * (var(--ar, 16 / 9))); margin-inline: auto; }
.step .pblock-h h3 { font-size: 14px; }
.tip { font-size: 13.5px; border-right: 3px solid var(--coral); padding-right: 8px; }
.result .art { aspect-ratio: var(--ar, 16 / 9); max-height: 72vh; max-width: calc(72vh * (var(--ar, 16 / 9))); margin-inline: auto; }

/* glossary */
.entries { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.entry { background: var(--white); border: 2px dashed var(--navy); border-radius: var(--r-card); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; scroll-margin-top: 16px; }
.entry:target { border-style: solid; box-shadow: none; outline: 3px solid var(--yellow); outline-offset: 2px; }
.entry-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pn-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.pn { font-family: var(--mono); font-size: 16px; font-weight: 700; direction: ltr; unicode-bidi: isolate; }
.al { font-size: 12.5px; color: var(--ink); }
.entry-h b { font-size: 15px; white-space: nowrap; }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.kv div { border: 1.5px dashed var(--line); border-radius: var(--r-field); padding: 5px 8px; font-size: 13px; line-height: 1.35; min-width: 0; overflow-wrap: anywhere; }
.kv b { display: block; font-size: 11.5px; color: var(--ink); font-weight: 500; }
.ex { font-family: var(--mono); font-size: 12.5px; padding: 7px 10px; background: var(--mist); border-radius: 8px; direction: ltr; text-align: left; unicode-bidi: isolate; overflow-wrap: anywhere; }
.state { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; background: var(--mist); color: var(--navy); border-radius: var(--r-pill); padding: 4px 12px 4px 10px; }
.state svg.i { width: 16px; height: 16px; }

/* compare */
.cgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; list-style: none; }
.cell { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cell .art { aspect-ratio: var(--ar, 1 / 1); }
.cell > span { font-family: var(--mono); font-size: 13px; text-align: center; direction: ltr; unicode-bidi: isolate; font-weight: 700; }
.cgrid.mixed { align-items: start; }
.glink { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-size: 13.5px; font-weight: 700; min-height: 32px; }
.glink svg.i { width: 16px; height: 16px; color: var(--coral); }
.cmp-switch { display: flex; flex-direction: column; gap: 8px; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1.5px dashed var(--line); }
.cmp-switch .k { font-size: 13px; font-weight: 700; color: var(--navy); }
.cmp-switch .chips { list-style: none; }
.cmp-switch .chip { min-height: 36px; text-decoration: none; }
.cmp-switch .chip code { background: none; padding: 0; font-size: 13px; color: inherit; }
.cmp-switch .chip[aria-current="page"] { background: var(--yellow); border-style: solid; font-weight: 700; }
.cmp-switch .chip[aria-current="page"] code { font-weight: 700; }
.cmp-body { display: flex; flex-direction: column; gap: 12px; }
.cmp-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.cmp-h .flag { font-family: var(--mono); font-size: 0.85em; color: var(--coral); }

/* about */
.prose { display: flex; flex-direction: column; gap: 22px; max-width: 760px; }
.prose .sec p + p { margin-top: 6px; }
.notice { background: var(--white); border: 2px dashed var(--navy); border-radius: var(--r-card); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ink); }
.notice b { color: var(--navy); }
.notice .en { direction: ltr; text-align: left; unicode-bidi: isolate; font-size: 13.5px; }
.who { display: flex; gap: 16px; align-items: flex-start; }
.who img { width: 112px; height: 112px; object-fit: cover; object-position: 50% 50%; border-radius: 50%; border: 2px dashed var(--navy); padding: 3px; background: var(--white); flex: none; }
.who > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ilist { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ilist li { font-size: 14.5px; line-height: 1.5; padding-inline-start: 18px; position: relative; }
.ilist li::before { content: ""; position: absolute; inset-inline-start: 0; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }

/* footer with the legal notice, on every page */
.foot { margin-top: 32px; background: var(--white); border-top: 1.5px dashed var(--line); padding: 22px 0 28px; font-size: 13.5px; color: var(--ink); }
.foot .wrap { display: flex; flex-direction: column; gap: 14px; }
.foot .brand { margin-bottom: 8px; }
.foot p + p { margin-top: 2px; }
.foot p .ltr, .notice p .ltr, .sub .ltr { white-space: nowrap; }
.foot .en { direction: ltr; unicode-bidi: isolate; text-align: right; }
.foot nav { display: flex; gap: 24px; }
.foot nav a { color: var(--navy); font-weight: 500; text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 5px; border-radius: 4px; }

/* tablet */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .related { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .entries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* desktop */
@media (min-width: 1024px) {
  body { font-size: 16px; }
  .hdr .wrap { flex-direction: row; align-items: center; justify-content: space-between; height: 72px; }
  .hdr-top { height: auto; }
  .brand img, .brand svg { width: 34px; height: 34px; }
  .word { font-size: 22px; }
  .word small { font-size: 14px; }
  .nav { height: 72px; gap: 36px; }
  .nav a { font-size: 16px; }

  .page { padding-top: 36px; gap: 20px; }
  h1 { font-size: 36px; line-height: 1.2; }
  .lib h1 { font-size: 44px; }
  h2 { font-size: 20px; }
  .sub { font-size: 19px; margin-top: 6px; }
  .p { font-size: 16px; }

  .controls { display: grid; grid-template-columns: 420px minmax(0, 1fr); grid-template-areas: "search type" "use use"; column-gap: 28px; row-gap: 14px; align-items: end; }
  .controls .c-search { grid-area: search; }
  .controls .c-type { grid-area: type; min-height: 52px; }
  .controls .c-use { grid-area: use; }
  .input { height: 52px; }
  .input input { font-size: 16px; }
  .chip { min-height: 38px; font-size: 15px; padding: 0 16px; }
  .chips .k { font-size: 15px; }
  .ghost { font-size: 15px; }
  .meta-line { font-size: 14px; }

  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
  .card { padding: 12px; }
  .card-b { padding: 12px 6px 4px; gap: 5px; }
  .card .t { font-size: 18px; }
  .card .type, .card .m { font-size: 13.5px; }
  .card .cap { font-size: 11.5px; }

  .item-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: start; }
  .item-grid > .col { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
  .media { position: sticky; top: 24px; }
  .media .hero { max-height: 640px; }
  .item-head h1 { font-size: 40px; }
  .ptext { font-size: 14px; }
  table { font-size: 15px; }
  .item-grid .related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini .art { width: 56px; height: 56px; }
  .mini b { font-size: 14.5px; }

  .wf { max-width: 980px; }
  .result .art { max-height: 540px; max-width: calc(540px * (var(--ar, 16 / 9))); }
  .who img { width: 160px; height: 160px; }
  .step { padding: 18px 20px; gap: 12px; }
  .step-body.has-img { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-areas: "main img" "tip img"; column-gap: 20px; row-gap: 10px; align-items: start; }
  .step-body.has-img > .step-main { grid-area: main; }
  .step-body.has-img > .art { grid-area: img; }
  .step-body.has-img > .tip { grid-area: tip; }
  .num { width: 32px; height: 32px; font-size: 15px; }
  .tip { font-size: 14.5px; }

  .entries { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .cgrid { gap: 20px; }
  .cmp { max-width: 980px; }

  .foot { margin-top: 48px; padding: 26px 0 32px; font-size: 14px; }
  .foot .wrap { flex-direction: row; justify-content: space-between; align-items: flex-start; gap: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- v2 phase 1: three axes, techniques, video, version table ---------- */
code.ic { font-size: 0.86em; padding: 1px 6px; white-space: nowrap; vertical-align: baseline; }
.axes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.axis { display: flex; flex-direction: column; gap: 3px; background: var(--white); border: 2px dashed var(--navy); border-radius: var(--r-field); padding: 10px 10px 9px; text-decoration: none; color: var(--navy); min-width: 0; }
.axis:hover { border-style: solid; }
.axis[aria-current="page"] { background: var(--yellow); border-style: solid; }
.axis svg.i { width: 22px; height: 22px; color: var(--coral); }
.axis[aria-current="page"] svg.i { color: var(--navy); }
.axis b { font-size: 16px; font-weight: 800; line-height: 1.2; }
.axis span { font-size: 12px; line-height: 1.35; color: var(--ink); }
.axis[aria-current="page"] span { color: var(--navy); }

.tech, .motion { display: flex; flex-direction: column; gap: 18px; max-width: 980px; }
.ba { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.ba-list { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.ba-p { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ba-l { align-self: flex-start; font-size: 13px; font-weight: 700; background: var(--white); border: 1.5px solid var(--navy); border-radius: var(--r-pill); padding: 3px 10px; }
.ba .art { --mh: 62vh; aspect-ratio: var(--ar, 1 / 1); max-height: var(--mh); max-width: calc(var(--mh) * (var(--ar, 1 / 1))); margin-inline: auto; }
.ba .illus-note { background: var(--white); border: 1.5px dashed var(--line); border-radius: var(--r-field); padding: 8px 12px; }
.tsteps { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.tsteps > li { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.tstep-b { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; padding-top: 2px; }
.tsteps .pblock-h h3 { font-size: 14px; }
.mistake .p { border-right: 3px solid var(--coral); padding-right: 10px; }
.srcs ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.srcs li { font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }

.compat-sec { gap: 10px; }
.ctable { overflow-x: auto; background: var(--white); border: 2px dashed var(--navy); border-radius: var(--r-card); padding: 4px 8px; }
table.compat { font-size: 13px; min-width: 330px; }
table.compat th, table.compat td { padding: 7px 3px; vertical-align: top; }
table.compat thead th { font-size: 12.5px; font-weight: 700; color: var(--navy); }
table.compat th.fc { text-align: right; width: 34%; }
table.compat th.fc .fcodes { display: flex; flex-wrap: wrap; gap: 3px; }
table.compat th.fc code { font-size: 11.5px; padding: 1px 6px; white-space: nowrap; }
table.compat .fn { display: block; font-size: 12px; font-weight: 500; color: var(--ink); margin-top: 3px; line-height: 1.3; }
table.compat .fn sup a { color: var(--navy); font-weight: 700; text-decoration: none; padding: 0 2px; }
table.compat .vc { text-align: center; white-space: nowrap; }
table.compat td.cc { text-align: center; font-size: 12.5px; font-weight: 700; line-height: 1.25; }
table.compat td.cc svg.i { width: 16px; height: 16px; display: block; margin: 0 auto 2px; }
table.compat td.cc small { display: block; font-size: 11px; font-weight: 500; color: var(--ink); margin-top: 2px; }
table.compat td.yes svg.i { color: var(--success); }
table.compat td.no svg.i { color: var(--error); }
table.compat td.unk { color: var(--ink); }
table.compat tbody tr:last-child th, table.compat tbody tr:last-child td { border-bottom: 0; }
.cnotes { padding-inline-start: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--ink); line-height: 1.5; }
.cnotes li { scroll-margin-top: 16px; }
.cnotes li:target { background: var(--yellow); color: var(--navy); }
.cnotes code { font-size: 11px; padding: 1px 5px; }

.vparams { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.vparams > div { background: var(--white); border: 1.5px dashed var(--navy); border-radius: var(--r-field); padding: 9px 12px; display: flex; flex-direction: column; gap: 4px; }
.vparams dt code { font-size: 13px; font-weight: 700; white-space: nowrap; }
.vparams dd { font-size: 14px; line-height: 1.5; }
.gh { font-size: 15.5px; font-weight: 800; margin-top: 6px; }
.vocab { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.vterm { background: var(--white); border: 2px dashed var(--navy); border-radius: var(--r-card); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.vterm-b { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vt { align-self: flex-start; font-size: 13.5px; font-weight: 700; white-space: normal; }
.clip { aspect-ratio: var(--ar, 16 / 9); max-height: 56vh; max-width: calc(56vh * (var(--ar, 16 / 9))); margin-inline: auto; border-radius: 12px; }
.clip video { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--mist); }
.clip-btn { position: absolute; top: 8px; inset-inline-end: 8px; display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 11px; border: 1.5px solid var(--navy); border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.92); font-size: 12.5px; font-weight: 700; color: var(--navy); cursor: pointer; }
.clip-btn svg.i { width: 15px; height: 15px; }
.clip.noplay .clip-btn { display: none; }

@media (min-width: 640px) {
  .ba-list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .ba-3 .ba-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ba .art { --mh: 480px; }
  .vparams { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vocab { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  table.compat { font-size: 14px; }
}
@media (min-width: 1024px) {
  .axes { gap: 16px; }
  .axis { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 10px; padding: 14px 18px; }
  .axis b { font-size: 20px; }
  .axis span { flex-basis: 100%; font-size: 14px; }
  .tech h1, .motion h1 { font-size: 40px; }
  .ba .art { --mh: 520px; }
  .vocab { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vocab.clips { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .gh { font-size: 18px; }
  table.compat td.cc { font-size: 13.5px; }
}
