/* ==========================================================================
   SocialSellerManager — "Counter" design system
   Paper-white surfaces, deep ink type, one warm action accent, and a punched
   price-tag notch as the signature device. Prices, SKUs and order numbers are
   set in mono: the receipt is the material of this product's world.
   ========================================================================== */

:root {
  /* Palette */
  --ssm-ink: #12161f;
  --ssm-ink-soft: #3d4552;
  --ssm-muted: #6b7280;
  --ssm-paper: #fbfaf8;
  --ssm-surface: #ffffff;
  --ssm-line: #e6e3dc;
  --ssm-line-strong: #d3cec3;
  --ssm-tag: #f5a524;
  --ssm-tag-ink: #2a1c00;
  --ssm-tag-soft: #fdf1da;
  --ssm-teal: #0e7c6b;
  --ssm-teal-soft: #e3f3ef;
  --ssm-danger: #c2412d;

  /* Type */
  --ssm-font-display: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ssm-font-body: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ssm-font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Shape */
  --ssm-radius: 16px;
  --ssm-radius-sm: 10px;
  --ssm-shadow: 0 1px 2px rgba(18, 22, 31, 0.05), 0 10px 28px -16px rgba(18, 22, 31, 0.22);
  --ssm-shadow-lift: 0 2px 4px rgba(18, 22, 31, 0.06), 0 18px 38px -18px rgba(18, 22, 31, 0.3);
}

[data-bs-theme="dark"] {
  --ssm-ink: #f2f0ea;
  --ssm-ink-soft: #c8ccd6;
  --ssm-muted: #8b93a3;
  --ssm-paper: #0d1017;
  --ssm-surface: #161b24;
  --ssm-line: #262d3a;
  --ssm-line-strong: #36404f;
  --ssm-tag-soft: #3a2c0d;
  --ssm-teal-soft: #0f2b26;
  --ssm-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 30px -18px rgba(0, 0, 0, 0.8);
  --ssm-shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.45), 0 22px 44px -20px rgba(0, 0, 0, 0.9);
}

/* Base ------------------------------------------------------------------ */

html {
  font-size: 15px;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ssm-paper);
  color: var(--ssm-ink);
  font-family: var(--ssm-font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Faint counter grid: a paper ledger behind everything. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(680px 320px at 12% -6%, rgba(245, 165, 36, 0.1), transparent 62%),
    linear-gradient(to right, var(--ssm-line) 1px, transparent 1px);
  background-size: 100% 100%, 96px 100%;
  opacity: 0.55;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 46%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 46%);
}

h1, h2, h3, h4 {
  font-family: var(--ssm-font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--ssm-ink);
}

/* Arabic headings take the Arabic face; Archivo has no Arabic glyphs. Negative
   tracking breaks joined script, and the Latin line-heights are far too tight
   for Arabic ascenders and descenders, so both are reset here. */
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4 {
  font-family: var(--ssm-font-body);
  letter-spacing: 0;
  line-height: 1.4;
}

[dir="rtl"] .display-title {
  font-family: var(--ssm-font-body);
  letter-spacing: 0;
  line-height: 1.32;
}

[dir="rtl"] .hero-title {
  font-family: var(--ssm-font-body);
  letter-spacing: 0;
  line-height: 1.28;
  font-size: clamp(2rem, 5.4vw, 3.6rem);
}

[dir="rtl"] .ssm-brand {
  font-family: var(--ssm-font-body);
  letter-spacing: 0;
}

p {
  color: var(--ssm-ink-soft);
}

/* Arabic mode is RTL, but some strings are still English. `plaintext` lets each
   of those paragraphs pick its own direction, so punctuation lands correctly
   without flipping the page layout. */
[dir="rtl"] p,
[dir="rtl"] label,
[dir="rtl"] td,
[dir="rtl"] th,
[dir="rtl"] li,
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] .btn,
[dir="rtl"] .badge,
[dir="rtl"] .form-check-label,
[dir="rtl"] .ssm-eyebrow,
[dir="rtl"] .ssm-tile-hint,
[dir="rtl"] .ssm-tile-label,
[dir="rtl"] .ssm-section-title,
[dir="rtl"] dd,
[dir="rtl"] .alert,
[dir="rtl"] .ssm-empty,
[dir="rtl"] .ssm-order-number,
[dir="rtl"] .app-footer-note {
  unicode-bidi: plaintext;
}

a {
  color: var(--ssm-ink);
  text-decoration-color: var(--ssm-line-strong);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--ssm-ink);
  text-decoration-color: var(--ssm-tag);
}

.text-muted {
  color: var(--ssm-muted) !important;
}

::selection {
  background: var(--ssm-tag);
  color: var(--ssm-tag-ink);
}

:focus-visible {
  outline: 2px solid var(--ssm-tag);
  outline-offset: 2px;
  border-radius: 4px;
}

.display-title {
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.hero-title {
  font-family: var(--ssm-font-display);
  font-size: clamp(2.5rem, 7.2vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.94;
}

/* Utility --------------------------------------------------------------- */

.ssm-mono {
  font-family: var(--ssm-font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* Small mono label with a live dot: the counter's ticket header. */
.ssm-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--ssm-font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ssm-muted);
  padding: 0;
  border: 0;
  background: none;
}

.ssm-eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ssm-tag);
  box-shadow: 0 0 0 3px var(--ssm-tag-soft);
}

.ssm-rule {
  height: 1px;
  border: 0;
  background: var(--ssm-line);
  opacity: 1;
  margin: 1.5rem 0;
}

/* Signature: dashed perforation, as on a torn receipt. */
.ssm-perf {
  height: 0;
  border: 0;
  border-top: 1.5px dashed var(--ssm-line-strong);
  opacity: 1;
  margin: 1rem 0;
}

/* Buttons --------------------------------------------------------------- */

.btn {
  font-family: var(--ssm-font-body);
  font-weight: 600;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  transition: transform 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-lg {
  padding: 0.8rem 1.6rem;
  font-size: 1.02rem;
}

.btn-sm {
  padding: 0.35rem 0.8rem;
  font-size: 0.83rem;
}

/* This project ships Bootstrap 5.1, which colours buttons with literal values
   rather than --bs-btn-* variables, so every state is set explicitly here. */
.btn-primary {
  background-color: var(--ssm-tag);
  border-color: var(--ssm-tag);
  color: var(--ssm-tag-ink);
  box-shadow: 0 10px 22px -14px rgba(245, 165, 36, 0.9);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #e79a17;
  border-color: #e79a17;
  color: var(--ssm-tag-ink);
  box-shadow: 0 12px 26px -12px rgba(245, 165, 36, 0.85);
}

.btn-primary:focus {
  box-shadow: 0 0 0 3px rgba(245, 165, 36, 0.32);
}

.btn-primary:active,
.btn-primary.active,
.btn-primary:first-child:active,
.btn-primary:not(.btn-check) + .btn-primary:active {
  background-color: #d98e0e;
  border-color: #d98e0e;
  color: var(--ssm-tag-ink);
}

.btn-primary:disabled,
.btn-primary.disabled {
  background-color: var(--ssm-tag);
  border-color: var(--ssm-tag);
  color: var(--ssm-tag-ink);
  opacity: 0.5;
  box-shadow: none;
}

.btn-outline-secondary {
  color: var(--ssm-ink);
  border-color: var(--ssm-line-strong);
  background-color: transparent;
  font-weight: 500;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  background-color: var(--ssm-ink);
  border-color: var(--ssm-ink);
  color: var(--ssm-paper);
}

.btn-outline-secondary:active,
.btn-outline-secondary.active {
  background-color: var(--ssm-ink);
  border-color: var(--ssm-ink);
  color: var(--ssm-paper);
}

.btn-outline-primary {
  color: var(--ssm-ink);
  border-color: var(--ssm-line-strong);
  background-color: transparent;
  font-weight: 500;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary.active {
  background-color: var(--ssm-ink);
  border-color: var(--ssm-ink);
  color: var(--ssm-paper);
}

.btn-link {
  color: var(--ssm-ink);
  font-weight: 500;
}

.btn-link:hover,
.btn-link:focus {
  color: var(--ssm-ink);
  text-decoration-color: var(--ssm-tag);
}

.btn-outline-danger {
  border-color: var(--ssm-line-strong);
  color: var(--ssm-danger);
  background-color: transparent;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus,
.btn-outline-danger:active {
  background-color: var(--ssm-danger);
  border-color: var(--ssm-danger);
  color: #fff;
}

.btn-outline-warning {
  border-color: var(--ssm-line-strong);
  color: var(--ssm-ink);
  background-color: transparent;
}

.btn-outline-warning:hover,
.btn-outline-warning:focus,
.btn-outline-warning:active {
  background-color: var(--ssm-tag);
  border-color: var(--ssm-tag);
  color: var(--ssm-tag-ink);
}

.btn-outline-success {
  border-color: var(--ssm-line-strong);
  color: var(--ssm-teal);
  background-color: transparent;
}

.btn-outline-success:hover,
.btn-outline-success:focus,
.btn-outline-success:active {
  background-color: var(--ssm-teal);
  border-color: var(--ssm-teal);
  color: #fff;
}

/* Outline buttons inside the dark topbar keep the paper text colour. */
.app-topbar .btn-outline-secondary:hover {
  color: var(--ssm-paper);
}

/* Forms ----------------------------------------------------------------- */

/* Field labels read as sentences in the body face, not as technical codes:
   the mono is reserved for values (prices, SKUs, order numbers). */
.form-label {
  font-family: var(--ssm-font-body);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ssm-ink-soft);
  margin-bottom: 0.35rem;
}

.form-control,
.form-select {
  background-color: var(--ssm-surface);
  border: 1px solid var(--ssm-line-strong);
  border-radius: var(--ssm-radius-sm);
  padding: 0.65rem 0.9rem;
  color: var(--ssm-ink);
  font-family: var(--ssm-font-body);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.form-control::placeholder {
  color: var(--ssm-muted);
  opacity: 0.75;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: var(--ssm-tag);
  box-shadow: 0 0 0 3px rgba(245, 165, 36, 0.22);
  background-color: var(--ssm-surface);
  color: var(--ssm-ink);
}

.form-control-sm,
.form-select-sm {
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
}

.form-check-input {
  border-color: var(--ssm-line-strong);
  border-radius: 4px;
}

.form-check-input:checked {
  background-color: var(--ssm-ink);
  border-color: var(--ssm-ink);
}

.form-check-label {
  color: var(--ssm-ink-soft);
  font-size: 0.92rem;
}

textarea.form-control {
  min-height: 7rem;
  resize: vertical;
}

.form-control::file-selector-button {
  background: var(--ssm-paper);
  color: var(--ssm-ink);
  border: 0;
  border-inline-end: 1px solid var(--ssm-line);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  margin-inline-end: 0.85rem;
  font-family: var(--ssm-font-body);
  font-weight: 500;
  cursor: pointer;
}

/* Surfaces -------------------------------------------------------------- */

.card,
.ssm-panel {
  background: var(--ssm-surface);
  border: 1px solid var(--ssm-line);
  border-radius: var(--ssm-radius);
  box-shadow: var(--ssm-shadow);
}

.card-body {
  padding: 1.15rem 1.25rem;
}

a.ssm-panel {
  color: var(--ssm-ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  a.ssm-panel:hover {
    transform: translateY(-2px);
    box-shadow: var(--ssm-shadow-lift);
    border-color: var(--ssm-line-strong);
  }
}

/* Alerts ---------------------------------------------------------------- */

.alert {
  border: 1px solid var(--ssm-line);
  border-inline-start: 3px solid var(--ssm-tag);
  border-radius: var(--ssm-radius-sm);
  background: var(--ssm-surface);
  color: var(--ssm-ink);
  box-shadow: none;
  font-size: 0.95rem;
}

.alert-info {
  background: var(--ssm-surface);
  border-color: var(--ssm-line);
  border-inline-start-color: var(--ssm-teal);
  color: var(--ssm-ink);
}

/* Badges & pills -------------------------------------------------------- */

.badge {
  font-family: var(--ssm-font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.3rem 0.62rem;
}

.badge.bg-success {
  background: var(--ssm-teal-soft) !important;
  color: var(--ssm-teal) !important;
}

.badge.bg-warning {
  background: var(--ssm-tag-soft) !important;
  color: #8a5a00 !important;
}

[data-bs-theme="dark"] .badge.bg-warning {
  color: var(--ssm-tag) !important;
}

.badge.bg-secondary {
  background: var(--ssm-paper) !important;
  color: var(--ssm-muted) !important;
  border: 1px solid var(--ssm-line);
}

.badge.bg-light {
  background: var(--ssm-paper) !important;
  color: var(--ssm-ink) !important;
  border: 1px solid var(--ssm-line);
}

/* App shell ------------------------------------------------------------- */

/* grow with content (`flex: 1 0 auto`): with a zero basis the shell would stay
   one viewport tall and the footer would sit on top of long pages. */
.app-shell {
  display: flex;
  flex: 1 0 auto;
  min-height: 100vh;
  width: 100%;
}

.app-sidebar {
  width: 252px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.5rem 1.1rem;
  background: var(--ssm-surface);
  border-inline-end: 1px solid var(--ssm-line);
}

.ssm-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--ssm-font-display);
  font-weight: 800;
  font-size: 1.06rem;
  letter-spacing: -0.03em;
  color: var(--ssm-ink);
  text-decoration: none;
  white-space: nowrap;
}

.ssm-brand:hover {
  color: var(--ssm-ink);
}

/* Brand mark: a punched price tag. */
.ssm-brand::before {
  content: "";
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background:
    radial-gradient(circle at 30% 50%, var(--ssm-surface) 0 2px, transparent 2.5px),
    var(--ssm-tag);
  box-shadow: inset 0 0 0 1px rgba(42, 28, 0, 0.12);
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--ssm-font-display);
  font-weight: 800;
  font-size: 1.06rem;
  letter-spacing: -0.03em;
  color: var(--ssm-ink);
  text-decoration: none;
}

.app-brand::before {
  content: "";
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background:
    radial-gradient(circle at 30% 50%, var(--ssm-surface) 0 2px, transparent 2.5px),
    var(--ssm-tag);
}

.app-sidebar .nav {
  margin-top: 1.5rem;
}

.app-sidebar .nav-link {
  color: var(--ssm-ink-soft);
  border-radius: var(--ssm-radius-sm);
  padding: 0.55rem 0.7rem;
  font-size: 0.94rem;
  font-weight: 500;
  border-inline-start: 2px solid transparent;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.app-sidebar .nav-link:hover {
  color: var(--ssm-ink);
  background: var(--ssm-paper);
}

.app-sidebar .nav-link.active {
  color: var(--ssm-ink);
  background: var(--ssm-tag-soft);
  border-inline-start-color: var(--ssm-tag);
  font-weight: 600;
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.1rem;
  background: color-mix(in srgb, var(--ssm-paper) 82%, transparent);
  backdrop-filter: saturate(1.5) blur(14px);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid var(--ssm-line);
}

.app-topbar .btn-outline-secondary {
  border-radius: 999px;
  font-size: 0.78rem;
  padding: 0.32rem 0.75rem;
  font-family: var(--ssm-font-mono);
  letter-spacing: 0.02em;
}

.app-content {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  padding: 1.75rem 1.25rem 2.5rem;
  animation: ssm-rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.app-tabbar {
  display: none;
}

@media (max-width: 991.98px) {
  .app-sidebar {
    display: none;
  }

  .app-content {
    padding: 1.25rem 0.9rem 6.5rem;
  }

  .app-tabbar {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    z-index: 1030;
    display: grid;
    /* minmax(0, …) lets the four tabs shrink on a small phone instead of
       overflowing the bar; labels wrap inside their cell. */
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.2rem;
    padding: 0.35rem;
    background: color-mix(in srgb, var(--ssm-surface) 92%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--ssm-line);
    border-radius: 20px;
    box-shadow: var(--ssm-shadow-lift);
  }

  /* The language switch is a POST form, so its button carries the same tab
     styling as the links; `display: contents` lets it fill its grid cell. */
  .app-tabbar form {
    display: contents;
  }

  .app-tabbar a,
  .app-tabbar button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.5rem 0.15rem;
    border: 0;
    border-radius: 14px;
    background: none;
    color: var(--ssm-muted);
    font-family: var(--ssm-font-body);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-wrap: balance;
    text-decoration: none;
    transition: color 0.16s ease, background 0.16s ease;
  }

  .app-tabbar a span,
  .app-tabbar button span {
    font-size: 1rem;
    line-height: 1;
  }

  .app-tabbar a.active {
    color: var(--ssm-ink);
    background: var(--ssm-tag-soft);
  }

  .app-tabbar button:hover,
  .app-tabbar button:focus-visible {
    color: var(--ssm-ink);
    background: var(--ssm-paper);
  }
}

@media (max-width: 575.98px) {
  .app-topbar {
    gap: 0.3rem;
    padding: 0.6rem 0.75rem;
  }

  .app-topbar .app-brand {
    font-size: 0.95rem;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .app-topbar .btn {
    padding: 0.28rem 0.6rem;
    font-size: 0.72rem;
  }
}

/* Order history timeline ------------------------------------------------- */

.ssm-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ssm-timeline li {
  position: relative;
  padding: 0 0 1rem 1.1rem;
  border-left: 1px solid var(--ssm-line);
}

[dir="rtl"] .ssm-timeline li {
  padding: 0 1.1rem 1rem 0;
  border-left: 0;
  border-right: 1px solid var(--ssm-line);
}

.ssm-timeline li::before {
  content: "";
  position: absolute;
  top: 0.3rem;
  left: -4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ssm-tag);
}

[dir="rtl"] .ssm-timeline li::before {
  left: auto;
  right: -4px;
}

.ssm-timeline li:last-child {
  border-color: transparent;
  padding-bottom: 0;
}

/* Dashboard bento ------------------------------------------------------- */

.ssm-bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.ssm-tile {
  position: relative;
  overflow: hidden;
  min-height: 8.5rem;
  padding: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  color: var(--ssm-ink);
}

.ssm-tile .ssm-tile-label {
  font-family: var(--ssm-font-body);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.ssm-tile .ssm-tile-hint {
  font-size: 0.88rem;
  color: var(--ssm-muted);
  line-height: 1.45;
}

/* The one loud surface: the primary action, cut like a tag. */
.ssm-tile.is-accent {
  background: var(--ssm-tag);
  border-color: transparent;
  color: var(--ssm-tag-ink);
}

.ssm-tile.is-accent .ssm-tile-label,
.ssm-tile.is-accent .ssm-tile-hint {
  color: var(--ssm-tag-ink);
}

.ssm-tile.is-accent .ssm-tile-hint {
  opacity: 0.78;
}

/* Punched hole + perforation: the signature, used once. */
.ssm-tile.is-accent::before {
  content: "";
  position: absolute;
  inset-block-start: 1.1rem;
  inset-inline-end: 1.1rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ssm-paper);
  box-shadow: inset 0 1px 2px rgba(42, 28, 0, 0.25);
}

.ssm-tile.is-accent::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: 4.6rem;
  border-top: 1.5px dashed rgba(42, 28, 0, 0.28);
}

.ssm-avatar {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--ssm-paper);
  border: 1px solid var(--ssm-line);
  color: var(--ssm-ink);
  font-family: var(--ssm-font-mono);
  font-weight: 600;
  font-size: 1rem;
}

.ssm-tile.is-accent .ssm-avatar {
  background: rgba(42, 28, 0, 0.1);
  border-color: rgba(42, 28, 0, 0.18);
  color: var(--ssm-tag-ink);
}

@media (min-width: 768px) {
  .ssm-bento {
    grid-template-columns: repeat(2, 1fr);
  }

  .ssm-tile.is-accent {
    grid-column: span 2;
    min-height: 12rem;
    justify-content: flex-end;
  }

  .ssm-tile.is-accent::after {
    inset-block-end: 5.6rem;
  }
}

@media (min-width: 992px) {
  .ssm-bento {
    grid-template-columns: 1.35fr 1fr;
    grid-template-rows: repeat(2, minmax(9rem, auto));
  }

  .ssm-tile.is-accent {
    grid-column: 1;
    grid-row: span 2;
    min-height: 0;
    padding: 1.6rem;
  }

  .ssm-tile.is-accent::after {
    inset-block-end: 6.5rem;
  }
}

/* Product list ---------------------------------------------------------- */

.ssm-filter {
  background: var(--ssm-surface);
  border: 1px solid var(--ssm-line);
  border-radius: var(--ssm-radius);
  box-shadow: none;
  padding: 1rem;
}

.ssm-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ssm-product {
  color: var(--ssm-ink);
  border: 1px solid var(--ssm-line);
  border-radius: var(--ssm-radius);
  background: var(--ssm-surface);
  box-shadow: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.ssm-product:hover,
.ssm-product:focus-visible {
  color: var(--ssm-ink);
  transform: translateY(-1px);
  border-color: var(--ssm-line-strong);
  box-shadow: var(--ssm-shadow);
}

.ssm-product .ssm-row-price {
  font-family: var(--ssm-font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 1.02rem;
}

.min-w-0 {
  min-width: 0;
}

/* Price tag: mono numerals on a paper tag. */
.ssm-price {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 8px;
  background: var(--ssm-tag);
  color: var(--ssm-tag-ink);
  font-family: var(--ssm-font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

/* Tables ---------------------------------------------------------------- */

/* Bootstrap 5.1 hardcodes table text to a dark grey, so the colour is set
   directly here rather than through --bs-table-color. */
.table {
  color: var(--ssm-ink);
  --bs-table-bg: transparent;
  --bs-table-hover-bg: var(--ssm-paper);
  --bs-table-border-color: var(--ssm-line);
  margin-bottom: 0;
  font-size: 0.94rem;
}

.table td,
.table th {
  color: var(--ssm-ink);
}

.table td .text-muted {
  color: var(--ssm-muted) !important;
}

.table > :not(caption) > * > * {
  padding: 0.75rem 0.65rem;
  border-bottom-color: var(--ssm-line);
  background: transparent;
}

.table > thead th {
  font-family: var(--ssm-font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ssm-muted);
  border-bottom: 1px solid var(--ssm-line-strong);
  white-space: nowrap;
}

.table-hover > tbody > tr:hover > * {
  background: var(--ssm-paper);
}

.table td .form-control-sm,
.table td .form-select-sm {
  background: var(--ssm-paper);
}

.table code {
  font-family: var(--ssm-font-mono);
  font-size: 0.78rem;
  color: var(--ssm-ink-soft);
  background: var(--ssm-paper);
  border: 1px solid var(--ssm-line);
  border-radius: 6px;
  padding: 0.15rem 0.45rem;
  word-break: break-all;
}

.table-responsive {
  border-radius: var(--ssm-radius);
}

/* Auth ------------------------------------------------------------------ */

.auth-shell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 3rem;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 2rem 1.75rem 1.6rem;
  position: relative;
  overflow: hidden;
}

/* A marigold ticket stub across the top of the card. */
.auth-card::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 4px;
  background: var(--ssm-tag);
}

.auth-card h1 {
  font-size: 1.6rem;
  letter-spacing: -0.03em;
}

.auth-card .ssm-perf {
  margin: 1.4rem -1.75rem;
}

/* Public pages ---------------------------------------------------------- */

.public-header {
  position: sticky;
  top: 0;
  z-index: 1020;
  background: color-mix(in srgb, var(--ssm-paper) 82%, transparent);
  backdrop-filter: saturate(1.5) blur(14px);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid var(--ssm-line);
}

.public-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.5rem 1.15rem 3rem;
  animation: ssm-rise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

/* Landing hero: asymmetric, type-led, with the order ticket as the artefact. */
.ssm-hero {
  position: relative;
  display: grid;
  gap: 2.5rem;
  align-items: center;
  padding: 1.5rem 0 0;
}

@media (min-width: 992px) {
  .ssm-hero {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
    padding: 2.5rem 0 0;
  }
}

.ssm-hero-body {
  max-width: 36rem;
}

.ssm-hero-body .lead {
  color: var(--ssm-ink-soft);
  font-size: 1.06rem;
  line-height: 1.65;
  max-width: 30rem;
}

.ssm-hero .ssm-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.75rem;
}

.ssm-hero .btn-ghost {
  background: transparent;
  border: 1px solid var(--ssm-line-strong);
  color: var(--ssm-ink);
}

.ssm-hero .btn-ghost:hover {
  background: var(--ssm-surface);
  border-color: var(--ssm-ink);
}

/* Order ticket artefact — the product itself, rendered as paper. */
.ssm-ticket-stack {
  position: relative;
  display: none;
  min-height: 24rem;
}

@media (min-width: 992px) {
  .ssm-ticket-stack {
    display: block;
  }
}

.ssm-ticket {
  position: relative;
  background: var(--ssm-surface);
  border: 1px solid var(--ssm-line);
  border-radius: var(--ssm-radius);
  box-shadow: var(--ssm-shadow-lift);
  padding: 1.1rem 1.15rem;
  font-size: 0.88rem;
}

/* The lower receipt sits behind: only its header shows, so nothing is clipped mid-word. */
.ssm-ticket-stack .ssm-ticket:nth-child(1) {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0.25rem;
  width: 14rem;
  transform: rotate(-4deg);
  opacity: 0.9;
}

.ssm-ticket-stack .ssm-ticket:nth-child(2) {
  position: absolute;
  inset-block-start: 4.75rem;
  inset-inline-start: 3.75rem;
  width: 17.5rem;
  transform: rotate(2deg);
  z-index: 2;
}

.ssm-ticket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: var(--ssm-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ssm-muted);
}

.ssm-ticket-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.32rem 0;
  color: var(--ssm-ink-soft);
}

.ssm-ticket-line strong {
  font-family: var(--ssm-font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--ssm-ink);
  font-weight: 600;
}

.ssm-ticket-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 600;
  color: var(--ssm-ink);
}

.ssm-ticket-total span:last-child {
  font-family: var(--ssm-font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.15rem;
}

.ssm-ticket-stub {
  position: absolute;
  inset-block-start: -0.55rem;
  inset-inline-end: 1.1rem;
  padding: 0.1rem 0.5rem;
  border-radius: 6px;
  background: var(--ssm-teal);
  color: #fff;
  font-family: var(--ssm-font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Public product order page */
.ssm-hero-img {
  width: 100%;
  border-radius: var(--ssm-radius);
  border: 1px solid var(--ssm-line);
  background: var(--ssm-surface);
  box-shadow: var(--ssm-shadow);
}

.ssm-order-ticket {
  position: relative;
  padding: 1.5rem 1.4rem 1.4rem;
}

/* Perforated head on the order ticket. */
.ssm-order-ticket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block-end: 1rem;
  border-block-end: 1.5px dashed var(--ssm-line-strong);
  margin-block-end: 1.25rem;
}

.ssm-order-ticket h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: -0.035em;
  margin: 0;
}

.ssm-order-ticket .ssm-price {
  font-size: 1.2rem;
  padding: 0.28rem 0.85rem;
}

.ssm-order-ticket .form-section-label {
  font-family: var(--ssm-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ssm-muted);
  margin-block: 1.5rem 0.85rem;
  padding-block-start: 1rem;
  border-block-start: 1px solid var(--ssm-line);
}

.ssm-order-action {
  margin-block-start: 1.25rem;
}

.ssm-order-action .btn {
  width: 100%;
  padding-block: 0.85rem;
}

@media (max-width: 767.98px) {
  .ssm-order-action {
    position: sticky;
    bottom: 0.75rem;
    z-index: 1025;
    padding: 0.5rem;
    margin-inline: -0.5rem;
    background: color-mix(in srgb, var(--ssm-paper) 88%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 999px;
  }
}

/* Submitted / empty states */
.ssm-done {
  max-width: 30rem;
  margin: 2rem auto;
  text-align: center;
  padding: 2.25rem 1.5rem;
}

.ssm-done-mark {
  width: 52px;
  height: 52px;
  margin: 0 auto 1.1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ssm-teal-soft);
  color: var(--ssm-teal);
  font-size: 1.35rem;
}

.ssm-done .ssm-order-number {
  display: inline-block;
  margin-block-start: 0.35rem;
  padding: 0.3rem 0.85rem;
  border-radius: 8px;
  background: var(--ssm-paper);
  border: 1px dashed var(--ssm-line-strong);
  font-family: var(--ssm-font-mono);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ssm-ink);
}

/* Simple content page (privacy, errors) */
.ssm-page {
  max-width: 44rem;
}

.ssm-page h1 {
  margin-bottom: 1rem;
}

/* Footer ---------------------------------------------------------------- */

.app-footer-note {
  color: var(--ssm-muted);
  font-size: 0.78rem;
  padding: 1.25rem 1rem 1.5rem;
  border-top: 1px solid var(--ssm-line);
  margin-top: auto;
}

.app-footer-note a {
  color: var(--ssm-muted);
}

/* Spec lists, section labels, empty states ------------------------------ */

.ssm-section-title {
  font-family: var(--ssm-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ssm-muted);
  margin-bottom: 0.9rem;
}

.ssm-spec {
  display: grid;
  grid-template-columns: minmax(6.5rem, auto) 1fr;
  gap: 0.6rem 1.5rem;
  margin: 0;
}

.ssm-spec dt {
  font-family: var(--ssm-font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ssm-muted);
  padding-top: 0.2rem;
}

.ssm-spec dd {
  margin: 0;
  color: var(--ssm-ink);
  font-variant-numeric: tabular-nums;
}

.ssm-empty {
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--ssm-muted);
  border: 1px dashed var(--ssm-line-strong);
  border-radius: var(--ssm-radius);
  background: var(--ssm-surface);
}

.ssm-empty p {
  color: var(--ssm-muted);
}

/* Motion ---------------------------------------------------------------- */

@keyframes ssm-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.stagger > * {
  animation: ssm-rise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.stagger > *:nth-child(2) { animation-delay: 0.07s; }
.stagger > *:nth-child(3) { animation-delay: 0.14s; }
.stagger > *:nth-child(4) { animation-delay: 0.21s; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Print: a clean packing slip. */
@media print {
  body::before,
  .app-sidebar,
  .app-topbar,
  .app-tabbar,
  .app-footer-note {
    display: none !important;
  }

  .card,
  .ssm-panel {
    box-shadow: none;
    border-color: #ccc;
  }
}

/* ==========================================================================
   Reports, revenue and platform surfaces
   ========================================================================== */

.ssm-range-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: var(--ssm-surface);
  border: 1px solid var(--ssm-line);
  border-radius: 999px;
}

.ssm-range-tab {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--ssm-muted);
  text-decoration: none;
  white-space: nowrap;
}

.ssm-range-tab:hover { color: var(--ssm-ink); }

.ssm-range-tab.active {
  background: var(--ssm-ink);
  color: var(--ssm-paper);
}

[data-bs-theme="dark"] .ssm-range-tab.active {
  background: var(--ssm-tag);
  color: var(--ssm-tag-ink);
}

.ssm-stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ssm-muted);
  margin: 0 0 4px;
}

.ssm-stat-value {
  font-family: var(--ssm-font-display);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  line-height: 1.15;
  font-weight: 700;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.ssm-stat-hint {
  font-size: 0.78rem;
  color: var(--ssm-muted);
  margin: 6px 0 0;
}

.ssm-panel.is-accent {
  background: var(--ssm-tag-soft);
  border-color: var(--ssm-tag);
}

.ssm-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 180px;
  padding-top: 8px;
  overflow-x: auto;
}

.ssm-chart-column {
  flex: 1 1 0;
  min-width: 18px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}

.ssm-chart-bar {
  width: 100%;
  max-width: 42px;
  min-height: 3px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--ssm-tag), #e08c00);
  transition: filter 0.15s ease;
}

.ssm-chart-bar:hover { filter: brightness(1.06); }

.ssm-chart-label {
  font-family: var(--ssm-font-mono);
  font-size: 0.62rem;
  color: var(--ssm-muted);
  white-space: nowrap;
}

.ssm-bars {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ssm-bar-track {
  height: 6px;
  background: var(--ssm-line);
  border-radius: 999px;
  overflow: hidden;
  margin: 4px 0 3px;
}

.ssm-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--ssm-teal);
}

[data-bs-theme="dark"] .ssm-bar-fill { background: #2fbfa7; }

@media print {
  .app-sidebar, .app-topbar, .app-tabbar, footer, .ssm-range-tabs, form.ssm-filter { display: none !important; }
  body { background: #fff; }
  .ssm-panel { box-shadow: none; border-color: #ddd; }
}

/* Toasts ---------------------------------------------------------------- */

.ssm-toast-container {
  z-index: 1090;
  width: min(24rem, calc(100vw - 1.5rem));
}

.ssm-toast {
  background: var(--ssm-surface);
  border: 1px solid var(--ssm-line);
  border-inline-start: 4px solid var(--ssm-tag);
  border-radius: var(--ssm-radius-sm);
  box-shadow: var(--ssm-shadow-lift);
  color: var(--ssm-ink);
}

.ssm-toast-success { border-inline-start-color: var(--ssm-teal); }
.ssm-toast-danger { border-inline-start-color: #c2412d; }
.ssm-toast-warning { border-inline-start-color: var(--ssm-tag); }
.ssm-toast-info { border-inline-start-color: var(--ssm-line-strong); }

.ssm-toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0.75rem 0 0 0.75rem;
  border-radius: 50%;
  background: var(--ssm-paper);
  font-family: var(--ssm-font-mono);
  font-size: 0.8rem;
  font-weight: 600;
}

[dir="rtl"] .ssm-toast-icon {
  margin: 0.75rem 0.75rem 0 0;
}

.ssm-toast .toast-body {
  padding: 0.75rem;
  font-size: 0.92rem;
}

/* Row actions in management tables -------------------------------------- */

.ssm-table-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.ssm-table-actions .btn {
  white-space: nowrap;
}

/* Public storefront ------------------------------------------------------ */
.storefront {
  padding-block: 0.5rem 1rem;
}

.storefront-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 0 1.75rem;
  border-block-end: 1.5px dashed var(--ssm-line-strong);
}

.storefront-identity {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  min-width: 0;
}

.storefront-logo,
.storefront-monogram {
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  border-radius: 22px;
  object-fit: cover;
  border: 1px solid var(--ssm-line);
  background: var(--ssm-surface);
  box-shadow: var(--ssm-shadow);
}

.storefront-monogram {
  display: grid;
  place-items: center;
  background: var(--ssm-tag);
  color: var(--ssm-tag-ink);
  font-family: var(--ssm-font-display);
  font-size: 2rem;
  font-weight: 800;
}

.storefront-contact {
  margin-block-start: 0.45rem;
  font-size: 0.88rem;
  color: var(--ssm-muted);
}

.storefront-hero-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.storefront-cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.45rem;
  height: 1.45rem;
  margin-inline-start: 0.35rem;
  padding-inline: 0.35rem;
  border-radius: 999px;
  background: var(--ssm-tag);
  color: var(--ssm-tag-ink);
  font-family: var(--ssm-font-mono);
  font-size: 0.68rem;
  font-weight: 600;
}

.storefront-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
}

.storefront-search {
  display: flex;
  gap: 0.5rem;
  flex: 1 1 22rem;
  max-width: 34rem;
}

.storefront-grid {
  display: grid;
  grid-template-columns: repeat(var(--storefront-columns, 3), minmax(0, 1fr));
  gap: 1.1rem;
}

.storefront-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--ssm-line);
  border-radius: var(--ssm-radius);
  background: var(--ssm-surface);
  color: var(--ssm-ink);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.storefront-card:hover,
.storefront-card:focus-visible {
  color: var(--ssm-ink);
  transform: translateY(-3px);
  border-color: var(--ssm-line-strong);
  box-shadow: var(--ssm-shadow-lift);
}

.storefront-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    linear-gradient(135deg, var(--ssm-tag-soft), var(--ssm-teal-soft));
}

.storefront-shape-square {
  aspect-ratio: 1 / 1;
}

.storefront-shape-portrait {
  aspect-ratio: 4 / 5;
}

.storefront-shape-landscape {
  aspect-ratio: 4 / 3;
}

.storefront-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.storefront-card:hover .storefront-card-media img {
  transform: scale(1.035);
}

.storefront-card-placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--ssm-tag-ink);
  font-family: var(--ssm-font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  opacity: 0.72;
}

.storefront-sale {
  position: absolute;
  inset-block-start: 0.65rem;
  inset-inline-start: 0.65rem;
  padding: 0.18rem 0.55rem;
  border-radius: 6px;
  background: var(--ssm-tag);
  color: var(--ssm-tag-ink);
  font-family: var(--ssm-font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.storefront-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  padding: 1rem;
}

.storefront-card-body h2 {
  font-family: var(--ssm-font-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0;
  line-height: 1.35;
}

.storefront-card-body p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  font-size: 0.85rem;
  color: var(--ssm-muted);
}

.storefront-card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
  margin-block-start: auto;
  padding-block-start: 0.65rem;
}

[dir="rtl"] .storefront-card-footer {
  flex-direction: row-reverse;
}

.storefront-price {
  font-family: var(--ssm-font-mono);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ssm-ink);
  white-space: nowrap;
}

.storefront-price small {
  font-size: 0.66rem;
  color: var(--ssm-muted);
}

.storefront-view {
  font-family: var(--ssm-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--ssm-teal);
  white-space: nowrap;
}

.storefront-empty {
  padding-block: 4rem;
}

.storefront-product-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem 1.25rem;
}

.storefront-gallery {
  position: sticky;
  top: 5rem;
}

.storefront-main-image {
  display: block;
  width: 100%;
  max-width: 22rem;
  margin-inline: auto;
  padding: 0.35rem;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: var(--ssm-radius);
  border: 1px solid var(--ssm-line);
  background: var(--ssm-surface);
  box-shadow: var(--ssm-shadow);
}

.storefront-main-image.is-compact {
  max-width: 20rem;
}

.storefront-main-image.is-regular {
  max-width: 28rem;
}

.storefront-main-image.is-large {
  max-width: 34rem;
}

.storefront-image-placeholder {
  display: grid;
  place-items: center;
  color: var(--ssm-tag-ink);
  background: linear-gradient(135deg, var(--ssm-tag-soft), var(--ssm-teal-soft));
  font-family: var(--ssm-font-display);
  font-size: 6rem;
  font-weight: 800;
  opacity: 0.8;
}

.storefront-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.55rem;
  max-width: 22rem;
  margin-inline: auto;
  margin-block-start: 0.7rem;
}

.storefront-thumb {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--ssm-line);
  border-radius: 10px;
  background: var(--ssm-surface);
  cursor: pointer;
}

.storefront-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.storefront-thumb.is-active {
  border-color: var(--ssm-teal);
  box-shadow: 0 0 0 2px var(--ssm-teal-soft);
}

.storefront-thumb:focus-visible {
  outline: 2px solid var(--ssm-teal);
  outline-offset: 2px;
}

.storefront-detail {
  padding: 1.5rem;
}

.storefront-detail h1 {
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  letter-spacing: -0.035em;
  margin-block: 0.15rem 1rem;
}

.storefront-detail-price {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-block-end: 1.1rem;
}

.storefront-description {
  color: var(--ssm-ink-soft);
  white-space: pre-line;
}

.storefront-add-form {
  margin-block-start: 1.6rem;
  padding-block-start: 1.25rem;
  border-block-start: 1px solid var(--ssm-line);
}

.storefront-buy-row {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}

.storefront-qty {
  flex: 0 0 8rem;
}

.storefront-add-button {
  flex: 1;
}

.storefront-assurances {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.4rem;
  margin-block-start: 1.5rem;
  padding-block-start: 1rem;
  border-block-start: 1.5px dashed var(--ssm-line-strong);
  font-size: 0.8rem;
  color: var(--ssm-muted);
}

.storefront-assurances > div {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.storefront-assurance-icon {
  color: var(--ssm-teal);
}

.storefront-cart-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.storefront-cart-line {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem;
  border: 1px solid var(--ssm-line);
  border-radius: var(--ssm-radius);
  background: var(--ssm-surface);
}

.storefront-cart-line.is-unavailable {
  border-color: var(--ssm-danger);
}

.storefront-cart-image {
  width: 72px;
  height: 72px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--ssm-tag-soft);
  font-family: var(--ssm-font-display);
  font-weight: 800;
  color: var(--ssm-tag-ink);
}

.storefront-cart-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.storefront-cart-copy a {
  font-weight: 600;
  text-decoration: none;
}

.storefront-line-issue {
  display: block;
  margin-block-start: 0.2rem;
  font-size: 0.75rem;
  color: var(--ssm-danger);
}

.storefront-cart-qty {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.storefront-cart-qty input {
  width: 4.5rem;
}

.storefront-cart-total {
  min-width: 5rem;
  text-align: end;
  font-weight: 600;
}

.storefront-cart-remove {
  margin: 0;
}

.storefront-summary {
  position: sticky;
  top: 5rem;
  padding: 1.35rem;
}

.storefront-summary-row,
.storefront-summary-total,
.storefront-summary-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.35rem;
  color: var(--ssm-ink-soft);
  font-size: 0.92rem;
}

.storefront-summary-line span {
  min-width: 0;
}
.storefront-summary-line strong,
.storefront-summary-row strong {
  white-space: nowrap;
  font-weight: 600;
  color: var(--ssm-ink);
}

.storefront-summary-total {
  font-weight: 700;
  color: var(--ssm-ink);
  font-size: 1.05rem;
}

.storefront-summary-total strong {
  color: var(--ssm-ink);
  font-size: 1.2rem;
}

.storefront-done {
  max-width: 34rem;
}

@media (max-width: 767.98px) {
  .storefront-hero {
    align-items: flex-start;
  }

  .storefront-logo,
  .storefront-monogram {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
    border-radius: 16px;
    font-size: 1.5rem;
  }

  .storefront-gallery,
  .storefront-summary {
    position: static;
  }

  .storefront-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
  }

  .storefront-thumbs {
    max-width: 100%;
  }

  .storefront-card-body {
    padding: 0.7rem;
  }

  .storefront-card-footer {
    display: block;
  }

  .storefront-view {
    display: none;
  }

  .storefront-cart-line {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 0.55rem;
  }

  .storefront-cart-image {
    width: 58px;
    height: 58px;
  }

  .storefront-cart-qty {
    grid-column: 2 / 3;
  }

  .storefront-cart-total {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
  }

  .storefront-cart-remove {
    grid-column: 3 / 4;
  }

  .storefront-buy-row {
    align-items: stretch;
    flex-direction: column;
  }

  .storefront-qty {
    flex-basis: auto;
  }
}

.storefront-buy-actions {
  display: flex;
  flex: 1;
  gap: 0.6rem;
  min-width: 0;
}

.storefront-buy-actions .btn {
  flex: 1;
  white-space: nowrap;
}

.storefront-buy-now {
  --bs-btn-bg: var(--ssm-ink);
  --bs-btn-border-color: var(--ssm-ink);
  --bs-btn-hover-bg: var(--ssm-ink-soft);
  --bs-btn-hover-border-color: var(--ssm-ink-soft);
}

.public-link-cell {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  max-width: 42rem;
}

.public-link-url {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ssm-ink-soft);
  background: transparent;
  padding: 0;
}

.public-link-copy {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  .storefront-buy-actions {
    flex-direction: column;
    width: 100%;
  }

  .public-link-cell {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-link-copy {
    width: 100%;
  }
}

/* Customer storefront navigation */
.storefront-shell {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.15rem 1.15rem 3rem;
  animation: ssm-rise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.storefront-nav {
  position: sticky;
  top: 0;
  z-index: 1020;
  border-block-end: 1px solid var(--ssm-line);
  background: color-mix(in srgb, var(--ssm-paper) 88%, transparent);
  backdrop-filter: saturate(1.5) blur(14px);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
}

.storefront-nav-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding: 0.65rem 1.15rem;
}

.storefront-nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  color: var(--ssm-ink);
  text-decoration: none;
}

.storefront-nav-brand:hover {
  color: var(--ssm-ink);
}

.storefront-nav-logo {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 11px;
  border: 1px solid var(--ssm-line);
  object-fit: cover;
  background: var(--ssm-surface);
}

.storefront-nav-monogram {
  display: grid;
  place-items: center;
  background: var(--ssm-tag);
  color: var(--ssm-tag-ink);
  font-family: var(--ssm-font-display);
  font-weight: 800;
}

.storefront-nav-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--ssm-font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.storefront-nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-inline-start: auto;
}

.storefront-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.7rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ssm-ink-soft);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.storefront-nav-link:hover,
.storefront-nav-link.active {
  background: var(--ssm-tag-soft);
  color: var(--ssm-ink);
}

.storefront-nav-language {
  margin: 0;
}

.storefront-nav-language .storefront-nav-link {
  color: var(--ssm-muted);
  font-weight: 500;
}

@media (max-width: 991.98px) {
  .storefront-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .storefront-nav-inner {
    gap: 0.5rem;
    padding-inline: 0.8rem;
  }

  .storefront-nav-name {
    max-width: 7.5rem;
    font-size: 0.92rem;
  }

  .storefront-nav-link {
    padding: 0.36rem 0.48rem;
    font-size: 0.8rem;
  }

  .storefront-nav-language .storefront-nav-link {
    padding-inline: 0.3rem;
  }

  .storefront-shell {
    padding-inline: 0.8rem;
  }
}

/* Landing sales page ---------------------------------------------------- */

html {
  scroll-behavior: smooth;
}

.ssm-landing-nav {
  gap: 1.1rem;
  font-size: 0.9rem;
}

.ssm-landing-nav a {
  color: var(--ssm-ink-soft);
  text-decoration: none;
}

.ssm-landing-nav a:hover {
  color: var(--ssm-ink);
}

.ssm-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.86rem;
  color: var(--ssm-muted);
}

.ssm-trust li::before {
  content: "\2713";
  margin-inline-end: 0.4rem;
  color: var(--ssm-teal);
  font-weight: 700;
}

.ssm-section {
  padding-block-start: 4.5rem;
  scroll-margin-top: 4.5rem;
}

.ssm-section-head {
  max-width: 40rem;
  margin-block-end: 2rem;
}

.ssm-landing-title {
  font-family: var(--ssm-font-display);
  font-size: clamp(1.6rem, 3.6vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-bottom: 0.75rem;
}

[dir="rtl"] .ssm-landing-title {
  font-family: var(--ssm-font-body);
  letter-spacing: 0;
  line-height: 1.2;
}

.ssm-section-lead {
  color: var(--ssm-ink-soft);
  font-size: 1.02rem;
  line-height: 1.7;
  margin: 0;
}

.ssm-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .ssm-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .ssm-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.ssm-card-feature {
  padding: 1.35rem 1.35rem 1.4rem;
}

.ssm-card-feature p,
.ssm-step p,
.ssm-usecase p,
.ssm-faq-item p {
  color: var(--ssm-ink-soft);
  font-size: 0.93rem;
  line-height: 1.6;
}

.ssm-card-feature h3 {
  font-weight: 700;
  margin: 0.85rem 0 0.4rem;
}

.ssm-goal-num {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ssm-tag);
}

.ssm-feature-icon {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--ssm-radius-sm);
  background: var(--ssm-tag-soft);
  color: var(--ssm-tag-ink);
}

[data-bs-theme="dark"] .ssm-feature-icon {
  color: var(--ssm-tag);
}

/* Steps: a numbered strip that reads as the order's journey. */
.ssm-steps {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

@media (min-width: 768px) {
  .ssm-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .ssm-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.ssm-step {
  position: relative;
  padding: 1.25rem 1.25rem 1.35rem;
  border-block-start: 2px dashed var(--ssm-line-strong);
}

.ssm-step h3 {
  font-weight: 700;
  margin: 0.75rem 0 0.4rem;
}

.ssm-step-num {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--ssm-ink);
  color: var(--ssm-paper);
  font-weight: 600;
}

.ssm-usecases {
  display: grid;
  gap: 0;
  border-block-start: 1px solid var(--ssm-line);
}

.ssm-usecase {
  display: grid;
  gap: 0.35rem;
  padding: 1.1rem 0;
  border-block-end: 1px solid var(--ssm-line);
}

.ssm-usecase h3 {
  font-weight: 700;
  margin: 0;
}

@media (min-width: 768px) {
  .ssm-usecase {
    grid-template-columns: 18rem 1fr;
    gap: 2rem;
    align-items: baseline;
  }
}

/* Pricing */
.ssm-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.4rem;
}

.ssm-plan.is-popular {
  border-color: var(--ssm-tag);
  box-shadow: 0 0 0 1px var(--ssm-tag), var(--ssm-shadow-lift);
}

.ssm-plan .ssm-ticket-stub {
  background: var(--ssm-tag);
  color: var(--ssm-tag-ink);
}

.ssm-plan h3 {
  font-weight: 700;
}

.ssm-plan-price {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

[dir="rtl"] .ssm-plan-price {
  justify-content: flex-end;
}

.ssm-plan-price .ssm-mono {
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--ssm-ink);
}

.ssm-plan-price small {
  color: var(--ssm-muted);
}

.ssm-plan-year {
  color: var(--ssm-muted);
  font-size: 0.85rem;
  margin: 0.15rem 0 1rem;
}

.ssm-plan-list {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 1.5rem;
  padding: 1rem 0 0;
  list-style: none;
  border-block-start: 1.5px dashed var(--ssm-line-strong);
  font-size: 0.92rem;
}

.ssm-plan-list li::before {
  display: inline-block;
  width: 1.2rem;
  font-weight: 700;
}

.ssm-plan-list .is-on::before {
  content: "\2713";
  color: var(--ssm-teal);
}

.ssm-plan-list .is-off {
  color: var(--ssm-muted);
  text-decoration: line-through;
}

.ssm-plan-list .is-off::before {
  content: "\2013";
}

.ssm-plan .btn-ghost {
  background: transparent;
  border: 1px solid var(--ssm-line-strong);
  color: var(--ssm-ink);
}

.ssm-plan .btn-ghost:hover {
  border-color: var(--ssm-ink);
}

/* FAQ */
.ssm-faq {
  max-width: 48rem;
  border-block-start: 1px solid var(--ssm-line);
}

.ssm-faq-item {
  border-block-end: 1px solid var(--ssm-line);
  padding: 0.25rem 0;
}

.ssm-faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  cursor: pointer;
  list-style: none;
}

.ssm-faq-item summary::-webkit-details-marker {
  display: none;
}

.ssm-faq-item summary h3 {
  font-weight: 600;
  margin: 0;
}

.ssm-faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  font-family: var(--ssm-font-mono);
  font-size: 1.2rem;
  color: var(--ssm-muted);
}

.ssm-faq-item[open] summary::after {
  content: "\2212";
}

.ssm-faq-item p {
  padding-block-end: 1rem;
  max-width: 42rem;
}

/* Closing call to action */
.ssm-cta {
  margin-block-start: 4.5rem;
  padding: 2.5rem 1.5rem;
  border-radius: var(--ssm-radius);
  background: var(--ssm-ink);
  color: var(--ssm-paper);
  text-align: center;
}

.ssm-cta .ssm-landing-title {
  color: var(--ssm-paper);
}

.ssm-cta p {
  color: color-mix(in srgb, var(--ssm-paper) 75%, transparent);
  max-width: 32rem;
  margin: 0 auto 1.5rem;
}

[data-bs-theme="dark"] .ssm-cta {
  background: var(--ssm-surface);
  border: 1px solid var(--ssm-line);
  color: var(--ssm-ink);
}

[data-bs-theme="dark"] .ssm-cta .ssm-landing-title {
  color: var(--ssm-ink);
}

[data-bs-theme="dark"] .ssm-cta p {
  color: var(--ssm-ink-soft);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Landing motion -------------------------------------------------------- */

:root {
  --ssm-lpc: #0e7c6b;
  --ssm-lpc-wash: rgba(14, 124, 107, 0.1);
  --ssm-lpc-grid: #ebe8e1;
}

[data-bs-theme="dark"] {
  --ssm-lpc: #4cc3ab;
  --ssm-lpc-wash: rgba(76, 195, 171, 0.12);
  --ssm-lpc-grid: #232a36;
}

/* The one load-time moment: order 1042 arrives and prints itself, line by line. */
@media (prefers-reduced-motion: no-preference) {
  .ssm-ticket-stack .ssm-ticket:nth-child(2) {
    animation: ssm-ticket-arrive 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.25s both;
  }

  .ssm-ticket-stack .ssm-ticket:nth-child(2) > :is(.ssm-ticket-line, .ssm-perf, .ssm-ticket-total) {
    animation: ssm-ticket-print 0.35s ease-out both;
  }

  .ssm-ticket-stack .ssm-ticket:nth-child(2) > :nth-child(3) { animation-delay: 0.7s; }
  .ssm-ticket-stack .ssm-ticket:nth-child(2) > :nth-child(4) { animation-delay: 0.82s; }
  .ssm-ticket-stack .ssm-ticket:nth-child(2) > :nth-child(5) { animation-delay: 0.94s; }
  .ssm-ticket-stack .ssm-ticket:nth-child(2) > :nth-child(6) { animation-delay: 1.06s; }
  .ssm-ticket-stack .ssm-ticket:nth-child(2) > :nth-child(7) { animation-delay: 1.14s; }
  .ssm-ticket-stack .ssm-ticket:nth-child(2) > :nth-child(8) { animation-delay: 1.22s; }

  .ssm-ticket-stack .ssm-ticket:nth-child(2) .ssm-ticket-stub {
    animation: ssm-ticket-stamp 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) 2.2s both;
  }

  /* Answers ease open when a question is clicked. */
  .ssm-faq-item[open] > p {
    animation: ssm-faq-open 0.25s ease-out;
  }
}

@keyframes ssm-ticket-arrive {
  from {
    opacity: 0;
    transform: translateY(-2.5rem) rotate(7deg);
  }
  to {
    opacity: 1;
    transform: rotate(2deg);
  }
}

@keyframes ssm-ticket-print {
  from {
    opacity: 0;
    clip-path: inset(0 0 100% 0);
  }
  to {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}

@keyframes ssm-ticket-stamp {
  from {
    opacity: 0;
    transform: scale(1.8) rotate(-12deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes ssm-faq-open {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Revenue preview ------------------------------------------------------- */

.ssm-preview {
  padding: 0;
  overflow: hidden;
}

.ssm-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.1rem;
  border-block-end: 1px solid var(--ssm-line);
  background: var(--ssm-paper);
}

.ssm-preview-dots {
  display: inline-flex;
  gap: 0.35rem;
}

.ssm-preview-dots i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--ssm-line-strong);
}

.ssm-preview-tag {
  font-size: 0.78rem;
  color: var(--ssm-muted);
  padding: 0.1rem 0.55rem;
  border: 1px dashed var(--ssm-line-strong);
  border-radius: 999px;
}

.ssm-preview-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--ssm-line);
  border-block-end: 1px solid var(--ssm-line);
}

@media (min-width: 768px) {
  .ssm-preview-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.ssm-preview-stats > div {
  padding: 1rem 1.1rem;
  background: var(--ssm-surface);
}

.ssm-preview-stats dd {
  margin: 0;
}

[dir="rtl"] .ssm-preview-stats dd {
  text-align: right;
}

.ssm-preview-stats dd small {
  font-family: var(--ssm-font-body);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ssm-muted);
}

.ssm-preview-charts {
  display: grid;
  gap: 2rem;
  padding: 1.4rem 1.1rem 1.2rem;
}

@media (min-width: 992px) {
  .ssm-preview-charts {
    grid-template-columns: 1.6fr 1fr;
    gap: 2.5rem;
    padding: 1.6rem 1.6rem 1.4rem;
  }
}

.ssm-lpchart {
  margin: 0;
  min-width: 0;
}

.ssm-lpchart figcaption {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ssm-ink);
  margin-bottom: 1rem;
}

.ssm-lpchart-plot {
  position: relative;
  height: 220px;
}

.ssm-lpchart-plot svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  cursor: crosshair;
  border-radius: 4px;
}

.ssm-lpchart-grid {
  stroke: var(--ssm-lpc-grid);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.ssm-lpchart-path {
  fill: none;
  stroke: var(--ssm-lpc);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.ssm-lpchart-area {
  fill: var(--ssm-lpc-wash);
}

.ssm-lpchart-cross {
  stroke: var(--ssm-ink-soft);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  vector-effect: non-scaling-stroke;
  opacity: 0;
}

.ssm-lpchart-ytick {
  position: absolute;
  inset-inline-start: 0;
  transform: translateY(-120%);
  font-family: var(--ssm-font-mono);
  font-size: 0.68rem;
  color: var(--ssm-muted);
  pointer-events: none;
}

/* The zero line is the baseline and needs no label. */
.ssm-lpchart-ytick:first-of-type {
  display: none;
}

.ssm-lpchart-xticks {
  display: flex;
  justify-content: space-between;
  margin-top: 0.45rem;
  font-family: var(--ssm-font-mono);
  font-size: 0.68rem;
  color: var(--ssm-muted);
}

.ssm-lpchart-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--ssm-lpc);
  box-shadow: 0 0 0 2px var(--ssm-surface);
  opacity: 0;
  pointer-events: none;
}

.ssm-lpchart-tip {
  position: absolute;
  display: grid;
  gap: 0.1rem;
  min-width: 7.5rem;
  padding: 0.45rem 0.65rem;
  transform: translate(12px, -110%);
  background: var(--ssm-ink);
  color: var(--ssm-paper);
  border-radius: var(--ssm-radius-sm);
  font-size: 0.75rem;
  line-height: 1.3;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

.ssm-lpchart-tip.is-flipped {
  transform: translate(calc(-100% - 12px), -110%);
}

.ssm-lpchart-tip strong {
  font-family: var(--ssm-font-mono);
  font-size: 0.9rem;
  font-weight: 600;
}

.ssm-lpchart-plot.is-hover .ssm-lpchart-cross,
.ssm-lpchart-plot.is-hover .ssm-lpchart-dot,
.ssm-lpchart-plot.is-hover .ssm-lpchart-tip {
  opacity: 1;
}

.ssm-lpbars {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ssm-lpbars li {
  display: grid;
  grid-template-columns: 6.5rem 1fr auto;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
}

.ssm-lpbar-label {
  color: var(--ssm-ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ssm-lpbar-track {
  height: 0.7rem;
}

.ssm-lpbar-fill {
  display: block;
  width: var(--w);
  height: 100%;
  background: var(--ssm-lpc);
  border-start-end-radius: 4px;
  border-end-end-radius: 4px;
  transform-origin: left center;
}

[dir="rtl"] .ssm-lpbar-fill {
  transform-origin: right center;
}

.ssm-lpbar-value {
  font-size: 0.78rem;
  color: var(--ssm-ink);
  min-width: 4.5rem;
  text-align: end;
}

.ssm-preview-table {
  padding: 0 1.1rem 1rem;
  font-size: 0.88rem;
}

@media (min-width: 992px) {
  .ssm-preview-table {
    padding: 0 1.6rem 1.2rem;
  }
}

.ssm-preview-table summary {
  color: var(--ssm-muted);
  cursor: pointer;
  width: fit-content;
}

.ssm-preview-table summary:hover {
  color: var(--ssm-ink);
}

.ssm-preview-table table {
  max-width: 24rem;
  margin-top: 0.75rem;
}

/* Reveal: the hidden "before" states exist only once landing.js has switched motion on. */
html.ssm-anim [data-reveal] .ssm-lpchart-path {
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.3s cubic-bezier(0.45, 0, 0.2, 1) 0.2s;
}

html.ssm-anim [data-reveal] .ssm-lpchart-area {
  opacity: 0;
  transition: opacity 0.6s ease 1.1s;
}

html.ssm-anim [data-reveal] .ssm-lpbar-fill {
  transform: scaleX(0);
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

html.ssm-anim [data-reveal] .ssm-lpbars li:nth-child(2) .ssm-lpbar-fill { transition-delay: 0.08s; }
html.ssm-anim [data-reveal] .ssm-lpbars li:nth-child(3) .ssm-lpbar-fill { transition-delay: 0.16s; }
html.ssm-anim [data-reveal] .ssm-lpbars li:nth-child(4) .ssm-lpbar-fill { transition-delay: 0.24s; }
html.ssm-anim [data-reveal] .ssm-lpbars li:nth-child(5) .ssm-lpbar-fill { transition-delay: 0.32s; }

html.ssm-anim [data-reveal].is-visible .ssm-lpchart-path {
  stroke-dashoffset: 0;
}

html.ssm-anim [data-reveal].is-visible .ssm-lpchart-area {
  opacity: 1;
}

html.ssm-anim [data-reveal].is-visible .ssm-lpbar-fill {
  transform: none;
}
