@font-face {
  font-family: Onest;
  src: url("assets/fonts/Onest.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  font-family: Onest, Arial, sans-serif;
  color: #202024;
  background: #fff;
}
* { box-sizing: border-box; }
a, [role=link] { cursor: pointer; }
body {
  margin: 0;
  display: grid;
  grid-template-columns: clamp(200px, 19vw, 280px) minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
}
aside {
  padding: 28px 14px;
  border-right: 1px solid #e1e1e4;
  overflow: auto;
}
h1, h2, p { margin: 0; }
.catalog-heading { margin: 0 10px 38px; }
h1 { font-size: 26px; letter-spacing: -.04em; }
.catalog-heading p { margin-top: 4px; font-size: 14px; color: #605f65; }
.nav-toggle { display: none; }
nav h2 { padding: 0 10px 10px; font-size: 15px; }
.screen-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 6px;
  color: inherit;
  background: #f1f1f2;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #595960;
  font-size: 12px;
  font-weight: 400;
}
.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #83838b;
}
.status.approved { color: #226742; }
.status.approved::before { background: #277548; }
.verification-code { color: #515057; font-size: 13px; }
@container (max-width: 590px) {
  .toolbar:has(.verification-code:not([hidden])) .verification-code { grid-area: code; }
  .toolbar:has(.verification-code:not([hidden])) { grid-template-areas: "screen links" "state state" "code code" "width width"; }
  .toolbar.fixed-width:has(.verification-code:not([hidden])) { grid-template-areas: "screen links" "state state" "code code"; }
}
main {
  display: grid;
  container-type: inline-size;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}
.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: "screen width links";
  align-items: center;
  gap: 10px 18px;
  padding: 12px 18px;
  border-bottom: 1px solid #dcdce0;
}
.screen-controls { grid-area: screen; display: flex; align-items: center; gap: 16px; min-width: 0; }
.current-screen { font-size: 16px; white-space: nowrap; }
.current-screen span { color: #6c6b72; font-weight: 400; }
button, select { font: inherit; }
.state-control {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #59595f;
}
select, .state-control .mk-select-trigger, .nav-toggle {
  min-height: 36px;
  padding: 0 10px;
  max-width: 100%;
  border: 1px solid #d3d3d7;
  border-radius: 6px;
  background: #fff;
  color: #28282c;
  cursor: pointer;
}
.state-control .mk-select { width: 240px; max-width: 100%; }
.state-control :is(select, .mk-select-trigger) { width: 100%; min-width: 0; }
.state-control .mk-select-trigger, .native-state-label {
  padding: 6px 30px 6px 10px;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}
.native-state-label { display: none; }
.state-control select:not([hidden]) { position: absolute; inset: 0; height: 100%; z-index: 1; opacity: 0; }
.state-control select:not([hidden]) + .native-state-label {
  display: flex; align-items: center; min-height: 44px;
  border: 1px solid #d3d3d7; border-radius: 6px; color: #28282c;
  background: #fff url("assets/icons/caret-down.svg") no-repeat right 8px center / 14px;
}
.state-control select:focus-visible + .native-state-label { border-color: #59595f; background-color: #efeff1; }
.state-control .mk-select-options { max-width: 100%; overflow-wrap: anywhere; }
.state-stepper { display: flex; align-items: stretch; gap: 4px; min-width: 0; }
.state-stepper .mk-select { flex: 1 1 auto; }
.state-stepper > button {
  display: grid;
  flex: 0 0 36px;
  place-items: center;
  padding: 0;
  min-height: 36px;
  border: 1px solid #d3d3d7;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.state-stepper > button:disabled { opacity: .45; cursor: default; }
.state-stepper > button:focus-visible { background: #e5e5e8; border-color: #59595f; }
@media (hover: hover) {
  .state-stepper > button:enabled:hover { background: #f1f1f2; border-color: #89898e; }
}
.state-stepper > button:enabled:active { background: #dedee2; }
.width-control {
  grid-area: width;
  justify-self: center;
  position: relative;
  display: inline-flex;
  margin: 0;
  padding: 2px;
  min-width: 0;
  border: 1px solid #d3d3d7;
  border-radius: 6px;
  white-space: nowrap;
}
.width-control legend, .width-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.width-control span {
  display: block;
  padding: 7px 10px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}
.width-control input:checked + span { color: #fff; background: #242426; }
:focus { outline: none; }
.screen-link:focus-visible > span, .screen-group > summary:focus-visible, .standalone:focus-visible, button:focus-visible {
  text-decoration: underline;
  text-underline-offset: .2em;
}
.state-control :is(select, .mk-select-trigger):focus-visible, .nav-toggle:focus-visible {
  border-color: #59595f;
  background: #efeff1;
}
.standalone:focus-visible, #screen-drawer button:focus-visible { background: #e5e5e8; }
.width-control input:focus-visible + span { text-decoration: underline; text-underline-offset: .2em; }
@media (hover: hover) and (pointer: fine) {
.screen-link:hover, .screen-group > summary:hover, .width-control input:not(:checked) + span:hover { background: #e5e5e8; }
  select:enabled:hover, .mk-select-trigger:enabled:hover, .nav-toggle:hover { border-color: #89898e; background: #f5f5f6; }
}
@media (prefers-reduced-motion: no-preference) {
.screen-link, .screen-group > summary, .width-control span, select, .mk-select-trigger, .nav-toggle, .state-stepper > button {
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
  }
.screen-group > summary::after { transition: transform 140ms ease; }
}
.canvas {
  display: grid;
  min-height: 0;
  padding: 14px;
  background: #eeeff1;
}
.stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
iframe {
  position: absolute;
  inset-block-start: 0;
  border: 0;
  background: white;
  transform-origin: top left;
}
noscript { position: fixed; right: 1rem; bottom: 1rem; background: white; }
@media (max-width: 760px) {
  body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  aside { padding: 8px 12px; border-right: 0; border-bottom: 1px solid #e1e1e4; }
  .catalog-heading { display: flex; justify-content: space-between; align-items: center; margin: 0; }
  .catalog-heading > div { display: flex; align-items: baseline; gap: 8px; }
  h1 { font-size: 18px; }
  .catalog-heading p { margin: 0; font-size: 12px; }
  .nav-toggle { display: block; min-height: 40px; font-size: 13px; }
  nav { display: none; margin-top: 10px; }
  .toolbar { gap: 6px 10px; padding: 8px 12px; }
  .canvas { padding: 6px; }
}
@media (max-width: 540px) {
  .current-screen { font-size: 15px; }
  .width-control span { padding: 12px 16px; font-size: 13px; }
  .canvas { padding: 0; }
}
[hidden] { display: none !important; }
.catalog-heading { margin-bottom: 26px; }
#screens > * + * { margin-top: 22px; }
#screens h2, .screen-group > summary { color: #67666c; font-size: 12px; }
.screen-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 6px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
.screen-group > summary::-webkit-details-marker { display: none; }
.screen-group > summary::after {
  content: "";
  flex: 0 0 7px;
  height: 7px;
  margin-inline-end: 3px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(-45deg);
}
.screen-group[open] > summary::after { transform: rotate(45deg); }
.screen-link { background: transparent; font-weight: 450; min-height: 39px; }
.screen-link[aria-current] { background: #efeff1; font-weight: 650; }
.status { flex-shrink: 0; font-size: 11px; }
.standalone { grid-area: links; justify-self: end; color: #515057; font-size: 13px; text-underline-offset: 3px; }

.screen-controls { flex-wrap: wrap; gap: 4px 12px; }
@container (max-width: 1050px) {
  .toolbar { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "screen links" "width width"; }
}
@container (max-width: 590px) {
  .toolbar { grid-template-areas: "screen links" "state state" "width width"; }
  .screen-controls { display: contents; }
  .current-screen { grid-area: screen; white-space: normal; }
  .state-control { grid-area: state; }
  .state-stepper { flex: 1; }
  .state-stepper > button { flex-basis: 44px; min-height: 44px; }
  .state-control .mk-select { flex: 1; }
  .state-control :is(select, .mk-select-trigger) { min-height: 40px; }
}
@media (max-width: 760px) {
  aside { max-height: 52dvh; }
  .catalog-heading { margin-bottom: 0; }
  #screens > * + * { margin-top: 12px; }
}

#screen-drawer { position: fixed; inset: 0 auto 0 0; width: min(315px, 86vw); height: 100dvh; max-height: none; padding: 0 14px 16px; border: 0; margin: 0; color: inherit; }
#screen-drawer::backdrop { background: rgb(24 25 28 / 45%); }
#screen-drawer header { position: sticky; top: 0; z-index: 1; background: white; display: flex; align-items: center; justify-content: space-between; padding: 12px 8px; }
#screen-drawer header button { display: grid; place-content: center; width: 44px; height: 44px; border: 0; border-radius: 4px; background: transparent; cursor: pointer; }
#screen-drawer nav { display: block; }
#screen-drawer .screen-link { min-height: 44px; }
.standalone { display: inline-flex; gap: 7px; align-items: center; min-height: 40px; }
@media (max-width: 760px) { aside { overflow: visible; } }
@media (hover: hover) { #screen-drawer button:hover { background: #efeff1; } }
.screen-link:active, .screen-group > summary:active, #screen-drawer button:active, .nav-toggle:active { background: #dedee2; }
@container (max-width: 590px) {
  .standalone { justify-content: center; width: 40px; min-height: 44px; }
  .standalone span { display: none; }
  .fixed-width { grid-template-areas: "screen links" "state state"; }
}

@container (min-width: 591px) and (max-width: 1050px) { .fixed-width { grid-template-areas: "screen links"; } }
