@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/poppins-600.woff2") format("woff2"); }

:root {
  --ink: #000;
  --paper: #fff;
  --line: #000;
  --muted: #555;
  --faint: rgba(0, 0, 0, 0.12);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; width: 100%; height: 100%;
  background: var(--paper); color: var(--ink);
  overflow: hidden; overscroll-behavior: none;
  font-family: "Poppins", sans-serif; font-weight: 400;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the demo, edge to edge */
#stage { position: fixed; inset: 0; background: var(--paper); }
#stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: var(--paper); }

/* the switcher button: small, faint until hovered or focused */
#menu-btn {
  position: fixed; z-index: 10;
  top: calc(var(--safe-t) + 10px); left: calc(var(--safe-l) + 10px);
  width: 34px; height: 34px; padding: 0;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line); border-radius: 10px;
  opacity: 0.28; cursor: pointer;
  transition: opacity 0.2s ease;
}
#menu-btn svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
#menu-btn:hover, #menu-btn:focus-visible, #menu-btn[aria-expanded="true"] { opacity: 1; }
#menu-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (hover: none) { #menu-btn { opacity: 0.4; } }
/* with a mouse, the button goes once the mouse rests (as the click-throughs hide the cursor), and comes back on a move */
@media (hover: hover) { body.idle #menu-btn:not(:hover):not(:focus-visible):not([aria-expanded="true"]) { opacity: 0; transition-duration: 0.6s; } }

/* back one step: bottom left, only on touch screens (a keyboard has the left arrow) */
#back-btn {
  position: fixed; z-index: 10; display: none;
  bottom: calc(var(--safe-b) + 10px); left: calc(var(--safe-l) + 10px);
  width: 40px; height: 40px; padding: 0; place-items: center;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line); border-radius: 10px;
  opacity: 0.4; cursor: pointer;
}
#back-btn svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#back-btn:active { opacity: 1; }
@media (hover: none) and (pointer: coarse) { #back-btn { display: grid; } }

/* the panel */
#scrim { position: fixed; inset: 0; z-index: 20; background: rgba(255, 255, 255, 0.35); }
#panel {
  position: fixed; z-index: 21;
  top: calc(var(--safe-t) + 10px); left: calc(var(--safe-l) + 10px);
  width: min(320px, calc(100vw - var(--safe-l) - 20px));
  max-height: calc(100% - var(--safe-t) - var(--safe-b) - 20px);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 8px;
  background: var(--paper);
  border: 1px solid var(--line); border-radius: 14px;
}
#panel[hidden], #scrim[hidden] { display: none; }

/* the demos: plain rows, the one on screen marked with a dot */
#demo-list { list-style: none; margin: 0; padding: 0; }
.demo {
  width: 100%; text-align: left; cursor: pointer;
  display: block; padding: 10px 12px;
  background: none; border: 0; border-radius: 9px;
}
.demo:hover { background: #f2f2f2; }
.demo:focus-visible { outline: 1px solid var(--ink); outline-offset: -1px; }
.demo .product { display: block; font-weight: 600; font-size: 15px; line-height: 1.3; }
.demo .meta { display: block; font-size: 12px; color: var(--muted); }
.demo[aria-current="true"] .product::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-radius: 50%; background: var(--ink); vertical-align: middle; }

/* P, H, F: the click-throughs' own keys, as buttons for a touch screen */
.tools { display: flex; gap: 6px; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--faint); }
.tool {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 4px; cursor: pointer; white-space: nowrap;
  background: var(--paper); border: 1px solid var(--line); border-radius: 9px;
  font-size: 12px;
}
.tool:hover { background: #f2f2f2; }
.tool:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.tool[hidden] { display: none; }
.tool kbd { font: 600 11px/1 "Poppins", sans-serif; padding: 3px 5px; border: 1px solid var(--line); border-radius: 4px; }

#update-note { margin: 8px 6px 2px; font-size: 13px; }
.link-btn { padding: 0; background: none; border: 0; text-decoration: underline; cursor: pointer; font-size: 13px; }
.noscript { position: fixed; inset: 0; display: grid; place-items: center; margin: 0; font-size: 16px; }
