:root {
  color-scheme: dark;
  --background: #101b28;
  --chrome: #0d1824;
  --surface: #172638;
  --surface-raised: #1d3043;
  --border: #344a60;
  --text: #edf5fb;
  --muted: #b0c0cf;
  --accent: #78d9f5;
  --green: #a1e3bb;
  --amber: #ffd39b;
  font: 100%/1.5 "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); }
a { color: var(--accent); text-underline-offset: .2em; }
button, select, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; color: var(--muted); opacity: .75; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.skip-link { position: absolute; z-index: 1; left: .5rem; top: .5rem; padding: .5rem; background: var(--chrome); transform: translateY(-200%); }
.skip-link:focus { transform: none; }

.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 70px; padding: 0 clamp(1rem, 3vw, 2.625rem);
  background: var(--chrome); border-bottom: 1px solid var(--border);
}
.brand, .profile { display: flex; align-items: center; gap: .85rem; }
.brand > span { padding-left: .85rem; border-left: 1px solid var(--border); color: var(--muted); font-size: .875rem; }
.brand-mark { width: 135px; height: 47px; position: relative; overflow: hidden; }
.brand-mark img { position: absolute; width: 141px; height: auto; inset: -16px 0 auto -2px; }
.profile { font-size: .875rem; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #29465a; color: #dcf6ff; }

.layout { display: grid; grid-template-columns: 239px minmax(0, 1fr); min-height: calc(100vh - 70px); }
.sidebar { display: flex; flex-direction: column; padding: 2rem 1.125rem; border-right: 1px solid var(--border); background: #111e2c; }
.sidebar > label { font-size: .875rem; font-weight: 600; }
.sidebar select { width: 100%; margin-top: .45rem; }
.workspace-role { font-size: .875rem; color: var(--muted); margin: .35rem 0 1.55rem; }
nav { display: grid; gap: .3rem; }
.nav-item {
  display: flex; align-items: center; gap: .65rem; width: 100%; min-height: 45px;
  padding: .5rem .7rem; border: 1px solid transparent; border-radius: 5px;
  color: var(--muted); background: transparent; text-align: left;
}
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item[aria-current="page"] { color: #dff7ff; background: #1d374b; border-color: #3b607a; font-weight: 600; }
.nav-item[aria-current="page"]::before { content: ""; width: 3px; height: 16px; border-radius: 2px; background: var(--accent); }
.website-link { margin-top: auto; padding: 2rem .3rem 0; font-size: .875rem; }

main { width: min(100%, 1400px); padding: 1.6rem clamp(1rem, 3.2vw, 3.25rem) 3rem; }
main:focus { outline: none; }
.preview-banner {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem .75rem; align-items: center;
  min-height: 47px; padding: .35rem .75rem; border: 1px solid #465874; border-radius: 6px;
  background: #1a273a; color: #c9d6e6; font-size: .875rem;
}
.feedback { margin: 0; color: var(--green); }
.feedback:not(:empty) { padding: .45rem .75rem; margin-top: .5rem; background: #16372e; border: 1px solid #326253; border-radius: 6px; }
.page-heading { margin: 1.75rem 0 1.4rem; }
.page-heading p { margin: .25rem 0 0; color: var(--muted); }
.context { font-size: .875rem; color: var(--accent) !important; font-weight: 600; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .35rem; font-size: clamp(1.9rem, 4vw, 2.65rem); letter-spacing: -.035em; line-height: 1.15; font-weight: 620; }
h2 { margin-bottom: .85rem; font-size: 1.32rem; line-height: 1.25; font-weight: 620; }
h3 { margin-bottom: .2rem; font-size: 1.1rem; font-weight: 650; }
.muted { color: var(--muted); }
.section { margin-top: 1.7rem; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.library { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.library .cards { grid-template-columns: minmax(0, 1fr); }
.card, .panel, .release-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: clamp(1rem, 2vw, 1.35rem); min-width: 0;
}
.card { display: flex; flex-direction: column; }
.product { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.product img { width: 47px; height: 47px; object-fit: contain; }
.product p { margin: 0; color: var(--muted); font-size: .875rem; }
.card-top, .section-head, .release-card, .dialog-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
}
.section-head { align-items: center; margin-bottom: .7rem; }
.section-head h2, .section-head p, .dialog-head h2 { margin: 0; }
.card > p { margin: .95rem 0; color: var(--muted); }
.card dl { flex: 1; }
.card hr { width: 100%; border: 0; border-top: 1px solid var(--border); margin: .25rem 0 .8rem; }
dl { display: grid; gap: .38rem; margin: 0 0 .8rem; }
dl > div { display: flex; gap: .6rem; justify-content: space-between; align-items: baseline; }
dt { color: var(--muted); }
dd { margin: 0; text-align: right; }
dt, dd { font-size: .875rem; overflow-wrap: anywhere; }
.pill { display: inline-flex; padding: .2rem .55rem; border: 1px solid var(--border); border-radius: 99px; color: #d9e5ef; background: #223448; font-size: .875rem; white-space: nowrap; }
.pill.good { color: var(--green); background: #19372f; border-color: #396454; }
.pill.warn { color: var(--amber); background: #3e3026; border-color: #705439; }
.pill.info { color: #b8edff; background: #1c3a4d; border-color: #39617b; }
.actions { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.button, .text-button { border-radius: 5px; min-height: 40px; padding: .42rem .8rem; font-size: .875rem; font-weight: 610; }
.button { background: #22364a; border: 1px solid #4b657c; color: var(--text); }
.button:hover:not(:disabled) { background: #2b455d; }
.button.primary { background: var(--accent); border-color: var(--accent); color: #0a2736; }
.button.primary:hover:not(:disabled) { background: #a1e6fb; }
.text-button { padding-inline: .4rem; border: 1px solid transparent; background: transparent; color: var(--accent); }
.text-button:hover { text-decoration: underline; text-underline-offset: .2em; }
.filter { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .65rem; font-size: .875rem; }

select, input {
  min-height: 42px; max-width: 100%; border-radius: 5px; border: 1px solid #536e86;
  color: var(--text); background: #122131; padding: .5rem .65rem;
}
select {
  appearance: none; padding-right: 2rem;
  background-image: linear-gradient(45deg, transparent 50%, #9cb1c4 50%), linear-gradient(135deg, #9cb1c4 50%, transparent 50%);
  background-size: 5px 5px; background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-repeat: no-repeat;
}
.stack { display: grid; gap: .75rem; }
.release-card { align-items: center; }
.release-card p { margin: .2rem 0 0; }
.release-card h3 { overflow-wrap: anywhere; }
.license-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 1rem 0; }
.license-summary > div { display: grid; gap: .3rem; background: #132233; border: 1px solid var(--border); border-radius: 6px; padding: .75rem; }
.license-summary dd { order: -1; text-align: left; font-size: 1.45rem; font-weight: 600; }
.record { display: flex; justify-content: space-between; gap: .45rem 1rem; align-items: center; flex-wrap: wrap; padding: .75rem 0; border-top: 1px solid var(--border); }
.record p { margin: 0; overflow-wrap: anywhere; }
.record small { color: var(--muted); font-size: .875rem; }

dialog {
  width: min(580px, calc(100% - 2rem)); max-height: calc(100% - 2rem);
  background: var(--surface); border: 1px solid #56748e; border-radius: 9px; padding: 1.25rem;
  color: var(--text); box-shadow: 0 18px 60px #030b16ad;
}
dialog::backdrop { background: #030b16c9; }
.dialog-head { align-items: center; margin-bottom: .65rem; }
dialog form { display: grid; gap: .7rem; }
dialog input { width: 100%; }
dialog .form-error { margin: 0; color: var(--amber); }
.release-note { margin: 0; padding: .7rem; border: 1px solid var(--border); border-radius: 5px; background: #132233; }

@media (max-width: 820px) {
  .layout { grid-template-columns: 185px minmax(0, 1fr); }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .library { display: block; }
  .sidebar { padding-inline: .75rem; }
}
@media (max-width: 590px) {
  .site-header { padding-inline: .8rem; }
  .profile { gap: .4rem; }
  .brand-mark { width: 112px; height: 38px; }
  .brand-mark img { width: 118px; inset: -13px 0 auto -2px; }
  .brand { gap: .35rem; }
  .brand > span { padding-left: .4rem; }
  .layout { display: block; }
  .sidebar { border: 0; border-bottom: 1px solid var(--border); padding: .75rem .9rem; }
  .workspace-role { margin-bottom: .5rem; }
  nav { display: flex; flex-wrap: wrap; }
  .nav-item { min-height: 40px; width: auto; padding: .35rem .55rem; font-size: .875rem; }
  .website-link { display: none; }
  main { padding-top: 1rem; }
  .license-summary { gap: .35rem; }
  .license-summary > div { padding: .45rem; }
}
