.om-shell {
  width: min(100% - clamp(1.5rem, 6vw, 7rem), 89rem);
  margin-inline: auto;
  padding: clamp(1.55rem, 3.1vw, 2.85rem) 0 clamp(1rem, 2vw, 2rem);
  --om-line: #35484b;
  --om-steel: #9cddde;
  --om-back: #111b20;
}

.om-lede {
  margin-bottom: clamp(1.1rem, 2vw, 1.65rem);
}

.om-overline,
.om-panel-label {
  color: var(--om-steel);
  font-family: var(--mono);
  font-size: .73rem;
  font-weight: 650;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.om-lede h1 {
  margin-block: .35rem .7rem;
  font-size: clamp(2.15rem, 5vw, 4.65rem);
  letter-spacing: -.055em;
  text-wrap: balance;
}

.om-lede > p:last-child {
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(.95rem, 1.45vw, 1.12rem);
}

.om-workbench {
  border: 1px solid var(--om-line);
  background: #0e171c;
}

.om-shell [hidden] { display: none; }

.om-mode {
  display: flex;
  padding-inline: .85rem;
  border-bottom: 1px solid var(--om-line);
  gap: .35rem;
}

.om-mode a {
  display: grid;
  min-height: 2.8rem;
  padding: .5rem .85rem;
  place-items: center;
  font-size: .89rem;
  text-decoration: none;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}

.om-mode a:hover,
.om-mode a[aria-current] {
  border-color: var(--accent);
  color: var(--white);
}

.om-mode a:focus-visible { outline-offset: -3px; }

.om-layout {
  display: grid;
  grid-template-columns: minmax(10.5rem, .68fr) minmax(0, 2.5fr) minmax(12rem, 1fr);
  min-height: 29rem;
}

.om-browser,
.om-inspector,
.om-text-view {
  min-width: 0;
  padding: clamp(.75rem, 1.45vw, 1.2rem);
}

.om-browser {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--om-line);
}

.om-browser label,
.om-browser summary {
  font-size: .83rem;
  font-weight: 700;
}

.om-browser input,
.om-browser select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 2.25rem;
  padding: .29rem .45rem;
  margin-top: .48rem;
  font: inherit;
  font-size: .85rem;
  color: var(--white);
  background: #15252a;
  border: 1px solid #53696b;
  border-radius: .2rem;
}

.om-browser input:focus-visible,
.om-browser select:focus-visible,
.om-browser summary:focus-visible,
.om-button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  z-index: 1;
}

.om-browser summary {
  margin-top: .8rem;
  cursor: pointer;
}

.om-browser summary span { color: var(--muted); font-weight: 500; }

.om-index,
.om-relations,
.om-tax-cards,
.om-dl,
.om-path {
  margin: 0;
  padding: 0;
  list-style: none;
}

.om-index {
  max-height: 20rem;
  margin-top: .5rem;
  overflow: auto;
  scrollbar-color: #687e7d #162025;
}

.om-index li { padding: .1rem .22rem .1rem .1rem; }

.om-button {
  appearance: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.om-index button {
  width: 100%;
  padding: .42rem .45rem;
  border: 0;
  border-left: 2px solid transparent;
  background: transparent;
  font-size: .87rem;
  line-height: 1.3;
}

.om-index button:hover,
.om-index button[aria-current] {
  border-color: var(--accent);
  color: var(--white);
  background: #24352e;
}

.om-view {
  position: relative;
  min-width: 0;
  background-color: var(--om-back);
}

.om-graph {
  min-height: 100%;
  padding: clamp(.8rem, 1.9vw, 1.5rem);
  background-image: radial-gradient(ellipse at 51% 47%, #163135 0, transparent 56%), radial-gradient(circle, #32464a 1px, transparent 1px);
  background-size: auto, 21px 21px;
}

.om-graph-intro p,
.om-graph-note {
  color: var(--muted);
  font-size: .77rem;
}

.om-graph-intro {
  position: relative;
  z-index: 1;
}

.om-graph-intro h2,
.om-text-view > h2 {
  margin-block: .28rem .4rem;
  font-size: clamp(1.05rem, 1.65vw, 1.35rem);
  line-height: 1.2;
}

.om-diagram {
  position: relative;
  min-height: 18rem;
  margin-top: .8rem;
}

.om-connectors {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.om-lanes {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .9fr) minmax(0, 1fr);
  gap: clamp(.65rem, 3vw, 2.75rem);
  align-items: center;
  min-height: 18rem;
}

.om-branch {
  display: grid;
  gap: .6rem;
  min-width: 0;
}

.om-node {
  width: 100%;
  min-height: 2.9rem;
  padding: .52rem .55rem;
  border: 1px solid #4d6968;
  border-radius: .28rem;
  background: #14252d;
  overflow-wrap: anywhere;
  color: var(--white);
  font-size: clamp(.76rem, 1.02vw, .93rem);
  font-weight: 650;
  line-height: 1.25;
}

button.om-node:hover {
  border-color: var(--om-steel);
  background: #203d41;
}

.om-node small {
  display: block;
  margin-bottom: .2rem;
  color: var(--om-steel);
  font-weight: 550;
  font-size: max(.68rem, .83em);
  line-height: 1.22;
}

.om-node[data-predicate="contains"] small {
  color: var(--accent);
}

.om-node-focus {
  min-width: 0;
  min-height: 5rem;
  display: grid;
  align-content: center;
  justify-items: start;
  border: 1px solid var(--accent);
  background: #233729;
  padding: .8rem .67rem;
  outline-offset: 4px;
  box-shadow: 0 0 1.8rem #b1db5840;
  font-size: clamp(.92rem, 1.45vw, 1.2rem);
}

.om-node-focus small { color: var(--accent); }
.om-entry-shortcut { display: none; }

.om-graph-note {
  margin-top: .55rem;
}

.om-inspector {
  min-width: 0;
  max-height: 32rem;
  overflow: auto;
  border-left: 1px solid var(--om-line);
  scrollbar-color: #687e7d #162025;
}

.om-inspector h2 {
  margin-top: .3rem;
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  line-height: 1.14;
  overflow-wrap: anywhere;
}

.om-inspector h3 {
  margin-top: .9rem;
  font-size: .91rem;
  line-height: 1.3;
}

.om-inspector p:not(.om-panel-label) {
  margin-top: .52rem;
  color: var(--muted);
  font-size: .88rem;
}

.om-open {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.35rem;
  margin: .75rem 0 .45rem;
  padding: .27rem .66rem;
  border: 1px solid var(--accent);
  border-radius: .2rem;
  font-size: .91rem;
  font-weight: 750;
  background: var(--accent);
  color: #141d15;
  text-decoration: none;
}

.om-open:hover { background: #eeffa5; }
.om-open:focus-visible { outline-offset: 3px; }

.om-relation-group summary {
  min-height: 2rem;
  align-content: center;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
}

.om-relation-group summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.om-relation-group + .om-relation-group {
  padding-top: .55rem;
  margin-top: .72rem;
  border-top: 1px solid var(--om-line);
}

.om-relation {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  width: 100%;
  padding: .35rem .28rem;
  margin-top: .25rem;
  border: 1px solid transparent;
  background: #17272b;
  line-height: 1.22;
  font-size: .86rem;
  color: var(--white);
}

.om-relation:hover { border-color: var(--om-steel); }

.om-relation small {
  font-size: .73rem;
  color: var(--om-steel);
}

.om-inspector .om-empty,
.om-index .om-empty {
  font-size: .82rem;
  color: var(--muted);
}

.om-text-view {
  min-height: 100%;
}

.om-text-view > p:not(.om-panel-label) {
  margin-block: .3rem .9rem;
  max-width: 68ch;
  font-size: .87rem;
  color: var(--muted);
}

.om-path {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .8rem;
  margin-block: .9rem;
}

.om-path li { line-height: 1.3; }

.om-path li + li::before {
  content: "›";
  margin-right: .55rem;
  color: var(--muted);
}

.om-path button,
.om-tax-cards button,
.om-model-mode button {
  border: 1px solid #4d6968;
  background: #192a31;
  font-size: .86rem;
  padding: .28rem .5rem;
  border-radius: .2rem;
}

.om-path button:hover,
.om-tax-cards button:hover,
.om-model-mode button:hover,
.om-model-mode button[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.om-tax-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.8rem), 1fr));
  gap: .5rem;
}

.om-tax-cards button { width: 100%; }

.om-text-view h3 {
  margin-block: .65rem .5rem;
  font-size: 1rem;
  line-height: 1.3;
}

.om-context + .om-context {
  border-top: 1px solid var(--om-line);
  margin-top: .87rem;
  padding-top: .3rem;
}

.om-model-mode {
  display: flex;
  flex-wrap: nowrap;
  gap: .45rem;
  margin-bottom: .72rem;
}

.om-model-mode button { white-space: normal; }

.om-model-table {
  max-height: 19.5rem;
  overflow: auto;
  scrollbar-color: #687e7d #162025;
}

.om-dl > div {
  padding: .38rem 0;
  border-bottom: 1px solid #324548;
}

.om-dl dt,
.om-dl dd {
  overflow-wrap: anywhere;
  font-size: .86rem;
}

.om-dl dt { font-weight: 750; }

.om-dl dd { color: var(--muted); }

.om-model-example {
  width: fit-content;
  max-width: 100%;
  padding: .62rem .75rem;
  border-left: 3px solid var(--accent);
  background: #25372d;
  overflow-wrap: anywhere;
  font: 650 .82rem/1.5 var(--mono);
}

.om-model-links {
  margin: .5rem 0;
  padding-left: 1.2rem;
}

.om-model-links li { margin: .38rem 0; }

.om-model-links a,
.om-fallback a { color: var(--accent); }

.om-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.om-status,
.om-fallback { padding: 1rem 0; }

.om-fallback li { margin-block: .3rem; }

@media (max-width: 63rem) {
  .om-layout {
    grid-template-columns: minmax(9.3rem, .72fr) minmax(0, 2.55fr) minmax(10rem, 1fr);
  }

  .om-lanes { gap: clamp(.6rem, 1.8vw, 1.6rem); }
  .om-inspector { padding-inline: .7rem; }
}

@media (max-width: 51rem) {
  .om-layout {
    grid-template-columns: minmax(8.7rem, .65fr) minmax(0, 2.45fr);
  }

  .om-view { grid-column: 2; }

  .om-entry-shortcut {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: .45rem .8rem;
    margin-bottom: .95rem;
    padding: .38rem .48rem .38rem .65rem;
    color: var(--white);
    background-color: #1b2b30;
    border: 1px solid var(--om-line);
  }

  .om-entry-shortcut strong {
    min-width: 0;
    font-size: .85rem;
    overflow-wrap: anywhere;
  }

  .om-entry-shortcut .om-open {
    min-height: 2rem;
    margin: 0;
    font-size: .79rem;
  }

  .om-inspector .om-open { display: none; }

  .om-inspector {
    grid-column: 1 / -1;
    max-height: none;
    border-left: 0;
    border-top: 1px solid var(--om-line);
    padding: .85rem;
  }

  .om-index { max-height: 20rem; }
}

@media (max-width: 35rem) {
  .om-lede h1 { font-size: clamp(1.9rem, 10vw, 3.5rem); }

  .om-layout { display: block; }

  .om-browser {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
    gap: .25rem .55rem;
    padding: .6rem .78rem;
    border-right: 0;
    border-bottom: 1px solid var(--om-line);
  }

  .om-browser label { grid-column: 1 / -1; }

  .om-browser input,
  .om-browser select { margin: 0; font-size: 1rem; }

  .om-browser details { grid-column: 1 / -1; }

  .om-browser summary { margin-top: .2rem; }

  .om-index { max-height: 10rem; }

  .om-graph { padding: .6rem .7rem .75rem; }

  .om-diagram,
  .om-lanes { min-height: 14rem; }

  .om-lanes {
    grid-template-columns: minmax(0, 1fr) minmax(0, .9fr) minmax(0, 1fr);
    gap: .55rem;
  }

  .om-node { padding: .36rem .28rem; }

  .om-branch { gap: .42rem; }

  .om-node-focus { min-height: 4rem; }

  .om-shell:lang(zh-Hans) .om-node-focus { font-size: .82rem; }

  .om-model-mode button { padding-inline: .3rem; }

  .om-model-table { max-height: none; }
}

.om-model-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.om-model-jumps button { width: auto; }
