/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --ink: #0d1a3a;
  --ink-soft: #45526d;
  --paper: #ffffff;
  --base: #edf1f9;
  --azure: #2f6df6;
  --azure-deep: #1c46c4;
  --ember: #ff8a3c;
  --orchid: #8b6cf6;
  --seal: #0b7a5b;
  --mark: #ffd84d;

  /*
   * Frosted glass comes in three layers, from the back of the page to the front.
   * Each layer up is more solid and throws a closer, sharper shadow, so the eye can
   * tell what lies on what.
   *
   * 1. Pane: the largest sheets. Most see-through, widest shadow, blurs what is behind.
   * 2. Card: smaller pieces lying on the page. More solid, closer shadow.
   * 3. Well: an area pressed into a pane or a card, such as the stage a product stands on.
   *    Shaded on the inside instead of underneath.
   * Buttons and other controls sit on top of all three and are fully solid.
   */
  --pane: linear-gradient(150deg, rgb(255 255 255 / 0.64), rgb(255 255 255 / 0.38));
  --pane-shadow: inset 0 1px 0 rgb(255 255 255 / 0.9), 0 34px 60px -38px rgb(13 26 58 / 0.42);
  --card: linear-gradient(150deg, rgb(255 255 255 / 0.9), rgb(255 255 255 / 0.7));
  --card-shadow: inset 0 1px 0 #fff, 0 1px 2px rgb(13 26 58 / 0.06), 0 14px 26px -18px rgb(13 26 58 / 0.34);
  --well: rgb(255 255 255 / 0.46);
  --well-shadow: inset 0 1px 3px rgb(13 26 58 / 0.13), inset 0 0 0 1px rgb(13 26 58 / 0.05), 0 1px 0 rgb(255 255 255 / 0.85);
  /* The glass of small controls: chips, the quiet button. */
  --glass: linear-gradient(150deg, rgb(255 255 255 / 0.92), rgb(255 255 255 / 0.7));
  --glass-edge: rgb(255 255 255 / 0.88);
  --glass-shadow: inset 0 1px 0 #fff, 0 8px 16px -10px rgb(13 26 58 / 0.4);
  --frost: blur(22px) saturate(170%);
  /* A hairline drawn on top of glass. */
  --hair: rgb(13 26 58 / 0.11);

  /* Corners get rounder as surfaces get larger. */
  --radius-pane: 28px;
  --radius-card: 20px;
  --radius-well: 14px;
  --radius-ctl: 999px;
  --wrap: 74rem;

  --font-text: "Hanken Grotesk", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  --font-key: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 6rem;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--base);
}
/*
 * The backdrop: soft fields of colour that stay in place while the page scrolls,
 * so every glass surface picks up a different tint as it passes over them.
 * Warm for Office, blue for Windows.
 */
body::before {
  content: "";
  position: fixed;
  inset: -12vmax;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(40vmax 40vmax at 16% 20%, rgb(255 138 60 / 0.4), transparent 68%),
    radial-gradient(46vmax 46vmax at 86% 14%, rgb(47 109 246 / 0.42), transparent 68%),
    radial-gradient(42vmax 42vmax at 64% 82%, rgb(139 108 246 / 0.3), transparent 68%),
    radial-gradient(38vmax 38vmax at 6% 92%, rgb(46 196 214 / 0.26), transparent 68%);
}
main {
  flex: 1;
}
h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
/* Chinese headings and buttons break at punctuation and spaces, never in the middle of a word. */
:lang(zh) :is(h1, h2, h3, .button) {
  word-break: keep-all;
  overflow-wrap: anywhere;
}
h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.5rem);
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
h2 {
  font-size: 1.6rem;
  font-weight: 720;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 1.125rem;
  font-weight: 650;
}
p {
  margin: 0 0 1em;
}
/* Links are ink with a fine underline; the accent colour appears when they are pointed at. */
a {
  color: var(--ink);
  text-decoration-color: rgb(13 26 58 / 0.32);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 0.15s, text-decoration-color 0.15s;
}
a:hover {
  color: var(--azure-deep);
  text-decoration-color: currentColor;
}
:focus-visible {
  outline: 3px solid var(--mark);
  outline-offset: 2px;
  border-radius: 4px;
}
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
address {
  font-style: normal;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}
.muted {
  color: var(--ink-soft);
}
.lead {
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 34rem;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-ctl);
  z-index: 100;
}
.skip-link:focus {
  top: 1rem;
}

/* Layer 1, panes. */
.pane,
.panel,
.prose,
.stage,
.product__info,
.cart__summary {
  background: var(--pane);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--pane-shadow);
  -webkit-backdrop-filter: var(--frost);
  backdrop-filter: var(--frost);
}
/* Layer 2, cards. */
.card,
.tile,
.steps li,
.details section,
.cart__lines {
  background: var(--card);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--card-shadow);
}
/* Wells. */
.cover,
.buy,
.mega__aside {
  background: var(--well);
  box-shadow: var(--well-shadow);
}
.picker ul {
  border: 1px solid var(--glass-edge);
  box-shadow: var(--card-shadow);
  -webkit-backdrop-filter: var(--frost);
  backdrop-filter: var(--frost);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
  padding: 0.8rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius-ctl);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.22), 0 12px 22px -14px rgb(13 26 58 / 0.75);
  cursor: pointer;
}
.button:hover {
  background: var(--azure-deep);
  color: var(--paper);
}
/* The quieter button: a piece of glass. */
.button--glass {
  color: var(--ink);
  background: var(--glass);
  border-color: var(--glass-edge);
  box-shadow: var(--glass-shadow);
}
.button--glass:hover {
  color: var(--ink);
  background: var(--paper);
}

.notice {
  max-width: 34rem;
  padding: 0.75rem 1rem;
  background: rgb(255 216 77 / 0.3);
  border: 1px solid rgb(214 168 0 / 0.45);
  border-radius: var(--radius-well);
}

/* ---------- Top bar ---------- */
.topbar {
  position: relative;
  z-index: 60;
  font-size: 0.875rem;
}
.topbar__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.5rem;
  padding-block: 0.6rem 0.35rem;
}
.topbar__note {
  margin: 0 auto 0 0;
  color: var(--ink-soft);
}
.topbar__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}
.topbar__links a {
  color: var(--ink-soft);
  text-decoration: none;
}
.topbar__links a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.switches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}
.switch {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-ctl);
  background: rgb(255 255 255 / 0.55);
}
.switch a {
  display: block;
  padding: 0.12rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: var(--radius-ctl);
}
.switch a:hover {
  color: var(--ink);
}
.switch a[aria-current="true"] {
  background: var(--ink);
  color: var(--paper);
}
/* Language menu: a <details> element, so it opens without any script. */
.picker {
  position: relative;
}
.picker summary,
.mega summary {
  list-style: none;
  cursor: pointer;
}
.picker summary::-webkit-details-marker,
.mega summary::-webkit-details-marker {
  display: none;
}
.picker summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  background: rgb(255 255 255 / 0.55);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-ctl);
}
.globe {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}
.picker summary::after,
.mega summary::after {
  content: "";
  display: inline-block;
  width: 0.4em;
  height: 0.4em;
  margin-left: 0.5em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.2em) rotate(45deg);
}
.picker[open] summary::after,
.mega[open] summary::after {
  transform: translateY(0.05em) rotate(-135deg);
}
.picker ul {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  min-width: 11rem;
  padding: 0.4rem;
  background: linear-gradient(145deg, rgb(255 255 255 / 0.92), rgb(255 255 255 / 0.78));
  border-radius: var(--radius-well);
}
.picker li a {
  display: block;
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
}
.picker li a:hover {
  background: rgb(13 26 58 / 0.07);
}
.picker li a[aria-current="true"] {
  font-weight: 700;
  background: rgb(13 26 58 / 0.07);
}

/* ---------- Header ---------- */
/* A capsule of glass that stays at the top of the screen while the page scrolls under it. */
.site-header {
  position: sticky;
  top: 0.6rem;
  z-index: 50;
  padding-block: 0.35rem;
}
/* One row on desktop: nothing in it may wrap, and the search box gives way first. */
.site-header__row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem 0.9rem;
  padding: 0.5rem 0.6rem 0.5rem 1.5rem;
  white-space: nowrap;
  border-radius: var(--radius-ctl);
}
/*
 * The glass itself is drawn behind the row rather than on it. A blurred surface
 * cannot hold a second one inside it, and the menu panel below needs its own blur.
 */
.site-header__row::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(145deg, rgb(255 255 255 / 0.82), rgb(255 255 255 / 0.6));
  border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.95), 0 16px 34px -20px rgb(13 26 58 / 0.4);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
}
.brand {
  flex: none;
  margin-right: 0.6rem;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
/* The logo is a picture; its height is set here and its width follows. */
.brand img {
  display: block;
  width: auto;
  height: 2.2rem;
}
.site-nav {
  display: flex;
  gap: 0.25rem;
}
.site-nav a,
.mega summary,
.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-ctl);
  transition: background-color 0.2s;
}
.site-nav a:hover,
.mega summary:hover,
.cart-link:hover,
.mega[open] summary {
  color: var(--ink);
  background: rgb(13 26 58 / 0.08);
}
.site-nav a[aria-current="page"],
.cart-link[aria-current="page"] {
  background: rgb(13 26 58 / 0.08);
}
.mega summary::after {
  margin-left: 0.15em;
}
.cart-link__count {
  min-width: 1.6rem;
  padding: 0.05rem 0.45rem;
  text-align: center;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--paper);
  background: var(--azure-deep);
  border-radius: var(--radius-ctl);
}
/*
 * Something was just added to the cart: the old number rolls up and out, the new
 * one rolls in from below, and the badge swells for a moment with a ring around it.
 */
.cart-link__count--bump {
  height: calc(1.55em + 0.1rem);
  overflow: hidden;
  animation: badge-pop 0.9s 0.45s cubic-bezier(0.3, 1.5, 0.5, 1) both;
}
.cart-link__roll {
  display: block;
  animation: roll 0.55s 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.cart-link__roll span {
  display: block;
}
@keyframes roll {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}
@keyframes badge-pop {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgb(47 109 246 / 0.55); }
  35% { transform: scale(1.5); box-shadow: 0 0 0 0 rgb(47 109 246 / 0.55); }
  100% { transform: scale(1); box-shadow: 0 0 0 0.9rem rgb(47 109 246 / 0); }
}
/*
 * The account and cart links are icons: a head and shoulders, and a cart.
 * The number of items in the cart sits on its upper right corner.
 */
.cart-link--icon {
  position: relative;
  padding: 0.5rem 0.65rem;
}
.cart-link__icon {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cart-link--icon .cart-link__count {
  position: absolute;
  top: 0.1rem;
  right: 0.15rem;
  min-width: 1.2rem;
  padding: 0 0.32rem;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.2rem;
  /* A thin white ring keeps the number apart from the lines of the cart. */
  outline: 2px solid var(--paper);
}
.cart-link--icon .cart-link__count--bump {
  height: 1.2rem;
}
/* Just added: the cart itself tips and settles, a moment before its number changes. */
.cart-link--added .cart-link__icon {
  transform-origin: 50% 90%;
  animation: cart-tip 0.7s 0.1s cubic-bezier(0.3, 1.4, 0.5, 1) both;
}
@keyframes cart-tip {
  0% { transform: none; }
  35% { transform: translateY(-3px) rotate(-10deg); }
  70% { transform: translateY(0) rotate(4deg); }
  100% { transform: none; }
}
/* A short confirmation hangs under the header, then leaves by itself. */
.toast {
  position: absolute;
  right: 0;
  top: calc(100% + 0.6rem);
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0;
  padding: 0.45rem 0.5rem 0.45rem 1.15rem;
  font-weight: 650;
  background: var(--card);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-ctl);
  box-shadow: var(--card-shadow);
  -webkit-backdrop-filter: var(--frost);
  backdrop-filter: var(--frost);
  animation: toast 7s both;
}
.toast::before {
  content: "";
  width: 0.8rem;
  height: 0.42rem;
  margin-right: -0.3rem;
  border-left: 2px solid var(--seal);
  border-bottom: 2px solid var(--seal);
  transform: translateY(-0.12rem) rotate(-45deg);
}
.toast a {
  padding: 0.3rem 0.9rem;
  font-size: 0.9375rem;
  color: var(--paper);
  text-decoration: none;
  background: var(--ink);
  border-radius: var(--radius-ctl);
}
.toast a:hover {
  color: var(--paper);
  background: var(--azure-deep);
}
@keyframes toast {
  0% { opacity: 0; transform: translateY(-0.6rem); }
  5% { opacity: 1; transform: none; }
  90% { opacity: 1; transform: none; visibility: visible; }
  100% { opacity: 0; transform: translateY(-0.4rem); visibility: hidden; }
}
.search {
  display: flex;
  flex: 1 1 8rem;
  min-width: 7rem;
  max-width: 22rem;
  margin-left: auto;
  padding: 3px;
  background: rgb(255 255 255 / 0.6);
  border: 1px solid var(--hair);
  border-radius: var(--radius-ctl);
}
.search:focus-within {
  background: var(--paper);
  border-color: var(--azure);
}
.search__icon {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}
.search input {
  flex: 1;
  min-width: 0;
  font: inherit;
  color: var(--ink);
  padding: 0.3rem 0.5rem 0.3rem 0.9rem;
  border: 0;
  background: none;
}
.search input:focus {
  outline: none;
}
.search input::placeholder {
  color: var(--ink-soft);
}
.search button {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.search button:hover {
  background: var(--azure-deep);
}
/* The "All licenses" menu: a sheet of glass under the header, on a grid of five equal columns. */
.mega__panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.6rem);
  max-height: calc(100vh - 9rem);
  overflow-y: auto;
  padding: 2rem clamp(1.25rem, 3vw, 2.25rem) 2.25rem;
  background: linear-gradient(145deg, rgb(255 255 255 / 0.9), rgb(255 255 255 / 0.76));
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-pane);
  box-shadow: inset 0 1px 0 var(--paper), 0 34px 60px -28px rgb(13 26 58 / 0.45);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
}
.mega__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2.25rem 2rem;
  align-items: start;
}
/* A category with many products spans several columns and lines its own columns up with the grid. */
.mega__block {
  display: grid;
  grid-template-columns: subgrid;
  row-gap: 0;
}
.mega__block--2 { grid-column: span 2; }
.mega__block--3 { grid-column: span 3; }
.mega__block--4 { grid-column: span 4; }
.mega__block--5 { grid-column: span 5; }
.mega__block > h2 {
  grid-column: 1 / -1;
}
.mega__sub {
  display: grid;
  align-content: start;
  gap: 1.25rem;
}
.mega__sub--wide {
  grid-column: span 2;
}
.mega__sub--wide ul {
  columns: 2;
  column-gap: 2rem;
}
.mega__grid li {
  break-inside: avoid;
}
/* Every heading stays on one line, so the rules under them sit at the same height. */
.mega__grid h2 {
  margin-bottom: 0.75rem;
  padding-bottom: 0.55rem;
  font-size: 1rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid rgb(13 26 58 / 0.22);
}
.mega__grid h3 {
  margin-bottom: 0.3rem;
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--ink-soft);
}
.mega__grid a {
  color: var(--ink);
  text-decoration: none;
}
.mega__grid li a {
  display: block;
  padding-block: 0.22rem;
  font-size: 0.9375rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mega__grid h3 a {
  color: inherit;
}
.mega__grid a:hover {
  color: var(--azure-deep);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.mega__aside {
  display: grid;
  gap: 0.9rem;
  padding: 1.1rem 1.15rem;
  white-space: normal;
  border-radius: var(--radius-well);
}
.mega__aside p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.mega__aside p a {
  text-decoration: underline;
}
.mega__all {
  display: grid;
  font-weight: 700;
}
.mega__all span {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-soft);
}

/* ---------- Home: first screen ---------- */
.hero {
  padding-block: clamp(2rem, 5vw, 3.75rem) clamp(1.5rem, 4vw, 2.5rem);
}
.hero__head {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: 1.25rem clamp(2rem, 5vw, 4.5rem);
  align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.hero__head h1 {
  margin: 0;
}
.hero__head .lead {
  margin: 0 0 0.35rem;
}
/* The two families the store leads with, each on its own pane of glass. */
.showcase {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}
.pane {
  --tint: var(--azure);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(8rem, 40%, 14rem);
  gap: 1.5rem;
  padding: clamp(1.4rem, 2.6vw, 2.25rem);
  border-radius: var(--radius-pane);
}
.pane--office { --tint: var(--ember); }
.pane--windows { --tint: var(--azure); }
/* The family colour glows through one corner of the glass. */
.pane::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(110% 95% at 100% 0%, color-mix(in srgb, var(--tint) 34%, transparent), transparent 62%);
  pointer-events: none;
}
.pane__text {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.pane h2 {
  margin-bottom: 0.35em;
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  font-weight: 750;
  letter-spacing: -0.03em;
}
.pane h2 a {
  color: var(--ink);
  text-decoration: none;
}
.pane__blurb {
  max-width: 26rem;
  color: var(--ink-soft);
}
.pane__versions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}
.pane__versions a {
  display: block;
  padding: 0.28rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  background: rgb(255 255 255 / 0.62);
  border: 1px solid var(--hair);
  border-radius: var(--radius-ctl);
  transition: background-color 0.2s, border-color 0.2s;
}
.pane__versions a:hover {
  background: var(--paper);
  border-color: var(--ink);
}
.pane__price {
  margin: auto 0 1rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.pane__price strong {
  font-size: 1.7rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--ink);
}
/* The box stands on the pane and reaches above its top edge. */
.pane__art {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: end;
  margin-top: clamp(-4.5rem, -5vw, -2.5rem);
  color: var(--ink);
  text-decoration: none;
}
.pane__art img {
  width: 100%;
  height: auto;
  max-height: 19rem;
  object-fit: contain;
  filter: drop-shadow(0 22px 20px rgb(13 26 58 / 0.3));
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.pane__art:hover img {
  transform: translateY(-8px) rotate(-1.5deg);
}
.pane__tag {
  position: relative;
  display: grid;
  max-width: 100%;
  margin-top: -1.1rem;
  padding: 0.45rem 0.8rem;
  font-size: 0.8125rem;
  line-height: 1.3;
  text-align: center;
  background: rgb(255 255 255 / 0.72);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-well);
  box-shadow: 0 10px 20px -12px rgb(13 26 58 / 0.4);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
}
.pane__tag b {
  font-weight: 650;
}
.pane__tag span {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* ---------- Home: sections ---------- */
.section {
  padding-block: clamp(2.25rem, 5vw, 3.5rem);
}
.section--tight {
  padding-block: 1.5rem clamp(2.5rem, 5vw, 4rem);
}
.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  margin-bottom: 1.25rem;
}
.section__head h2 {
  margin: 0;
}

/* How buying works: the four steps beside the email they lead to. */
.how {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 1.5rem clamp(1.5rem, 4vw, 3rem);
  align-items: stretch;
}
.how--plain {
  grid-template-columns: minmax(0, 1fr);
}
.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}
.how--plain .steps {
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}
.steps li {
  counter-increment: step;
  padding: 1.15rem 1.25rem 1.3rem;
  border-radius: var(--radius-card);
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  margin-bottom: 0.9rem;
  font-weight: 750;
  color: var(--paper);
  background: var(--ink);
  border-radius: 50%;
}
.steps h3 {
  margin-bottom: 0.35em;
}
.steps p {
  color: var(--ink-soft);
  margin: 0;
}

/* The "license slip": what arrives by email, on dark glass. */
.slip {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: 0;
  padding: clamp(1.4rem, 3vw, 2.25rem);
  color: var(--paper);
  background: linear-gradient(150deg, rgb(33 52 138 / 0.92), rgb(13 26 58 / 0.95));
  border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: var(--radius-pane);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25), 0 30px 50px -28px rgb(13 26 58 / 0.7);
}
.guilloche {
  position: absolute;
  width: 120%;
  right: -62%;
  top: -78%;
  color: rgb(255 255 255 / 0.22);
  pointer-events: none;
}
.guilloche ellipse {
  fill: none;
  stroke: currentColor;
  stroke-width: 0.35;
}
.slip__title,
.slip__fields,
.slip__note {
  position: relative;
}
.slip__title {
  font-weight: 650;
  margin-bottom: 2.25rem;
}
.slip__fields {
  margin: 0;
  display: grid;
  gap: 1.1rem;
}
.slip__fields dt {
  font-size: 0.8125rem;
  color: rgb(255 255 255 / 0.72);
}
.slip__fields dd {
  margin: 0.15rem 0 0;
  font-size: 1.05rem;
  font-weight: 600;
}
.key {
  font-family: var(--font-key);
  font-weight: 500;
  font-size: clamp(0.8rem, 1.55vw, 1.15rem);
  letter-spacing: 0.03em;
  white-space: nowrap;
  color: var(--mark);
}
.key__dash {
  color: rgb(255 255 255 / 0.5);
}
.key__group {
  opacity: 0;
  animation: key-in 0.45s ease-out forwards;
}
.key__group--1 { animation-delay: 0.25s; }
.key__group--2 { animation-delay: 0.5s; }
.key__group--3 { animation-delay: 0.75s; }
.key__group--4 { animation-delay: 1s; }
.key__group--5 { animation-delay: 1.25s; }
@keyframes key-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.slip__note {
  margin: 1.75rem 0 0;
  font-size: 0.8125rem;
  color: rgb(255 255 255 / 0.72);
}

/* ---------- Product grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr));
  gap: 1.25rem;
}
.card {
  display: flex;
  flex-direction: column;
  padding: 0.7rem 0.7rem 1rem;
  border-radius: var(--radius-card);
}
.card__link {
  display: block;
  color: var(--ink);
  text-decoration: none;
}
.card__name {
  display: block;
  margin: 0.85rem 0.4rem 0;
  font-weight: 650;
  line-height: 1.3;
}
.card__link:hover .card__name {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.card__options {
  margin: 0.2rem 0.4rem 0;
  font-size: 0.875rem;
  color: var(--ink-soft);
}
/* Prices line up along the bottom of a row, whatever the length of the names. */
.card .price {
  margin: auto 0.4rem 0;
  padding-top: 0.45rem;
}

/*
 * The well a product stands in. It is built like a small photo studio:
 * a wall lit from above, a floor that takes a little of the family's colour,
 * and a shadow on the floor where the box touches it.
 */
.cover {
  --family: var(--azure-deep);
  --tint: var(--azure);
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 1 / 1;
  padding: 1rem 1.1rem 1.1rem;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(90% 58% at 50% 24%, #fff, transparent 74%),
    linear-gradient(180deg, color-mix(in srgb, var(--tint) 7%, rgb(255 255 255 / 0.55)) 0%, rgb(255 255 255 / 0.7) 60%, color-mix(in srgb, var(--tint) 18%, rgb(255 255 255 / 0.9)) 100%);
  border-radius: var(--radius-well);
}
/* The corner of a frame inside another frame is rounder by exactly the gap between them. */
.card .cover {
  border-radius: calc(var(--radius-card) - 0.7rem);
}
/* Five short bars: the five groups of a product key. */
.cover::after {
  content: "";
  position: absolute;
  right: 1.1rem;
  top: 1.25rem;
  width: 4.5rem;
  height: 0.4rem;
  background: repeating-linear-gradient(90deg, var(--family) 0 0.7rem, transparent 0.7rem 0.95rem);
}
.cover__family {
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--family);
}
.cover__name {
  font-size: 1.3rem;
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}
.cover--large {
  padding: 1.75rem;
}
.cover--large::after {
  right: 1.75rem;
  top: 2rem;
}
.cover--large .cover__family {
  font-size: 1rem;
}
.cover--large .cover__name {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
}
.cover--image::after {
  content: none;
}
/* Every box stands on the same line near the bottom of the well, whatever its shape. */
.cover--image img {
  position: absolute;
  z-index: 1;
  inset: 7%;
  width: 86%;
  height: 86%;
  object-fit: contain;
  object-position: 50% 100%;
  filter: drop-shadow(0 2px 3px rgb(13 26 58 / 0.14));
}
/* The shadow under the box: darkest where it touches the floor, gone within a short distance. */
.cover--image::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 19%;
  right: 19%;
  bottom: 2.8%;
  height: 8.4%;
  background: radial-gradient(50% 50% at 50% 50%, rgb(13 26 58 / 0.4), rgb(13 26 58 / 0.15) 40%, transparent 72%);
}
/* Products without a picture yet: the well is tinted more strongly in the colour of their family. */
.cover:not(.cover--image) {
  background: linear-gradient(160deg, color-mix(in srgb, var(--family) 20%, rgb(255 255 255 / 0.9)), color-mix(in srgb, var(--family) 5%, rgb(255 255 255 / 0.6)));
}
/* Each family has a dark colour for text and a bright one that tints the floor of its well. */
.cover--office { --family: #b5461b; --tint: var(--ember); }
.cover--windows { --family: #1d5fbf; --tint: var(--azure); }
.cover--windows-server { --family: #364154; --tint: #5f7396; }
.cover--project-sql { --family: #6b45a8; --tint: var(--orchid); }
.cover--autodesk { --family: #0e7474; --tint: #1fb3ae; }
.cover--cad-3d { --family: #7c5e10; --tint: #e0a91f; }

.price {
  margin: 0.35rem 0 0;
  font-variant-numeric: tabular-nums;
}
.price__from {
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.price__now {
  font-weight: 750;
}
.price__was {
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

/* ---------- Home: the other product families ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}
.tile {
  padding: 0.9rem;
  border-radius: var(--radius-card);
}
.tile__main {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--ink);
  text-decoration: none;
}
.tile__main .cover {
  flex: 0 0 5rem;
  padding: 0;
}
.tile__text {
  display: grid;
}
.tile__name {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.tile__main:hover .tile__name {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.tile__count {
  color: var(--ink-soft);
  font-size: 0.9375rem;
}
.tile__groups {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--hair);
  font-size: 0.9375rem;
}
.tile__groups a {
  color: var(--ink-soft);
  text-decoration: none;
}
.tile__groups a:hover {
  color: var(--azure-deep);
  text-decoration: underline;
}

/* ---------- Volume orders ---------- */
.bulk {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 3rem;
  padding: clamp(1.75rem, 4vw, 3rem);
  color: var(--paper);
  background:
    radial-gradient(60% 120% at 100% 0%, rgb(47 109 246 / 0.55), transparent 60%),
    radial-gradient(50% 110% at 0% 100%, rgb(255 138 60 / 0.3), transparent 60%),
    linear-gradient(150deg, #1d2c78, var(--ink));
  border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: var(--radius-pane);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25), 0 30px 50px -28px rgb(13 26 58 / 0.7);
}
.bulk h2 {
  margin-bottom: 0.4em;
}
.bulk p {
  margin: 0;
  max-width: 40rem;
  color: rgb(255 255 255 / 0.85);
}
.bulk .button {
  background: var(--paper);
  color: var(--ink);
}
.bulk .button:hover {
  background: var(--mark);
  color: var(--ink);
}
.product__bulk {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--hair);
  color: var(--ink-soft);
}

/* ---------- Shop ---------- */
.page-head {
  padding-block: clamp(2rem, 5vw, 3.25rem) 0;
}
.page-head h1 {
  margin-bottom: 0.2em;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
/* One look for every small link that leads somewhere else: filters, "see all", delivery and refunds. */
.chips a,
.section__head a,
.product__links a {
  display: inline-block;
  padding: 0.4rem 0.95rem;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-ctl);
  box-shadow: var(--glass-shadow);
  transition: background-color 0.2s, border-color 0.2s, transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.chips a:hover,
.section__head a:hover,
.product__links a:hover {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--ink);
  transform: translateY(-1px);
}
.chips a[aria-current="page"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.chips--groups {
  margin-top: 0.6rem;
}
.chips--groups a {
  font-size: 0.875rem;
  background: rgb(255 255 255 / 0.4);
  box-shadow: none;
}

.page-head__about {
  max-width: 46rem;
  margin: 0.6rem 0 0.9rem;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.page-head__support {
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 1px solid var(--hair);
}
/* The editions of one version side by side. */
.compare {
  margin-top: 2rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--card);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
}
.compare h2 {
  font-size: 1.25rem;
}
.compare__scroll {
  overflow-x: auto;
}
.compare table {
  width: 100%;
  min-width: 28rem;
  border-collapse: collapse;
}
.compare th,
.compare td {
  padding: 0.7rem 0.75rem;
  text-align: center;
  border-top: 1px solid var(--hair);
}
.compare thead th,
.compare thead td {
  border-top: 0;
  vertical-align: bottom;
  line-height: 1.3;
}
.compare thead a {
  text-decoration: none;
}
.compare tbody th {
  padding-left: 0;
  text-align: left;
  font-weight: 600;
  color: var(--ink-soft);
}
.compare__yes,
.compare__no {
  display: inline-block;
}
.compare__yes {
  width: 0.95rem;
  height: 0.5rem;
  border-left: 2.5px solid var(--seal);
  border-bottom: 2.5px solid var(--seal);
  transform: translateY(-0.2rem) rotate(-45deg);
}
.compare__no {
  width: 0.8rem;
  height: 2px;
  vertical-align: middle;
  background: rgb(13 26 58 / 0.25);
}
.compare__price td {
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.compare__price .price__from {
  font-weight: 400;
}

/* ---------- The owner's pages ---------- */
/*
 * The back office is a place to work, so it is plain: a white page, solid surfaces
 * and hairlines, with none of the storefront's glass or colour. Every surface reads
 * these values, so setting them here is enough to change all of the owner's pages.
 */
.admin {
  --ink: #0e1a36;
  --ink-soft: #5a6478;
  --base: #ffffff;
  --hair: #e4e7ee;
  --pane: #ffffff;
  --pane-shadow: none;
  --card: #ffffff;
  --card-shadow: none;
  --well: #f4f5f8;
  --well-shadow: none;
  --glass: #ffffff;
  --glass-edge: #e4e7ee;
  --glass-shadow: none;
  --frost: none;
  --radius-pane: 22px;
  --radius-card: 16px;
  --radius-well: 12px;
}
/* No coloured backdrop behind the owner's pages. */
.admin::before {
  display: none;
}
.admin .button {
  box-shadow: none;
}
.admin .field input,
.admin .field textarea,
.admin .prices input[type="text"] {
  background: #ffffff;
}
/* A fixed column of navigation on the left, the work on the right. */
.admin-shell {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  width: 100%;
  max-width: 88rem;
  margin-inline: auto;
  padding: clamp(1rem, 2.5vw, 1.75rem);
}
.admin-nav {
  position: sticky;
  top: clamp(1rem, 2.5vw, 1.75rem);
  align-self: start;
  display: grid;
  gap: 1.25rem;
  padding: 1.25rem 0.9rem 1rem;
  background: var(--pane);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-pane);
  box-shadow: var(--pane-shadow);
  -webkit-backdrop-filter: var(--frost);
  backdrop-filter: var(--frost);
}
.admin-nav__brand {
  display: grid;
  padding-inline: 0.75rem;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.admin-nav__brand img {
  display: block;
  width: auto;
  height: 1.9rem;
  margin-bottom: 0.35rem;
}
.admin-nav__brand span {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink-soft);
}
.admin-nav nav {
  display: grid;
  gap: 0.2rem;
}
.admin-nav nav a,
.admin-nav__store {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius-well);
  transition: background-color 0.2s;
}
.admin-nav nav a:hover,
.admin-nav__store:hover {
  color: var(--ink);
  background: rgb(13 26 58 / 0.07);
}
.admin-nav nav a[aria-current="page"] {
  color: var(--paper);
  background: var(--ink);
}
.admin-nav__store {
  padding-top: 0.9rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--hair);
  border-radius: 0 0 var(--radius-well) var(--radius-well);
}
.admin-main {
  min-width: 0;
  padding-block: 0.5rem 4rem;
}
.admin-main > h1 {
  margin-bottom: 0.5em;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
}
.admin-main .crumbs {
  margin-top: 0;
}
.admin-main > .chips {
  margin: 0 0 1.25rem;
}
.admin-lead {
  max-width: 50rem;
  color: var(--ink-soft);
}
.admin-block {
  margin-top: 1.25rem;
}
.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 19rem);
  gap: 1.5rem;
  align-items: start;
  margin-top: 1.5rem;
}
/* The four numbers the owner looks at first. */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  gap: 1rem;
}
.stats a,
.stats div {
  display: grid;
  gap: 0.15rem;
  height: 100%;
  padding: 1.1rem 1.25rem 1.2rem;
  color: var(--ink);
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.stats a:hover {
  color: var(--ink);
  transform: translateY(-3px);
}
.stats__label {
  font-size: 0.9375rem;
  font-weight: 650;
}
.stats strong {
  font-size: 2.4rem;
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stats .stats__money {
  font-size: 1.6rem;
  line-height: 1.65;
}
.stats small {
  font-size: 0.8125rem;
  color: var(--ink-soft);
}
.admin-facts {
  display: grid;
  margin: 0;
}
.admin-facts div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.65rem;
  border-top: 1px solid var(--hair);
}
.admin-facts dt {
  color: var(--ink-soft);
}
.admin-facts dd {
  margin: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.orders__email {
  overflow-wrap: anywhere;
}
/* The price list: one row per product, with the fields the owner changes. */
.prices th,
.prices td {
  vertical-align: middle;
}
.prices__name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  font-weight: 600;
}
/* Product names and email addresses are ordinary text, unlike order numbers. */
.orders .prices__name a,
.orders .orders__email a {
  font-family: var(--font-text);
  letter-spacing: 0;
}
.prices__name a {
  text-decoration: none;
}
.prices__name small {
  flex-basis: 100%;
  padding-left: calc(40px + 0.75rem);
  font-weight: 400;
}
.prices img,
.prices__blank {
  flex: none;
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--well);
  box-shadow: var(--well-shadow);
}
.prices input[type="text"] {
  width: 7rem;
  padding: 0.5rem 0.65rem;
  font: inherit;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: rgb(255 255 255 / 0.92);
  border: 1px solid var(--hair);
  border-radius: 10px;
  box-shadow: inset 0 1px 2px rgb(13 26 58 / 0.07);
}
.prices input[type="text"]:focus {
  background: var(--paper);
  border-color: var(--azure);
}
.prices input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  accent-color: var(--ink);
}
.keys {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hair);
}
.keys h2,
.keys p {
  margin: 0;
}
.keys .button {
  justify-self: start;
}
.field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font-family: var(--font-key);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink);
  background: rgb(255 255 255 / 0.92);
  border: 1px solid var(--hair);
  border-radius: 12px;
  box-shadow: inset 0 1px 2px rgb(13 26 58 / 0.07);
  resize: vertical;
}
.field textarea:focus {
  background: var(--paper);
  border-color: var(--azure);
}
/* Several keys for one item are shown one per line. */
.order-items code {
  white-space: pre-line;
}

/* ---- The owner's pages: one product, and the stock of keys ---- */

/* Two panels of the same width, for pages where neither is the side note. */
.admin-grid--even {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
/* Panels one under the other inside a column of the grid. */
.admin-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  min-width: 0;
}
/* A panel never grows wider than its column, whatever it holds; wide tables scroll inside it. */
.admin-stack > *,
.admin-grid > * {
  min-width: 0;
}
/* The head of a product's page: its picture beside its name. */
.admin-product {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 1.25rem;
}
.admin-product img,
.admin-product .prices__blank {
  flex: none;
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: var(--well);
  border-radius: var(--radius-well);
}
.admin-product h1 {
  margin: 0 0 0.2em;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}
.admin-product p {
  margin: 0;
}
/* How many keys are left. Grey is fine, amber is running low, red is none. */
.stock {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.15rem 0.7rem;
  font-size: 0.875rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--ink);
  background: var(--well);
  border-radius: var(--radius-ctl);
}
.stock--low {
  background: rgb(255 216 77 / 0.45);
}
.stock--out {
  color: #9b1c1c;
  background: #fdecec;
}
.stock--used,
.stock--none {
  font-weight: 500;
  color: var(--ink-soft);
}
.stock--none {
  background: none;
  padding-inline: 0;
}
.prices__stock {
  text-decoration: none;
}
.prices thead th {
  white-space: nowrap;
}
.prices__off {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* A form as wide as its panel, with short fields side by side. */
.admin .form--wide {
  max-width: none;
}
.form__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}
.form--wide .field input,
.form--wide .field select {
  width: 100%;
}
.form--wide .button {
  justify-self: start;
}
.field select {
  padding: 0.7rem 0.85rem;
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--hair);
  border-radius: 12px;
}
.check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
}
.check input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--ink);
}
.stock-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
  margin: 0 0 1rem;
}
/* Stock per variant of a product that comes in several. */
.stock-variants {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}
.stock-variants li {
  display: flex;
  gap: 0.6rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  background: var(--well);
  border-radius: var(--radius-ctl);
}
.stock-variants b {
  font-variant-numeric: tabular-nums;
}
.keys-add {
  margin-bottom: 1.5rem;
  padding: 1.1rem 1.2rem 1.25rem;
  background: var(--well);
  border-radius: var(--radius-well);
}
.keys-add h3 {
  margin: 0;
  font-size: 1rem;
}
/* A wide table scrolls sideways inside its panel instead of widening the page. */
.table-scroll {
  overflow-x: auto;
}
.keylist {
  font-size: 0.9375rem;
}
.keylist th,
.keylist td {
  vertical-align: middle;
  white-space: nowrap;
}
.keylist .key {
  font-size: 0.875rem;
  color: var(--ink);
}
.keylist .stock a {
  font-family: var(--font-key);
  font-size: 0.8125rem;
}
/* An action that changes stock takes two steps: open, then confirm. */
.confirm summary {
  font-size: 0.875rem;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  list-style: none;
  cursor: pointer;
}
.confirm summary::-webkit-details-marker {
  display: none;
}
.confirm[open] summary {
  display: none;
}
.confirm .button {
  padding: 0.3rem 0.9rem;
  font-size: 0.875rem;
}
.admin-facts--stacked div {
  display: grid;
  gap: 0.15rem;
}
.admin-facts--stacked dd {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.admin-facts code {
  font-family: var(--font-key);
  font-size: 0.875rem;
  font-weight: 500;
}
/* The latest orders that contain a product. */
.sales {
  display: grid;
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
}
.sales li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 0.75rem;
  padding-block: 0.6rem;
  font-size: 0.875rem;
  border-top: 1px solid var(--hair);
}
.sales a {
  font-family: var(--font-key);
  font-weight: 700;
}
.notice--problem {
  max-width: 44rem;
  color: #7a1616;
  background: #fdecec;
  border-color: #f3c2c2;
}
/* "Fill from stock" on an order: what is missing, and the button. */
.fill {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 0.9rem 1.1rem;
  background: var(--well);
  border-radius: var(--radius-well);
}
.fill p {
  margin: 0;
}
.button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.keys--manual {
  margin-top: 1rem;
  padding-top: 0;
  border-top: 0;
}
/* The three steps of bringing keys in from a spreadsheet. */
.import-steps {
  display: grid;
  gap: 1.1rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.import-steps li {
  position: relative;
  display: grid;
  gap: 0.6rem;
  justify-items: start;
  padding-left: 2.4rem;
  counter-increment: step;
}
.import-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.1rem;
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--paper);
  background: var(--ink);
  border-radius: 50%;
}
.upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}
.upload input[type="file"] {
  flex: 1 1 14rem;
  min-width: 0;
  padding: 0.5rem;
  font: inherit;
  font-size: 0.875rem;
  background: var(--well);
  border: 1px dashed #c3c9d6;
  border-radius: 12px;
}
.upload input[type="file"]::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.35rem 0.9rem;
  font: inherit;
  font-weight: 650;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--hair);
  border-radius: var(--radius-ctl);
  cursor: pointer;
}
/* What an upload did. */
.import-result {
  margin-bottom: 1.5rem;
}
.import-result__numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}
.import-result__numbers b {
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}
.import-result__problems {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  padding: 0.9rem 1.1rem;
  font-size: 0.9375rem;
  list-style: none;
  background: #fdecec;
  border-radius: var(--radius-well);
}

/* The page shown before the shop opens: the logo and one line, in the middle of the screen. */
.soon {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1rem;
  min-height: 100dvh;
  text-align: center;
}
.soon img {
  width: auto;
  height: 2.75rem;
  margin-bottom: 1rem;
}

/* An element marked as hidden stays hidden, whatever its class says about layout. */
[hidden] {
  display: none !important;
}

/* ---- The owner's pages: who is signed in, people and roles ---- */
.admin-nav__who {
  display: grid;
  gap: 0.15rem;
  padding: 0.9rem 0.75rem 0;
  font-size: 0.9375rem;
  border-top: 1px solid var(--hair);
}
.admin-nav__who a {
  color: var(--ink-soft);
}
.admin-nav__as {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.6rem;
}
.admin-nav__as select {
  width: 100%;
  padding: 0.45rem 0.6rem;
  font: inherit;
  font-size: 0.875rem;
  color: var(--ink);
  background: var(--well);
  border: 1px solid var(--hair);
  border-radius: var(--radius-well);
}
.admin-nav__as .button {
  padding-block: 0.4rem;
  font-size: 0.875rem;
}
.staff-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.staff-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.75rem 1rem;
  padding: 1rem 0;
}
.staff-row + .staff-row {
  border-top: 1px solid var(--hair);
}
.staff-row--fixed {
  align-items: center;
}
.staff-row--fixed > span:first-child {
  display: grid;
  min-width: 12rem;
}
.staff-row__form {
  display: flex;
  flex: 1 1 32rem;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.75rem 1rem;
}
.staff-row__form .field {
  flex: 1 1 11rem;
  margin: 0;
}
.staff-row__form .check {
  padding-bottom: 0.7rem;
}
.staff-row__seen {
  flex-basis: 100%;
  font-size: 0.875rem;
}
.roles {
  display: grid;
  gap: 0.9rem;
  margin: 0;
}
.roles div {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: 1rem;
}
.roles dt {
  font-weight: 700;
}
.roles dd {
  margin: 0;
  color: var(--ink-soft);
}
.admin-noaccess {
  max-width: 36rem;
  padding-block: 5rem;
}
/* The record of who did what: the time and the action each stay on one line. */
.log td:nth-child(1),
.log td:nth-child(3) {
  white-space: nowrap;
}
.roles + .field__hint {
  margin-top: 1rem;
}

/* ---- The owner's pages: the mailbox ---- */

/* One line per conversation: who, what about, when. */
.mail-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mail-list__item + .mail-list__item {
  border-top: 1px solid var(--hair);
}
.mail-list__item a {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.25rem 1.25rem;
  padding: 0.9rem 0.5rem;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius-well);
}
.mail-list__item a:hover {
  background: var(--well);
}
.mail-list__from {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mail-list__text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mail-list__text b {
  margin-right: 0.6rem;
  font-weight: 500;
}
.mail-list__time {
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* Not read yet: a blue dot, and the sender and subject in bold. */
.mail-list__item--unread .mail-list__from,
.mail-list__item--unread .mail-list__text b {
  font-weight: 750;
}
.mail-list__dot {
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--azure-deep);
  border-radius: 50%;
}
.mail-setup summary {
  font-weight: 650;
  cursor: pointer;
}
.mail-setup ol {
  display: grid;
  gap: 0.4rem;
  margin: 1rem 0;
  padding-left: 1.3rem;
}
.mail-subject {
  overflow-wrap: anywhere;
}
/* A conversation: the customer's messages on the left in grey, the owner's on the right in outline. */
.mail-thread {
  display: grid;
  gap: 1rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}
.mail-message {
  max-width: min(100%, 44rem);
  padding: 0.85rem 1.1rem 1rem;
  border-radius: var(--radius-card);
}
.mail-message--in {
  justify-self: start;
  background: var(--well);
  border-top-left-radius: 6px;
}
.mail-message--out {
  justify-self: end;
  border: 1px solid var(--hair);
  border-top-right-radius: 6px;
}
.mail-message__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1.25rem;
  margin: 0 0 0.4rem;
  font-size: 0.875rem;
}
/* Exactly as written, line breaks included; a long address or link wraps instead of widening the page. */
.mail-message__body {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.mail-message__files {
  margin: 0.6rem 0 0;
  font-size: 0.875rem;
}
.mail-reply {
  padding-top: 1.5rem;
  border-top: 1px solid var(--hair);
}
.mail-reply textarea {
  font-family: var(--font-text);
}
.mail-orders__title {
  margin: 1.25rem 0 0.25rem;
  font-size: 0.9375rem;
}

/* ---------- Product page ---------- */
/* The path back up the catalog: a quiet capsule, in the same glass as the chips. */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.55rem;
  width: fit-content;
  margin-block: 1.5rem 1.1rem;
  padding: 0.3rem 1rem;
  font-size: 0.875rem;
  color: rgb(13 26 58 / 0.35);
  background: rgb(255 255 255 / 0.42);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-ctl);
}
.crumbs a {
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
}
.crumbs a:hover {
  color: var(--ink);
}
.page-head .crumbs,
.prose .crumbs {
  margin-block: 0 0.9rem;
}
.product {
  --gap: 1.5rem;
  container-type: inline-size;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: var(--gap);
  align-items: stretch;
  padding-bottom: clamp(1.5rem, 3vw, 2rem);
}
/*
 * The picture: a pane of glass holding the well the box stands in.
 * The pane grows to the height of the details beside it, from a square up to
 * about a third taller; the box stays on the floor of the well and the extra
 * height becomes wall above it. Past that, the pane keeps its place while the
 * details scroll by.
 */
.stage {
  --side: calc((100cqi - var(--gap)) * 5 / 11);
  position: sticky;
  top: 6.5rem;
  display: flex;
  max-height: calc(var(--side) * 1.3);
  padding: 0.8rem;
  border-radius: var(--radius-pane);
}
.stage .cover {
  flex: 1;
  aspect-ratio: auto;
  min-height: calc(var(--side) - 1.6rem - 2px);
  border-radius: calc(var(--radius-pane) - 0.8rem);
}
/* The details: a second pane beside it. */
.product__info {
  padding: clamp(1.4rem, 3vw, 2.4rem);
  border-radius: var(--radius-pane);
}
.product__info h1 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  margin-bottom: 0.3em;
}
.product__info .price {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.product__info .price__from,
.product__info .price__was {
  font-size: 1rem;
}
.product__description {
  max-width: 34rem;
  color: var(--ink-soft);
}
.product__info h2 {
  font-size: 1.125rem;
  margin-top: 2rem;
}
.option-values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.option-values li {
  padding: 0.3rem 0.8rem;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  background: rgb(255 255 255 / 0.6);
  border: 1px solid var(--hair);
  border-radius: var(--radius-ctl);
}
.includes li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.4rem;
}
.includes li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.45em;
  width: 0.75rem;
  height: 0.4rem;
  border-left: 2px solid var(--seal);
  border-bottom: 2px solid var(--seal);
  transform: rotate(-45deg);
}
.product__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
}
/* Choosing and adding to the cart happen in a well pressed into the pane. */
.buy {
  margin-block: 1.5rem;
  padding: 1.15rem 1.25rem 1.3rem;
  border-radius: var(--radius-well);
}
.choice {
  margin: 0 0 1.1rem;
  padding: 0;
  border: 0;
}
.choice legend {
  padding: 0;
  margin-bottom: 0.45rem;
  font-size: 0.875rem;
  font-weight: 650;
}
.choice__values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
/* Each choice is a real radio button drawn as a chip. */
.choice input {
  position: absolute;
  opacity: 0;
}
.choice span {
  display: block;
  padding: 0.45rem 1rem;
  background: rgb(255 255 255 / 0.92);
  border: 1px solid var(--hair);
  border-radius: var(--radius-ctl);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}
.choice span:hover {
  border-color: var(--ink-soft);
}
.choice input:checked + span {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}
.choice input:focus-visible + span {
  outline: 3px solid var(--mark);
  outline-offset: 2px;
}
.buy__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
}
.choice + .buy__row {
  margin-top: 1.4rem;
}
.qty {
  display: grid;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 650;
}
.qty input,
.field input {
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  background: rgb(255 255 255 / 0.92);
  border: 1px solid var(--hair);
  border-radius: 12px;
  box-shadow: inset 0 1px 2px rgb(13 26 58 / 0.07);
}
.qty input:focus,
.field input:focus {
  background: var(--paper);
  border-color: var(--azure);
}
.qty input {
  width: 5rem;
  padding: 0.7rem 0.6rem;
}
.details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-block: 0 3rem;
}
.details section {
  padding: 1.5rem 1.6rem 1.6rem;
  border-radius: var(--radius-card);
}
.details h2 {
  font-size: 1.25rem;
}
.details__column {
  display: grid;
  align-content: start;
  gap: 1.5rem;
}
/* With a full introduction, the text column is the wider one. */
.details--story {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}
.story p {
  max-width: 64ch;
  line-height: 1.7;
}
.story h3 {
  margin: 1.6rem 0 0.4em;
  font-size: 1rem;
}
.story .specs {
  margin-top: 0.25rem;
}
.story .story__note {
  margin: 1rem 0 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.story > :last-child {
  margin-bottom: 0;
}
.specs {
  width: 100%;
  border-collapse: collapse;
}
.specs th,
.specs td {
  padding: 0.7rem 0;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--hair);
}
.specs th {
  width: 40%;
  padding-right: 1.5rem;
  font-weight: 600;
  color: var(--ink-soft);
}

/* ---------- Text pages ---------- */
/* A sheet of glass to read on. */
.prose {
  max-width: 46rem;
  margin-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 6vw, 5rem);
  padding: clamp(1.5rem, 4.5vw, 3rem);
  border-radius: var(--radius-pane);
}
.prose h1 {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
}
.prose h2 {
  font-size: 1.25rem;
  margin-top: 2rem;
}
.prose .lead {
  margin-bottom: 1.5rem;
}
.prose > :last-child {
  margin-bottom: 0;
}
.prose--wide {
  max-width: 54rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ---------- Contact buttons ---------- */
.chat-icon {
  flex: none;
  fill: currentColor;
}
.button--icon {
  display: inline-flex;
}
.button--chat,
.chat-button {
  background: var(--seal);
  color: var(--paper);
}
.button--chat:hover,
.chat-button:hover {
  background: var(--azure-deep);
  color: var(--paper);
}
/* WhatsApp and email stay in the corner of the screen on every page. */
.contact-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
}
.chat-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  text-decoration: none;
  border: 1px solid rgb(255 255 255 / 0.3);
  border-radius: 50%;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.3), 0 12px 24px -10px rgb(13 26 58 / 0.5);
}
/* The name of the button slides out beside it for pointer and keyboard users. */
.chat-button span {
  position: absolute;
  right: calc(100% + 0.6rem);
  padding: 0.35rem 0.8rem;
  font-size: 0.875rem;
  font-weight: 650;
  white-space: nowrap;
  color: var(--paper);
  background: var(--ink);
  border-radius: var(--radius-ctl);
  opacity: 0;
  transform: translateX(0.4rem);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.chat-button:hover span,
.chat-button:focus-visible span {
  opacity: 1;
  transform: none;
}
/* Frosted, so it stays readable over pictures and over the dark footer alike. */
.chat-button--mail {
  color: var(--ink);
  background: rgb(255 255 255 / 0.74);
  border-color: var(--glass-edge);
  -webkit-backdrop-filter: var(--frost);
  backdrop-filter: var(--frost);
}
.chat-button--mail:hover {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}

/* ---------- Live chat ---------- */
/* The button opens the chat in place: a small window above it, on every page. */
.chat-dock {
  display: contents;
}
.chat-dock > summary {
  list-style: none;
  cursor: pointer;
}
.chat-dock > summary::-webkit-details-marker {
  display: none;
}
.chat-button--live {
  background: var(--ink);
}
.chat-button--live:hover {
  background: var(--azure-deep);
}
.chat-button svg path {
  fill: currentColor;
}
.chat-dock__close path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}
/* Open: the button becomes the way to close, and its name no longer slides out over the window. */
.chat-dock__close,
.chat-dock[open] .chat-icon,
.chat-dock[open] > summary span {
  display: none;
}
.chat-dock[open] .chat-dock__close {
  display: block;
}
/* The shop has answered and the visitor has not looked yet. */
.chat-dock__dot {
  position: absolute;
  top: 0.1rem;
  right: 0.1rem;
  width: 0.8rem;
  height: 0.8rem;
  background: #e5484d;
  border: 2px solid var(--paper);
  border-radius: 50%;
}
.chat-dock__window {
  position: fixed;
  right: 1rem;
  bottom: 5rem;
  z-index: 41;
  width: min(23rem, calc(100vw - 2rem));
  height: min(32rem, calc(100dvh - 6.5rem));
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: var(--radius-card);
  box-shadow: 0 24px 60px -18px rgb(13 26 58 / 0.45);
}

/* Inside the window. These pages stand alone in a frame: no backdrop, no page margins. */
.chat-window,
.chat-feed {
  min-height: 0;
  margin: 0;
  background: var(--paper);
}
.chat-window::before,
.chat-feed::before {
  display: none;
}
.chat-window {
  display: flex;
  flex-direction: column;
  height: 100dvh;
}
.chat-window__head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--hair);
}
.chat-window__head img {
  width: auto;
  height: 1.35rem;
}
.chat-window__feed {
  flex: 1;
  min-height: 0;
  width: 100%;
  border: 0;
}
.chat-window__intro {
  flex: 1;
  margin: 0;
  padding: 1.25rem 1rem;
  color: var(--ink-soft);
}
.chat-window__problem {
  margin: 0;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: #a4262c;
  background: #fdecec;
}
.chat-window__form {
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--hair);
}
.chat-window__member {
  margin: 0;
  padding-inline: 0.25rem;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}
.chat-admin__who {
  display: block;
  margin-top: 0.2rem;
  font-weight: 400;
}
.chat-window__trap {
  position: absolute;
  left: -200vw;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.chat-window__email,
.chat-window__row textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--well);
  border: 1px solid transparent;
  border-radius: var(--radius-well);
}
.chat-window__email:focus-visible,
.chat-window__row textarea:focus-visible {
  background: var(--paper);
  border-color: var(--azure-deep);
  outline: none;
}
.chat-window__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.5rem;
}
.chat-window__row textarea {
  resize: none;
}
.chat-window__row button {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.chat-window__row button:hover {
  background: var(--azure-deep);
}
.chat-window__row button path {
  fill: currentColor;
}

/* The messages. The list is anchored to the bottom of its frame, so the newest one is in view. */
.chat-feed__scroll {
  display: flex;
  flex-direction: column-reverse;
  height: 100dvh;
  overflow-y: auto;
}
.chat-feed__list {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 1rem;
  list-style: none;
}
.bubble {
  max-width: 85%;
  padding: 0.55rem 0.85rem;
  border-radius: 18px;
}
.bubble--theirs {
  justify-self: start;
  background: #eef1f6;
  border-bottom-left-radius: 6px;
}
.bubble--mine {
  justify-self: end;
  color: var(--paper);
  background: var(--ink);
  border-bottom-right-radius: 6px;
}
.bubble__body {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bubble__meta {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  opacity: 0.65;
}
/* In the back office the conversation sits in the page, above the box for the answer. */
.chat-admin__feed {
  display: block;
  width: 100%;
  height: min(30rem, 55vh);
  margin-bottom: 1.25rem;
  border: 1px solid var(--hair);
  border-radius: var(--radius-well);
}
.chat-admin__reply textarea {
  font-family: var(--font-text);
}

/* ---------- Cart ---------- */
.cart {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 23rem);
  gap: 1.5rem;
  align-items: start;
}
.cart__lines {
  padding: 0.35rem 1.35rem;
  border-radius: var(--radius-card);
}
.cart-line {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr) auto;
  gap: 1rem 1.25rem;
  padding-block: 1.1rem;
}
.cart-line + .cart-line {
  border-top: 1px solid var(--hair);
}
.cart-line__cover .cover {
  padding: 0;
}
/* A small tile has no room for the product name, so the text cover keeps only its bars. */
.cart-line__cover .cover:not(.cover--image) > *,
.tile__main .cover:not(.cover--image) > * {
  display: none;
}
.cart-line__name {
  font-weight: 650;
  color: var(--ink);
  text-decoration: none;
}
.cart-line__name:hover {
  text-decoration: underline;
}
.cart-line__main p {
  margin: 0.15rem 0 0;
  font-size: 0.9375rem;
}
.cart-line__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  margin-top: 0.75rem;
}
.cart-line__actions form {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.cart-line__actions .qty input {
  width: 4.25rem;
  padding-block: 0.4rem;
}
.link-button {
  font: inherit;
  color: var(--ink);
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  text-decoration-color: rgb(13 26 58 / 0.32);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  cursor: pointer;
}
.link-button:hover {
  color: var(--azure-deep);
  text-decoration-color: currentColor;
}
.cart-line__price {
  margin: 0;
  font-weight: 700;
  white-space: nowrap;
}
.cart__summary {
  position: sticky;
  top: 6.5rem;
  display: grid;
  gap: 0.9rem;
  padding: 1.5rem;
  border-radius: var(--radius-card);
}
.cart__summary p {
  margin: 0;
}
.cart__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.cart__total strong {
  font-size: 1.5rem;
  letter-spacing: -0.015em;
}
/* The cart has its own send buttons, so the floating contact buttons step aside. */
body:has(.cart__summary) .contact-fab {
  display: none;
}
/* An empty cart, an empty order list: a quiet pane that says what belongs here and where to go next. */
.empty {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 1.5rem clamp(1.5rem, 4vw, 2.75rem);
  align-items: center;
}
.empty h3 {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.empty p {
  max-width: 28rem;
  color: var(--ink-soft);
}
/* A ghost of the order that will be listed here: number, status and key still blank. */
.empty__ghost {
  display: grid;
  gap: 0.85rem;
  padding: 1.25rem 1.35rem;
  border: 1.5px dashed rgb(13 26 58 / 0.24);
  border-radius: var(--radius-card);
  background: rgb(255 255 255 / 0.34);
}
.empty__ghost i {
  display: block;
  height: 0.7rem;
  border-radius: var(--radius-ctl);
  background: rgb(13 26 58 / 0.12);
}
.empty__ghost i:nth-child(1) { width: 38%; }
.empty__ghost i:nth-child(2) { width: 64%; }
.empty__ghost .status {
  width: fit-content;
  color: rgb(13 26 58 / 0.5);
  background: rgb(13 26 58 / 0.07);
}
.key--ghost {
  font-size: clamp(0.62rem, 1.02vw, 0.82rem);
  letter-spacing: 0;
  color: rgb(13 26 58 / 0.3);
  overflow: hidden;
}

/* ---------- Forms, account and orders ---------- */
.form {
  display: grid;
  gap: 0.9rem;
  max-width: 24rem;
}
.field {
  display: grid;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 650;
}
.field input {
  padding: 0.7rem 0.85rem;
}
.field__code {
  font-family: var(--font-key);
  font-size: 1.25rem;
  letter-spacing: 0.3em;
}
.field__hint {
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.hp {
  position: absolute;
  left: -100rem;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 3rem;
  margin: 2rem 0 1.5rem;
}
.facts dt {
  font-size: 0.8125rem;
  color: var(--ink-soft);
}
.facts dd {
  margin: 0.15rem 0 0;
  font-weight: 650;
}
.facts__number,
.orders th a,
.order-items code {
  font-family: var(--font-key);
  letter-spacing: 0.03em;
}
.status {
  display: inline-block;
  padding: 0.15rem 0.7rem;
  font-size: 0.875rem;
  font-weight: 650;
  border-radius: var(--radius-ctl);
  background: rgb(255 216 77 / 0.45);
}
.status--paid,
.status--delivered {
  color: var(--paper);
  background: var(--seal);
}
.status--cancelled {
  color: var(--ink-soft);
  background: rgb(13 26 58 / 0.08);
}
.order-items li {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1rem;
  border-top: 1px solid var(--hair);
}
.order-items p {
  margin: 0;
}
.order-items__name,
.order-items__price {
  font-weight: 650;
}
.order-items__price {
  white-space: nowrap;
}
.order-items .order-items__key {
  margin-top: 0.4rem;
  font-size: 0.9375rem;
}
.order-total {
  padding-block: 1rem;
  border-block: 1px solid var(--hair);
  margin-bottom: 1.5rem;
}
/* The account page: who is signed in on the left, their orders on the right. */
.account {
  display: grid;
  grid-template-columns: minmax(0, 19rem) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  padding-block: 1.5rem clamp(1.5rem, 4vw, 2.5rem);
}
.panel {
  padding: 1.5rem;
  border-radius: var(--radius-card);
}
.panel h2 {
  font-size: 1.25rem;
}
.account__side {
  display: grid;
  gap: 1.25rem;
}
.account__who {
  display: grid;
  justify-items: start;
  gap: 0.9rem;
}
.account__who p {
  margin: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.avatar {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  font-size: 1.5rem;
  font-weight: 750;
  color: var(--paper);
  background: linear-gradient(140deg, var(--azure), var(--orchid) 55%, var(--ember));
  border: 2px solid rgb(255 255 255 / 0.8);
  border-radius: 50%;
  box-shadow: 0 10px 20px -10px rgb(13 26 58 / 0.5);
}
.account__help h2 {
  font-size: 1.05rem;
}
.account__help .actions {
  margin: 0;
}
.account__orders {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: var(--radius-pane);
}
.guide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 2rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hair);
}
.guide h3 {
  margin-bottom: 0.3em;
  font-size: 1rem;
}
.guide p {
  margin: 0;
  color: var(--ink-soft);
}
.orders {
  width: 100%;
  border-collapse: collapse;
}
.orders th,
.orders td {
  padding: 0.8rem 0.75rem 0.8rem 0;
  text-align: left;
  border-top: 1px solid var(--hair);
}
.orders thead th {
  border-top: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.orders .orders__total {
  text-align: right;
  padding-right: 0;
  white-space: nowrap;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: clamp(2.5rem, 6vw, 5rem);
  background: linear-gradient(180deg, rgb(13 26 58 / 0.94), var(--ink));
  color: #d7dcea;
  padding-block: clamp(2.5rem, 5vw, 3.5rem) 1.5rem;
  font-size: 0.9375rem;
}
.site-footer a {
  color: var(--paper);
  text-decoration-color: rgb(255 255 255 / 0.4);
}
.site-footer a:hover {
  color: var(--mark);
}
.site-footer .muted {
  color: #aab3cc;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 2rem;
}
.site-footer__brand {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--paper);
}
.site-footer__brand img {
  display: block;
  width: auto;
  height: 2rem;
}
.site-footer h2 {
  font-size: 0.9375rem;
  font-weight: 650;
  color: var(--paper);
  letter-spacing: 0;
}
.site-footer li {
  margin-bottom: 0.45rem;
}
/* The bottom padding leaves room so the contact buttons never cover the last line of the page. */
.site-footer__fine {
  margin-top: 2rem;
  padding-bottom: 5rem;
  color: #aab3cc;
  font-size: 0.8125rem;
}
.site-footer__fine p {
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgb(255 255 255 / 0.16);
}

/* ---------- Motion ---------- */
/* The colour behind the glass drifts very slowly, so the page is never quite still. */
@keyframes drift {
  to { transform: translate3d(4vmax, -3vmax, 0) rotate(8deg) scale(1.08); }
}
body::before {
  animation: drift 32s ease-in-out infinite alternate;
}
/* The product names that drift across the page under the first screen. */
.ticker {
  overflow: hidden;
  padding-block: 1.1rem;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
  white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker__track {
  display: inline-flex;
  gap: 3.5rem;
  padding-right: 3.5rem;
  animation: ticker 80s linear infinite;
}
.ticker__track span::before {
  content: "";
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  margin-right: 3.5rem;
  vertical-align: middle;
  border-radius: 50%;
  background: rgb(13 26 58 / 0.25);
}
.ticker:hover .ticker__track {
  animation-play-state: paused;
}
@keyframes ticker {
  to { transform: translateX(-50%); }
}
/* The first screen arrives in sequence: headline, text, then the two panes. */
@keyframes rise {
  from { opacity: 0; transform: translateY(1.5rem); }
  to { opacity: 1; transform: none; }
}
.hero__head > *,
.pane {
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero__head > :nth-child(2) { animation-delay: 0.1s; }
.pane:nth-child(1) { animation-delay: 0.2s; }
.pane:nth-child(2) { animation-delay: 0.32s; }
.guilloche {
  animation: turn 140s linear infinite;
}
@keyframes turn {
  to { transform: rotate(360deg); }
}
.page-head h1 {
  animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
/* On a product page the two panes arrive one after the other. */
.stage,
.product__info {
  animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.product__info {
  animation-delay: 0.1s;
}
/* Things that answer the pointer. */
.card,
.tile,
.button,
.chat-button {
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.25s, border-color 0.2s, background-color 0.2s;
}
.cover--image img {
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.card:hover,
.tile:hover {
  transform: translateY(-4px);
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgb(13 26 58 / 0.06), 0 26px 40px -22px rgb(13 26 58 / 0.44);
}
.card__link:hover .cover--image img {
  transform: scale(1.06);
}
.button:hover,
.chat-button:hover {
  transform: translateY(-2px);
}
/* A button gives way under the finger. */
.button:active {
  transform: translateY(0) scale(0.96);
  transition-duration: 0.08s;
}
/* After adding to the cart the page comes back in place: only the cart count moves. */
.just-added .stage,
.just-added .product__info {
  animation: none;
}
.mega[open] .mega__panel,
.picker[open] ul {
  animation: drop 0.22s ease-out both;
}
@keyframes drop {
  from { opacity: 0; transform: translateY(-0.5rem); }
  to { opacity: 1; transform: none; }
}
/*
 * Scroll effects, written in CSS so the site still runs no scripts.
 * Browsers that do not support them simply show everything at once.
 */
@supports (animation-timeline: view()) {
  @keyframes reveal {
    from { opacity: 0; transform: translateY(2rem); }
    to { opacity: 1; transform: none; }
  }
  .card,
  .tile,
  .steps li,
  .slip,
  .details section,
  .bulk {
    animation: reveal linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 45%;
  }
  /* Section headings fill with ink as they scroll into view. */
  .section h2:not(.bulk h2, .panel h2) {
    --heading-on: var(--ink);
    --heading-off: rgb(13 26 58 / 0.22);
    width: fit-content;
    color: transparent;
    background: linear-gradient(90deg, var(--heading-on) 50%, var(--heading-off) 50%) 100% 0 / 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: fill linear both;
    animation-timeline: view();
    animation-range: cover 0% cover 18%;
  }
  @keyframes fill {
    to { background-position: 0 0; }
  }
}

/* ---------- Smaller screens ---------- */
/* Narrow laptops and tablets: the top bar drops its note so it stays on one line. */
@media (max-width: 68rem) {
  .topbar__note {
    display: none;
  }
  .topbar__links {
    margin-right: auto;
  }
  .how {
    grid-template-columns: minmax(0, 1fr);
  }
  .steps {
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  }
}
@media (max-width: 60rem) {
  .showcase {
    grid-template-columns: minmax(0, 1fr);
    gap: 3.5rem;
  }
  .account,
  .admin-grid,
  .admin-grid--even {
    grid-template-columns: minmax(0, 1fr);
  }
  /* On a narrow screen the navigation lies across the top. */
  .admin-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .admin-nav {
    position: static;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.5rem 1rem;
    padding: 0.8rem 0.9rem;
    border-radius: var(--radius-card);
  }
  .admin-nav__brand {
    padding-inline: 0.4rem;
  }
  .admin-nav nav {
    grid-column: 1 / -1;
    order: 3;
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    white-space: nowrap;
  }
  .admin-nav__store {
    padding: 0.5rem 0.75rem;
    border-top: 0;
    border-radius: var(--radius-well);
  }
  .account__side {
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  }
  /* On a narrow screen the orders come first. */
  .account__orders {
    order: -1;
  }
}
@media (max-width: 52rem) {
  .hero__head,
  .product,
  .details,
  .cart,
  .empty {
    grid-template-columns: minmax(0, 1fr);
  }
  .cart__summary {
    position: static;
  }
  /* In one column the stage is as wide as the page and stays square. */
  .stage {
    --side: 100cqi;
    position: relative;
    top: auto;
    max-height: none;
  }

  .mega__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mega__block,
  .mega__aside {
    grid-column: 1 / -1;
  }
  .mega__sub--wide ul {
    columns: 1;
  }
  .mega__panel {
    max-height: 70vh;
    white-space: normal;
  }
  .mega__grid h2 {
    white-space: normal;
  }
  .topbar__links {
    display: none;
  }
  .switches {
    margin-left: auto;
  }
  /*
   * The capsule becomes a rounded card with two lines:
   * store name, account and cart above; the menu and the search box below.
   */
  .site-header__row {
    flex-wrap: wrap;
    gap: 0.4rem 0.25rem;
    padding: 0.6rem 0.7rem 0.7rem 1rem;
    border-radius: var(--radius-card);
  }
  .site-header__row::after {
    content: "";
    order: 3;
    flex-basis: 100%;
  }
  .brand {
    order: 1;
    margin-right: auto;
  }
  .cart-link {
    order: 2;
  }
  .site-nav {
    display: none;
  }
  .mega {
    order: 4;
    margin-left: -0.3rem;
  }
  .mega summary {
    background: rgb(13 26 58 / 0.07);
  }
  .search {
    order: 5;
    flex: 1 1 8rem;
    max-width: none;
    margin-left: 0.35rem;
  }

  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cover--large:not(.cover--image) {
    aspect-ratio: 4 / 3;
  }
}
@media (max-width: 30rem) {
  .mail-list__item a {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .mail-list__text {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  /* A smaller logo, so that it shares the first row with the account and cart links. */
  .brand img {
    height: 1.5rem;
  }
  .form__row {
    grid-template-columns: minmax(0, 1fr);
  }
  .picker ul {
    right: auto;
    left: 0;
  }
  .site-nav a,
  .mega summary,
  .cart-link {
    padding-inline: 0.55rem;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
  .card {
    padding: 0.45rem 0.45rem 0.8rem;
  }
  .cover {
    padding: 0.75rem;
  }
  .cover::after {
    display: none;
  }
  .cover__name {
    font-size: 1rem;
  }
  /* On a phone the text takes the full width and the box stands in the bottom corner. */
  .pane {
    display: block;
  }
  .pane__versions {
    margin-bottom: 1.75rem;
  }
  .pane__price,
  .pane__text > .button {
    max-width: calc(100% - 6.75rem);
  }
  /* A long label breaks into two even lines instead of leaving one word behind. */
  .pane__text > .button {
    padding-inline: 1.1rem;
    font-size: 0.875rem;
    text-align: center;
    text-wrap: balance;
  }
  .pane__art {
    position: absolute;
    right: 1.1rem;
    bottom: 1.3rem;
    width: 5.75rem;
    margin: 0;
  }
  .pane__tag {
    display: none;
  }
  .guide {
    grid-template-columns: minmax(0, 1fr);
  }
  .cart__lines {
    padding-inline: 0.9rem;
  }
  .cart-line {
    grid-template-columns: 4rem minmax(0, 1fr);
  }
  .cart-line__price {
    grid-column: 2;
  }
}

/* Visitors who ask for less motion get a still page with everything visible. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .key__group {
    opacity: 1;
  }
  /* Without the roll, the new cart count is simply shown. */
  .cart-link__roll {
    transform: translateY(-50%);
  }
  .section h2:not(.bulk h2, .panel h2) {
    color: inherit;
    background: none;
  }
}
/* Browsers without backdrop blur get more opaque glass, so text stays easy to read. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header__row::before,
  .mega__panel,
  .picker ul,
  .chat-button--mail {
    background: rgb(255 255 255 / 0.96);
  }
}
