/* Commerce is deliberately scoped: the Clear Choices studio is unchanged. */
body[data-simple-studio="true"] .topbar {
  grid-template-columns: 112px minmax(0, 1fr) 112px;
  z-index: 100;
}
.studio-header-actions {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}
.studio-header-actions button, .studio-header-actions summary {
  min-height: 44px;
  border: 0;
  color: var(--simple-ink);
  background: transparent;
  font: 550 14px/1.2 ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
}
#studio-signin { padding: 8px 4px; white-space: nowrap; }
#studio-signin:disabled { cursor: wait; }
#studio-account { position: relative; }
#studio-account[hidden], #studio-signin[hidden] { display: none; }
#studio-profile {
  display: grid;
  place-items: center;
  width: 44px;
  padding: 4px;
  border-radius: 50%;
  list-style: none;
}
#studio-profile::-webkit-details-marker { display: none; }
.studio-avatar, .studio-avatar-initials {
  grid-area: 1 / 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.studio-avatar-initials { display: grid; place-items: center; background: oklch(96% 0 0); }
.studio-account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 224px;
  padding: 12px;
  border: 1px solid oklch(83% 0 0);
  border-radius: 14px;
  background: oklch(98% 0 0);
  color: oklch(20% 0 0);
  box-shadow: 0 8px 28px oklch(20% 0 0 / .14);
}
.studio-account-menu strong { display: block; padding: 8px; overflow-wrap: anywhere; }
.studio-account-menu a, .studio-account-menu button {
  display: flex;
  align-items: center;
  min-height: 44px;
  width: 100%;
  padding: 10px 8px;
  color: inherit;
  text-decoration: none;
  text-align: left;
  font: 14px/1.4 ui-sans-serif, system-ui, sans-serif;
  border-radius: 8px;
}
.studio-account-menu a:hover, .studio-account-menu button:hover { background: oklch(92% 0 0); }
.studio-header-actions :focus-visible { outline: 3px solid oklch(52% .18 255); outline-offset: 2px; }
body[data-simple-studio="true"] .studio-purchase { flex-wrap: wrap; }
.cart-save-status {
  position: absolute;
  inset: auto 16px calc(100% + 10px);
  margin: 0;
  padding: 10px 14px;
  max-height: 6em;
  overflow-y: auto;
  overflow-wrap: anywhere;
  border: 1px solid var(--ui-highlight);
  border-radius: 14px;
  background: var(--ui-sheet);
  box-shadow: var(--ui-glass-shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  text-align: center;
  color: var(--ui-ink);
  font: 13px/1.5 ui-sans-serif, system-ui, sans-serif;
}
.cart-save-status:empty { display: none; }
body[data-simple-studio="true"] #review-clock-action[aria-busy="true"] {
  cursor: wait;
  opacity: .85;
}
#review-clock-action[aria-busy="true"]::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  vertical-align: -2px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: cart-saving-spin .8s linear infinite;
}
@keyframes cart-saving-spin { to { transform: rotate(360deg); } }
@media (max-width: 430px) {
  body[data-simple-studio="true"] .topbar { grid-template-columns: 102px minmax(0, 1fr) 102px; }
  body[data-simple-studio="true"] .brand-wordmark { width: 100px; }
  .studio-header-actions { gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  #review-clock-action[aria-busy="true"]::before { animation: none; }
}
.cart-address-review {
  margin: 20px 0;
  padding: 16px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 0 0 1px #d6d7d3;
}
.cart-address-review button { margin: 4px 8px 4px 0; }
.clock-cart .google-maps-attribution {
  margin: 12px 0 0;
  font: 500 14px/1.4 Arial, sans-serif;
  color: #5e5e5e;
  white-space: nowrap;
}
.clock-cart,
.commerce-page {
  --commerce-ink: #161716;
  --commerce-paper: #f8f8f6;
  --commerce-line: #d6d7d3;
  --commerce-red: #ed0020;
  color: var(--commerce-ink);
  font:
    16px/1.45 Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
.clock-cart *,
.commerce-page * {
  box-sizing: border-box;
}
body.cart-modal-open {
  overflow: hidden !important;
}
dialog.clock-cart {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(540px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  border: 0;
  border-radius: 24px 0 0 24px;
  padding: 0;
  background: var(--commerce-paper);
  box-shadow: -12px 0 60px #0002;
  overflow: auto;
  overscroll-behavior: contain;
}
.clock-cart::backdrop {
  background: #17181666;
  backdrop-filter: blur(3px);
}
.cart-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--commerce-paper);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--commerce-line);
}
.cart-header h2 {
  font-size: 24px;
  margin: 0;
}
.cart-content {
  padding: 8px 24px 32px;
}
.cart-notice {
  position: sticky;
  top: 85px;
  height: 0;
  z-index: 3;
}
.clock-cart #cart-status {
  position: absolute;
  inset: 8px 16px auto;
  margin: 0;
  padding: 10px 14px;
  max-height: min(9em, 40dvh);
  overflow-y: auto;
  overflow-wrap: anywhere;
  border: 1px solid var(--ui-highlight);
  border-radius: 14px;
  background: var(--ui-sheet);
  color: var(--ui-ink);
  box-shadow: var(--ui-glass-shadow);
}
.clock-cart #cart-status:empty {
  display: none;
}
.clock-cart button,
.commerce-page button {
  font: inherit;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--commerce-line);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  cursor: pointer;
}
.clock-cart button:hover,
.commerce-page button:hover {
  background: #eceeea;
}
.clock-cart button:disabled,
.commerce-page button:disabled {
  opacity: 0.5;
  cursor: default;
}
.clock-cart :focus-visible,
.commerce-page :focus-visible,
#cancel-cart-edit:focus-visible {
  outline: 3px solid #101110;
  outline-offset: 3px;
}
.clock-cart .commerce-primary,
.commerce-page .commerce-primary {
  background: var(--commerce-red);
  color: #fff;
  border: 0;
  font-weight: 650;
  width: 100%;
  margin-top: 14px;
}
.clock-cart .commerce-primary:hover,
.commerce-page .commerce-primary:hover {
  background: #c9001b;
}
.clock-cart .commerce-icon {
  width: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 30px;
}
.cart-account {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 16px 0;
}
.cart-account a,
.commerce-page a {
  color: inherit;
  text-underline-offset: 3px;
}
.commerce-notice {
  background: #fff1d5;
  color: #624614;
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
}
.cart-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--commerce-line);
}
.cart-item img {
  width: 112px;
  height: 112px;
  object-fit: contain;
}
.cart-item h3 {
  margin: 0 0 6px;
  font-size: 18px;
  overflow-wrap: anywhere;
}
.cart-item p {
  margin: 6px 0;
  font-size: 14px;
  color: #4e504b;
}
.cart-item .cart-price {
  font-weight: 650;
  color: #181a16;
}
.cart-item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cart-item-actions button {
  padding: 8px 10px;
  font-size: 14px;
}
.cart-empty {
  text-align: center;
  padding: 32px 8px;
}
.cart-advisory {
  font-size: 13px !important;
}
.cart-shipping {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}
.cart-shipping h3,
.cart-shipping p {
  margin: 4px 0;
}
.cart-shipping input,
.commerce-page input,
.commerce-page textarea,
.commerce-page select {
  font: inherit;
  font-size: 16px;
  min-height: 44px;
  border: 1px solid #9a9d95;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  width: 100%;
  color: #161716;
}
.cart-shipping label {
  margin-top: 8px;
  font-weight: 550;
}
.cart-shipping button {
  margin-top: 12px;
}
.cart-shipping #shipping-submit[aria-busy="true"] { cursor: wait; }
.cart-shipping #shipping-submit[aria-busy="true"]::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  vertical-align: -2px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: cart-saving-spin .8s linear infinite;
}
.cart-shipping .shipping-feedback { min-height: 20px; font-size: 14px; color: #444; }
.cart-shipping .shipping-suggestions:empty { display: none; }
.cart-shipping .shipping-suggestions {
  border: 1px solid var(--commerce-line);
  border-radius: 10px;
  background: #fff;
  padding: 4px;
}
.cart-shipping .shipping-suggestion {
  display: block;
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 6px;
  text-align: left;
}
.cart-shipping .shipping-suggestions .google-maps-attribution { margin: 4px 12px 6px; }
.cart-quote {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--commerce-line);
}
.cart-quote > a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  min-height: 96px;
}
.cart-quote img {
  object-fit: contain;
}
.cart-quote dl,
.order-totals {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}
.cart-quote dd,
.order-totals dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.commerce-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  cursor: pointer;
}
.commerce-check input {
  width: 22px;
  height: 22px;
  min-height: 22px;
  flex-shrink: 0;
  margin: 0;
  accent-color: #161716;
}
.commerce-dev {
  margin-top: 24px;
  border-top: 1px solid var(--commerce-line);
  padding: 16px 0;
  color: #5c5241;
  font-size: 14px;
}
.commerce-dev summary {
  min-height: 44px;
  cursor: pointer;
}
.commerce-dev button {
  margin: 4px;
  font-size: 13px;
}
.cart-count {
  position: absolute;
  right: 0;
  top: 0;
  min-width: 20px;
  height: 20px;
  border-radius: 12px;
  background: #151515;
  color: white;
  font-size: 12px;
  line-height: 20px;
  text-align: center;
}
.cart-count[hidden] {
  display: none;
}
/* One compact purchase region; viewing the cart never adds the current draft. */
body[data-simple-studio="true"] .topbar #buy-action {
  position: relative;
}
body[data-simple-studio="true"] .studio-purchase > .studio-purchase-copy[hidden] {
  display: none;
}
body[data-simple-studio="true"] .studio-purchase > .studio-purchase-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
body[data-simple-studio="true"] .studio-purchase #review-clock-action {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  min-height: 48px;
  padding: 12px 16px;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.2;
}
body[data-simple-studio="true"] #studio-cart-action {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 12px 16px;
  border: 0;
  border-radius: 28px;
  background: transparent;
  color: var(--simple-ink);
  box-shadow: inset 0 0 0 1px currentColor;
  font: 550 14px/1.2 ui-sans-serif, system-ui, sans-serif;
  white-space: nowrap;
  cursor: pointer;
}
body[data-simple-studio="true"] #studio-cart-action:hover {
  background: var(--color-hover-neutral, oklch(96% 0 0));
}
body[data-simple-studio="true"] #studio-cart-action:disabled {
  opacity: .5;
  cursor: default;
}
body[data-simple-studio="true"] #studio-cart-action[hidden] {
  display: none;
}
.studio-purchase-actions :focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}
.cart-edit-banner {
  padding: 12px;
  border-radius: 10px;
  background: #fff1d5;
  color: #4b391b;
  font: 14px/1.4 inherit;
}
.cart-edit-banner[hidden] {
  display: none;
}
#cancel-cart-edit {
  font: inherit;
  border: 0;
  min-height: 44px;
  padding: 10px 12px;
  background: transparent;
  text-decoration: underline;
  color: inherit;
  cursor: pointer;
  flex: 0 0 auto;
  white-space: nowrap;
}
#cancel-cart-edit[hidden] {
  display: none;
}
.commerce-page {
  margin: 0;
  background: #e0e1de;
  min-height: 100dvh;
}
.commerce-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  max-width: 1120px;
  margin: auto;
}
.commerce-header h1 {
  flex: 1;
  font-size: 24px;
  margin: 0;
}
.commerce-page main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 60px;
}
.commerce-page #commerce-status {
  max-width: 1032px;
  margin: 12px auto;
  padding: 0 24px;
}
.ops-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 22px; }
.ops-nav a { min-width: 94px; min-height: 44px; display: grid; place-items: center;
  padding: 10px 18px; border-radius: 999px; color: inherit; text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--commerce-line); }
.ops-nav a[aria-current="page"] { color: #fff; background: var(--commerce-ink); box-shadow: none; }
.ops-nav a:focus-visible { outline: 3px solid #2765d8; outline-offset: 2px; }
.ops-card { overflow-wrap: anywhere; }
.ops-person { display: flex; align-items: center; gap: 12px; }
.ops-person img, .ops-avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; object-fit: cover; }
.ops-avatar { display: grid; place-items: center; background: #e4e5e2; }
.ops-person strong, .ops-person span { display: block; }
.ops-items { margin: 12px 0; padding-left: 22px; }
.commerce-legal { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap;
  max-width: 1080px; margin: 0 auto; padding: 20px 24px 40px; border-top: 1px solid var(--commerce-line); }
.commerce-legal a { color: inherit; text-underline-offset: 3px; }
.order-card,
.order-detail {
  background: var(--commerce-paper);
  border-radius: 20px;
  padding: 24px;
  margin: 16px 0;
}
.order-card h2 {
  font-size: 18px;
  overflow-wrap: anywhere;
}
.order-card a {
  display: block;
  min-height: 44px;
  padding: 10px 0;
}
.order-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
}
.order-meta span {
  padding: 6px 10px;
  border-radius: 8px;
  background: #e8e9e5;
}
.order-detail img {
  width: 144px;
  height: 144px;
  object-fit: contain;
}
.order-detail ul {
  padding-left: 20px;
}
.order-detail textarea {
  min-height: 100px;
}
.order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}
.order-detail h2 {
  font-size: 20px;
  margin-top: 24px;
}
.order-detail h2,
.order-detail p,
.order-timeline li,
.order-meta span {
  overflow-wrap: anywhere;
}
.order-timeline li {
  margin: 10px 0;
  font-size: 14px;
}
.operator-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.operator-filters label {
  flex: 1;
  min-width: 160px;
}
.operator-filters .commerce-check {
  align-items: center;
}
.operator-filters input[type="checkbox"] {
  width: 22px;
}
@media (max-width: 600px) {
  dialog.clock-cart {
    width: 100%;
    border-radius: 0;
  }
  .cart-header {
    padding: 16px;
  }
  .cart-content {
    padding: 8px 16px 32px;
  }
  .cart-item {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
  }
  .cart-item img {
    width: 88px;
    height: 88px;
  }
  .cart-item-actions {
    gap: 4px;
  }
  .cart-item-actions button {
    padding: 8px;
  }
  .commerce-header {
    padding: 16px;
    gap: 12px;
  }
  .commerce-header h1 {
    font-size: 20px;
  }
  .commerce-page main {
    padding: 0 12px 32px;
  }
  .order-detail,
  .order-card {
    padding: 18px;
  }
  .cart-header h2 {
    font-size: 22px;
  }
  .cart-notice {
    top: 77px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .clock-cart *,
  .commerce-page * {
    scroll-behavior: auto !important;
  }
}
@media (forced-colors: active) {
  body[data-simple-studio="true"] #studio-cart-action {
    border: 1px solid ButtonText;
  }
  .clock-cart,
  .order-card,
  .order-detail {
    border: 1px solid CanvasText;
  }
  .clock-cart button,
  .commerce-page button {
    border: 1px solid ButtonText;
  }
  .commerce-notice {
    border: 1px solid CanvasText;
  }
  .cart-count {
    forced-color-adjust: none;
  }
}

.shipping-save-feedback {
  height: 4.5em;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ui-muted);
  margin: 8px 0;
}
.shipping-options { border: 0; padding: 0; margin: 24px 0; min-width: 0; }
.shipping-options legend { margin-bottom: 12px; }
.shipping-option { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--ui-line); border-radius: 14px; margin: 8px 0; cursor: pointer; }
.clock-cart .shipping-option input { width: 20px; height: 20px; flex: 0 0 20px; margin: 0; }
.shipping-option:has(input:checked) { background: var(--ui-glass); border-color: var(--ui-ink); }
.shipping-option small { display: block; font-size: 12px; color: var(--ui-muted); margin-top: 4px; }
.shipping-option > span { min-width: 0; overflow-wrap: anywhere; }
