:root {
  color-scheme: light;
  --ink: #171918;
  --muted: #626967;
  --paper: #f3f5f3;
  --surface: #ffffff;
  --steel: #d9dfdc;
  --line: #dfe4e1;
  --green: #276451;
  --green-dark: #1d4c3e;
  --brass: #9b7838;
  --danger: #a33b35;
  --warning: #9a661d;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  background: var(--paper);
  color-scheme: light;
}

body {
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
}

body.checkout-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

.navbar {
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  display: flex;
  min-height: 3.75rem;
  padding: 0 1.25rem;
}

.navbar-brand,
.navbar-end {
  align-items: stretch;
  display: flex;
}

.navbar-end {
  margin-left: auto;
}

.navbar-item {
  color: #424846;
  min-height: 3.75rem;
}

.navbar-item:hover,
.navbar-item.is-active {
  background: transparent;
  color: var(--ink);
}

.brand-lockup {
  color: var(--ink);
  font-weight: 700;
  gap: 0.65rem;
}

.brand-mark {
  align-items: center;
  background: var(--ink);
  border-radius: 4px;
  color: white;
  display: inline-flex;
  font-family: Georgia, serif;
  font-size: 1.05rem;
  height: 1.85rem;
  justify-content: center;
  width: 1.85rem;
}

.auth-actions {
  align-items: center;
  display: flex;
  gap: 0.65rem;
  padding: 0.5rem 0;
}

.auth-user {
  color: var(--muted);
  font-size: 0.82rem;
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.button {
  border-radius: 4px;
  gap: 0.45rem;
}

.button svg {
  height: 1rem;
  width: 1rem;
}

.button.is-primary {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

.button.is-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.hero-band {
  align-items: center;
  background-image:
    linear-gradient(90deg, rgba(15, 17, 16, 0.92) 0%, rgba(15, 17, 16, 0.72) 40%, rgba(15, 17, 16, 0.08) 76%),
    url("/images/razor-workbench-hero.webp");
  background-position: center;
  background-size: cover;
  color: white;
  display: flex;
  min-height: 29rem;
}

.hero-copy {
  max-width: 42rem;
  padding: 5.5rem 0 6rem;
}

.hero-copy h1 {
  color: white;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.65rem;
  font-weight: 500;
  line-height: 1.03;
  margin: 0 0 1.25rem;
  max-width: 40rem;
}

.hero-copy > p:last-child {
  color: #e4e8e5;
  font-size: 1.12rem;
  line-height: 1.65;
  max-width: 36rem;
}

.eyebrow {
  color: #d1d8d4;
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.eyebrow--dark {
  color: var(--green);
}

.storefront-section {
  background: var(--paper);
  padding: 4.5rem 1.5rem 5.5rem;
}

.storefront-heading {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}

.storefront-heading h2 {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.25rem;
  font-weight: 500;
  line-height: 1.1;
}

.collection-count {
  color: var(--muted);
  font-size: 0.88rem;
}

.inventory-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}

.inventory-grid--empty {
  display: block;
}

.storefront-empty {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 4.5rem 0;
}

.storefront-empty__title {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  margin-bottom: 0.35rem;
}

.razor-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.razor-card__media {
  align-items: center;
  background: #e7ebe9;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  font-size: 0.82rem;
  justify-content: center;
  overflow: hidden;
  width: 100%;
}

.razor-card__media--empty {
  aspect-ratio: 4 / 3;
}

.media-gallery__stage {
  aspect-ratio: 4 / 3;
  background: #e7ebe9;
  overflow: hidden;
  position: relative;
  touch-action: pan-y;
  width: 100%;
}

.media-gallery__stage:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: -3px;
}

.media-gallery__viewport,
.media-gallery__viewport img,
.media-gallery__viewport video {
  height: 100%;
  width: 100%;
}

.media-gallery__viewport img,
.media-gallery__viewport video {
  display: block;
  object-fit: cover;
}

.media-gallery__viewport video {
  background: #111412;
  object-fit: contain;
}

.media-gallery__arrow {
  align-items: center;
  background: rgba(19, 23, 21, 0.78);
  border: 0;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  height: 2.25rem;
  justify-content: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: background 120ms ease;
  width: 2.25rem;
  z-index: 2;
}

.media-gallery__arrow:hover,
.media-gallery__arrow:focus-visible {
  background: #111412;
}

.media-gallery__arrow--previous {
  left: 0.6rem;
}

.media-gallery__arrow--next {
  right: 0.6rem;
}

.media-gallery__arrow svg {
  height: 1.2rem;
  width: 1.2rem;
}

.media-gallery__counter {
  background: rgba(19, 23, 21, 0.78);
  border-radius: 999px;
  bottom: 0.55rem;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.35rem 0.5rem;
  position: absolute;
  right: 0.55rem;
  z-index: 2;
}

.media-gallery__thumbnails {
  background: #f7f8f7;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.5rem;
  scrollbar-width: thin;
  width: 100%;
}

.media-gallery__thumbnail {
  aspect-ratio: 1;
  background: #dfe4e1;
  border: 2px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  flex: 0 0 2.8rem;
  overflow: hidden;
  padding: 0;
  position: relative;
}

.media-gallery__thumbnail:hover,
.media-gallery__thumbnail:focus-visible {
  border-color: #84928b;
}

.media-gallery__thumbnail.is-active {
  border-color: var(--green);
}

.media-gallery__thumbnail img,
.media-gallery__thumbnail video {
  display: block;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  width: 100%;
}

.media-gallery__video-badge {
  align-items: center;
  background: rgba(17, 20, 18, 0.75);
  border-radius: 50%;
  color: white;
  display: flex;
  height: 1.35rem;
  justify-content: center;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1.35rem;
}

.media-gallery__video-badge svg {
  height: 0.7rem;
  margin-left: 1px;
  width: 0.7rem;
}

.razor-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.25rem;
}

.razor-card__topline {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.availability-badge,
.status-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.36rem 0.55rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.availability-badge {
  background: #e3efe9;
  color: var(--green-dark);
}

.razor-price {
  color: var(--ink);
  font-weight: 700;
}

.razor-card h3 {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.18;
  margin-bottom: 0.35rem;
}

.razor-maker {
  color: var(--brass);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  text-transform: uppercase;
}

.razor-description {
  color: #4e5552;
  line-height: 1.55;
}

.razor-specs {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.78rem;
  gap: 0.45rem 1rem;
  margin-top: 1.1rem;
  padding-top: 0.9rem;
}

.razor-specs li {
  list-style: none;
}

.razor-card__checkout {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.55rem;
  margin-top: auto;
  padding-top: 1.1rem;
}

.razor-card__buy {
  justify-content: center;
  width: 100%;
}

.razor-card__shipping {
  color: var(--muted);
  font-size: 0.72rem;
  text-align: center;
}

.razor-card__checkout-message {
  color: var(--muted);
  font-size: 0.72rem;
  min-height: 1.1rem;
  text-align: center;
}

.razor-card__checkout-message--error {
  color: var(--danger);
}

.checkout-notice {
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
  padding: 0.85rem 1.5rem;
  text-align: center;
}

.checkout-notice--success {
  background: #e3efe9;
  color: var(--green-dark);
}

.checkout-notice--neutral {
  background: #eef1ef;
  color: #4e5753;
}

.checkout-notice--error {
  background: #f7e9e7;
  color: var(--danger);
}

.checkout-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 1.25rem;
  position: fixed;
  z-index: 100;
}

.checkout-modal__backdrop {
  background: rgba(13, 15, 14, 0.74);
  border: 0;
  cursor: default;
  inset: 0;
  position: absolute;
}

.checkout-dialog {
  background: var(--surface);
  border-radius: 6px;
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.28);
  max-height: calc(100vh - 2.5rem);
  max-width: 70rem;
  overflow: auto;
  position: relative;
  width: 100%;
}

.checkout-dialog__header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
}

.checkout-dialog__header .eyebrow {
  margin-bottom: 0.2rem;
}

.checkout-dialog__header h2 {
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 700;
}

.icon-button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  height: 2.35rem;
  justify-content: center;
  width: 2.35rem;
}

.icon-button:hover {
  background: var(--paper);
  color: var(--ink);
}

.icon-button svg {
  height: 1.15rem;
  width: 1.15rem;
}

.checkout-dialog__content {
  display: grid;
  grid-template-columns: minmax(14rem, 19rem) minmax(0, 1fr);
  min-height: 36rem;
}

.checkout-summary {
  background: #f5f7f5;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  padding: 1.5rem;
}

.checkout-summary h3 {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  line-height: 1.25;
  margin-top: 0.35rem;
}

.checkout-summary__price {
  color: var(--green-dark);
  font-size: 1.1rem;
  font-weight: 700;
}

.checkout-summary dl {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

.checkout-summary dl div {
  padding: 0.8rem 0;
}

.checkout-summary dl div + div {
  border-top: 1px solid var(--line);
}

.checkout-summary dt {
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
}

.checkout-summary dd,
.checkout-final-sale {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
  margin-top: 0.15rem;
}

.checkout-final-sale strong {
  color: var(--ink);
}

.checkout-summary > a {
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: auto;
}

.checkout-payment {
  min-height: 36rem;
  padding: 0.5rem;
  position: relative;
}

.checkout-loading {
  align-items: center;
  color: var(--muted);
  display: flex;
  inset: 0;
  justify-content: center;
  position: absolute;
}

.site-footer {
  background: var(--ink);
  color: #bfc6c2;
  font-size: 0.8rem;
  padding: 1.5rem;
}

.site-footer__inner {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.site-footer a {
  color: #e0e5e2;
}

.policy-page {
  background: var(--surface);
  min-height: calc(100vh - 7rem);
}

.policy-heading {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 3.5rem 1.5rem 2.5rem;
}

.policy-heading h1 {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.7rem;
  font-weight: 500;
  line-height: 1.1;
}

.policy-heading p:last-child {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.65rem;
}

.policy-content {
  max-width: 52rem;
  padding: 3rem 1.5rem 4.5rem;
}

.policy-content section {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0;
}

.policy-content h2 {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.policy-content p {
  color: #4e5552;
  line-height: 1.7;
}

.policy-content p + p {
  margin-top: 0.65rem;
}

.inventory-package-option {
  align-items: end;
  display: flex;
  padding-bottom: 0.55rem;
}

.admin-page {
  background: #eef1ef;
}

.admin-heading {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 1.4rem 1.5rem;
}

.admin-heading .container {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.admin-heading .eyebrow {
  margin-bottom: 0.2rem;
}

.admin-heading h1 {
  color: var(--ink);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.2;
}

.app-status {
  color: var(--muted);
  font-size: 0.8rem;
  min-height: 1.2rem;
  text-align: right;
}

.app-status--error {
  color: var(--danger);
}

.admin-main {
  padding: 0 1.5rem 2rem;
}

.admin-tabs {
  margin-bottom: 0;
}

.admin-tabs ul {
  border-bottom-color: var(--line);
}

.admin-tab {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  font-weight: 600;
  gap: 0.45rem;
  padding: 1rem 1.15rem 0.85rem;
}

.admin-tab svg {
  height: 1rem;
  width: 1rem;
}

.admin-tabs li.is-active {
  border-bottom: 2px solid var(--green);
}

.admin-tabs li.is-active .admin-tab {
  color: var(--ink);
}

.auth-gate,
.editor-empty {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 28rem;
  text-align: center;
}

.auth-gate svg,
.editor-empty svg {
  color: #a2aba6;
  height: 2rem;
  margin-bottom: 0.85rem;
  width: 2rem;
}

.auth-gate h2,
.editor-empty h2 {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
}

.inventory-workspace {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  grid-template-columns: 20rem minmax(0, 1fr);
  min-height: 42rem;
}

.inventory-sidebar {
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-toolbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 1rem;
}

.sidebar-toolbar h2 {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
}

.record-count {
  color: var(--muted);
  font-size: 0.72rem;
}

.inventory-search {
  margin: 0;
  padding: 0 1rem 0.85rem;
}

.inventory-search .icon svg {
  height: 0.9rem;
  width: 0.9rem;
}

.inventory-list {
  border-top: 1px solid var(--line);
  flex: 1;
  max-height: 64rem;
  overflow: auto;
}

.inventory-list-empty {
  color: var(--muted);
  font-size: 0.8rem;
  padding: 1.25rem 1rem;
}

.inventory-row {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #edf0ee;
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: 2.75rem minmax(0, 1fr) auto;
  min-height: 4.5rem;
  padding: 0.7rem 0.85rem;
  text-align: left;
  width: 100%;
}

.inventory-row:hover {
  background: #f6f8f7;
}

.inventory-row.is-selected {
  background: #edf5f1;
  box-shadow: inset 3px 0 var(--green);
}

.inventory-row__thumb {
  align-items: center;
  aspect-ratio: 1;
  background: #dde4e0;
  border-radius: 4px;
  color: var(--green-dark);
  display: flex;
  font-family: Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  justify-content: center;
  overflow: hidden;
}

.inventory-row__thumb img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.inventory-row__details {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.inventory-row__details strong,
.inventory-row__details span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-row__details strong {
  color: var(--ink);
  font-size: 0.84rem;
}

.inventory-row__details span {
  color: var(--muted);
  font-size: 0.7rem;
  margin-top: 0.2rem;
}

.inventory-row__summary {
  align-items: end;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  font-size: 0.72rem;
  gap: 0.35rem;
}

.status-badge {
  background: #e8ecea;
  color: #555e5a;
}

.status-restoring {
  background: #fff0d8;
  color: #79521b;
}

.status-ready,
.status-available {
  background: #dfeee7;
  color: var(--green-dark);
}

.status-reserved {
  background: #e8e5f2;
  color: #574979;
}

.status-sold {
  background: #e5e8e7;
  color: #3f4643;
}

.status-archived {
  background: #f0e4e3;
  color: #7d3b37;
}

.inventory-editor {
  min-width: 0;
}

.editor-toolbar {
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 2;
}

.editor-kicker {
  color: var(--muted);
  font-size: 0.68rem;
  margin-bottom: 0.2rem;
  text-transform: uppercase;
}

.editor-toolbar h2 {
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 700;
}

.form-message {
  color: var(--muted);
  font-size: 0.78rem;
  min-height: 1.25rem;
  padding: 0.75rem 1.25rem 0;
}

.form-message--success {
  color: var(--green);
}

.form-message--error,
.analysis-error {
  color: var(--danger);
}

.form-section {
  border-bottom: 1px solid var(--line);
  padding: 1.25rem;
}

.form-section > h3,
.section-heading-row h3,
.publishing-section h3 {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.section-heading-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-heading-row h3 {
  margin-bottom: 0;
}

.section-heading-actions {
  display: flex;
  gap: 0.5rem;
}

.ai-review {
  background: #f5f1e8;
  border-bottom: 1px solid #e2d8c4;
  color: #66522c;
  font-size: 0.76rem;
  padding: 0.75rem 1.25rem;
}

.ai-review__heading {
  align-items: center;
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.ai-review__heading svg {
  height: 0.95rem;
  width: 0.95rem;
}

.ai-review ul {
  line-height: 1.45;
  margin-left: 1.1rem;
}

.input.ai-suggested,
.textarea.ai-suggested {
  background: #fffdf7;
  border-color: var(--brass);
  box-shadow: 0 0 0 1px rgba(155, 120, 56, 0.18);
}

.ai-confidence {
  border: 1px solid currentColor;
  border-radius: 999px;
  float: right;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.1rem;
  padding: 0 0.35rem;
  text-transform: uppercase;
}

.ai-confidence--high {
  color: var(--green);
}

.ai-confidence--medium {
  color: var(--brass);
}

.ai-confidence--low {
  color: var(--muted);
}

.field-grid {
  display: grid;
  gap: 0.9rem 1rem;
}

.field-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-grid--five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.field-span-two {
  grid-column: span 2;
}

.field-span-full {
  grid-column: 1 / -1;
}

.field {
  margin-bottom: 0;
}

.label {
  color: #464d4a;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.input,
.textarea,
.select select {
  background: white;
  border-color: #cfd6d2;
  border-radius: 4px;
  box-shadow: none;
  color: var(--ink);
  font-size: 0.86rem;
}

.input:focus,
.textarea:focus,
.select select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 1px var(--green);
}

.textarea {
  min-height: auto;
  resize: vertical;
}

.margin-summary {
  color: var(--muted);
  display: flex;
  font-size: 0.73rem;
  gap: 1.25rem;
}

.margin-summary strong {
  color: var(--ink);
  margin-left: 0.25rem;
}

.media-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
}

.media-tile {
  aspect-ratio: 4 / 3;
  background: #e8ecea;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.media-tile img,
.media-tile video {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.media-caption {
  background: rgba(20, 23, 21, 0.78);
  bottom: 0;
  color: white;
  font-size: 0.65rem;
  left: 0;
  overflow: hidden;
  padding: 0.35rem 0.5rem;
  position: absolute;
  right: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-remove {
  align-items: center;
  background: rgba(20, 23, 21, 0.85);
  border: 0;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  height: 1.65rem;
  justify-content: center;
  position: absolute;
  right: 0.4rem;
  top: 0.4rem;
  width: 1.65rem;
}

.media-remove svg {
  height: 0.9rem;
  width: 0.9rem;
}

.media-empty {
  color: var(--muted);
  font-size: 0.78rem;
  padding: 1rem 0;
}

.publishing-section {
  align-items: center;
  border-bottom: 0;
  display: flex;
  justify-content: space-between;
}

.publishing-section h3 {
  margin-bottom: 0.15rem;
}

.publishing-state {
  color: var(--muted);
  font-size: 0.75rem;
}

.publishing-state.is-published {
  color: var(--green);
}

.switch-control {
  align-items: center;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 700;
  gap: 0.55rem;
}

.switch-control input {
  position: absolute;
  opacity: 0;
}

.switch-track {
  background: #b7bfbb;
  border-radius: 999px;
  display: inline-block;
  height: 1.35rem;
  position: relative;
  transition: background 150ms ease;
  width: 2.35rem;
}

.switch-track::after {
  background: white;
  border-radius: 50%;
  content: "";
  height: 0.95rem;
  left: 0.2rem;
  position: absolute;
  top: 0.2rem;
  transition: transform 150ms ease;
  width: 0.95rem;
}

.switch-control input:checked + .switch-track {
  background: var(--green);
}

.switch-control input:checked + .switch-track::after {
  transform: translateX(1rem);
}

.switch-control input:focus-visible + .switch-track {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.deals-workspace {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(20rem, 0.9fr);
}

.shipping-workspace {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  grid-template-columns: minmax(24rem, 0.8fr) minmax(28rem, 1.2fr);
  min-height: 36rem;
}

.shipping-form-panel,
.shipping-rates-panel {
  padding: 1.5rem;
}

.shipping-form-panel {
  border-right: 1px solid var(--line);
}

.shipping-form-panel > h2,
.shipping-rates-heading h2 {
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.shipping-form-panel .field {
  margin-bottom: 1rem;
}

.shipping-package-fields {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  margin: 0.25rem 0 1rem;
  padding: 1rem 0 0;
}

.shipping-package-fields legend,
.shipping-price-field legend {
  color: #464d4a;
  font-size: 0.72rem;
  font-weight: 700;
}

.shipping-package-grid {
  display: grid;
  gap: 0 0.75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.shipping-options-row {
  align-items: end;
  display: flex;
  gap: 1.25rem;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.shipping-price-field legend {
  margin-bottom: 0.35rem;
}

.segmented-control {
  background: #edf1ef;
  border: 1px solid #cfd6d2;
  border-radius: 4px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
}

.segmented-control label {
  cursor: pointer;
  min-width: 7rem;
  position: relative;
  text-align: center;
}

.segmented-control input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.segmented-control span {
  color: var(--muted);
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.5rem 0.75rem;
}

.segmented-control input:checked + span {
  background: white;
  color: var(--ink);
  box-shadow: 0 0 0 1px #bfc8c3;
}

.segmented-control input:focus-visible + span {
  outline: 2px solid var(--green);
  outline-offset: -2px;
}

.shipping-nonstandard {
  padding-bottom: 0.45rem;
  white-space: nowrap;
}

.shipping-message {
  color: var(--muted);
  font-size: 0.75rem;
  min-height: 1.35rem;
}

.shipping-message--error,
.shipping-rates-error {
  color: var(--danger);
}

.shipping-rates-heading {
  border-bottom: 1px solid var(--line);
  min-height: 4.1rem;
}

.shipping-rates-heading h2 {
  margin-bottom: 0.2rem;
}

.shipping-rates-heading p {
  color: var(--muted);
  font-size: 0.72rem;
  min-height: 1.1rem;
}

.shipping-rates-empty {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.85rem;
  justify-content: center;
  min-height: 24rem;
  text-align: center;
}

.shipping-rate-list {
  display: grid;
}

.shipping-rate-row {
  border-bottom: 1px solid var(--line);
  padding: 1.15rem 0;
}

.shipping-rate-head {
  align-items: start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.shipping-rate-identity {
  min-width: 0;
}

.shipping-rate-name {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.shipping-rate-name h3 {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 700;
}

.shipping-lowest-badge {
  background: #dfeee7;
  border-radius: 999px;
  color: var(--green-dark);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  text-transform: uppercase;
}

.shipping-rate-identity > p {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
  margin-top: 0.3rem;
}

.shipping-rate-price {
  color: var(--ink);
  font-size: 1.3rem;
  white-space: nowrap;
}

.shipping-rate-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.7rem;
}

.shipping-rate-tag {
  background: #edf1ef;
  border-radius: 3px;
  color: #4e5753;
  font-size: 0.64rem;
  padding: 0.2rem 0.4rem;
}

.shipping-rate-fees {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.68rem;
  gap: 0.75rem;
  margin-top: 0.65rem;
}

.shipping-rate-warning {
  color: var(--warning);
  font-size: 0.7rem;
  line-height: 1.4;
  margin-top: 0.55rem;
}

.orders-workspace {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 34rem;
}

.orders-toolbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 1rem 1.25rem;
}

.orders-toolbar h2 {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
}

.orders-message {
  color: var(--muted);
  font-size: 0.74rem;
  min-height: 1.15rem;
  padding: 0.65rem 1.25rem 0;
}

.orders-list {
  padding: 0 1.25rem 1.25rem;
}

.orders-list--empty {
  align-items: center;
  color: var(--muted);
  display: flex;
  justify-content: center;
  min-height: 25rem;
}

.orders-list--error {
  color: var(--danger);
}

.order-row {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(13rem, 0.8fr) minmax(18rem, 1.4fr) minmax(9rem, 0.5fr);
  padding: 1.25rem 0;
}

.order-heading {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.order-heading h3 {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
}

.order-status {
  background: #e3efe9;
  border-radius: 3px;
  color: var(--green-dark);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.2rem 0.4rem;
  text-transform: uppercase;
}

.order-status--payment-review {
  background: #f4ead8;
  color: var(--warning);
}

.order-date,
.order-customer span,
.order-total span {
  color: var(--muted);
  font-size: 0.72rem;
}

.order-date {
  margin-top: 0.35rem;
}

.order-customer,
.order-total {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.order-customer strong,
.order-total strong {
  color: var(--ink);
  font-size: 0.86rem;
}

.order-address {
  color: #4e5753;
  font-size: 0.75rem;
  line-height: 1.45;
  margin-top: 0.35rem;
}

.order-total {
  text-align: right;
}

.order-total strong {
  font-size: 1.05rem;
}

.deal-form-panel,
.analysis-panel {
  padding: 1.5rem;
}

.deal-form-panel {
  border-right: 1px solid var(--line);
}

.deal-form-panel > h2,
.analysis-panel > h2 {
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.deal-form-panel .field {
  margin-bottom: 1rem;
}

.deal-media-section {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  margin: 1.25rem 0;
  padding: 1rem 0;
}

.deal-media-toolbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.deal-media-toolbar h3 {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.deal-media-grid {
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
}

.deal-media-message {
  color: var(--muted);
  font-size: 0.72rem;
  min-height: 1.1rem;
  padding-top: 0.5rem;
}

.deal-media-message--error {
  color: var(--danger);
}

.analysis-empty {
  color: var(--muted);
  font-size: 0.85rem;
}

.analysis-result {
  display: grid;
  gap: 1.25rem;
}

.analysis-score-row {
  align-items: center;
  display: flex;
  gap: 0.85rem;
}

.analysis-score-row h3 {
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: capitalize;
}

.score-pill {
  align-items: center;
  background: var(--green);
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 700;
  height: 2.15rem;
  justify-content: center;
  min-width: 4rem;
  padding: 0 0.7rem;
}

.analysis-offers {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analysis-offers div {
  border-left: 3px solid var(--brass);
  display: flex;
  flex-direction: column;
  padding-left: 0.75rem;
}

.analysis-offers span {
  color: var(--muted);
  font-size: 0.7rem;
}

.analysis-offers strong {
  color: var(--ink);
  font-size: 1.25rem;
}

.analysis-result h4 {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
}

.analysis-condition {
  background: #f4f6f5;
  border-left: 3px solid var(--green);
  padding: 0.75rem 0.9rem;
}

.analysis-condition p {
  color: #4f5653;
  font-size: 0.84rem;
  line-height: 1.5;
}

.analysis-result ul {
  color: #4f5653;
  font-size: 0.84rem;
  line-height: 1.55;
  padding-left: 1rem;
}

.visually-hidden {
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  clip: rect(0 0 0 0);
}

@media (max-width: 1100px) {
  .field-grid--five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .checkout-dialog__content {
    grid-template-columns: 1fr;
  }

  .checkout-summary {
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }

  .checkout-summary dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .checkout-summary dl div {
    padding: 0.75rem;
  }

  .checkout-summary dl div + div {
    border-left: 1px solid var(--line);
    border-top: 0;
  }

  .checkout-summary > a {
    margin-top: 0;
  }

  .hero-band {
    background-position: 62% center;
    min-height: 24rem;
  }

  .hero-copy {
    padding: 4rem 0;
  }

  .hero-copy h1 {
    font-size: 2.65rem;
    max-width: 31rem;
  }

  .inventory-workspace {
    display: block;
  }

  .inventory-sidebar {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    max-height: 24rem;
  }

  .inventory-list {
    max-height: 17rem;
  }

  .deals-workspace {
    grid-template-columns: 1fr;
  }

  .shipping-workspace {
    grid-template-columns: 1fr;
  }

  .deal-form-panel {
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }

  .shipping-form-panel {
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }

  .analysis-panel {
    min-height: 20rem;
  }

  .shipping-rates-empty {
    min-height: 16rem;
  }
}

@media (max-width: 640px) {
  .checkout-modal {
    align-items: stretch;
    padding: 0;
  }

  .checkout-dialog {
    border-radius: 0;
    max-height: 100vh;
  }

  .checkout-dialog__header,
  .checkout-summary {
    padding: 1rem;
  }

  .checkout-summary dl {
    display: block;
  }

  .checkout-summary dl div {
    padding: 0.7rem 0;
  }

  .checkout-summary dl div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .checkout-payment {
    min-height: 32rem;
    padding: 0;
  }

  .navbar {
    padding: 0 0.6rem;
  }

  .navbar-item {
    padding-left: 0.55rem;
    padding-right: 0.55rem;
  }

  .brand-lockup > span:last-child,
  .auth-user {
    display: none;
  }

  .admin-heading {
    padding: 1rem;
  }

  .admin-main {
    padding: 0 0.65rem 1.5rem;
  }

  .admin-tabs ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-tabs li {
    min-width: 0;
  }

  .admin-tab {
    font-size: 0.75rem;
    gap: 0.3rem;
    justify-content: center;
    padding: 0.85rem 0.15rem 0.75rem;
    width: 100%;
  }

  .admin-heading .container {
    align-items: start;
  }

  .admin-heading h1 {
    font-size: 1.3rem;
  }

  .hero-band {
    background-position: 68% center;
    min-height: 22rem;
  }

  .hero-copy {
    padding: 3.5rem 1rem;
  }

  .hero-copy h1 {
    font-size: 2.15rem;
    max-width: 20rem;
  }

  .hero-copy > p:last-child {
    font-size: 0.95rem;
    max-width: 20rem;
  }

  .storefront-section {
    padding: 3rem 1rem 4rem;
  }

  .storefront-heading {
    align-items: start;
    flex-direction: column;
    gap: 0.5rem;
  }

  .storefront-heading h2 {
    font-size: 1.85rem;
  }

  .inventory-grid {
    grid-template-columns: 1fr;
  }

  .editor-toolbar {
    align-items: start;
    gap: 0.75rem;
  }

  .editor-toolbar .button {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .field-grid--two,
  .field-grid--three,
  .field-grid--five {
    grid-template-columns: 1fr;
  }

  .shipping-package-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shipping-options-row {
    align-items: start;
    flex-direction: column;
  }

  .field-span-two,
  .field-span-full {
    grid-column: auto;
  }

  .section-heading-row {
    align-items: start;
    gap: 0.75rem;
  }

  .section-heading-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .margin-summary {
    align-items: end;
    flex-direction: column;
    gap: 0.2rem;
  }

  .form-section {
    padding: 1rem;
  }

  .publishing-section {
    align-items: start;
    gap: 1rem;
  }

  .analysis-offers {
    grid-template-columns: 1fr;
  }

  .order-row {
    gap: 0.9rem;
    grid-template-columns: 1fr;
  }

  .order-total {
    text-align: left;
  }
}
