:root {
  color-scheme: light;
  --paper: #f7f8f6;
  --surface: #fff;
  --ink: #182331;
  --muted: #506072;
  --faint: #637080;
  --edge: #d5dce0;
  --accent: #244bd5;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --gutter: clamp(20px, 4vw, 64px);
  --workspace-width: 1440px;
  font: 15px/1.55 "Instrument Sans", "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box }
body { margin: 0 }
a { color: inherit; text-decoration: none }
button, input, textarea, select { font: inherit; color: inherit }
button, select { cursor: pointer }
h1, h2, h3, p { margin: 0 }
h1, h2, h3 { line-height: 1.25; overflow-wrap: anywhere }
input::placeholder, textarea::placeholder { color: var(--faint); opacity: 1 }
:focus-visible { outline: 3px solid #5785f4; outline-offset: 3px }
main:focus { outline: none }
[hidden] { display: none !important }
svg.icon { width: 19px; height: 19px; display: inline-block; flex: none; vertical-align: middle }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums }
.skip { position: fixed; top: -65px; left: 16px; padding: 10px 16px; background: white; z-index: 10 }
.skip:focus { top: 9px }

/* The workspace navigation shares its alignment with each page. */
.masthead { background: #182230; color: #e9edf5; border-bottom: 1px solid #0e1723 }
.masthead-inner, .main-shell {
  max-width: var(--workspace-width); padding-inline: var(--gutter); margin-inline: auto;
}
.masthead-inner { display: flex; gap: clamp(24px,5vw,76px); align-items: stretch; min-height: 66px }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; color: white }
.brand span { font: 700 24px/1 "Bricolage Grotesque", "Avenir Next", sans-serif; letter-spacing: -1.3px }
.brand-mark { width: 31px; height: 31px; color: #acc1ff }
#nav { display: flex; align-items: stretch; gap: clamp(8px,1.6vw,28px) }
.nav-item {
  display: inline-flex; position: relative; align-items: center; justify-content: center; gap: 7px;
  padding: 2px 7px 0; color: #c4cfdd; font-size: 14px; font-weight: 530; white-space: nowrap;
}
.nav-item .icon { width: 17px; height: 17px }
.nav-item::after { position: absolute; bottom: -1px; left: 5px; right: 5px; height: 3px; background: transparent; content: "" }
.nav-item:hover, .nav-item[aria-current=page] { color: #fff }
.nav-item[aria-current=page]::after { background: #a7c0ff }
.workspace { display: flex; align-items: center; gap: 8px; margin-left: auto; color: #d1dae5; font-size: 13px; white-space: nowrap }
.workspace .icon { color: #b6c3d8; width: 16px; height: 16px }
#crumbs { display: flex; align-items: center; gap: 8px; min-height: 51px; font-size: 12px; color: var(--faint); overflow-wrap: anywhere }
#crumbs .icon { width: 15px; height: 15px }
#crumbs .separator { color: #9aa4ad }
#crumbs b { font-weight: 550; color: var(--ink) }
#crumbs a:hover, .linked:hover, .secondary-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px }
main { min-width: 0; padding: 9px 0 64px }
.page-title, .section-head, .actions, .toolbar, .badges, .row-head, .inline { display: flex; align-items: center; gap: 10px }
.page-title, .section-head, .row-head { justify-content: space-between }
.actions, .toolbar, .badges, .page-title, .section-head { flex-wrap: wrap }
.page-title { align-items: center; gap: 14px 24px; margin: 0 0 26px }
.page-title h1 { font-size: clamp(32px,3.15vw,46px); line-height: 1.17; letter-spacing: -.045em; font-weight: 680 }
.page-title p, .subtle { color: var(--muted); font-size: 14px }
.page-title p { margin-top: 7px }
.section-head { margin: 25px 0 12px; gap: 10px 16px }
.section-head h2, .panel h2 { display: flex; align-items: center; gap: 9px; font-size: 20px; font-weight: 620; letter-spacing: -.028em }
.count { display: inline-block; font: 12px/1.6 var(--mono); color: #526274; padding: 0 6px; border-radius: 3px; background: #e9edf0 }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 39px; padding: 7px 14px;
  border: 1px solid #bdc7d0; border-radius: 5px; background: var(--surface); color: var(--ink);
  font-size: 14px; font-weight: 560; line-height: 1.4; white-space: nowrap;
  transition: background .16s, border-color .16s, transform .16s;
}
.btn:hover { background: #f1f4f9; border-color: #8899af }
.btn:active { transform: translateY(1px) }
.btn.primary { background: var(--accent); border-color: var(--accent); color: white }
.btn.primary:hover { background: #193bad; border-color: #193bad }
.btn.small { min-height: 32px; font-size: 13px; padding: 5px 10px }
.btn .icon, .small-icon .icon { width: 16px; height: 16px }
.text-btn, .linked { color: var(--accent); font-weight: 550 }
.text-btn { font-size: 13px; background: transparent; border: 0 }
.text-btn:hover { text-decoration: underline; text-underline-offset: 3px }
.input-wrap { display: flex; align-items: center; gap: 9px; max-width: 100%; width: 235px; min-height: 36px; padding: 3px 11px; border: 1px solid #c4cdd4; background: white; border-radius: 5px }
.input-wrap .icon { width: 16px; height: 16px; color: var(--faint) }
.input-wrap input { min-width: 0; width: 100%; flex: 1; height: 30px; border: 0; padding: 0; background: transparent; font-size: 14px }
.input-wrap:focus-within { outline: 2px solid var(--accent); outline-offset: 1px }
.input-wrap input:focus { outline: none }
.panel, .table-scroll, .toolbar-panel { border: 1px solid var(--edge); border-radius: 7px; background: var(--surface) }
.panel { padding: 20px 22px; margin-bottom: 16px }
.panel p { overflow-wrap: anywhere }
.empty { background: var(--surface); border: 1px dashed #bdc9d4; padding: 30px 18px; text-align: center; color: var(--muted); border-radius: 6px }
.kind, .status, .version-tag {
  font-size: 12px; line-height: 1.55; display: inline-flex; align-items: center; gap: 6px;
  border-radius: 3px; padding: 2px 7px; font-weight: 550; white-space: nowrap;
}
.version-tag { font-family: var(--mono); background: #eff2f7; color: #425466 }
.kind, .status { background: #edf1f4; color: #475a6a }
.fix { background: #fff0dd; color: #84500e }
.feature { background: #e8eefe; color: #2547a7 }
.tune { background: #eee9f6; color: #64527d }
.released { background: #e5f1eb; color: #236241 }
.draft { background: #fff1d8; color: #7e5715 }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor }
.period-date { white-space: nowrap }
.card-glyph { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 6px; background: #ecf0fd; color: var(--accent) }
.card-glyph .icon { width: 20px; height: 20px }
.branch-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center }
.branch-line .icon { width: 15px; height: 15px }
.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; color: var(--muted); font-size: 14px }
.meta-line strong { color: var(--ink); font-weight: 550 }

/* Filters and query results. */
.toolbar { gap: 12px 16px }
.toolbar-panel { padding: 15px 18px; margin-bottom: 19px }
.toolbar-panel .input-wrap { flex: 1 1 220px; min-width: 0 }
.toolbar > label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px }
.toolbar select, .field select, .field input:not([type=checkbox]), .field textarea {
  min-width: 0; min-height: 37px; padding: 6px 9px; border: 1px solid #bfc9d2; border-radius: 5px; background: white; color: var(--ink);
}
.toolbar select { max-width: min(245px,60vw) }
.table-scroll { max-width: 100%; overflow: auto }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 14px }
th, td { padding: 13px 15px; border-bottom: 1px solid #e0e5e8; vertical-align: middle }
th { background: #f0f3f4; color: #536172; font-size: 12px; font-weight: 600; white-space: nowrap }
td { overflow-wrap: anywhere }
tbody tr:last-child td { border-bottom: 0 }
tbody tr:hover { background: #f7f9fd }
table .mono { font-size: 13px }
.change-reference { display: grid; gap: 3px }
.change-reference .linked { color: var(--ink); font-size: 15px }
.change-reference .linked:hover { color: var(--accent) }
.secondary-link { color: var(--muted); width: fit-content }
.release-reference { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px }
.release-reference + .release-reference { margin-top: 6px }
.release-reference > span:first-child { color: var(--muted) }

/* Shared form and status primitives. */
.dialog-head, .dialog-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px }
.dialog-head { border-bottom: 1px solid var(--edge) }
.dialog-head h2 { font-size: 20px }
.dialog-foot { justify-content: flex-end; border-top: 1px solid var(--edge) }
dialog.registry-editor { padding: 0; width: 540px; max-width: calc(100vw - 24px); max-height: 92dvh; color: var(--ink); border: 1px solid var(--edge); border-radius: 9px }
dialog::backdrop { background: #101b2b66 }
.dialog-body { padding: 20px 22px; max-height: calc(92dvh - 144px); overflow: auto }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 550 }
.field-full { grid-column: 1/-1 }
.field-toggle { display: flex; align-items: center; gap: 7px; font-size: 14px }
.field input, .field select, .field textarea { width: 100%; font-weight: 400 }
.field input[type=checkbox] { width: auto }
.field textarea { resize: vertical }
.landing-fields { border: 0; padding: 0; margin: 0; min-width: 0 }
.plan-versions { margin: 0; min-width: 0; border: 1px solid var(--edge); border-radius: 5px; padding: 8px 12px; max-height: 220px; overflow: auto }
.plan-versions label { overflow-wrap: anywhere }
.error { color: #973127; background: #ffefeb; border-radius: 4px; padding: 9px 12px; margin-top: 12px }
.error:empty, #toast:empty { display: none }
#toast { position: fixed; right: 18px; bottom: 18px; max-width: calc(100vw - 36px); z-index: 3; padding: 10px 16px; color: white; background: #1d2b3b; border-radius: 5px; font-size: 14px }

@media (max-width: 940px) {
  .masthead-inner { gap: 25px }
  #nav { gap: 5px }
  .nav-item { padding-inline: 6px }
  .workspace { font-size: 12px }
}
@media (max-width: 760px) {
  .masthead-inner { display: grid; grid-template-columns: auto 1fr; gap: 0 14px; min-height: 0 }
  .brand { min-height: 49px }
  .brand span { font-size: 22px }
  .brand-mark { width: 26px; height: 26px }
  .workspace { grid-column: 2; grid-row: 1; justify-self: end }
  #nav { grid-column: 1/-1; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0; margin-inline: -6px }
  .nav-item { min-height: 42px; padding: 0 3px; font-size: 13px; gap: 5px }
  .nav-item .icon { width: 15px; height: 15px }
  #crumbs { min-height: 40px; font-size: 12px }
  main { padding: 10px 0 42px }
  .page-title { margin-bottom: 20px }
  .page-title h1 { font-size: 32px }
  .toolbar-panel { padding: 12px }
  .toolbar-panel .input-wrap { flex-basis: 100% }
  .toolbar { gap: 10px }
  .toolbar select { max-width: 60vw }
}
@media (max-width: 650px) {
  .table-scroll { border: 0; border-radius: 0; background: none; overflow: visible }
  .table-scroll table, .table-scroll tbody { display: block }
  .table-scroll thead { position: absolute; width: 1px; height: 1px; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap }
  .table-scroll tbody tr { display: grid; gap: 0; padding: 8px 13px; margin-bottom: 10px; border: 1px solid var(--edge); border-radius: 6px; background: white }
  .table-scroll td { display: grid; grid-template-columns: minmax(64px,23%) minmax(0,1fr); gap: 10px; align-items: baseline; padding: 7px 0; border: 0 }
  .table-scroll td::before { content: attr(data-label); color: var(--muted); font-size: 12px }
  .cell-value { min-width: 0 }
  .section-head h2 { font-size: 18px }
}
@media (max-width: 440px) {
  :root { --gutter: 15px }
  .nav-item .icon { display: none }
  .page-title { align-items: flex-start }
  .page-title h1 { font-size: 30px }
  .btn { padding-inline: 11px }
  .form-grid { grid-template-columns: 1fr }
  .toolbar > label:not(.input-wrap) { display: grid; flex: 1 1 88px; gap: 4px }
  .toolbar select { width: 100%; max-width: 100% }
}
@media (prefers-reduced-motion: no-preference) {
  .page-title { animation: page-in .22s ease-out both }
  @keyframes page-in { from { opacity: .35; transform: translateY(3px) } to { opacity: 1; transform: translateY(0) } }
}

.blueprint {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .94fr);
  align-items: center;
  gap: clamp(32px, 5vw, 84px);
  position: relative;
  isolation: isolate;
  padding: clamp(24px, 3.2vw, 46px);
  background: #244bd5;
  color: #fff;
  border-radius: 8px;
}
.blueprint::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background-image: linear-gradient(#ffffff14 1px, transparent 1px), linear-gradient(90deg, #ffffff14 1px, transparent 1px),
    linear-gradient(#ffffff17 1px, transparent 1px), linear-gradient(90deg, #ffffff17 1px, transparent 1px);
  background-size: 16px 16px, 16px 16px, 80px 80px, 80px 80px;
  mask-image: linear-gradient(100deg, transparent, #0003 32%, #000 70%);
}
.blueprint-single { grid-template-columns: minmax(0, 1fr); }
.blueprint-query { min-width: 0; }
.blueprint-query h2 { font-size: clamp(24px, 2.55vw, 38px); line-height: 1.25; letter-spacing: -.045em; font-weight: 650; }
.blueprint-query p { margin: 10px 0 22px; color: #e0e7ff; font-size: 14px; }
.blueprint-search {
  display: flex; align-items: center; gap: 10px; max-width: 460px; min-height: 46px; padding: 4px 4px 4px 13px;
  border: 1px solid #fff; border-radius: 5px; background: #fff; color: #536179;
}
.blueprint-search .icon { width: 17px; height: 17px; }
.blueprint-search input { flex: 1; width: 0; min-width: 0; height: 35px; border: 0; background: transparent; padding: 0; color: var(--ink); font-size: 14px; }
.blueprint-search input:focus-visible { outline: none; }
.blueprint-search:focus-within { outline: 2px solid #dfe8ff; outline-offset: 3px; }
.blueprint-search button { flex: none; padding: 0 17px; min-height: 35px; border-radius: 3px; border: 0; color: #fff; font-size: 14px; font-weight: 600; background: #173291; }
.blueprint-search button:hover { background: #112774; }
.trace-drawing { --trace-gap: clamp(28px, 3vw, 54px); margin: 0; min-width: 0; }
.trace-drawing figcaption {
  display: flex; align-items: center; gap: 6px; color: #e2e9ff; font-size: 12px; font-weight: 600; margin-bottom: 8px;
}
.trace-drawing figcaption .icon { width: 14px; height: 14px; }
.trace-nodes { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: var(--trace-gap); align-items: center; }
.trace-origin, .trace-targets a {
  position: relative; min-width: 0; display: block; max-width: 100%; border: 1px solid #97b0ff; background: #2146bc;
  color: #fff; border-radius: 4px; padding: 8px 10px; line-height: 1.35; overflow-wrap: anywhere;
}
.trace-origin:hover, .trace-targets a:hover { background: #19399f; border-color: #fff; color: #fff; }
.blueprint a:focus-visible, .blueprint button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.trace-origin strong, .trace-target-title strong { display: block; font: 650 15px/1.3 var(--mono); }
.trace-origin > span { display: block; margin-top: 5px; color: #e1e9ff; font-size: 12px; }
.trace-origin:has(+ .trace-targets)::after, .trace-targets li::before {
  content: ""; position: absolute; width: calc(var(--trace-gap) / 2 + 1px); top: 50%; border-top: 1px solid #c2d2ff; pointer-events: none;
}
.trace-origin::after { left: 100%; }
.trace-targets { list-style: none; padding: 0; margin: 0; }
.trace-targets li { position: relative; padding: 5px 0; }
.trace-targets li::before { right: 100%; }
.trace-targets li::after {
  content: ""; position: absolute; right: calc(100% + var(--trace-gap) / 2); top: 0; bottom: 0; border-left: 1px solid #c2d2ff; pointer-events: none;
}
.trace-targets li:first-child::after { top: 50%; }
.trace-targets li:last-child::after { bottom: 50%; }
.trace-targets a::before, .trace-origin:has(+ .trace-targets)::before {
  content: ""; position: absolute; box-sizing: border-box; width: 6px; height: 6px; border-radius: 50%; top: calc(50% - 3px);
  background: #eef2ff; border: 1px solid #becfff; z-index: 1;
}
.trace-targets a::before { left: -4px; }
.trace-origin::before { right: -4px; }
.trace-target-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 7px; }
.trace-target-title > span { color: #e3ebff; font: 12px/1.4 var(--mono); }
.trace-targets small { display: flex; align-items: center; gap: 5px; margin-top: 3px; color: #e3ebff; font: 12px/1.35 var(--mono); }
.trace-targets small .icon { width: 12px; height: 12px; }
.trace-pending { color: #e3ebff; font-size: 13px; }
.directory-sections {
  display: grid; grid-template-columns: minmax(0, 2.6fr) minmax(220px, 1fr); gap: clamp(28px, 3.25vw, 58px);
  margin-top: clamp(26px, 2.8vw, 44px);
}
.directory-main, .release-rail { min-width: 0; }
.directory-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; min-height: 38px; }
.directory-heading h2 { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: clamp(19px, 1.55vw, 23px); font-weight: 650; letter-spacing: -.03em; color: var(--ink); }
#inventory-count { font: 500 13px/1.4 var(--mono); color: var(--muted); }
.directory-heading .input-wrap { width: min(214px, 100%); min-height: 36px; display: flex; align-items: center; gap: 7px; padding: 4px 10px; background: #fff; border: 1px solid var(--edge); border-radius: 4px; color: var(--muted); }
.directory-heading .input-wrap .icon { width: 15px; height: 15px; }
.directory-heading .input-wrap input { flex: 1; width: 0; min-width: 0; height: 26px; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 13px; }
.directory-heading .input-wrap:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.directory-heading .input-wrap input:focus-visible { outline: none; }
.release-rail .directory-heading a { color: var(--accent); font-size: 13px; font-weight: 550; }
.release-rail .directory-heading a:hover { text-decoration: underline; }
.inventory-head, .inventory-row { display: grid; grid-template-columns: minmax(0, 2.8fr) minmax(74px, 1fr) minmax(58px, .82fr) minmax(40px, .5fr); align-items: center; gap: 12px; padding-inline: 13px; }
.inventory-head { font-size: 12px; font-weight: 550; color: var(--muted); background: #efeee9; border-top: 1px solid var(--edge); border-bottom: 1px solid var(--edge); padding-block: 8px; }
.inventory-head > :last-child, .inventory-count { text-align: right; }
.inventory-list, .release-list { list-style: none; padding: 0; margin: 0; }
.inventory-row { position: relative; min-height: 68px; padding-block: 10px; border-bottom: 1px solid var(--edge); }
.inventory-row:hover, .inventory-row:focus-within { background: #f0f1ed; }
.inventory-identity { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--ink); overflow-wrap: anywhere; }
.inventory-identity::after { content: ""; position: absolute; inset: 0; }
.inventory-symbol { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #d5daf1; border-radius: 6px; color: #314a99; background: #eceff8; }
.inventory-symbol .icon { width: 19px; height: 19px; }
.inventory-identity strong { display: block; font: 600 clamp(14px, 1.12vw, 17px)/1.4 var(--mono); letter-spacing: -.035em; }
.inventory-identity small { display: block; font-size: 13px; line-height: 1.4; color: var(--muted); margin-top: 3px; }
.inventory-identity:hover strong { color: var(--accent); }
.inventory-cell { min-width: 0; font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.inventory-count { font-family: var(--mono); }
.inventory-version { position: relative; z-index: 1; color: var(--accent); font: 550 13px/1.45 var(--mono); }
.inventory-version:hover { text-decoration: underline; }
.inventory-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.inventory-empty, .directory-empty { color: var(--muted); font-size: 13px; }
.directory-empty { margin: 0; padding: 22px 12px; border-bottom: 1px solid var(--edge); }
.release-list { border-top: 2px solid var(--ink); }
.release-list li { position: relative; padding-left: 22px; }
.release-list li::before { content: ""; position: absolute; left: 3px; top: 0; bottom: 0; width: 1px; background: var(--edge); }
.release-list li:first-child::before { top: 23px; }
.release-list li:last-child::before { bottom: auto; height: 23px; }
.release-list li:only-child::before { display: none; }
.release-list li::after { content: ""; position: absolute; left: 0; top: 20px; width: 7px; height: 7px; border: 1px solid var(--accent); border-radius: 50%; background: var(--paper); box-sizing: border-box; }
.release-list li:first-child::after { background: var(--accent); }
.release-list a { display: block; padding: 12px 0; color: var(--ink); border-bottom: 1px solid var(--edge); overflow-wrap: anywhere; }
.release-list a:hover strong, .release-list a:hover .release-component { color: var(--accent); }
.release-top { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 3px 8px; }
.release-top strong { font: 650 16px/1.4 var(--mono); }
.release-top time { font: 12px/1.5 var(--mono); color: var(--muted); }
.release-component { display: block; margin-top: 2px; font: 13px/1.45 var(--mono); color: var(--muted); }
@media (max-width: 900px) {
  .blueprint { gap: 22px; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); }
  .blueprint-single { grid-template-columns: 1fr; }
  .directory-sections { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .blueprint { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .trace-drawing { max-width: 480px; width: 100%; }
  .trace-drawing figcaption { margin-bottom: 3px; }
  .blueprint-query p { margin: 8px 0 14px; }
  .blueprint-search { max-width: none; }
}
@media (max-width: 520px) {
  .blueprint { padding: 20px 16px; }
  .blueprint-query h2 { font-size: 25px; }
  .trace-nodes { grid-template-columns: minmax(0, .84fr) minmax(0, 1fr); }
  .trace-origin, .trace-targets a { padding: 7px 8px; }
  .trace-target-title { gap: 1px 6px; }
  .directory-heading { gap: 7px; margin-bottom: 10px; }
  .directory-heading .input-wrap { max-width: 52%; }
  .inventory-head { display: none; }
  .inventory-list { border-top: 1px solid var(--edge); }
  .inventory-row { grid-template-columns: repeat(3, minmax(0, auto)); justify-content: start; gap: 8px 16px; padding: 12px 4px; }
  .inventory-identity { grid-column: 1 / -1; }
  .inventory-row > :nth-child(2) { margin-left: 46px; }
  .inventory-label { position: static; width: auto; height: auto; clip-path: none; color: var(--muted); margin-right: 4px; font-size: 12px; }
  .inventory-cell, .inventory-version, .inventory-empty { font-size: 12px; }
  .inventory-count { text-align: left; }
}
@media (max-width: 380px) {
  .inventory-row { gap: 6px 10px; }
  .inventory-row > :nth-child(2) { margin-left: 0; }
}

/* Detail pages */
.detail-page { min-width: 0; }
.detail-page > .page-title { padding-bottom: 22px; margin-bottom: 0; border-bottom: 1px solid var(--ink); }
.detail-page .page-title > :first-child { min-width: 0; }
.detail-page .page-title h1 { overflow-wrap: anywhere; }
.component-detail .page-title h1, .version-detail .page-title h1 { font-family: var(--mono); font-weight: 600; }
.detail-page .detail-section { margin-top: 28px; min-width: 0; }
.detail-section > .section-head, .version-facts > .section-head { margin: 0 0 14px; }
.detail-page .section-head h2 { line-height: 1.4; }
.detail-strip, .version-facts dl { margin: 0; }
.detail-strip { display: flex; flex-wrap: wrap; gap: 12px 36px; padding: 18px 0; border-bottom: 1px solid var(--edge); }
.detail-strip > div { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.detail-page dt { color: var(--muted); font-size: 13px; }
.detail-page dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.detail-strip dd { font-weight: 600; }
.detail-key { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.detail-key .mono { color: var(--accent); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.change-note { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 16px; padding: 19px 0; border-bottom: 1px solid var(--edge); }
.change-note h2 { font-size: 14px; font-weight: 600; line-height: 1.7; }
.change-note p, .release-log p { white-space: pre-wrap; overflow-wrap: anywhere; }
.change-note p { max-width: 78ch; line-height: 1.7; }
.version-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(248px, 29%); gap: clamp(22px, 3vw, 48px); align-items: start; margin-top: 26px; }
.version-work, .version-aside { min-width: 0; }
.version-work > .detail-section:first-child { margin-top: 0; }
.version-facts { border-block-start: 2px solid var(--ink); padding: 14px 0 0; }
.version-facts > .section-head { margin-bottom: 8px; }
.version-facts h2, .detail-document h2 { font-size: 16px; }
.version-facts dl > div { display: grid; grid-template-columns: 72px minmax(0,1fr); column-gap: 10px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--edge); }
.version-facts dd { font-size: 14px; }
.detail-document { display: block; margin-top: 22px; padding: 17px; border: 1px solid var(--edge); background: #fff; }
.detail-document-head { display: flex; align-items: center; gap: 9px; }
.detail-document-head .icon { width: 19px; height: 19px; color: var(--accent); }
.detail-document p { margin: 8px 0 14px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.detail-document a { color: var(--accent); }
.release-log { border-block: 1px solid var(--edge); background: #fff; }
.log-group { display: grid; grid-template-columns: 58px minmax(0,1fr); gap: 12px; padding: 18px 18px 19px; }
.log-group + .log-group { border-top: 1px solid var(--edge); }
.log-group h3 { display: flex; align-items: baseline; gap: 8px; font-size: 14px; line-height: 1.65; color: var(--accent); }
.log-group h3::before { content: ""; display: inline-block; width: 3px; height: .8em; background: currentColor; }
.log-group ul { list-style: none; margin: 0; padding: 0; }
.log-group li + li { margin-top: 14px; }
.release-log .linked { font-size: 15px; font-weight: 620; line-height: 1.65; color: var(--ink); overflow-wrap: anywhere; }
.release-log .linked:hover { color: var(--accent); text-decoration: underline; }
.release-log p { margin-top: 3px; font-size: 14px; line-height: 1.65; color: var(--muted); }
.version-branches .table-scroll table { min-width: 0; }
.version-branches .branch-line { flex-wrap: nowrap; overflow-wrap: anywhere; }
@media (min-width: 651px) { .version-branches td:last-child { width: 1%; } }
@media (max-width: 900px) {
  .version-layout { grid-template-columns: minmax(0, 1fr); }
  .version-aside { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 22px; align-items: start; }
  .detail-document { margin-top: 0; }
}
@media (max-width: 560px) {
  .version-aside { grid-template-columns: 1fr; gap: 18px; }
  .detail-page > .page-title { padding-bottom: 16px; }
  .detail-strip { gap: 8px 20px; }
  .change-note { grid-template-columns: 1fr; gap: 4px; }
  .log-group { grid-template-columns: 42px minmax(0,1fr); gap: 10px; padding: 14px 9px; }
  .version-branches :is(td,th) { padding-inline: 8px; }
}

.plan-desk { color: var(--ink); }
.plan-desk ul { list-style: none; margin: 0; padding: 0; }
.plan-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 clamp(24px, 3vw, 40px);
  padding: 20px 0;
  background: #fff;
  border-block: 1px solid var(--edge);
}
.plan-metrics > div { padding: 0 clamp(12px, 2.5vw, 32px); }
.plan-metrics > div + div { border-inline-start: 1px solid var(--edge); }
.plan-metrics dt { color: var(--muted); font-size: 14px; }
.plan-metrics dd { margin: 5px 0 0; font: 540 clamp(30px, 3.4vw, 46px)/1.05 var(--mono); letter-spacing: -.065em; }
.plan-metrics > div:first-child dd { color: var(--accent); }
.plan-columns { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(235px, 1fr); gap: clamp(20px, 2.5vw, 36px); align-items: start; }
.plan-list, .plan-queue { min-width: 0; }
.plan-list > h2, .plan-queue header { padding: 0 0 12px; border-bottom: 2px solid var(--ink); }
.plan-list h2, .plan-queue h2 { margin: 0; color: var(--ink); font-size: 19px; line-height: 1.35; font-weight: 650; }
.plan-queue header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plan-queue header a { color: var(--accent); font-size: 13px; white-space: nowrap; }
.plan-item { overflow-wrap: anywhere; padding: 21px 0; border-bottom: 1px solid var(--edge); }
.plan-item h3 { margin: 0; color: var(--ink); font-size: 19px; font-weight: 640; }
.plan-item .plan-goal { margin: 6px 0 0; color: var(--muted); white-space: pre-wrap; font-size: 14px; }
.plan-facts, .plan-actions { display: flex; flex-wrap: wrap; align-items: center; }
.plan-facts { gap: 6px 20px; margin-top: 15px; color: var(--muted); font-size: 13px; }
.plan-facts .icon { width: 14px; height: 14px; margin-right: 5px; vertical-align: -2px; }
.plan-facts b { color: var(--ink); font: 550 14px var(--mono); }
.plan-facts .subtle { font-size: inherit; }
.plan-actions { gap: 8px; margin-top: 14px; }
.plan-actions a.btn { color: var(--accent); }
.plan-queue-link {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 5px 12px 0; border-bottom: 1px solid var(--edge);
}
.plan-queue-link:hover .plan-queue-ref strong { color: var(--accent); text-decoration: underline; }
.plan-queue-ref { display: grid; min-width: 0; gap: 2px; overflow-wrap: anywhere; font-family: var(--mono); }
.plan-queue-ref strong { font-size: 14px; font-weight: 600; line-height: 1.4; }
.plan-queue-ref > span { color: var(--muted); font-size: 13px; }
.plan-queue-link .status { flex-shrink: 0; }
.plan-queue-empty { padding: 22px 0; color: var(--muted); }
.plans-empty { padding: 36px 18px; text-align: center; border-bottom: 1px solid var(--edge); }
.plans-empty h3 { margin: 16px 0 6px; font-size: 17px; }
.plans-empty p { color: var(--muted); font-size: 14px; }
.plans-empty-icon {
  position: relative; width: 78px; height: 67px; margin: auto;
  display: grid; place-items: center; color: var(--accent);
  background: repeating-linear-gradient(0deg, #e8eaf0 0 1px, transparent 1px 12px), repeating-linear-gradient(90deg, #e8eaf0 0 1px, transparent 1px 12px);
}
.plans-empty-icon > .icon:first-child { width: 47px; height: 47px; padding: 5px; background: #fff; }
.plans-empty-icon > .icon:last-child { position: absolute; width: 24px; height: 24px; padding: 3px; bottom: 3px; right: 4px; background: #e9edfc; border: 1px solid #aab9f0; }
dialog.registry-editor {
  width: 560px; max-width: min(560px, calc(100vw - 24px));
  padding: 0; color: var(--ink); background: var(--paper);
  border: 1px solid var(--edge); border-radius: 8px; box-shadow: 0 24px 90px #17213b35;
}
dialog.registry-editor::backdrop { background: #161b2d69; }
.registry-editor .dialog-head, .registry-editor .dialog-foot { padding: 16px 24px; background: #fff; }
.registry-editor .dialog-head { border-block-end: 1px solid var(--edge); }
.registry-editor .dialog-head h2 { font-size: 22px; line-height: 1.3; letter-spacing: -.02em; }
.registry-editor .dialog-close { width: 32px; min-height: 32px; padding: 0; font-size: 22px; line-height: 1; }
.registry-editor .dialog-body { padding: 21px 24px; }
.registry-editor .field { min-width: 0; font-size: 14px; }
.registry-editor .field :is(input, select, textarea) { min-width: 0; }
.registry-editor .dialog-foot { border-block-start: 1px solid var(--edge); }
.registry-editor .dialog-foot .btn { min-width: 75px; }
.registry-editor input[type=checkbox] { accent-color: var(--accent); }
.registry-editor .plan-versions {
  min-width: 0; max-height: none; overflow: visible; margin: 0; padding: 0;
  border: 0; border-radius: 0;
}
.registry-editor .plan-versions > legend { padding: 0; margin-bottom: 3px; font-size: 14px; font-weight: 550; }
.plan-version-group { min-width: 0; margin: 11px 0 0; padding: 0; border: 0; }
.plan-version-group > legend { padding: 0; margin-bottom: 5px; font: 600 13px/1.4 var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.registry-editor .plan-version-group .field-toggle {
  display: inline-flex; align-items: center; max-width: 100%; min-height: 34px;
  margin: 2px 4px 2px 0; padding: 4px 9px; color: var(--ink);
  font: 13px/1.4 var(--mono); border: 1px solid var(--edge); border-radius: 4px; background: #fff; cursor: pointer;
}
.plan-version-group .field-toggle:has(:checked) { outline: 1px solid var(--accent); outline-offset: -1px; }
.plan-version-group .field-toggle input { flex: none; margin: 0; }
@media (max-width: 880px) {
  .plan-columns { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 540px) {
  .plan-metrics { padding: 15px 0; }
  .plan-metrics > div { padding-inline: 11px; }
  .plan-metrics dt { font-size: 12px; }
  .plan-item { padding: 17px 0; }
  .registry-editor .dialog-head, .registry-editor .dialog-foot, .registry-editor .dialog-body { padding-inline: 15px; }
}

.workspace-caption { display: inline-flex; align-items: center; gap: 7px; }
.logout-button {
  min-height: 34px; margin-left: 4px; padding: 3px 9px; color: #e7edf7;
  border: 1px solid #657183; border-radius: 4px; background: transparent; font-size: 13px;
}
.logout-button:hover { color: #fff; background: #344154; }
.signed-out .masthead, .signed-out #crumbs { display: none; }
.signed-out .main-shell, .signed-out #content { max-width: none; margin: 0; padding: 0; }
.login-shell {
  min-height: 100vh; min-height: 100svh; display: grid;
  grid-template-columns: minmax(0, .96fr) minmax(0, 1.04fr); background: var(--paper);
}
.login-cover {
  position: relative; isolation: isolate; display: grid;
  grid-template-rows: auto minmax(200px, 1fr) auto; align-items: center;
  padding: clamp(30px, 4.8vw, 84px); color: #fff; background: var(--accent);
}
.login-cover::before {
  content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background-image: linear-gradient(#ffffff12 1px, transparent 1px), linear-gradient(90deg, #ffffff12 1px, transparent 1px),
    linear-gradient(#ffffff20 1px, transparent 1px), linear-gradient(90deg, #ffffff20 1px, transparent 1px);
  background-size: 20px 20px, 20px 20px, 100px 100px, 100px 100px;
  mask-image: linear-gradient(155deg, #0003, #000 40%, #000 65%, #0003);
}
.login-brand { justify-self: start; }
.login-brand .brand-mark { color: #e1eaff; }
.login-drawing { display: block; width: min(100%, 540px); height: auto; justify-self: center; margin-block: 24px; }
.login-cover-copy { max-width: 520px; border-top: 1px solid #a4b9f7; padding-top: 17px; }
.login-cover-copy p { font-size: clamp(26px, 3vw, 46px); font-weight: 620; line-height: 1.25; letter-spacing: -.045em; }
.login-cover-copy span { display: block; margin-top: 8px; font-size: 15px; color: #e3eaff; }
.login-entry { display: grid; align-items: center; justify-items: center; min-width: 0; padding: 56px clamp(28px, 6vw, 88px); }
.login-entry-inner { width: min(100%, 386px); }
.login-entry h1 { font-size: clamp(32px, 3.45vw, 48px); line-height: 1.2; font-weight: 680; letter-spacing: -.05em; }
.login-intro { margin: 10px 0 32px; color: var(--muted); }
#login-form { display: grid; gap: 12px; }
.login-field { display: grid; gap: 7px; margin-bottom: 6px; min-width: 0; }
.login-field label { color: var(--ink); font-size: 14px; font-weight: 590; }
.login-field input {
  min-height: 47px; width: 100%; min-width: 0; padding: 9px 13px;
  color: var(--ink); border: 1px solid #aebac7; border-radius: 4px; background: #fff; font-size: 16px;
}
.login-password { position: relative; }
.login-password input { padding-right: 62px; }
#toggle-password { position: absolute; inset: 5px 5px 5px auto; padding: 0 8px; color: var(--accent); font-size: 13px; font-weight: 600; border: 0; border-radius: 3px; background: transparent; }
#toggle-password:hover { background: #eaf0ff; }
#login-error { margin: 0; }
.login-submit, .login-demo { width: 100%; min-height: 45px; font-size: 15px; }
.login-submit { margin-top: 5px; }
@media (min-width: 761px) and (max-width: 940px) { .workspace-caption { display: none; } }
@media (max-width: 760px) {
  .login-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .login-cover { grid-template-rows: auto; padding: 17px clamp(22px, 6vw, 40px); }
  .login-brand { min-height: 0; }
  .login-drawing, .login-cover-copy { display: none; }
  .login-entry { align-items: start; padding: clamp(40px, 10vh, 84px) clamp(22px, 6vw, 40px) 40px; }
  .login-intro { margin-bottom: 26px; }
}
@media (max-width: 380px) { .workspace-caption { display: none; } }

.pager { display:flex; justify-content:flex-end; align-items:center; gap:12px; margin-top:12px; font:14px var(--mono); }
.pager button:disabled, button:disabled { opacity:.6; cursor:default; }
.migration { display:grid; gap:16px; }
.account-link { overflow:hidden; text-overflow:ellipsis; max-width:11rem; }
.account-link:hover { color:white; text-decoration:underline; }
@media (max-width:940px) { .workspace .account-link { display:inline-flex; max-width:80px; } }
@media (min-width:761px) and (max-width:940px) { .masthead-inner { gap:12px; } }
