:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f1ea;
  color: #1e201c;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: radial-gradient(circle at 16% 0%, rgba(218, 229, 197, .66), transparent 31rem), #f4f1ea;
}
button, input, select { font: inherit; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }

.app-shell { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }
.topbar, .content, footer { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(30, 32, 28, .14);
}
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 700; letter-spacing: .04em; text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  background: #242720; color: #f7f4ec; font-family: Georgia, serif; font-size: 18px;
}
.text-button { padding: 8px 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: #56594f; cursor: pointer; }
.content { padding: 76px 0 96px; }
.hero { max-width: 860px; margin-bottom: 64px; }
.eyebrow { margin: 0 0 16px; color: #73776a; font-size: 12px; font-weight: 800; letter-spacing: .14em; }
h1 {
  max-width: 820px; margin-bottom: 20px; font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 7vw, 92px); font-weight: 400; letter-spacing: -.055em; line-height: .96;
}
.lede { max-width: 610px; margin-bottom: 0; color: #62665c; font-size: clamp(17px, 2vw, 21px); line-height: 1.55; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px; }
.tool-card {
  overflow: hidden; display: grid; grid-template-columns: minmax(190px, 42%) 1fr; min-height: 350px;
  border: 1px solid rgba(30, 32, 28, .14); border-radius: 28px; background: rgba(255, 254, 249, .72);
  box-shadow: 0 20px 60px rgba(35, 38, 30, .08); text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.tool-card:hover, .tool-card:focus-visible { transform: translateY(-4px); box-shadow: 0 26px 80px rgba(35, 38, 30, .14); }
.tool-card__art { position: relative; overflow: hidden; background: #dfe8c8; }
.tool-card__art::after {
  content: ""; position: absolute; inset: auto -20% -32% 4%; aspect-ratio: 1;
  border: 1px solid rgba(57, 68, 43, .25); border-radius: 50%;
}
.garment {
  position: absolute; top: 19%; left: 50%; width: 108px; height: 166px;
  border-radius: 28px 28px 18px 18px; background: #f7f4ec;
  clip-path: polygon(23% 0, 40% 9%, 60% 9%, 77% 0, 100% 18%, 84% 35%, 76% 29%, 81% 100%, 19% 100%, 24% 29%, 16% 35%, 0 18%);
  filter: drop-shadow(0 22px 20px rgba(41, 49, 32, .16));
}
.garment--back { transform: translate(-72%, 16%) rotate(-8deg); background: #aab98b; }
.garment--front { transform: translate(-31%, 0) rotate(7deg); }
.tool-card__body { display: flex; flex-direction: column; padding: 34px; }
.tool-card__heading { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.tool-card h2 { margin-bottom: 0; font-family: Georgia, serif; font-size: 34px; font-weight: 400; }
.tool-card p { margin: 28px 0; color: #666a60; line-height: 1.6; }
.arrow { font-size: 23px; }
.activity { margin-top: auto; color: #777b70; font-size: 13px; }
.status-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #84a04d; box-shadow: 0 0 0 5px rgba(132, 160, 77, .12); }

.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 52px; }
.page-heading h1 { margin-bottom: 14px; font-size: clamp(44px, 6vw, 76px); }
.back-link { display: inline-block; margin-bottom: 32px; color: #65695f; text-decoration: none; }
.connection-pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px;
  border: 1px solid rgba(30, 32, 28, .13); border-radius: 999px; background: rgba(255, 254, 249, .65);
  color: #62665c; font-size: 13px; white-space: nowrap;
}
.connection-pill.is-connecting .status-dot,
.connection-pill.is-reconnecting .status-dot { background: #b28a43; box-shadow: 0 0 0 5px rgba(178, 138, 67, .12); }
.connection-pill.is-failed .status-dot { background: #a85545; box-shadow: 0 0 0 5px rgba(168, 85, 69, .12); }
.catalog-status {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px;
  padding: 18px 20px; border: 1px solid rgba(30, 32, 28, .13); border-radius: 16px;
  background: rgba(255, 254, 249, .68);
}
.status-name { margin-bottom: 5px; font-weight: 750; }
.status-detail, .catalog-error { margin-bottom: 0; color: #74786e; font-size: 13px; line-height: 1.45; }
.catalog-error { margin-top: 7px; color: #874b37; }
.sync-button {
  flex: 0 0 auto; padding: 8px 12px; border: 1px solid rgba(30, 32, 28, .2); border-radius: 999px;
  background: transparent; color: #50544b; font-size: 12px; font-weight: 700; cursor: pointer;
}
.sync-button:disabled { cursor: wait; opacity: .55; }
.catalog-filter {
  display: flex; align-items: center; gap: 12px; margin-bottom: 22px;
  color: #62665c; font-size: 13px; font-weight: 700;
}
.catalog-filter select {
  min-width: min(100%, 320px); padding: 10px 36px 10px 12px;
  border: 1px solid rgba(30, 32, 28, .2); border-radius: 12px;
  background: #fffef9; color: #30332d;
}
.catalog-notice { margin: -8px 0 22px; color: #62665c; font-size: 13px; }
.catalog-empty { padding: 54px 28px; border: 1px dashed rgba(30, 32, 28, .2); border-radius: 22px; text-align: center; }
.catalog-empty h2 { margin-bottom: 9px; font-family: Georgia, serif; font-size: 30px; font-weight: 400; }
.catalog-empty p { margin-bottom: 0; color: #73776d; }
.product-list { display: grid; gap: 16px; }
.catalog-pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 22px; }
.catalog-pagination p { margin: 0; color: #74786e; font-size: 12px; }
.product-row { overflow: hidden; border: 1px solid rgba(30, 32, 28, .13); border-radius: 22px; background: rgba(255, 254, 249, .66); }
.product-row summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 28px; list-style: none; }
.product-row summary::-webkit-details-marker { display: none; }
.product-row h2 { margin-bottom: 0; font-family: Georgia, serif; font-size: 28px; font-weight: 400; }
.product-vendor, .colorway-count { margin-bottom: 5px; color: #7b7f73; font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.product-handle { margin: 5px 0 0; color: #85897f; font-size: 12px; }
.product-detail { display: grid; gap: 1px; border-top: 1px solid rgba(30, 32, 28, .11); background: rgba(30, 32, 28, .11); }
.variant-group { padding: 24px 28px; background: #fbfaf5; }
.variant-group h3 { margin-bottom: 16px; font-size: 18px; }
.variant-group--ungrouped { background: #f7f4ec; }
.group-note { margin: -8px 0 18px; color: #74786e; font-size: 13px; }
.variant-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.variant-card { min-width: 0; padding: 16px; border: 1px solid rgba(30, 32, 28, .11); border-radius: 14px; background: rgba(255,255,255,.6); }
.variant-card__heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.variant-card h4 { margin: 0; font-size: 15px; }
.variant-options { margin: 9px 0; color: #62665c; font-size: 12px; }
.variant-id { overflow: hidden; margin-bottom: 20px; color: #85897f; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.availability { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; font-size: 10px; font-weight: 750; }
.availability.is-available { background: #dfe9d2; color: #4e672b; }
.availability.is-unavailable { background: #e9e8e1; color: #65685f; }
.source-placeholder { display: flex; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid rgba(30,32,28,.1); color: #74786e; font-size: 11px; }
.source-placeholder strong { color: #56594f; }
.prepared-cases { display: grid; gap: 12px; padding-top: 12px; border-top: 1px solid rgba(30,32,28,.1); }
.prepared-case { min-width: 0; }
.prepared-case__heading { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; color: #74786e; font-size: 11px; }
.prepared-case__heading strong { overflow: hidden; color: #56594f; text-overflow: ellipsis; white-space: nowrap; }
.source-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.source-image { min-width: 0; margin: 0; }
.source-image img, .source-image__unavailable { width: 100%; aspect-ratio: 3 / 4; border-radius: 8px; background: #eeece4; object-fit: cover; }
.source-image__unavailable { display: grid; place-items: center; color: #85897f; font-size: 10px; }
.source-image p { overflow: hidden; margin: 5px 0 0; color: #74786e; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.login-layout { min-height: 610px; display: grid; grid-template-columns: 1.1fr .9fr; overflow: hidden; border: 1px solid rgba(30, 32, 28, .13); border-radius: 32px; background: rgba(255, 254, 249, .76); box-shadow: 0 24px 90px rgba(35, 38, 30, .1); }
.login-art { position: relative; display: grid; place-items: center; overflow: hidden; background: #242720; color: #e4edce; font-family: Georgia, serif; font-size: clamp(28px, 4vw, 54px); letter-spacing: .03em; }
.login-orbit { position: absolute; width: 70%; aspect-ratio: 1; border: 1px solid rgba(228, 237, 206, .35); border-radius: 50%; box-shadow: 0 0 0 70px rgba(228, 237, 206, .04), 0 0 0 140px rgba(228, 237, 206, .025); }
.login-panel { align-self: center; padding: clamp(36px, 7vw, 84px); }
.login-panel h1, .empty-state h1 { font-size: clamp(42px, 5vw, 66px); }
.login-panel > p:not(.eyebrow) { margin-bottom: 34px; color: #676b61; line-height: 1.6; }
.login-panel label { display: grid; gap: 9px; color: #666a60; font-size: 13px; }
.login-panel input { width: 100%; padding: 15px 16px; border: 1px solid rgba(30, 32, 28, .2); border-radius: 12px; background: #fffef9; }
.primary-button { display: inline-flex; justify-content: center; margin-top: 18px; padding: 14px 20px; border: 0; border-radius: 12px; background: #242720; color: #f7f4ec; font-weight: 700; text-decoration: none; cursor: pointer; }
.login-panel .primary-button { width: 100%; }
.loading-panel, .empty-state { min-height: 420px; display: grid; place-items: center; align-content: center; color: #73776d; }
.loader { width: 30px; height: 30px; margin-bottom: 14px; border: 2px solid rgba(30, 32, 28, .14); border-top-color: #78904e; border-radius: 50%; animation: spin 800ms linear infinite; }
footer { padding: 22px 0 30px; border-top: 1px solid rgba(30, 32, 28, .12); color: #85897f; font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .topbar, .content, footer { width: min(100% - 24px, 1180px); }
  .content { padding: 48px 0 72px; }
  .tool-card, .login-layout { grid-template-columns: 1fr; }
  .tool-card__art { min-height: 250px; }
  .login-art { min-height: 260px; }
  .page-heading { align-items: start; flex-direction: column; }
  .catalog-status { align-items: stretch; flex-direction: column; }
  .catalog-filter { align-items: stretch; flex-direction: column; }
  .catalog-filter select { width: 100%; }
  .sync-button { align-self: start; }
  .catalog-pagination { align-items: stretch; flex-direction: column; }
  .catalog-pagination .sync-button { align-self: stretch; }
  .catalog-pagination p { text-align: center; }
  .product-row summary { align-items: start; flex-direction: column; }
  .variant-group { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
