:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: #152438;
  background: #edf1f6;
  --muted: #465b72;
  --accent: #0c5d54;
  --sidebar: #122437;
  --line: #d6e0eb;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
a { color: var(--accent); text-underline-offset: .18em; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid #2aa894;
  outline-offset: 3px;
}
.skip { position: fixed; z-index: 5; top: .65rem; left: .65rem; padding: .7rem; background: white; transform: translateY(-200%); }
.skip:focus { transform: translateY(0); }
.workspace { display: grid; grid-template-columns: minmax(19.5rem, 22rem) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; align-self: start; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; min-height: 0;
  background: var(--sidebar); color: #edf5ff;
}
.sidebar-masthead { padding: 1.6rem 1.35rem 1rem; border-bottom: 1px solid #2d4055; }
.brand { color: #a6e0d5; font-size: .875rem; font-weight: 650; letter-spacing: .06em; }
.app-title { font-size: 1.85rem; font-weight: 700; letter-spacing: -.035em; margin: .35rem 0 1.5rem; }
.sidebar label { display: block; font-size: .875rem; color: #d2e0ee; margin-bottom: .45rem; }
#topic-search {
  width: 100%; min-width: 0; border: 1px solid #547087; padding: .65rem .7rem; border-radius: .5rem;
  color: white; background: #1d344b; font-size: .95rem;
}
#topic-search::placeholder { color: #b9ccdf; }
#topic-navigation { overflow: auto; scrollbar-color: #557089 var(--sidebar); padding: .6rem .8rem 1.3rem; }
.topic-group { border-bottom: 1px solid #304259; padding-bottom: .45rem; }
.topic-group summary { cursor: pointer; padding: .8rem .4rem; color: #c3d6e9; font-size: .875rem; font-weight: 650; }
.topic-list, .variant-list { list-style: none; margin: 0; padding: 0; }
.topic-control, .variant-control {
  color: #edf5ff; background: transparent; border: 0; border-radius: .4rem;
  cursor: pointer; display: grid; text-align: left; gap: .45rem;
  align-items: baseline; width: 100%; font-size: .9rem; line-height: 1.35;
  padding: .53rem .48rem;
}
.topic-control { grid-template-columns: 1.5rem minmax(0, 1fr) auto; }
.topic-control:hover, .variant-control:hover { background: #263d54; }
.topic-control[aria-current], .topic-control[data-selected="true"] { background: #224a4c; color: white; }
.topic-number { color: #aad6d1; font-size: .82rem; font-variant-numeric: tabular-nums; }
.topic-count { color: #c6d8e8; font-size: .82rem; font-variant-numeric: tabular-nums; }
.variant-list { margin: .3rem 0 .55rem 1.5rem; padding-left: .45rem; border-left: 1px solid #52716e; }
.variant-control { grid-template-columns: minmax(0, 1fr) auto; color: #d7e7f5; font-size: .875rem; }
.variant-control[aria-current] { background: #325755; color: white; }
#comparison { min-width: 0; max-width: 103rem; width: 100%; padding: 0 clamp(1rem, 3vw, 3rem) 3rem; justify-self: center; }
.top-line {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem 1.2rem;
  min-height: 3.8rem; border-bottom: 1px solid var(--line); font-size: .875rem; color: var(--muted);
}
.top-line a { font-weight: 650; }
.comparison-head { padding: 2.15rem 0 1.4rem; }
.group-label { color: var(--accent); font-size: .9rem; font-weight: 650; margin: 0 0 .45rem; }
h1 { max-width: 25ch; font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.07; letter-spacing: -.045em; margin: 0; }
.selection { font-weight: 620; margin: .85rem 0 .4rem; }
.preview-note { margin: .4rem 0 0; color: var(--muted); line-height: 1.5; }
#versions { display: grid; gap: 1.5rem; }
.version-card { min-width: 0; background: white; border: 1px solid var(--line); border-radius: .75rem; overflow: hidden; box-shadow: 0 1px 2px #142a4010; }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem 1rem; padding: 1.05rem 1.3rem 1rem; border-bottom: 1px solid var(--line); }
.card-header h2 { font-size: 1.18rem; margin: .45rem 0 .25rem; line-height: 1.3; }
.version-id { display: inline-block; color: #094c46; background: #dcf0eb; padding: .26rem .5rem; border-radius: .3rem; font-size: .875rem; font-weight: 720; }
.version-name { color: var(--muted); line-height: 1.4; font-size: .9rem; margin: 0; overflow-wrap: anywhere; }
.original-link { text-decoration: none; white-space: nowrap; flex: none; font-size: .875rem; font-weight: 650; padding: .55rem .7rem; border: 1px solid #a9c9c3; border-radius: .45rem; background: #f6fcfa; }
.original-link:hover { background: #def3ed; }
.block-preview { display: block; border: 0; width: 100%; height: 21rem; background: white; }
.block-text { border-top: 1px solid var(--line); padding: .5rem 1.3rem; }
.block-text summary { cursor: pointer; padding: .45rem 0; color: var(--accent); font-size: .9rem; font-weight: 620; }
.block-text p { white-space: pre-wrap; line-height: 1.6; max-width: 74ch; margin: .2rem 0 1rem; }
.empty { line-height: 1.5; padding: .6rem; }
.workspace-links { display: flex; flex-wrap: wrap; gap: .6rem 1.25rem; }
.live-launch { margin-top: 1.2rem; background: #fff; border: 1px solid var(--line); border-radius: .6rem; padding: 1rem; line-height: 1.45; }
.live-launch p { margin: .35rem 0 .55rem; }
.live-preview { height: 38rem; }
.preview-status { font-size: .875rem; color: var(--muted); margin: 0; align-self: center; }
.card-header { flex-wrap: wrap; }
.inventory-page { max-width: 78rem; padding: 0 clamp(1rem, 4vw, 3rem) 3rem; margin: auto; }
.inventory-controls { display: flex; flex-wrap: wrap; gap: .9rem; padding: 1rem; border: 1px solid var(--line); border-radius: .6rem; background: #fff; }
.inventory-controls label { display: grid; gap: .35rem; flex: 1 1 12rem; min-width: 0; font-weight: 600; }
.inventory-controls select, .inventory-controls input { width: 100%; min-width: 0; padding: .55rem; color: #152438; background: #fff; border: 1px solid #8296ab; border-radius: .35rem; font: inherit; }
#review-files { list-style: none; margin: .6rem 0 1rem; padding: 0; border: 1px solid var(--line); border-radius: .6rem; overflow: hidden; background: #fff; }
#review-files li { padding: .7rem .85rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .65rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
#review-files span { color: var(--muted); font-size: .875rem; }
#show-more { border: 1px solid #789792; border-radius: .4rem; background: #fff; color: var(--accent); padding: .55rem 1rem; cursor: pointer; }
[hidden] { display: none !important; }
@media (max-width: 59rem) {
  .workspace { grid-template-columns: minmax(16.5rem, 32vw) minmax(0, 1fr); }
  .sidebar-masthead { padding-left: .95rem; padding-right: .95rem; }
  .card-header { flex-wrap: wrap; }
}
@media (max-width: 42rem) {
  .workspace { display: block; }
  .sidebar { position: static; height: auto; max-height: 55vh; }
  .sidebar-masthead { padding-top: .9rem; }
  .app-title { margin-bottom: .8rem; }
  #topic-navigation { min-height: 0; }
  .comparison-head { padding-top: 1.4rem; }
}

