.nw-wardrobe {
  --nw-ink: #332e29;
  --nw-quiet: #655d53;
  --nw-line: #bfb7a6;
  --nw-stage: #dedad0;
  --nw-accent: #724934;
  container: wardrobe / inline-size;
  color: var(--nw-ink);
  color-scheme: light;
  margin-block: 1.75rem;
}
.nw-wardrobe [hidden] { display: none !important; }
.nw-wardrobe .nw-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block-end: .65rem;
  margin-block-end: 1rem;
  border-block-end: 1px solid var(--nw-line);
}
.nw-wardrobe .nw-head h2 {
  margin: 0;
  border: 0;
  padding: 0;
  color: var(--nw-ink);
  font-size: 1.25rem;
  line-height: 1.45;
}
.nw-wardrobe .nw-head :is(span, small) {
  color: var(--nw-quiet);
  font-size: .8125rem;
  white-space: nowrap;
}
.nw-wardrobe .nw-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: clamp(1rem, 4cqi, 2.5rem);
  align-items: start;
}
.nw-wardrobe .nw-stage {
  display: grid;
  place-items: stretch;
  min-inline-size: 0;
  margin: 0;
  height: clamp(20rem, 59cqi, 32rem);
  border: 1px solid var(--nw-line);
  border-radius: 4px;
  overflow: hidden;
  background: var(--nw-stage);
}
.nw-wardrobe .nw-stage > a {
  display: block;
  min-height: 0;
  height: 100%;
  text-decoration: none;
  cursor: zoom-in;
}
.nw-wardrobe .nw-stage img[data-nw-image] {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  border: 0;
  margin: 0;
  object-fit: contain;
  background: transparent;
}
.nw-wardrobe .nw-stage [data-nw-empty] {
  align-self: center;
  justify-self: center;
  color: var(--nw-quiet);
  font-size: .9375rem;
}
.nw-wardrobe .nw-details { min-width: 0; }
.nw-wardrobe .nw-selected-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5rem;
  color: var(--nw-quiet);
  font-size: .8125rem;
  line-height: 1.55;
}
.nw-wardrobe [data-nw-default] {
  color: var(--nw-accent);
  font-weight: 600;
}
.nw-wardrobe .nw-details h3[data-nw-name] {
  margin: .25rem 0 .7rem;
  color: var(--nw-ink);
  font-size: clamp(1.25rem, 3.2cqi, 1.625rem);
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.nw-wardrobe .nw-details [data-nw-description] {
  margin: 0 0 .75rem;
  color: var(--nw-ink);
  font-size: .96875rem;
  line-height: 1.8;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.nw-wardrobe .nw-details .nw-source {
  margin: .5rem 0;
  color: var(--nw-quiet);
  font-size: .875rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.nw-wardrobe .nw-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
  gap: .4rem;
  margin-block-start: 1.125rem;
  padding-block-start: .875rem;
  border-block-start: 1px solid var(--nw-line);
}
.nw-wardrobe .nw-picker a.nw-option {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
  min-height: 46px;
  box-sizing: border-box;
  padding: .25rem .45rem .25rem .25rem;
  border: 1px solid #c4bcac;
  border-radius: 3px;
  background: #f2eee5;
  color: var(--nw-ink);
  text-decoration: none;
  font-size: .875rem;
  line-height: 1.4;
}
.nw-wardrobe .nw-picker a.nw-option:hover { background: #fbf8f0; border-color: #968673; }
.nw-wardrobe .nw-picker a.nw-option[aria-current="true"] {
  border-color: var(--nw-accent);
  background: #fffaf0;
  box-shadow: inset 0 0 0 1px var(--nw-accent);
  font-weight: 650;
}
.nw-wardrobe .nw-option-name { min-inline-size: 0; overflow-wrap: anywhere; }
.nw-wardrobe .nw-thumb, .nw-wardrobe .nw-no-thumb {
  display: grid;
  flex: 0 0 2.375rem;
  width: 2.375rem;
  height: 2.375rem;
  place-items: center;
  overflow: hidden;
  border-radius: 2px;
  background: #ded8cb;
}
.nw-wardrobe .nw-thumb img, .nw-wardrobe img.nw-thumb {
  display: block;
  width: 2.375rem;
  height: 2.375rem;
  margin: 0;
  border: 0;
  object-fit: contain;
  background: transparent;
}
.nw-wardrobe a:focus-visible { outline: 3px solid #426774; outline-offset: 2px; }
.nw-wardrobe .nw-stage > a:focus-visible { outline-offset: -4px; }
@container wardrobe (max-width: 34rem) {
  .nw-wardrobe .nw-layout { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .nw-wardrobe .nw-stage { height: clamp(15rem, 86cqi, 24rem); }
  .nw-wardrobe .nw-picker { grid-template-columns: repeat(auto-fit, minmax(min(100%, 7.5rem), 1fr)); }
}

/* Both the server-rendered dossier and its 3D reading-desk copy use light paper. */
.ci-portal.ci-archive :is(.ar-document-desk, .ar-live-paper) .cp-article {
  --nw-ink: #332e29;
  --nw-muted: #5e554a;
  --nw-rule: #c6bcaa;
  --nw-heading-bg: #e0d8c7;
}
.ci-portal.ci-archive :is(.ar-document-desk, .ar-live-paper) .cp-article .cp-table-wrap { border-color: var(--nw-rule); }
.ci-portal.ci-archive :is(.ar-document-desk, .ar-live-paper) .cp-article .cp-table-wrap :is(th, td) {
  color: var(--nw-ink);
  border-color: var(--nw-rule);
  font-size: .9375rem;
  line-height: 1.55;
}
.ci-portal.ci-archive :is(.ar-document-desk, .ar-live-paper) .cp-article thead th {
  background: var(--nw-heading-bg);
  font-weight: 600;
}
.ci-portal.ci-archive :is(.ar-document-desk, .ar-live-paper) .cp-article tbody :is(th, td) {
  background: transparent;
}
.ci-portal.ci-archive :is(.ar-document-desk, .ar-live-paper) .cp-article :is(.cp-muted, .cp-light-provenance, .cp-light-provenance summary, .cp-article-footer span, .cp-article-meta, .cp-article-label) {
  color: var(--nw-muted);
}
.ci-portal.ci-archive :is(.ar-document-desk, .ar-live-paper) .cp-article :is(.cp-machine-links, .cp-light-provenance, .cp-article-footer, .nw-record-links) a {
  color: #63452e;
  text-decoration: underline;
  text-underline-offset: .18em;
}
.nw-stat-section { color: var(--nw-ink); scroll-margin-block: 1rem; }
.nw-stat-section .nw-stat-note, .nw-stat-section .nw-fixed { font-size: .875rem; color: var(--nw-muted); }
.nw-level-picker { display: none; }
.nw-interactive .nw-level-picker { display: block; margin: 1rem 0; }
.nw-level-picker label { font-size: .875rem; }
.nw-level-picker select {
  margin-inline-start: .5rem; padding: .35rem .6rem; min-height: 36px;
  border: 1px solid #958877; border-radius: 3px; background: #faf7ee; color: var(--nw-ink);
  font: inherit; color-scheme: light;
}
.nw-level-values { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .6rem; margin: .8rem 0; }
.nw-level-values > div { padding: .55rem .65rem; border-block: 1px solid var(--nw-rule); }
.nw-level-values dt { font-size: .875rem; color: var(--nw-muted); }
.nw-level-values dd { margin: .2rem 0 0; color: var(--nw-ink); font-size: 1.25rem; line-height: 1.4; font-weight: 600; font-variant-numeric: tabular-nums; }
.nw-levels { margin-block: 1rem 2rem; }
.nw-levels summary { width: fit-content; padding: .3rem 0; color: #63452e; font-size: .9375rem; cursor: pointer; }
.nw-levels .nw-table-scroll { overflow: auto; max-height: min(14rem, 40vh); }
.nw-levels .nw-table-scroll table { width: 100%; min-width: 0; font-variant-numeric: tabular-nums; }
.nw-levels .nw-table-scroll thead th { position: sticky; top: 0; z-index: 1; }
.nw-levels .nw-table-scroll :is(th,td) { text-align: end; white-space: nowrap; }
.nw-stat-section .nw-effect-list { list-style: none; padding: 0; margin: 0; }
.nw-stat-section .nw-effect-list li { border-bottom: 1px solid var(--nw-rule); padding: .8rem 0; margin: 0; }
.nw-effect-title { display: flex; flex-wrap: wrap; gap: .6rem; align-items: baseline; }
.nw-effect-title span { font-size: .8125rem; color: #6b472c; }
.nw-effect-title strong { font-size: 1rem; color: var(--nw-ink); }
.nw-stat-section .nw-effect-list p { margin: .35rem 0; font-size: 1rem; line-height: 1.75; white-space: pre-line; overflow-wrap: anywhere; }
.nw-stat-section .nw-effect-list small { color: var(--nw-muted); }
.nw-record-links { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin: .75rem 0; }
.nw-art-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,7rem),1fr)); gap: .5rem; }
.nw-art-grid img { max-width: 100%; height: 7rem; object-fit: contain; }
.nw-skill { border-bottom: 1px solid var(--nw-rule); padding-block: .5rem; }
.nw-skill > summary {
  display: flex; align-items: center; gap: .6rem; min-height: 40px;
  list-style: none; cursor: pointer; color: var(--nw-ink); line-height: 1.5;
}
.nw-skill > summary::-webkit-details-marker { display: none; }
.nw-skill > summary::before {
  content: ""; flex: none; width: .44rem; height: .44rem; margin-inline: .1rem .2rem;
  border: solid currentColor; border-width: 1.5px 1.5px 0 0; transform: rotate(45deg);
}
.nw-skill[open] > summary::before { transform: rotate(135deg); }
.nw-skill > summary:focus-visible { outline: 2px solid #45616b; outline-offset: 2px; }
.ci-portal.ci-archive :is(.ar-document-desk,.ar-live-paper) .cp-prose :is(.nw-skill > summary,.nw-effect-title) > img {
  box-sizing: border-box; flex: 0 0 28px; align-self: center; display: block;
  width: 28px; height: 28px; max-width: 28px; max-height: 28px; padding: 2px; margin: 0;
  border: 0; border-radius: 3px; object-fit: contain; background: #49443d;
}
.nw-card-source { font-size: .875rem; color: var(--nw-quiet); }
.nw-card-source a { color: #63452e; text-decoration: underline; margin-inline-end: .6rem; }
.ci-archive .ar-card-media.ar-fit-vehicle {
  display: grid; grid-template: minmax(0,1fr) / minmax(0,1fr); place-items: center;
  box-sizing: border-box; aspect-ratio: 16/9; padding: 10px 14px;
}
.ci-archive .ar-card-media.ar-fit-vehicle .ar-card-thumb {
  width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; transform: none;
}
.nw-brand-gallery { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,10rem),1fr)); gap: 1rem; margin: .8rem 0 2rem; }
.nw-brand-gallery figure { margin: 0; min-width: 0; }
.nw-brand-gallery a { display: grid; place-items: center; height: 8rem; padding: .8rem; border: 1px solid var(--nw-rule); border-radius: 3px; }
.nw-brand-dark { background: #332f2e; }
.nw-brand-light { background: #e6dfd1; }
.nw-brand-gallery a img { max-width: 100%; max-height: 6.25rem; margin: 0; object-fit: contain; }
.nw-brand-gallery figcaption { margin-top: .35rem; font-size: .875rem; color: var(--nw-ink); }
.nw-extra summary { color: #63452e; font-size: .9375rem; cursor: pointer; }
.nw-extra dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .3rem 1rem; margin: .5rem 0; }
.nw-extra dl > div { display: flex; justify-content: space-between; gap: .5rem; padding-block: .25rem; border-bottom: 1px solid var(--nw-rule); font-size: .875rem; }
.nw-extra dd { margin: 0; font-variant-numeric: tabular-nums; }

.nw-slot-section .nw-slot-figure {
  margin: .75rem 0 1.25rem;
  color: #382f25;
}
.nw-slot-section .nw-slot-figure figcaption {
  margin: 0 0 .65rem;
  color: #51463a;
  font: inherit;
  font-size: .9375rem;
}
.nw-slot-section .nw-slot-board {
  box-sizing: border-box;
  width: min(100%, 16.5rem);
  padding: .45rem;
  border: 1px solid #a69b87;
  border-radius: .25rem;
  background: #e1dbce;
}
.nw-slot-section .nw-slot-cells {
  display: grid;
  grid-template-columns: repeat(var(--nw-slot-cols, 7), minmax(0, 1fr));
  gap: 3px;
}
.nw-slot-section .nw-slot {
  display: block;
  box-sizing: border-box;
  aspect-ratio: 1;
  border: 1px solid;
  border-radius: 2px;
}
.nw-slot-section .nw-slot-open { background: #6c4932; border-color: #543923; }
.nw-slot-section .nw-slot-off { background: #f3eee4; border-color: #a89c89; border-style: dashed; }
.nw-slot-section .nw-slot-legend, .nw-slot-section .nw-slot-legend > span {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.nw-slot-section .nw-slot-legend {
  flex-wrap: wrap;
  gap: .4rem 1rem;
  margin-top: .55rem;
  color: #51463a;
  font-size: .8125rem;
}
.nw-slot-section .nw-slot-legend .nw-slot { width: .85rem; }
