/* ===== z10 phone base (shared homes + inners) =====
   Root fixes for iPhone Safari. Do NOT use display:contents on sticky ancestors.
   Pair with HTML that uses header.z10-pin + .z10-tools (see apply_z10_phone_chrome.py).
*/

html{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}
*,*::before,*::after{box-sizing:border-box}
html,body{max-width:100%}

/* Beat style-ja6 / home overflow-x:clip on html,body (that pair breaks sticky on iOS) */
html,body{overflow-x:visible!important;overflow-y:visible!important}
main,.z10-tools,.hero-stage,.hero,.page-hero,.table-wrap{overflow-x:clip}
img,svg,video,canvas{max-width:100%;height:auto}
table{max-width:100%}

/* Flex/grid children must be allowed to shrink below content size */
.wrap,.site-inner,.hero-stage,.hero-copy,.hero-visual,.hero,.actions,.tiles,.act,.tile,
.scard,.cc,.cats-grid > *,.store-grid > *,.z10-tools,.z10-pin,
header.site .wrap,header.site-head .wrap,main,main > *{
  min-width:0;
  max-width:100%;
}

/* ----- Unified slim pin bar (real sticky element, not display:contents) ----- */
header.z10-pin{
  position:sticky;
  top:0;
  z-index:50;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-height:56px;
  max-height:64px;
  padding:8px 14px;
  box-sizing:border-box;
  width:100%;
  background:var(--z-header, var(--header, var(--card, #fff)));
  color:var(--z-header-ink, var(--header-ink, var(--ink, #111)));
  border-bottom:1px solid var(--z-line, var(--line, #ddd));
  box-shadow:0 6px 18px rgba(0,0,0,.06);
  overflow:hidden;
}
header.z10-pin{
  flex-wrap:nowrap;
}
header.z10-pin .brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  flex:1 1 0;
  text-decoration:none;
  color:inherit;
  overflow:hidden;
}
header.z10-pin .brand small{display:none}
header.z10-pin .brand b,
header.z10-pin .brand strong{
  font-size:14px;
  line-height:1.2;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:100%;
}
header.z10-pin .brand .mk,
header.z10-pin .brand .mark{
  width:34px;height:34px;flex:0 0 auto;border-radius:10px;
  display:grid;place-items:center;
}
header.z10-pin .tools,
header.z10-pin .slim-tools{
  display:flex;align-items:center;gap:6px;flex:0 0 auto;flex-wrap:nowrap;
}
header.z10-pin .tools .tt,
header.z10-pin .slim-tools .tt,
header.z10-pin .tools summary,
header.z10-pin .slim-tools summary{
  min-width:40px;min-height:40px;
}

/* Tools block under the pin: search, chips, deferred util — NEVER sticky */
.z10-tools{
  display:block;
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  padding:16px 14px 12px;
  margin:0;
  background:var(--z-header, var(--header, var(--card, #0f1218)));
  border-bottom:1px solid var(--z-line, var(--line, #2a2f38));
  position:static;
}
.z10-tools > * + *{margin-top:10px} /* ≥8px gap between adjacent blocks */
.z10-tools .nav,
.z10-tools nav.nav,
.z10-tools nav.cats,
.z10-tools nav.hnav{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:0;
  padding:0;
  position:static;
}
.z10-tools .nav a,
.z10-tools .chip,
.z10-tools nav a{
  min-height:40px;
  display:inline-flex;
  align-items:center;
  padding:8px 12px;
  box-sizing:border-box;
}

/* Phone: collapse the old util strip (moved into tools or hidden) */
@media (max-width:700px){
  body.home-z10 > .util,
  body.inner-z10 > .util,
  body.ja6 > .util,
  body.intl > .util,
  .z10-tools .util .u-msg,
  .z10-tools .util > .wrap > span:first-child{
    /* long tagline eats the first screen on phones */
  }
  body.home-z10 > .util,
  body.inner-z10 > .util,
  body > .util:not(.util--kept){
    display:none!important;
  }
  /* Anchors clear the 56px pin */
  [id], h1, h2, h3, section[id]{scroll-margin-top:72px}

  /* Hero / cards: never paint past the viewport */
  .hero-stage,.hero-visual,.hero-copy,.hero,
  section.hero,.page-hero{
    max-width:100%!important;
    width:100%!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
  .hero-stage img,.hero-visual img,.hero img{
    max-width:100%!important;
    width:100%!important;
    height:auto!important;
    display:block;
  }
  .hero-copy h1,.hero h1,.page-hero h1{
    max-width:100%!important;
    overflow-wrap:anywhere;
    word-break:normal;
  }

  /* Featured / data tables → stacked cards (no 640px min-width scroll trap) */
  .table-wrap,
  .tw,.mt-w,.mt-scroll,.table-scroll{
    overflow:visible!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
    width:100%!important;
    max-width:100%!important;
  }
  table.feat,
  table.mt-cards,
  .table-wrap > table,
  .tw > table{
    display:block!important;
    min-width:0!important;
    width:100%!important;
    border-collapse:separate!important;
    border-spacing:0!important;
  }
  table.feat thead,
  table.mt-cards thead,
  .table-wrap > table thead{
    display:none!important;
  }
  table.feat tbody,
  table.mt-cards tbody,
  .table-wrap > table tbody{
    display:block!important;
    width:100%!important;
  }
  table.feat tr,
  table.mt-cards tr,
  .table-wrap > table tr{
    display:block!important;
    width:100%!important;
    box-sizing:border-box!important;
    border:1px solid var(--z-line, var(--line, #2E333B))!important;
    border-radius:12px!important;
    padding:12px 14px!important;
    margin:0 0 10px!important;
    background:var(--z-card, var(--elev, var(--card, #1C212B)))!important;
    height:auto!important;
    min-height:0!important;
  }
  table.feat td,
  table.feat th,
  table.mt-cards td,
  table.mt-cards th,
  .table-wrap > table td,
  .table-wrap > table th{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    border:0!important;
    padding:2px 0!important;
    height:auto!important;
    white-space:normal!important;
    overflow:visible!important;
    box-sizing:border-box!important;
  }
  table.feat td.store,
  table.feat .store{
    font-weight:800;
    font-size:15px;
    margin-bottom:4px;
  }
  table.feat .stag,
  table.feat .tag,
  table.feat .mk,
  table.feat .verdict{
    display:inline-flex!important;
    max-width:100%!important;
    white-space:normal!important;
    overflow:visible!important;
    margin:4px 0!important;
  }

  /* CJK action / category cards: one comfortable column under 400px, keep phrases readable */
  .actions,.tiles{
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
  }
  .act .body,.act .phrase,.act b,
  .cc b,.cc span,.cats-grid .cc b{
    overflow-wrap:break-word;
    word-break:normal;          /* not keep-all: avoid 2–3 char forced lines */
    line-break:strict;
    hyphens:none;
    font-size:13px;
    line-height:1.35;
  }
  @media (max-width:400px){
    .actions{grid-template-columns:1fr!important}
    .act .phrase,.act b{font-size:14px;white-space:normal}
  }

  /* Kill leftover after8 display:contents rules if any sheet still has them */
  header.site,
  header.site-head,
  header.site > .wrap,
  header.site > .site-inner,
  header.site-head > .wrap{
    /* when HTML still has old header (pre-transform), fall back: make whole header NOT sticky and pin via .z10-pin only */
  }
}

/* Desktop: pin bar looks like a normal header strip; tools sit beside/under naturally */
@media (min-width:701px){
  header.z10-pin{
    max-height:none;
    min-height:64px;
    padding:10px 20px;
    box-shadow:none;
  }
  header.z10-pin .brand small{display:block;opacity:.85;font-size:11.5px;font-weight:500}
  .z10-tools{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:12px;
    padding:10px 20px 14px;
    max-width:1120px;
    margin:0 auto;
    border-bottom:1px solid var(--z-line, var(--line, #ddd));
    background:transparent;
  }
  .z10-tools > * + *{margin-top:0}
  .z10-tools .searchband{flex:1 1 320px;margin:0}
  .z10-tools .nav,.z10-tools nav.cats,.z10-tools nav.hnav{flex:1 1 auto}
}

/* Adjacent-block floor: chips/nav never flush against the pin */
.z10-tools{
  padding-top:12px;
}


/* Compact featured-store cards on phones: hide 直接/転送 cols, inline rank+store */
@media (max-width:700px){
  table.feat thead, table.feat thead tr{display:none!important;height:0!important;padding:0!important;margin:0!important;border:0!important}
  table.feat tbody tr{
    display:grid!important;
    grid-template-columns:auto 1fr;
    grid-template-areas:
      "rank store"
      "verdict verdict"
      "note note";
    gap:4px 10px;
    padding:12px 14px!important;
    align-items:center;
  }
  table.feat tbody td{
    display:block!important;
    width:auto!important;
    padding:0!important;
    border:0!important;
  }
  table.feat tbody td:nth-child(1){grid-area:rank;font-weight:800;opacity:.7;font-variant-numeric:tabular-nums}
  table.feat tbody td.store, table.feat tbody td:nth-child(2){grid-area:store;font-weight:800;font-size:15px}
  table.feat tbody td:nth-child(3){grid-area:verdict}
  table.feat tbody td:nth-child(4),
  table.feat tbody td:nth-child(5){display:none!important} /* 直接 / 転送 */
  table.feat tbody td:nth-child(6){grid-area:note;font-size:13px;color:var(--muted, #9aa3ad);line-height:1.45}
  table.feat .stag, table.feat .tag, table.feat .mk{
    max-width:100%!important;white-space:normal!important;line-height:1.3;
  }
}

.z10-tools > a:not(.chip):not(.brand){
  display:inline-flex;align-items:center;min-height:40px;
  font-weight:700;text-decoration:underline;text-underline-offset:2px;
  color:var(--util-link, var(--z-lead, #C9892E));
  margin:0 0 4px;
}


@media (max-width:700px){
  /* JA home: category chip row is desktop/tablet only (too many chips on phones) */
  body.home-z10 .z10-tools nav.cats{display:none!important}
  /* space between Guia link and chip row */
  body.home-z10 .z10-tools > a + .nav-wrap,
  body.home-z10 .z10-tools > a + nav,
  .z10-tools .nav-wrap{margin-top:10px}
  .z10-tools > a:not(.chip){margin-bottom:2px}
  /* content below pin shouldn't hug the sticky bar when it scrolls up */
  body.z10-phone main, body.z10-phone .z10-tools + main, body.z10-phone .z10-tools + .wrap{
    padding-top:8px;
  }
}


/* Guia / util links: meet 4.5:1 on light cards */
.z10-tools > a:not(.chip):not(.brand){
  color:#8A5A12!important; /* ~brown on light */
}
html[data-theme="dark"] .z10-tools > a:not(.chip):not(.brand),
html:not([data-theme="light"]) .z10-tools > a:not(.chip):not(.brand){
  color:#E0B36A!important;
}
@media (prefers-color-scheme: light){
  html:not([data-theme="dark"]) .z10-tools > a:not(.chip):not(.brand){color:#8A5A12!important}
}
/* z10-tools: no "painted box" false edge — transparent bg on phone, content has own surfaces */
@media (max-width:700px){
  .z10-tools{
    background:transparent!important;
    border-bottom:0!important;
    padding-bottom:8px!important;
  }
  .z10-tools .searchband,
  .z10-tools form.search,
  .z10-tools form.head-search{
    background:transparent;
    border:0;
    padding:0!important;
    box-sizing:border-box;
    overflow:visible!important;
  }
  /* Cardify ANY wide data table on phone, not only .feat */
  table.mt-cards, table.feat, .tw > table, .table-wrap > table, table.stores, table.az, .az table{
    display:block!important; min-width:0!important; width:100%!important;
  }
  table.mt-cards thead, .tw > table thead, .table-wrap > table thead, table.stores thead{
    display:none!important;
  }
  table.mt-cards tbody tr, .tw > table tbody tr, .table-wrap > table tbody tr, table.stores tbody tr{
    display:block!important; width:100%!important; box-sizing:border-box!important;
    border:1px solid var(--z-line, var(--line,#2E333B))!important; border-radius:12px!important;
    padding:12px 14px!important; margin:0 0 10px!important;
    background:var(--z-card, var(--elev, var(--card,#1C212B)))!important;
    height:auto!important;
  }
  table.mt-cards td, .tw > table td, .table-wrap > table td, table.stores td{
    display:block!important; width:100%!important; border:0!important; padding:2px 0!important;
    white-space:normal!important; height:auto!important;
  }
}

@media (max-width:700px){.z10-tools{margin-top:8px!important}}

@media (max-width:700px){body.home-z10 .cats-grid{grid-template-columns:1fr 1fr!important} @media (max-width:400px){body.home-z10 .cats-grid{grid-template-columns:1fr!important}}}

/* ===== final polish 2026-11-02b ===== */

/* Header controls: same height + pill shape on every template */
header.z10-pin .slim-tools,
header.z10-pin .tools{
  display:flex;align-items:center;gap:6px;flex:0 0 auto;flex-wrap:nowrap;
}
header.z10-pin .slim-tools .tt,
header.z10-pin .tools .tt,
header.z10-pin .slim-tools summary,
header.z10-pin .tools summary,
header.z10-pin .lang summary,
header.z10-pin .lsw summary,
header.z10-pin details.lang > summary,
header.z10-pin details.lsw > summary{
  min-width:40px!important;
  min-height:40px!important;
  height:40px!important;
  max-height:40px!important;
  border-radius:999px!important;
  box-sizing:border-box!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0 12px!important;
  line-height:1!important;
  flex:0 0 auto!important;
}
header.z10-pin .tt{
  width:40px!important;
  padding:0!important;
}

/* Brand <small> contrast ≥4.5:1 on light (was ~4.18 with --muted #6B645C) */
header.z10-pin .brand small,
header.site .brand small,
header.site-head .brand small,
.brand small{
  color:#534C45!important; /* ~7:1 on white; still muted */
}
html[data-theme="dark"] header.z10-pin .brand small,
html[data-theme="dark"] .brand small,
html:not([data-theme="light"]) .brand small{
  color:#C4B9AD!important;
}

/* JA stat tiles: decorative art was poking past the box (scrollWidth>clientWidth) */
body.home-z10 .tile,
body.home-z10 article.tile,
.tile{
  overflow:hidden!important;
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}
body.home-z10 .tile .art,
.tile .art{
  right:0!important;
  bottom:0!important;
  max-width:40%!important;
  pointer-events:none;
}
body.home-z10 .tile .k,
body.home-z10 .tile .s,
.tile .k,.tile .s{
  overflow-wrap:anywhere;
  word-break:normal;
  max-width:100%;
}

/* Category cards: drop keep-all (causes 1–3 char lines); size for phone */
body.home-z10 .cats-grid .cc,
body.home-z10 .cats-grid .cc b,
body.home-z10 .cats-grid .cc span,
body.home-z10 a.cc,
body.home-z10 a.cc b,
body.home-z10 a.cc span,
.cats-grid .cc, .cats-grid .cc b, .cats-grid .cc span, a.cc, a.cc b, a.cc span{
  word-break:normal!important;
  overflow-wrap:break-word!important;
  line-break:strict!important;
  hyphens:none!important;
  white-space:normal!important;
}
@media (max-width:700px){
  body.home-z10 .cats-grid{
    grid-template-columns:1fr!important;
    gap:10px!important;
  }
  body.home-z10 .cats-grid .cc,
  body.home-z10 a.cc{
    display:flex!important;
    align-items:flex-start!important;
    gap:12px!important;
    padding:12px 14px!important;
    min-height:48px!important;
  }
  body.home-z10 .cats-grid .cc b,
  body.home-z10 a.cc b{
    font-size:15px!important;
    line-height:1.4!important;
  }
  body.home-z10 .cats-grid .cc span,
  body.home-z10 a.cc span{
    font-size:13px!important;
    line-height:1.4!important;
  }
  /* Stat tiles: 2×2 with room so text never clips */
  body.home-z10 .tiles{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
  }
  body.home-z10 .tile,
  body.home-z10 article.tile{
    padding:12px!important;
  }
  body.home-z10 .tile .n{font-size:1.5rem!important}
  body.home-z10 .tile .k,
  body.home-z10 .tile .s{font-size:11px!important;line-height:1.35!important}

  /* pt-br hero: match card radius + side insets of surrounding cards */
  body.home-z10 section.hero,
  body.home-z10 .hero{
    border-radius:14px!important;
    margin-left:0!important;
    margin-right:0!important;
    padding:22px 16px 18px!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
  /* Guia/chips: clear air under pin (Ernest: buttons touching header) */
  body.home-z10 .z10-tools{
    margin-top:12px!important;
    padding-top:16px!important;
  }
}

/* Inner pages: same header control shape */
body.inner-z10 header.z10-pin .tt,
body.inner-z10 header.z10-pin summary{
  border-radius:999px!important;
  min-height:40px!important;
  height:40px!important;
}

/* ===== final polish 2026-11-02c — phrase overflow + taps + crumbs ===== */

/* Root cause of JA hero text-clip / SE h-overflow:
   .phrase > span { display:inline-block; white-space:nowrap; word-break:keep-all }
   keeps chunks unbreakable past the phone content width. Clear on all phones. */
@media (max-width:700px){
  body.home-z10 h1.phrase > span,
  body.home-z10 h2.phrase > span,
  body.home-z10 .phrase > span,
  body.z10-phone .phrase > span,
  body.z10-phone h1.phrase > span,
  body.z10-phone h2.phrase > span{
    display:inline!important;
    white-space:normal!important;
    word-break:normal!important;
    overflow-wrap:anywhere!important;
    line-break:strict!important;
  }
  body.home-z10 .hero-copy h1,
  body.home-z10 .hero h1,
  body.home-z10 h1.phrase,
  body.z10-phone .hero-copy h1,
  body.z10-phone .page-hero h1{
    max-width:100%!important;
    font-size:clamp(1.2rem, 5.2vw, 1.45rem)!important;
    line-height:1.35!important;
    overflow-wrap:anywhere!important;
  }
  /* Brand hit box ≥40×40; mark matches tools pills */
  header.z10-pin .brand{
    min-height:40px!important;
    align-items:center!important;
  }
  header.z10-pin .brand .mk,
  header.z10-pin .brand .mark{
    width:40px!important;
    height:40px!important;
    border-radius:12px!important;
  }
  header.z10-pin .brand b,
  header.z10-pin .brand strong{
    font-size:13.5px!important;
    line-height:1.25!important;
  }
  /* Breadcrumb trail: real tap targets */
  nav.crumbs a,
  .crumbs a,
  .page-hero .crumbs a{
    display:inline-flex!important;
    align-items:center!important;
    min-height:40px!important;
    padding:8px 2px!important;
    box-sizing:border-box!important;
  }
  nav.crumbs{
    display:flex!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    gap:2px 4px!important;
  }
  /* Inner page heroes: match home card radius */
  body.z10-phone .page-hero,
  body.inner-z10 .page-hero{
    border-radius:14px!important;
  }
  /* Tools air under pin on ALL templates (not only home) — Ernest: chips touching header */
  body.z10-phone .z10-tools{
    margin-top:12px!important;
    padding-top:12px!important;
  }
}

/* ===== final polish 2026-11-02d — pin control contrast + newsletter ===== */

/* Home styles .lsw/.tt as dark chips; inners lacked that sheet after slim-tools reinject.
   Keep the same dark chip look so "Brasil"/theme icon stay ≥4.5:1 on every template. */
header.z10-pin .slim-tools summary,
header.z10-pin .slim-tools .tt,
header.z10-pin .tt,
header.z10-pin details.lsw > summary,
header.z10-pin details.lang > summary{
  background:#2C2724!important;
  color:#F5F0E8!important;
  border:1px solid #4A433C!important;
}
header.z10-pin .slim-tools summary span,
header.z10-pin .slim-tools summary .ico,
header.z10-pin .tt .ico{
  color:inherit!important;
  fill:none;
  stroke:currentColor;
}
html[data-theme="dark"] header.z10-pin .slim-tools summary,
html[data-theme="dark"] header.z10-pin .slim-tools .tt,
html[data-theme="dark"] header.z10-pin .tt,
html:not([data-theme="light"]) header.z10-pin .slim-tools summary,
html:not([data-theme="light"]) header.z10-pin .slim-tools .tt,
html:not([data-theme="light"]) header.z10-pin .tt{
  background:#1A1614!important;
  color:#F3EEE6!important;
  border-color:#4A433C!important;
}

/* Newsletter / short JA titles: avoid keep-all clip on SE */
@media (max-width:700px){
  body.z10-phone h1,
  body.inner-z10 h1{
    max-width:100%!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
  }
  body.z10-phone h1 .phrase > span,
  body.inner-z10 h1 span{
    white-space:normal!important;
    display:inline!important;
  }
}


/* ===== final polish 2026-11-03 resume ===== */

/* Guide breadcrumbs use .bc (not nav.crumbs); same ≥40px trail as crumbs */
@media (max-width:700px){
  .bc a,
  div.bc a,
  .page-hero .bc a{
    display:inline-flex!important;
    align-items:center!important;
    min-height:40px!important;
    padding:8px 2px!important;
    box-sizing:border-box!important;
  }
  .bc, div.bc{
    display:flex!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    gap:2px 4px!important;
  }

  /* Tools nav chips + search submit: real chrome taps */
  .z10-tools nav.hnav a,
  .z10-tools .hnav a,
  .z10-tools nav a,
  .z10-tools form.search button,
  .z10-tools form.head-search button,
  .z10-tools button[type=submit]{
    min-height:40px!important;
    min-width:40px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    box-sizing:border-box!important;
    padding:8px 12px!important;
  }

  /* Newsletter / form primary buttons */
  body.z10-phone button.btn,
  body.z10-phone .btn,
  body.z10-phone form .btn,
  body.z10-phone input[type=submit]{
    min-height:40px!important;
    height:auto!important;
    padding:10px 16px!important;
    box-sizing:border-box!important;
  }
}


/* ===== designer eye-check 2026-11-03 =====
   Shared page gutter, wrap-safe badges, chip scroller, card logo align,
   unified locale + control, scroll-padding under pin.
*/
:root{
  --z-page-gutter:14px;
  --z-pin-offset:72px; /* pin ~56–64 + gap */
}
html{
  scroll-padding-top:var(--z-pin-offset);
}

/* Locale control: same + / − affordance on every route (style-v5 only shipped on some inners) */
header.z10-pin details.lang > summary,
header.z10-pin details.lsw > summary{
  gap:6px!important;
}
header.z10-pin details.lang > summary::after,
header.z10-pin details.lsw > summary::after{
  content:"+"!important;
  color:inherit!important;
  font-weight:700!important;
  margin-left:2px;
  flex:0 0 auto;
  line-height:1;
}
header.z10-pin details[open].lang > summary::after,
header.z10-pin details[open].lsw > summary::after{
  content:"−"!important;
}

@media (max-width:700px){
  /* 1) One page gutter: tools chips and main wrap share --z-page-gutter */
  .z10-tools{
    padding-left:var(--z-page-gutter)!important;
    padding-right:var(--z-page-gutter)!important;
  }
  body.z10-phone main > .wrap,
  body.home-z10 main .wrap,
  body.inner-z10 main .wrap,
  body.home-z10 main > .wrap,
  body.z10-phone .page-hero,
  body.inner-z10 .page-hero{
    padding-left:var(--z-page-gutter)!important;
    padding-right:var(--z-page-gutter)!important;
    box-sizing:border-box!important;
  }
  /* Hero is inside .wrap — wrap owns the gutter; kill hero's own side pad
     (home CSS after6 set padding-inline:16px which doubled the inset vs chips) */
  body.home-z10 section.hero,
  body.home-z10 .hero{
    margin-left:0!important;
    margin-right:0!important;
    padding-left:0!important;
    padding-right:0!important;
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }
  body.home-z10 .hero > .wrap,
  body.home-z10 .hero .hero-copy,
  body.home-z10 .hero .in{
    padding-left:0!important;
    padding-right:0!important;
  }

  /* 2) Long kickers/badges: smaller type; wrap as rounded rect (not stadium) */
  .kicker, p.kicker, .hero .kicker, body.home-z10 .kicker{
    font-size:12px!important;
    line-height:1.3!important;
    padding:6px 10px!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    white-space:normal!important;
    border-radius:10px!important; /* not 999 when multi-line */
    display:inline-block!important;
    align-items:unset!important;
  }
  /* Short single-line pills stay stadium + nowrap */
  .stag, .tag, .verdict,
  .mk.ok, .mk.warn, .mk.soft, .mk.unk, .mk.bad{
    white-space:nowrap!important;
    border-radius:999px!important;
  }

  /* 3) Cardified table: one padding owner — the row. Kill th/td/a extra inline pad */
  table.mt-cards tbody tr,
  table.feat tbody tr,
  .table-wrap > table tbody tr,
  .tw > table tbody tr{
    padding-left:14px!important;
    padding-right:14px!important;
    box-sizing:border-box!important;
  }
  table.mt-cards tbody th,
  table.mt-cards tbody td,
  table.feat tbody th,
  table.feat tbody td,
  .table-wrap > table tbody th,
  .table-wrap > table tbody td,
  .tw > table tbody th,
  .tw > table tbody td,
  th.mt-t, td.mt-t{
    padding-left:0!important;
    padding-right:0!important;
  }
  th.mt-t > a,
  table.mt-cards th.mt-t > a,
  table.mt-cards tbody th > a,
  table.feat tbody th > a{
    padding-left:0!important;
    padding-right:0!important;
    margin-left:0!important;
    margin-right:0!important;
  }
  th.mt-t .logo,
  table.mt-cards .logo{
    margin-left:0!important;
  }

  /* 4) Chip row: nowrap + horizontal scroll; light gets visible surface */
  body.home-z10 .z10-tools .nav-wrap{
    overflow-x:auto!important;
    overflow-y:hidden!important;
    -webkit-overflow-scrolling:touch;
    scroll-padding-inline:10px;
    padding-inline:2px!important; /* keep focus ring inside the scrollport */
    padding-block:4px!important;
    max-width:100%!important;
  }
  body.home-z10 .z10-tools .nav a:focus-visible,
  body.home-z10 .z10-tools nav.nav a:focus-visible{
    outline:2px solid var(--acc, #C9892E)!important;
    outline-offset:2px!important;
  }
  body.home-z10 .z10-tools .nav,
  body.home-z10 .z10-tools nav.nav{
    display:flex!important;
    flex-wrap:nowrap!important;
    overflow:visible!important;
    width:max-content!important;
    max-width:none!important;
    gap:6px!important;
  }
  body.home-z10 .z10-tools .nav a,
  body.home-z10 .z10-tools nav.nav a{
    flex:0 0 auto!important;
    background:var(--chip, #EDE8E0)!important;
    border:1px solid var(--line, #D0C8BC)!important;
    border-radius:999px!important;
    color:var(--ink, #1A1614)!important;
    text-decoration:none!important;
  }
  html[data-theme="dark"] body.home-z10 .z10-tools .nav a,
  html:not([data-theme="light"]) body.home-z10 .z10-tools .nav a{
    background:var(--chip, #2A251F)!important;
    border-color:var(--line, #4A433C)!important;
    color:var(--ink, #F0E9DF)!important;
  }
  @media (prefers-color-scheme: light){
    html:not([data-theme="dark"]) body.home-z10 .z10-tools .nav a{
      background:var(--chip, #EDE8E0)!important;
      border:1px solid var(--line, #D0C8BC)!important;
      color:var(--ink, #1A1614)!important;
    }
  }
  body.home-z10 .nav-wrap::after{display:none!important}

  /* 6) Anchors clear the pin (also set on html scroll-padding-top) */
  [id], h1, h2, h3, section[id]{
    scroll-margin-top:var(--z-pin-offset)!important;
  }
}


/* neutralize legacy after8 display:contents sticky (iOS ghost chips) on transformed pages */
@media (max-width:700px){
  body.z10-phone header.site,
  body.z10-phone header.site-head,
  body.z10-phone header.site > .wrap,
  body.z10-phone header.site > .site-inner,
  body.z10-phone header.site-head > .wrap{
    display:block!important;
    position:static!important;
  }
  body.z10-phone .util-note{display:none!important}
  /* gap floor between pin and tools already via .z10-tools padding-top */
  body.z10-phone .z10-tools .nav,
  body.z10-phone .z10-tools nav.cats{
    margin-top:0;
  }
}
