/* System website base plate: window chrome, grid body, filter chips, status pills,
   callout, initials badges, MiniPlate thumbnails. Loaded after home-netflix.css on
   .nx pages; every selector is scoped under .nx. Colour rules: white plates on paper,
   1px --line borders, 12px radius, pastel only on role badges (--pc/--pi), signal red
   only on the callout hairline. The red-light pill is a warm neutral, once per plate. */

/* -- Tokens for the system pages: mono switch, the warm red-light tint, and a darker third ink.
   home-netflix's --ink-3 (#9b9da3) is 2.6:1 on paper; the system pages set every eyebrow, caption,
   chip label and column head in it, so here it is #6b6e75 (5.2:1). Decorative rules use --line. */
.nx.nx-sys,
.nx .nx-sys {
  --mono: 'JetBrains Mono', 'Geist Mono', ui-monospace, Menlo, monospace;
  --red-tint: #f6ede9;
  --plate-shadow: 0 30px 80px -40px rgb(0 0 0 / 35%);
  --plate-shadow-compact: 0 16px 40px -30px rgb(0 0 0 / 35%);
  --ink-3: #6b6e75;
}

/* -- Window frame */
.nx .win {
  position: relative;
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--plate-shadow, 0 30px 80px -40px rgb(0 0 0 / 35%));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: 'bar bar' 'rail body' 'note note';
  overflow: hidden;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--ink);
  text-align: left;
}
.nx .win[data-mode='compact'] {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: 'bar' 'body' 'note';
  box-shadow: var(--plate-shadow-compact, 0 16px 40px -30px rgb(0 0 0 / 35%));
}
.nx .win-bar {
  grid-area: bar;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 14px;
  background: #f6f5f1;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.nx .win-dots {
  display: inline-flex;
  flex: none;
}
.nx .win-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  display: inline-block;
  margin-right: 4px;
}
.nx .win-title {
  font: 600 15px var(--display);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 10ch;
  flex: 1 1 auto;
}
.nx .win-src {
  font: 11px var(--mono);
  color: var(--ink-3);
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nx a.win-src:hover {
  color: var(--ink);
}
.nx .win-roles {
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
  display: flex;
  gap: 4px;
  flex: none;
}
.nx .win-roles li {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--pc, #c8d6ce);
  color: var(--pi, #1e2d26);
  font: 500 10px var(--mono);
  display: inline-grid;
  place-items: center;
}
.nx .win-roles a {
  color: inherit;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}
.nx .win-rail {
  grid-area: rail;
  width: 150px;
  padding: 12px 0;
  border-right: 1px solid var(--line);
  background: #fbfaf7;
  font-size: 12.5px;
}
.nx .win-rail a,
.nx .win-rail span {
  display: block;
  padding: 6px 14px;
  color: var(--ink-2);
}
.nx .win-rail a:hover {
  color: var(--ink);
}
.nx .win-rail .on {
  background: #fff;
  color: var(--ink);
  box-shadow: inset 2px 0 0 var(--ink);
}
.nx .win-body {
  grid-area: body;
  overflow-x: auto;
  min-width: 0;
}
/* a body wider than its window fades at the right edge (sys-anchorbar.js sets is-overflow), so a cut column reads as more to scroll */
.nx .win-body.is-overflow {
  mask-image: linear-gradient(90deg, #000 calc(100% - 56px), rgb(0 0 0 / 15%));
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), rgb(0 0 0 / 15%));
}
.nx .win-note {
  grid-area: note;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-2);
}
.nx .win-note .k {
  color: var(--ink-3);
}
.nx .win-note a {
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.nx .win-note a:hover {
  border-color: var(--ink);
}

/* -- Plate tables. The table class is win-grid, never grid: tailwind.css ships a `.grid { display: grid }`
   utility that would split thead from tbody. Every table inside a window is pinned to table layout
   here as well, so a stray utility class on a plate table cannot break the columns again. Column heads
   may wrap at their CamelCase humps (plate-grid.njk spaces them) so a long head never widens its column. */
.nx .win table {
  display: table;
  grid-template-columns: none;
  gap: 0;
}
.nx .win table thead {
  display: table-header-group;
}
.nx .win table tbody {
  display: table-row-group;
}
.nx .win table tfoot {
  display: table-footer-group;
}
.nx .win table tr {
  display: table-row;
}
.nx .win table th,
.nx .win table td {
  display: table-cell;
}
.nx .win .win-grid {
  table-layout: auto;
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.nx .win .win-grid th {
  font: 400 11px var(--mono);
  letter-spacing: 0.04em;
  color: var(--ink-2);
  text-align: left;
  padding: 8px 12px;
  border-bottom: 2px solid var(--ink);
  white-space: normal;
  line-height: 1.25;
  vertical-align: bottom;
}
.nx .win .win-grid td {
  padding: 7px 12px;
  border-bottom: 1px solid #f0efe9;
  height: 32px;
  white-space: nowrap;
  vertical-align: middle;
}
.nx .win .win-grid tr:last-child td {
  border-bottom: 0;
}
.nx .win .n {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.nx .win .id,
.nx .win .ref {
  font-family: var(--mono);
  font-size: 12px;
}
.nx .win .tick {
  font-family: var(--mono);
  color: var(--ink);
}

/* -- Filter chips */
.nx .win-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.nx .chip {
  font: 11.5px var(--mono);
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  line-height: 1.35;
}
.nx .chip.f {
  color: var(--ink-3);
}
.nx .chip.me {
  border-radius: 999px;
  padding-left: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23121213' stroke-width='1.5' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E")
    6px 50% / 10px no-repeat #fff;
}
.nx .chip.dashed {
  border-style: dashed;
  color: var(--ink-2);
}

/* -- Status pills: light tints of the poster pairs; light is the warm red-light, once per plate */
.nx .pill {
  display: inline-block;
  font: 500 11.5px var(--body);
  padding: 3px 8px;
  border-radius: 4px;
  line-height: 1.35;
  white-space: nowrap;
}
.nx .pill.planned {
  background: #eceef1;
  color: #262c33;
}
.nx .pill.released {
  background: #e6eff3;
  color: #193b45;
}
.nx .pill.inprogress {
  background: #eaece2;
  color: #303a22;
}
.nx .pill.completed {
  background: #e4ece7;
  color: #1e2d26;
}
.nx .pill.light {
  background: var(--red-tint, #f6ede9);
  color: #9e1b1b;
}
/* Status badges stay in the document flow, including inside product previews. */
.nx .pill.planned,
.nx .pill.released,
.nx .pill.inprogress,
.nx .pill.completed,
.nx .pill.light {
  position: static;
  transform: none;
  opacity: 1;
  width: auto;
  height: auto;
  top: auto;
  left: auto;
  z-index: auto;
  display: inline-block;
}

/* -- Initials badge (people are initials, never names) */
.nx .av {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--pc, #c8d6ce);
  color: var(--pi, #1e2d26);
  font: 500 10px var(--mono);
  font-style: normal;
  text-decoration: none;
  vertical-align: middle;
}

/* -- Callout: the one red hairline a plate may carry (:not(text) keeps the .circuit svg labels untouched).
   Inside a window bar it is a flex item at the end of the bar, never over the title. */
.nx .callout:not(text) {
  position: absolute;
  top: -12px;
  right: 16px;
  background: #fff;
  border: 1.5px solid var(--red);
  color: var(--red);
  font: 11.5px var(--mono);
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1.35;
  white-space: nowrap;
  z-index: 2;
}
.nx .callout[data-at='top-left'] {
  right: auto;
  left: 16px;
}
.nx .callout[data-at='bottom-right'] {
  top: auto;
  bottom: -12px;
}
.nx .win > .callout:not(text) {
  top: 8px;
  right: 12px;
}
.nx .win > .callout[data-at='bottom-right'] {
  top: auto;
  bottom: 12px;
}
.nx .win-bar .callout:not(text) {
  position: static;
  margin-left: auto;
  flex: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nx .win-bar .win-roles + .callout:not(text) {
  margin-left: 0;
}
/* Compact windows (screens row, doc rows, the industry three-up) are 450–560px wide: the bar wraps
   instead of truncating the title, so a callout that does not fit beside the title, source and
   initials takes the next line, right-aligned. App-mode bars are wide enough to stay on one line. */
.nx .win[data-mode='compact'] .win-bar {
  flex-wrap: wrap;
  row-gap: 4px;
  padding-top: 5px;
  padding-bottom: 5px;
}
.nx .win[data-mode='compact'] .win-bar .bar-break {
  flex-basis: 100%;
  height: 0;
  margin: 0;
}
.nx .win[data-mode='compact'] .win-bar .callout:not(text) {
  margin-left: auto;
}

/* -- MiniPlate thumbnail: pure HTML, reads as a screen at 220px */
.nx .mini {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  font-size: 8.5px;
  line-height: 1.3;
  position: relative;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 16px;
}
.nx a.mini:hover {
  border-color: var(--ink-3);
}
.nx .mini-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: #f6f5f1;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.nx .mini-bar b {
  font: 600 9.5px/1.2 var(--display);
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  min-width: 0;
}
.nx .mini .pill {
  font-size: 8px;
  padding: 1px 5px;
  border-radius: 3px;
}
.nx .mini-head {
  display: grid;
  grid-template-columns: var(--mini-tpl, 2fr 1.6fr 1fr 1fr);
  gap: 6px;
  padding: 4px 8px;
  font-family: var(--mono);
  font-size: 7.5px;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
}
.nx .mini-head span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nx .mini-row {
  display: grid;
  grid-template-columns: var(--mini-tpl, 2fr 1.6fr 1fr 1fr);
  gap: 6px;
  padding: 5px 8px;
  align-items: center;
}
.nx .mini-row i {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: #e6e5e0;
  font-style: normal;
}
.nx .mini-row i.pill {
  height: auto;
  width: auto;
  justify-self: start;
  background: #eceef1;
}
.nx .mini-row i.pill.released {
  background: #e6eff3;
}
.nx .mini-row i.pill.inprogress {
  background: #eaece2;
}
.nx .mini-row i.pill.completed {
  background: #e4ece7;
}
.nx .mini-note {
  position: absolute;
  right: 6px;
  bottom: 4px;
  font: 7.5px var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* -- Screen-reader only */
.nx .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* -- Phones: app-mode windows drop the rail */
@media (max-width: 900px) {
  .nx .win[data-mode='app'] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'bar' 'body' 'note';
  }
  .nx .win-rail {
    display: none;
  }
  .nx .win-bar {
    gap: 8px;
    padding: 0 12px;
  }
}

/* -- Phones: the bar wraps, the title may take two lines, the callout takes its own line, the
   source label yields to the initials */
@media (max-width: 640px) {
  .nx .win-bar {
    flex-wrap: wrap;
    padding: 6px 12px;
    row-gap: 4px;
  }
  .nx .win-title {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.2;
    padding: 3px 0;
  }
  .nx .win-bar .callout:not(text) {
    flex-basis: 100%;
    margin: 2px 0 2px;
    width: auto;
    max-width: 100%;
    white-space: normal;
    line-height: 1.35;
  }
  .nx .win-bar:has(.win-roles) .win-src {
    display: none;
  }
  .nx .win > .callout:not(text) {
    position: static;
    justify-self: start;
    margin: 8px 12px 12px;
  }
}

/* -- Phones: the sysnav keeps its five groups in one or two rows instead of a column
   (home-netflix.css wraps the bar under 900px; these rules only size and order its items) */
.nx .sysnav[data-sysnav-ready] .sysnav-menu {
  display: none;
}
.nx .sysnav[data-sysnav-ready] .sysnav-group.is-open > .sysnav-menu {
  display: block;
}
.nx .sysnav[data-sysnav-ready] .sysnav-group.is-open > button {
  color: var(--ink);
  background: #f1f0ec;
}
.nx .sysnav[data-sysnav-ready] .sysnav-group:nth-last-child(-n + 2) > .sysnav-menu {
  left: auto;
  right: 0;
}
.nx .sysnav button:focus-visible,
.nx .sysnav-menu a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
/* Keep the floating global bar above the product and section navigation. */
.nx.nx-sys {
  --system-quick-offset: 0px;
  --system-nav-height: 0px;
  --system-scroll-nav-height: var(--system-nav-height);
}
.nx.nx-sys:has(> .nx-quick-nav.show) {
  --system-quick-offset: 86px;
}
.nx.nx-sys .sysnav {
  top: var(--system-quick-offset);
}
.nx.nx-sys .anchorbar {
  top: calc(var(--system-quick-offset) + var(--system-nav-height, 56px));
}
/* Section links clear every sticky navigation row, including tablet wrapping. */
.nx.nx-sys [id] {
  scroll-margin-top: calc(var(--system-quick-offset) + var(--system-scroll-nav-height) + 48px);
}
/* Align the product navigation with the 1300px main bar and its inner padding. */
@media (min-width: 901px) {
  .nx.nx-sys .sysnav {
    padding-inline: max(46px, calc((100% - 1256px) / 2));
  }
}
@media (max-width: 900px) {
  .nx.nx-sys .sysnav {
    row-gap: 4px;
  }
  .nx.nx-sys .sysnav-home {
    flex: 1 1 auto;
    margin-right: 0;
  }
  .nx.nx-sys .sysnav-cta {
    order: 1;
    margin-left: 0;
  }
  /* Wrapping keeps every disclosure reachable without clipping its open menu. */
  .nx.nx-sys .sysnav-groups {
    order: 2;
    flex: 1 1 100%;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2px 4px;
    overflow: visible;
    scrollbar-width: none;
    min-width: 0;
  }
  .nx.nx-sys .sysnav-groups::-webkit-scrollbar {
    display: none;
  }
  .nx.nx-sys .sysnav-group {
    position: static;
    width: auto;
    flex: none;
  }
  .nx.nx-sys .sysnav-group > button {
    padding: 6px 9px;
    font-size: 13.5px;
    white-space: nowrap;
  }
  .nx.nx-sys .sysnav[data-sysnav-ready] .sysnav-group > .sysnav-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    min-width: 0;
    max-width: none;
    max-height: min(65vh, 36rem);
    overflow-y: auto;
  }
}
/* -- Phones: the sysnav scrolls away with the page; only the anchorbar (a 40px select) stays pinned */
@media (max-width: 640px) {
  .nx.nx-sys {
    --system-scroll-nav-height: 0px;
  }
  .nx.nx-sys .sysnav {
    position: relative;
    top: auto;
  }
  .nx.nx-sys .anchorbar {
    top: var(--system-quick-offset);
  }
  .nx .th-row,
  .nx .doc-row,
  .nx .stage-sec,
  .nx .faq-item {
    scroll-margin-top: 56px;
  }
}
