/* ADIR website — one stylesheet, no external fonts or CDNs (runs offline).
   Palette: light warm-grey paper (after the One Page Love reference), a coral
   "thread" red for actions, and denim indigo for identifiers — the two dyes of
   a garment label. Monospace is reserved for identifiers and tags, because an
   ADID is something people read character by character. */

:root {
  --paper: #ECEAE6;
  --paper-2: #E4E1DC;
  --sheet: #FAF9F7;
  --ink: #1D1F24;
  --muted: #67645D;
  --rule: #D6D2CB;
  --thread: #D6455A;
  --thread-deep: #B83347;
  --denim: #2E4A7D;
  --denim-soft: #E2E7F0;
  --ok: #2F6B4F;
  --ok-soft: #E1EEE6;
  --warn: #8A5A12;
  --warn-soft: #F5EAD6;
  --sans: "Inter", "Segoe UI Variable Text", "Segoe UI", "Helvetica Neue", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --radius-s: 6px;
  --radius-m: 12px;
  --radius-pill: 999px;
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--denim); text-underline-offset: 3px; }
a:hover { color: var(--thread-deep); }
:focus-visible { outline: 2px solid var(--denim); outline-offset: 2px; border-radius: 4px; }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; font-weight: 600; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); letter-spacing: -0.02em; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; max-width: 68ch; }
.mono, code, kbd { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------ header */
.site-head { border-bottom: 1px solid var(--rule); }
.site-head .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; min-height: 84px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.05rem; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand small { display: block; font-weight: 400; font-size: .74rem; color: var(--muted); letter-spacing: 0; }
.nav { display: flex; gap: 34px; }
.nav a { color: var(--ink); text-decoration: none; font-size: 1.02rem; opacity: .82; }
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; color: var(--ink); text-decoration: underline; text-decoration-color: var(--thread); text-decoration-thickness: 2px; }
.head-right { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.search-pill { display: flex; align-items: center; gap: 8px; border: 1px solid var(--rule); background: transparent; border-radius: var(--radius-pill); padding: 8px 16px; min-width: 200px; }
.search-pill input { border: 0; background: transparent; font: inherit; color: var(--ink); width: 100%; outline: none; }
.search-pill svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.who { font-size: .9rem; color: var(--muted); white-space: nowrap; }
.who form { display: inline; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--denim); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--radius-pill); padding: 11px 22px; font: 600 .95rem/1 var(--sans); text-decoration: none; cursor: pointer; border: 1.5px solid transparent; transition: background-color .15s, color .15s; }
.btn-thread { background: var(--thread); color: #fff; }
.btn-thread:hover { background: var(--thread-deep); color: #fff; }
.btn-line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-quiet { border-color: var(--rule); color: var(--ink); background: var(--sheet); }
.btn-quiet:hover { border-color: var(--ink); color: var(--ink); }
.btn-danger { border-color: var(--thread); color: var(--thread-deep); background: transparent; }
.btn-danger:hover { background: var(--thread); color: #fff; }
.btn-s { padding: 7px 14px; font-size: .85rem; }

/* ------------------------------------------------------------ lookup strip */
.strip { border-bottom: 1px solid var(--rule); padding: 26px 0 40px; text-align: center; }
.strip .mono { color: var(--ink); opacity: .85; font-size: .95rem; display: block; margin-bottom: 14px; }
.lookup { display: flex; max-width: 540px; margin: 0 auto; background: #fff; border: 1px solid var(--rule); border-radius: var(--radius-pill); padding: 5px 5px 5px 22px; box-shadow: 0 1px 0 rgba(29,31,36,.04); }
.lookup input { flex: 1; border: 0; font: inherit; font-size: 1.02rem; outline: none; min-width: 0; background: transparent; }
.lookup .btn { padding: 12px 20px; }

/* --------------------------------------------------------------------- hero */
.hero { padding: 72px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 46ch; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.tag-figure { position: relative; justify-self: center; width: min(420px, 100%); }
.tag-figure svg { display: block; width: 100%; height: auto; }

/* ------------------------------------------------------------------ formula */
.formula { padding: 40px 0 76px; }
.formula-card { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 34px 34px 28px; }
.formula-card h2 { margin-bottom: 6px; }
.uri { display: flex; flex-wrap: wrap; align-items: stretch; margin: 30px 0 8px; font-family: var(--mono); font-size: clamp(.9rem, 1.9vw, 1.35rem); }
.uri-part { display: flex; flex-direction: column; gap: 10px; }
.uri-part .seg { padding: 4px 2px; border-bottom: 3px solid var(--rule); white-space: nowrap; }
.uri-part.host .seg { border-color: var(--ink); }
.uri-part.type .seg { border-color: var(--muted); }
.uri-part.id .seg { border-color: var(--denim); color: var(--denim); }
.uri-part .seg .v4 { background: var(--thread); color: #fff; border-radius: 3px; padding: 0 2px; }
.uri-part .anno { font-family: var(--sans); font-size: .82rem; color: var(--muted); max-width: 22ch; line-height: 1.4; padding-right: 18px; }
.uri-part .anno b { color: var(--ink); font-weight: 600; display: block; }
.formula-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; align-items: center; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--rule); }
.equation { font-family: var(--mono); font-size: .9rem; color: var(--ink); line-height: 1.9; }
.equation span { color: var(--muted); }

/* -------------------------------------------------------------- card grid */
.section { padding: 64px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 30px; }
.section-head p { margin: 0; color: var(--muted); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 46px 34px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 34px; }
.shot { display: block; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-m); aspect-ratio: 16 / 10; overflow: hidden; }
.shot svg { width: 100%; height: 100%; display: block; }
.card-meta { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-top: 16px; }
.card-meta h3 { font-weight: 500; font-size: 1.35rem; margin: 0 0 6px; letter-spacing: -.01em; }
.tags { display: flex; gap: 18px; flex-wrap: wrap; font-family: var(--mono); font-size: .86rem; color: var(--ink); opacity: .78; }
.out-icon { width: 20px; height: 20px; color: var(--muted); flex: none; margin-top: 6px; }
.dark-card { background: #17191E; color: #F2F0EC; border-radius: var(--radius-m); padding: 30px; display: flex; flex-direction: column; justify-content: space-between; min-height: 100%; }
.dark-card h3 { font-size: 1.9rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.12; }
.dark-card p { color: #C9C6BF; }
.dark-card .dot { display: inline-block; width: 8px; height: 8px; background: var(--thread); border-radius: 50%; margin-right: 8px; }
.dark-card .btn-line { border-color: #F2F0EC; color: #F2F0EC; }
.dark-card .btn-line:hover { background: #F2F0EC; color: #17191E; }

/* ----------------------------------------------------- before / after tags */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }
.compare .panel { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 28px; }
.idline { font-family: var(--mono); font-size: .95rem; padding: 10px 12px; border-radius: var(--radius-s); background: var(--paper); margin: 8px 0; word-break: break-all; }
.idline.broken { text-decoration: line-through; text-decoration-color: var(--thread); color: var(--muted); }
.idline.kept { background: var(--denim-soft); color: var(--denim); }
.bignum { font-size: 2.6rem; font-weight: 600; letter-spacing: -.03em; line-height: 1; margin-top: 18px; }
.bignum + .small { color: var(--muted); }

/* ----------------------------------------------------------------- steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; counter-reset: step; border-top: 1px solid var(--ink); }
.steps li { padding: 18px 18px 0 0; counter-increment: step; }
.steps li::before { content: counter(step); font-family: var(--mono); font-size: .85rem; color: var(--thread-deep); display: block; margin-bottom: 10px; }
.steps h3 { font-size: 1.02rem; margin-bottom: 6px; }
.steps p { font-size: .92rem; color: var(--muted); }

/* ------------------------------------------------------------- reasons */
.reasons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.reasons blockquote { margin: 0 0 12px; font-size: 1.12rem; line-height: 1.45; }
.reasons cite { font-style: normal; font-family: var(--mono); font-size: .82rem; color: var(--muted); }

/* --------------------------------------------------------------- footer */
.site-foot { border-top: 1px solid var(--rule); padding: 36px 0 52px; margin-top: 40px; font-size: .9rem; color: var(--muted); }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; }
.site-foot a { color: var(--muted); }

/* --------------------------------------------------------- page bodies */
.page { padding: 44px 0 30px; }
.page-head { margin-bottom: 26px; }
.page-head p { color: var(--muted); }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs a { color: var(--muted); }
.panel { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 24px; }
.panel + .panel { margin-top: 20px; }
.panel h2, .panel h3 { margin-top: 0; }
.cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: start; }
.stack > * + * { margin-top: 20px; }
.kv { width: 100%; border-collapse: collapse; font-size: .95rem; }
.kv th, .kv td { text-align: left; padding: 9px 10px 9px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.kv th { color: var(--muted); font-weight: 400; width: 40%; }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: 0; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font-weight: 600; font-size: .82rem; color: var(--muted); padding: 10px 10px 10px 0; border-bottom: 1px solid var(--ink); }
.table td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.table select, .table input[type=text] { width: 100%; }
.pill { display: inline-block; font-size: .78rem; padding: 2px 10px; border-radius: var(--radius-pill); background: var(--paper); color: var(--ink); border: 1px solid var(--rule); white-space: nowrap; }
.pill.kind { background: var(--denim-soft); border-color: transparent; color: var(--denim); }
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.bad { background: #F6DEE1; color: var(--thread-deep); border-color: transparent; }
.idbox { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--rule); border-radius: var(--radius-s); padding: 10px 12px; font-family: var(--mono); font-size: .92rem; word-break: break-all; }
.idbox .btn { flex: none; }
.idlist { list-style: none; padding: 0; margin: 0; font-family: var(--mono); font-size: .85rem; }
.idlist li { padding: 6px 0; border-bottom: 1px dashed var(--rule); word-break: break-all; }
.idlist li:last-child { border-bottom: 0; }
.idlist .k { color: var(--muted); font-family: var(--sans); font-size: .8rem; display: block; }
.near { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.near h3 { font-size: .95rem; margin-bottom: 8px; }
.near ul { list-style: none; padding: 0; margin: 0; }
.near li { margin-bottom: 6px; font-size: .92rem; }
.near li small { color: var(--muted); display: block; font-family: var(--mono); font-size: .76rem; }
.empty { color: var(--muted); font-size: .9rem; }
.flash { padding: 12px 16px; border-radius: var(--radius-s); margin-bottom: 18px; background: var(--ok-soft); color: var(--ok); }
.flash.error { background: #F6DEE1; color: var(--thread-deep); }
.note { background: var(--warn-soft); color: var(--warn); border-radius: var(--radius-s); padding: 12px 16px; font-size: .92rem; }
form.inline { display: inline; }
label { display: block; font-weight: 600; font-size: .9rem; margin: 14px 0 6px; }
label .hint { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=file], select, textarea {
  font: inherit; width: 100%; padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: #fff; color: var(--ink);
}
input[readonly] { background: var(--paper); color: var(--muted); }
.formcard { max-width: 460px; margin: 0 auto; }
.formcard .btn { width: 100%; margin-top: 20px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 18px 20px; }
.stat b { display: block; font-size: 1.9rem; font-weight: 600; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: .88rem; }
.filters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.filters label { margin-top: 0; font-weight: 400; color: var(--muted); font-size: .82rem; }
details summary { cursor: pointer; color: var(--denim); }
.samples { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.diff-old { text-decoration: line-through; color: var(--muted); }
.diff-new { color: var(--ok); font-weight: 600; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 980px) {
  .site-head .wrap { grid-template-columns: 1fr auto; }
  .nav { grid-column: 1 / -1; order: 3; justify-content: flex-start; gap: 22px; padding-bottom: 14px; overflow-x: auto; }
  .hero .wrap, .cols, .compare, .grid2 { grid-template-columns: 1fr; }
  .grid3, .reasons { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .near, .stats, .filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .wrap { padding: 0 16px; }
  .search-pill { display: none; }
  .grid3, .reasons, .steps, .near, .stats, .filters { grid-template-columns: 1fr; }
  .hero { padding-top: 40px; }
  .formula-card { padding: 24px 18px; }
  .uri-part .anno { max-width: none; }
  .table { font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@keyframes settle { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.minted { animation: settle .35s ease-out; }

/* ============================================================ ADID banner
   The one loud moment on the home page: a dark indigo field like a denim
   bolt, with the garment's own dye carried into the tag and the address. */
.adid-banner { background: #14202C; color: #EEF1F4; padding: 76px 0 56px; margin: 10px 0 20px; position: relative; overflow: hidden; }
.adid-banner::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255,255,255,.025) 0 2px, transparent 2px 9px); pointer-events: none; }
.adid-banner .wrap { position: relative; }
.banner-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 56px; align-items: center; }
.banner-kicker { color: #F0A3AE; font-size: .95rem; margin-bottom: 14px; }
.adid-banner h2 { font-size: clamp(2rem, 4.2vw, 3.3rem); letter-spacing: -.03em; line-height: 1.04; max-width: 17ch; margin-bottom: 18px; color: #fff; }
.banner-lead { color: #B9C3CE; font-size: 1.08rem; max-width: 58ch; }
.banner-lead b { color: #fff; font-weight: 600; }
.picker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.picker-label { width: 84px; color: #8D9AA8; font-size: .9rem; }
.picker-note { color: #8D9AA8; font-size: .85rem; margin-left: 6px; }
.swatch, .chip { font: 500 .92rem/1 var(--sans); color: #EEF1F4; background: transparent; border: 1.5px solid #3A4A5B; border-radius: var(--radius-pill); padding: 9px 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: border-color .15s, background-color .15s; }
.swatch span { width: 16px; height: 16px; border-radius: 50%; background: var(--dye); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.chip { min-width: 44px; justify-content: center; }
.swatch:hover, .chip:hover { border-color: #8D9AA8; }
.swatch[aria-pressed="true"], .chip[aria-pressed="true"] { border-color: #fff; background: rgba(255,255,255,.1); }
.chip:disabled { opacity: .4; cursor: not-allowed; }
.address { margin-top: 30px; font-family: var(--mono); font-size: clamp(.82rem, 1.55vw, 1.12rem); line-height: 1.6; word-break: break-all; background: rgba(0,0,0,.28); border-radius: var(--radius-m); padding: 16px 18px; }
.address .a-var, .address .a-item { display: inline-block; }
.address .a-host { color: #8D9AA8; }
.address .a-fam { color: #9CC3E6; border-bottom: 3px solid #4F8FC4; }
.address .a-var { color: #FFD08A; border-bottom: 3px solid #E0A240; }
.address .a-item { color: #F0A3AE; border-bottom: 3px solid var(--thread); }
.address-key { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; font-size: .86rem; color: #AAB5C1; }
.address-key li { border-top: 3px solid; padding-top: 8px; }
.address-key b { display: block; color: #fff; font-weight: 600; margin-bottom: 2px; }
.address-key .k-fam { border-color: #4F8FC4; }
.address-key .k-var { border-color: #E0A240; }
.address-key .k-item { border-color: var(--thread); }
.btn-line-light { border-color: #EEF1F4; color: #EEF1F4; background: transparent; }
.btn-line-light:hover { background: #EEF1F4; color: #14202C; }
.banner-tag { margin: 0; justify-self: center; width: min(360px, 100%); }
.banner-tag svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 30px rgba(0,0,0,.35)); transform: rotate(2.5deg); }
.banner-tag [data-tee] { transition: fill .35s ease; }
.banner-tag figcaption { text-align: center; color: #8D9AA8; font-size: .88rem; margin-top: 14px; }
.family-tree { list-style: none; padding: 26px 0 0; margin: 46px 0 0; border-top: 1px solid #2B3A49; display: flex; flex-wrap: wrap; gap: 10px 0; }
.family-tree li { flex: 1 1 150px; display: flex; flex-direction: column; padding-right: 18px; position: relative; }
.family-tree li + li::before { content: ""; position: absolute; left: -12px; top: 12px; width: 6px; height: 6px; border-top: 2px solid #4F8FC4; border-right: 2px solid #4F8FC4; transform: rotate(45deg); }
.family-tree li + li { padding-left: 4px; }
.family-tree b { font-size: 1.9rem; font-weight: 600; letter-spacing: -.02em; color: #fff; line-height: 1.1; }
.family-tree span { color: #8D9AA8; font-size: .88rem; }
.flash-in { animation: settle .4s ease-out; }

/* ========================================================== connection map */
.related-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 34px; align-items: center; }
.rel-list { display: flex; flex-direction: column; gap: 10px; }
.rel-card { display: flex; gap: 14px; align-items: flex-start; text-align: left; font: inherit; color: var(--ink); background: transparent; border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 16px 18px; cursor: pointer; transition: background-color .15s, border-color .15s; }
.rel-card b { display: block; font-size: 1.04rem; margin-bottom: 3px; }
.rel-card > span:last-child { color: var(--muted); font-size: .92rem; line-height: 1.45; }
.rel-card[aria-selected="true"] { background: var(--sheet); border-color: var(--ink); }
.rel-card[aria-selected="true"] > span:last-child { color: var(--ink); }
.rel-ico { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--c); margin-top: 5px; }
.lock { font-size: .72rem; font-weight: 600; background: var(--warn-soft); color: var(--warn); border-radius: var(--radius-pill); padding: 2px 8px; margin-left: 6px; vertical-align: 2px; }
.rel-map { margin: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 18px; }
.rel-map svg { display: block; width: 100%; height: auto; }
.rel-map figcaption { text-align: center; font-size: .9rem; margin-top: 6px; }
.rel-map .edges path { stroke: #CFCAC2; transition: stroke .3s, opacity .3s; }
.rel-map .node { transition: opacity .3s; opacity: .28; }
.rel-map .node.on { opacity: 1; }
.rel-map .edges path { opacity: .35; }
.rel-map .edges path.on { opacity: 1; }

.rel-map svg[data-active="design"] .edges path.on { stroke: #1D1F24; }
.rel-map svg[data-active="siblings"] .edges path.on { stroke: #2E4A7D; }
.rel-map svg[data-active="lot"] .edges path.on { stroke: #8A5A12; stroke-width: 2.6; }
.rel-map svg[data-active="similar"] .edges path.on { stroke: #D6455A; stroke-width: 2.6; }

/* ============================================================= journeys */
.role-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 18px; }
.role { text-align: left; font: inherit; color: var(--ink); background: transparent; border: 1.5px solid var(--rule); border-radius: var(--radius-m); padding: 16px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; transition: border-color .15s, background-color .15s; }
.role svg { width: 34px; height: 34px; fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 6px; }
.role b { font-size: 1.08rem; }
.role span { color: var(--muted); font-size: .86rem; line-height: 1.4; }
.role:hover { border-color: var(--muted); }
.role[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.role[aria-selected="true"] span { color: #C9C6BF; }
.role[aria-selected="true"] svg { stroke: var(--thread); }
.journey .j-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.journey .j-head h2 { margin: 0; font-size: 1.5rem; }
.j-flow svg { display: block; width: 100%; height: auto; margin: 14px 0 6px; }
.j-track { stroke: var(--rule); stroke-width: 4; stroke-linecap: round; }
.j-fill { stroke: var(--thread); stroke-width: 4; stroke-linecap: round; transition: x2 .8s ease; }
.j-node circle { fill: var(--sheet); stroke: var(--rule); stroke-width: 2; transition: fill .3s, stroke .3s; }
.j-node .j-icon { fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: stroke .3s; }
.j-node text { font: 500 13px var(--sans); fill: var(--muted); }
.j-node.done circle { fill: #F6DEE1; stroke: var(--thread); }
.j-node.done .j-icon { stroke: var(--thread-deep); }
.j-node.now circle { fill: var(--thread); stroke: var(--thread); }
.j-node.now .j-icon { stroke: #fff; }
.j-node.now text { fill: var(--ink); font-weight: 600; }
.j-pulse { fill: none; stroke: var(--thread); stroke-width: 2; opacity: .5; transition: cx .8s ease; }
@media (prefers-reduced-motion: no-preference) { .j-pulse { animation: pulse 1.6s ease-in-out infinite; } }
@keyframes pulse { 0% { r: 26; opacity: .6; } 100% { r: 36; opacity: 0; } }
.j-steps { list-style: none; padding: 0; margin: 10px 0 18px; display: grid; align-items: start; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; counter-reset: j; }
.j-steps li { counter-increment: j; border-radius: var(--radius-s); padding: 12px; cursor: pointer; border: 1px solid transparent; transition: background-color .25s, border-color .25s; }
.j-steps li::before { content: counter(j); font-family: var(--mono); font-size: .8rem; color: var(--thread-deep); display: block; margin-bottom: 4px; }
.j-steps li b { display: block; font-size: .98rem; margin-bottom: 4px; }
.j-steps li span { color: var(--muted); font-size: .88rem; line-height: 1.45; display: block; }
.j-steps li.now { background: #fff; border-color: var(--thread); }
.j-steps li.now span { color: var(--ink); }

/* ============================================================ data journey */
.datajourney { margin-top: 28px; }
.pipeline { display: grid; grid-template-columns: minmax(170px, .8fr) 70px 2fr; gap: 14px; align-items: center; margin: 22px 0 10px; position: relative; }
.cols-in { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.cols-in li { background: #fff; border: 1px solid var(--rule); border-radius: var(--radius-s); padding: 6px 10px; font-size: .85rem; transition: opacity .3s, border-color .3s, transform .3s; }
.cols-in li.active { border-color: var(--thread); transform: translateX(8px); }
.cols-in li.sent { opacity: .35; }
.gate { color: var(--thread); text-align: center; font-size: .75rem; }
.gate svg { width: 44px; height: 160px; display: block; margin: 0 auto 6px; }
.bins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bin { border-radius: var(--radius-m); padding: 12px; min-height: 120px; border: 1.5px solid; }
.bin h3 { font-size: .95rem; margin: 0 0 2px; }
.bin p { font-size: .78rem; color: var(--muted); margin: 0 0 8px; }
.bin-items { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.bin-chip { background: #fff; border-radius: var(--radius-s); padding: 4px 8px; font-size: .8rem; line-height: 1.25; box-shadow: 0 1px 0 rgba(29,31,36,.08); }
.bin-chip small { display: block; color: var(--muted); font-family: var(--mono); font-size: .7rem; }
.bin-chip.drop { animation: drop .45s ease-out; }
@keyframes drop { from { opacity: 0; transform: translateX(-26px) scale(.9); } to { opacity: 1; transform: none; } }
.b-design { border-color: #1D1F24; background: #F1EFEB; }
.b-variant { border-color: var(--denim); background: var(--denim-soft); }
.b-item { border-color: var(--thread); background: #FBEEF0; border-style: dashed; }
.b-private { border-color: var(--warn); background: var(--warn-soft); }
.b-dropped { border-color: var(--rule); background: transparent; border-style: dashed; }
.b-dropped .bin-chip { text-decoration: line-through; color: var(--muted); }
.pipeline .run { position: absolute; right: 0; bottom: -44px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 26px; margin-top: 56px; }
.facts h3 { font-size: 1rem; margin-bottom: 4px; }
.facts p { font-size: .92rem; color: var(--muted); margin: 0; }
.who-sees { margin-top: 26px; }
.who-sees td.y { color: var(--ok); font-weight: 600; }
.who-sees td.n { color: var(--muted); }
details.hood { padding: 0; }
details.hood > summary { list-style: none; padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; color: var(--ink); }
details.hood > summary::-webkit-details-marker { display: none; }
details.hood > summary::after { content: "+"; font-size: 1.4rem; color: var(--muted); }
details.hood[open] > summary::after { content: "–"; }
details.hood > summary h3 { margin: 0; font-size: 1.15rem; }
details.hood > :not(summary) { margin-left: 24px; margin-right: 24px; }
details.hood > table { width: calc(100% - 48px); }
details.hood > :last-child { margin-bottom: 22px; }
details.hood + details.hood { margin-top: 12px; }

@media (max-width: 980px) {
  .banner-grid, .related-grid { grid-template-columns: 1fr; }
  .banner-tag { width: min(300px, 80%); }
  .role-pick { grid-template-columns: 1fr 1fr; }
  .pipeline { grid-template-columns: 1fr; }
  .gate svg { transform: rotate(90deg); height: 60px; }
  .bins { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .pipeline .run { position: static; justify-self: start; }
}
@media (max-width: 620px) {
  .adid-banner { padding: 52px 0 40px; }
  .address-key { grid-template-columns: 1fr; }
  .picker-label { width: 100%; }
  .role-pick, .bins, .facts { grid-template-columns: 1fr; }
  .j-node text { font-size: 15px; }
}

/* ================================================================ registry */
.reg-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.reg-head h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin: 0; }
.view-toggle { display: inline-flex; background: var(--paper-2); border-radius: var(--radius-pill); padding: 4px; }
.view-toggle a { padding: 8px 16px; border-radius: var(--radius-pill); color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 500; }
.view-toggle a[aria-current="true"] { background: var(--sheet); color: var(--ink); box-shadow: 0 1px 2px rgba(29,31,36,.12); }
.cat-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.cat-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border: 1px solid var(--rule); border-radius: var(--radius-pill); color: var(--ink); text-decoration: none; font-size: .92rem; background: transparent; }
.cat-chip:hover { border-color: var(--ink); color: var(--ink); }
.cat-chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.cat-chip[aria-current="true"] .garment g { stroke: var(--paper); fill: var(--ink); }
.cat-all { width: 26px; height: 26px; border-radius: 50%; background: conic-gradient(#1F6E9C 0 25%, #A8592A 0 50%, #D8C49C 0 75%, #45484F 0); }
.more-filters { margin-bottom: 30px; }
.more-filters > summary { font-size: .9rem; color: var(--denim); padding: 6px 0; }
.more-filters form { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 20px; margin-top: 10px; }
.reg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.reg-card { display: flex; flex-direction: column; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-m); overflow: hidden; color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.reg-card:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-2px); }
.reg-visual { position: relative; display: grid; place-items: center; height: 150px; background: color-mix(in srgb, var(--tint) 16%, var(--paper)); }
.reg-visual .garment { filter: drop-shadow(0 6px 8px rgba(29,31,36,.12)); }
.reg-cat { position: absolute; left: 12px; top: 12px; font-size: .78rem; font-weight: 600; background: var(--sheet); border-radius: var(--radius-pill); padding: 3px 10px; }
.reg-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.reg-body h2 { font-size: 1.3rem; margin: 0; letter-spacing: -.01em; }
.reg-variant { margin: 0; font-weight: 500; }
.reg-maker { margin: 0; color: var(--muted); font-size: .9rem; }
.reg-swatches { display: flex; gap: 5px; align-items: center; margin-top: 4px; }
.reg-swatches span { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(29,31,36,.18); }
.reg-swatches em { font-style: normal; font-size: .8rem; color: var(--muted); }
.reg-facts { margin: 6px 0 0; display: grid; gap: 2px; font-size: .86rem; }
.reg-facts div { display: flex; gap: 8px; }
.reg-facts dt { color: var(--muted); min-width: 56px; }
.reg-facts dd { margin: 0; }
.reg-id { margin-top: auto; padding-top: 10px; font-size: .72rem; color: var(--denim); word-break: break-all; opacity: .8; }
.reg-empty { text-align: center; padding: 50px 0; color: var(--muted); }
