:root {
  color-scheme: light;
  --font-ui: "Open Sans", "Segoe UI", Arial, sans-serif;
  --font-heading: "Cabin", "Open Sans", "Segoe UI", Arial, sans-serif;
  --vivad-red: #e4002b;
  --vivad-red-dark: #b60022;
  --vivad-grey: #53565a;
  --vivad-blue: #348be2;
  --vivad-blue-hover: #498ddc;
  --vivad-blue-deep: #1d5f9f;
  --vivad-blue-soft: #c2dcf9;
  --vivad-blue-pale: #eff5fb;
  --vivad-success: #74bf2f;
  --vivad-success-dark: #5fa825;
  --vivad-success-soft: #e8f2df;
  --vivad-coral: #f65856;
  --ink: #26282a;
  --muted: var(--vivad-grey);
  --line: #d9dfe8;
  --paper: var(--vivad-blue-pale);
  --surface: #ffffff;
  --surface-alt: var(--vivad-blue-pale);
  --green: var(--vivad-red);
  --green-dark: var(--vivad-red-dark);
  --coral: var(--vivad-coral);
  --amber: var(--vivad-grey);
  --blue: var(--vivad-blue);
  --brand-blue-soft: var(--vivad-blue-soft);
  --brand-green-soft: var(--vivad-success-soft);
  --brand-red-soft: #fde8ec;
  --button-shadow: 0 3px 8px rgba(52, 139, 226, 0.28);
  --button-hover-shadow: 0 8px 18px rgba(52, 139, 226, 0.32);
  --control-shadow: inset 0 0 0 1px rgba(83, 86, 90, 0.16), 0 3px 10px rgba(83, 86, 90, 0.10);
  --focus-ring: 0 0 0 3px rgba(52, 139, 226, 0.28);
  --shadow: 0 14px 34px rgba(83, 86, 90, 0.12);
  --recommendation-panel-space: 128px;
  --recommendation-panel-offset: clamp(6px, 1.2vw, 12px);
  --sticky-header-height: 112px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px clamp(16px, 3vw, 34px);
  background: #fff;
  border-bottom: 4px solid var(--green);
  box-shadow: 0 10px 26px rgba(83, 86, 90, 0.10);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 22px);
  min-width: 0;
}

.brand-logo {
  width: clamp(148px, 20vw, 240px);
  height: auto;
  flex: 0 0 auto;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.16;
}

h1 {
  font-size: clamp(1.35rem, 2.6vw, 2.2rem);
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--muted);
}

h2 {
  font-size: 1rem;
  font-weight: 600;
}

.header-actions,
.section-heading,
.input-grid {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.imposition-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.header-action-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.header-actions .icon-button {
  width: 40px;
  min-width: 40px;
}

.strapi-admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 50%;
  color: #4945ff;
  opacity: 0.66;
  transition: opacity 150ms ease, background 150ms ease, border-color 150ms ease;
}

.strapi-admin-link:hover,
.strapi-admin-link:focus-visible {
  border-color: rgba(73, 69, 255, 0.22);
  background: rgba(73, 69, 255, 0.08);
  opacity: 1;
  outline: none;
}

.strapi-admin-link svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.strapi-admin-link text {
  fill: #fff;
  font: 700 12px/1 var(--font-ui);
}

.pricing-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(520px, 1.18fr);
  align-items: start;
  gap: 16px;
  padding: 18px clamp(12px, 2.4vw, 28px) 28px;
}

.app-shell.is-input-only {
  grid-template-columns: minmax(360px, 760px);
}

.app-shell.is-family-detail {
  grid-template-columns: minmax(0, 1fr);
}

.workflow-column {
  display: grid;
  min-width: 0;
  gap: 16px;
}

.output-workflow {
  position: sticky;
  top: calc(var(--sticky-header-height) + 16px);
  align-self: start;
  max-height: calc(100vh - var(--sticky-header-height) - 32px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.surface {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.setup-panel,
.input-panel,
.artwork-panel,
.results-panel,
.wide-panel,
.imposition-panel {
  padding: 16px;
}

.results-panel {
  position: static;
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  max-height: none;
  overflow: visible;
  border-color: #348ede;
  box-shadow: 0 10px 26px rgba(83, 86, 90, 0.14);
}

.section-heading {
  justify-content: space-between;
  margin-bottom: 14px;
}

.qcode-entry {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  padding: 13px;
  border: 1px solid #b8cbe0;
  border-radius: 8px;
  background: #f7fbff;
}

.qcode-entry-heading h3,
.qcode-entry-heading p {
  margin: 0;
}

.qcode-entry-heading h3 {
  margin-top: 2px;
  font-size: 0.96rem;
}

.qcode-entry-heading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.qcode-lookup-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 8px;
}

.qcode-lookup-form .field {
  margin: 0;
}

.qcode-lookup-status {
  min-height: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.qcode-lookup-status.error {
  color: var(--red);
  font-weight: 700;
}

.qcode-lookup-result {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #8dc1ef;
  border-radius: 8px;
  background: #fff;
}

.qcode-lookup-result[hidden] {
  display: none;
}

.qcode-product-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.qcode-product-heading div {
  display: grid;
  gap: 2px;
}

.qcode-product-heading span {
  color: #1d5f9f;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.qcode-product-heading code {
  white-space: nowrap;
}

.qcode-product-facts {
  display: grid;
  gap: 6px;
  margin: 0;
}

.qcode-product-facts div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 8px;
  font-size: 0.76rem;
}

.qcode-product-facts dt {
  font-weight: 700;
}

.qcode-product-facts dd {
  margin: 0;
  color: var(--muted);
}

.qcode-print-mode-field {
  margin: 0;
}

@media (max-width: 560px) {
  .qcode-lookup-form {
    grid-template-columns: 1fr 1fr;
  }

  .qcode-lookup-form .field {
    grid-column: 1 / -1;
  }

  .qcode-product-heading {
    display: grid;
  }

  .qcode-product-facts div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

.heading-title,
.section-heading h2 {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.help-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.help-button {
  display: inline-grid;
  place-items: center;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border: 1px solid #b8cbe0;
  border-radius: 999px;
  background: #f7fbff;
  color: #1d5f9f;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  box-shadow: none;
}

.help-button:hover,
.help-button:focus-visible {
  border-color: #348ede;
  background: #eaf4ff;
  color: #174f86;
  outline: none;
}

.help-tooltip::after {
  content: attr(data-help);
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 80;
  width: min(320px, calc(100vw - 36px));
  padding: 10px 12px;
  border: 1px solid #b8cbe0;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(83, 86, 90, 0.18);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s ease;
  visibility: hidden;
  white-space: normal;
}

.help-tooltip:hover::after,
.help-tooltip:focus-within::after {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.muted {
  color: var(--muted);
  font-size: 0.86rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill.positive {
  background: var(--brand-red-soft);
  color: var(--green-dark);
}

.sheet-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0 14px;
  padding: 9px 10px;
  border: 1px solid #b8cbe0;
  border-left: 4px solid #348ede;
  border-radius: 8px;
  background: #f7fbff;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.4;
}

.sheet-status.warning {
  border-color: #eed58d;
  border-left-color: #b47a00;
  background: #fff9e8;
  color: #604200;
}

.sheet-status.error {
  border-color: #fac0ca;
  border-left-color: var(--green);
  background: #fff4f6;
  color: #8d1028;
}

.sheet-status .ghost-button {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border-color: #348ede;
  background: #348ede;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.sheet-status .ghost-button:hover:not(:disabled) {
  border-color: #2378c4;
  background: #2378c4;
  color: #fff;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.selector-survey {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.product-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
}

.family-panel {
  display: grid;
  gap: 13px;
}

.family-panel[hidden] {
  display: none;
}

.family-panel-heading {
  align-items: start;
}

.family-panel-heading .heading-title {
  display: grid;
  gap: 3px;
}

.family-panel-heading h2,
.family-panel-heading p {
  margin: 0;
}

.family-panel-heading p {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.family-panel-kicker {
  color: #1d5f9f;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sav-family-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sav-family-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 108px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.sav-family-card:hover {
  border-color: var(--vivad-blue-hover);
  box-shadow: 0 8px 20px rgba(29, 95, 159, 0.12);
  transform: translateY(-1px);
}

.sav-family-card:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.sav-family-card.selected {
  border-color: var(--vivad-blue);
  background: #eef7ff;
  box-shadow: 0 0 0 3px rgba(52, 142, 222, 0.14);
}

.sav-family-card-media {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-alt);
}

.sav-family-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sav-family-card-media.fallback {
  background: linear-gradient(145deg, #eaf4ff, #f7fbff);
  color: #1d5f9f;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
}

.sav-family-card-content {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.sav-family-card-content strong {
  font-family: var(--font-heading);
  font-size: 0.96rem;
  line-height: 1.25;
}

.sav-family-card-surfaces,
.sav-family-card-description {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.sav-family-card-description {
  margin-top: 2px;
}

.sav-family-card-action {
  align-self: end;
  color: var(--vivad-blue-deep);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.sav-family-detail {
  padding: clamp(8px, 1vw, 16px) clamp(4px, 1vw, 12px) 18px;
}

.family-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.8rem;
}

.family-breadcrumbs button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--vivad-blue);
  cursor: pointer;
}

.family-breadcrumbs button:hover,
.family-breadcrumbs button:focus-visible {
  color: var(--vivad-blue-deep);
  text-decoration: underline;
  outline: none;
}

.family-detail-heading {
  margin-bottom: 28px;
}

.family-detail-heading::before {
  display: block;
  width: 58px;
  height: 5px;
  margin-bottom: 14px;
  background: var(--green);
  content: "";
}

.family-detail-brand {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.family-detail-heading h2 {
  color: var(--muted);
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
}

.family-detail-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.92fr) minmax(420px, 1.08fr);
  align-items: start;
  gap: clamp(28px, 5vw, 70px);
}

.family-detail-product {
  min-width: 0;
}

.family-detail-image {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: clamp(340px, 42vw, 535px);
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(145deg, #eaf4ff, #f7fbff);
  color: #1d5f9f;
  font: 700 4rem/1 var(--font-heading);
}

.family-detail-image.has-image:not(:disabled) {
  cursor: zoom-in;
}

.family-detail-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.family-detail-image small {
  position: absolute;
  z-index: 1;
  bottom: 18px;
  left: 18px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--vivad-blue-deep);
  font: 700 0.68rem/1 var(--font-ui);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.family-detail-about {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.family-detail-about h3,
.family-detail-about p {
  margin: 0;
}

.family-detail-about h3 {
  margin-bottom: 9px;
  font: 700 1rem/1.3 var(--font-heading);
}

.family-detail-about p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.family-detail-about .family-detail-option-name {
  margin-bottom: 8px;
  color: var(--text);
}

.family-material-availability {
  margin-top: 22px;
}

.family-material-availability h3 {
  margin: 0 0 10px;
  font: 700 1rem/1.3 var(--font-heading);
}

.family-material-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.family-material-availability table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.family-material-availability th,
.family-material-availability td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.family-material-availability th {
  background: #f5f8fb;
  color: var(--muted);
  font-size: 0.69rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.family-material-availability tbody tr:last-child td {
  border-bottom: 0;
}

.family-material-availability td small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.66rem;
}

.family-material-availability .family-material-message {
  padding: 14px 12px;
  color: var(--muted);
}

.family-material-availability .family-material-message.error {
  color: var(--red);
}

.family-config-panel {
  padding: clamp(22px, 3.5vw, 38px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 44px rgba(33, 37, 41, 0.10);
}

.family-config-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.family-config-title h3,
.family-config-title p {
  margin: 0;
}

.family-config-title h3 {
  color: var(--muted);
  font: 700 1.45rem/1.2 var(--font-heading);
}

.family-config-title p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
}

.family-config-title > span {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.family-option-group {
  padding: 23px 0;
  border-bottom: 1px solid var(--line);
}

.family-option-group > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.family-option-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.family-option-label span {
  color: var(--muted);
  font-size: 0.78rem;
}

.family-radio-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}

.family-radio-choice {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.family-variant-help {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.family-variant-help > button {
  display: inline-grid;
  place-items: center;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border: 1px solid var(--vivad-blue);
  border-radius: 50%;
  background: #fff;
  color: var(--vivad-blue-deep);
  font: 700 0.68rem/1 var(--font-ui);
  cursor: help;
  box-shadow: none;
}

.family-variant-help > button:hover,
.family-variant-help > button:focus-visible {
  border-color: var(--vivad-blue-hover);
  background: #eaf4ff;
  outline: none;
}

.family-variant-help-content {
  position: absolute;
  z-index: 30;
  bottom: calc(100% + 8px);
  left: 50%;
  width: max-content;
  max-width: min(280px, calc(100vw - 32px));
  padding: 9px 11px;
  border: 1px solid #cbd9e8;
  border-radius: 8px;
  background: #162435;
  color: #fff;
  font-size: 0.76rem;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  visibility: hidden;
  box-shadow: 0 10px 28px rgb(24 52 82 / 22%);
}

.family-variant-help:hover .family-variant-help-content,
.family-variant-help:focus-within .family-variant-help-content,
.family-variant-help.open .family-variant-help-content {
  opacity: 1;
  transform: translate(-50%, 0);
  visibility: visible;
}

.family-variant-empty {
  color: var(--muted);
  font-size: 0.82rem;
}

.family-radio-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
}

.family-radio-option input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  accent-color: var(--vivad-blue);
  cursor: pointer;
}

.family-radio-option input:focus {
  border: 0;
  box-shadow: none;
  outline: 2px solid rgba(52, 139, 226, 0.24);
  outline-offset: 2px;
}

.family-radio-option.selected span {
  color: var(--vivad-blue-deep);
  font-weight: 700;
}

.family-radio-option.disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.family-print-mode select {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--control-shadow);
}

.family-selection-result {
  display: grid;
  gap: 4px;
  margin-top: 22px;
  padding: 15px 16px;
  border-radius: 10px;
  background: var(--surface-alt);
}

.family-selection-result span {
  color: var(--muted);
  font-size: 0.75rem;
}

.family-selection-result strong {
  color: var(--muted);
  font-family: var(--font-heading);
}

.class-step {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 13px;
  border: 1px solid var(--brand-blue-soft);
  border-radius: 9px;
  background: #f7fbff;
  scroll-margin-top: 14px;
  scroll-margin-bottom: calc(var(--recommendation-panel-space) + 18px);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.class-step.is-active {
  border-color: #348ede;
  background: #eef7ff;
  box-shadow: 0 0 0 4px rgba(52, 142, 222, 0.14), 0 10px 24px rgba(29, 95, 159, 0.10);
}

.class-step-heading {
  display: grid;
  gap: 2px;
}

.class-step-heading h3,
.class-step-heading p {
  margin: 0;
}

.class-step-heading h3 {
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}

.class-step-heading p {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.class-step-kicker {
  color: #1d5f9f;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.product-search-field {
  min-width: 0;
  margin-bottom: 0;
}

.product-search-results {
  display: grid;
  grid-column: 1 / -1;
  gap: 7px;
}

.product-search-list {
  display: grid;
  gap: 7px;
}

.product-search-result {
  display: grid;
  justify-items: start;
  width: 100%;
  min-height: 0;
  padding: 9px 10px;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.product-search-result:hover {
  border-color: var(--green);
  color: var(--green-dark);
}

.product-search-result strong {
  font-size: 0.9rem;
}

.product-search-result span,
.product-search-empty {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.product-search-empty {
  padding: 8px 10px;
  border: 1px dashed var(--brand-blue-soft);
  border-radius: 7px;
  background: #f7fbff;
  font-weight: 700;
}

.ghost-button.setup-reset-button {
  min-height: 36px;
  padding: 8px 18px;
  border-radius: 999px;
  border-color: #348ede;
  background: #348ede;
  color: #fff;
}

.ghost-button.setup-reset-button:hover:not(:disabled) {
  border-color: #1d72b8;
  background: #1d72b8;
  color: #fff;
}

.configurator-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 14px;
}

.configurator-step {
  display: grid;
  gap: 2px;
  min-width: 0;
  min-height: 45px;
  width: 100%;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.configurator-step span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.configurator-step strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.configurator-step.complete {
  border-color: var(--brand-blue-soft);
  background: #f7fbff;
}

.configurator-step.neutral {
  border-color: var(--line);
  background: #fff;
}

.configurator-step.current {
  border-color: #348ede;
  background: #eaf4ff;
  box-shadow: 0 0 0 3px rgba(52, 142, 222, 0.10);
}

.configurator-step:hover {
  border-color: #348ede;
  box-shadow: 0 0 0 3px rgba(52, 142, 222, 0.10);
  transform: translateY(-1px);
}

.configurator-step:focus-visible {
  outline: 3px solid rgba(52, 142, 222, 0.35);
  outline-offset: 2px;
}

.configurator-step.pending {
  opacity: 0.68;
}

.configurator-step.pending:hover {
  opacity: 1;
}

.class-step,
.product-search,
.filters-panel,
.selector-survey,
.input-panel,
.results-panel,
.wide-panel {
  scroll-margin-top: 14px;
  scroll-margin-bottom: calc(var(--recommendation-panel-space) + 18px);
}

.progress-target-highlight {
  animation: progress-target-pulse 1.3s ease;
}

@keyframes progress-target-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(52, 142, 222, 0.35);
  }

  100% {
    box-shadow: 0 0 0 8px rgba(52, 142, 222, 0);
  }
}

.configurator-guidance {
  overflow: hidden;
  display: grid;
  gap: 0;
  margin: -4px 0 14px;
  border: 1px solid var(--brand-blue-soft);
  border-left: 4px solid #348ede;
  border-radius: 8px;
  background: #f7fbff;
}

.configurator-guidance-button {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.configurator-guidance-button:hover:not(:disabled) {
  background: rgba(52, 142, 222, 0.08);
}

.configurator-guidance-button:focus-visible {
  outline: 3px solid rgba(52, 142, 222, 0.35);
  outline-offset: -3px;
}

.configurator-guidance-button:disabled {
  cursor: default;
}

.configurator-guidance-kicker {
  color: #1d5f9f;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
}

.configurator-guidance strong {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.2;
}

.configurator-guidance span:last-child {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.configurator-guidance.complete {
  border-color: #bddfcd;
  border-left-color: #3f9868;
  background: #f4fbf6;
}

.configurator-guidance.complete .configurator-guidance-kicker {
  color: #28724d;
}

.configurator-guidance.pending {
  border-left-color: #7d8790;
  background: #f6f7f8;
}

.advanced-config {
  overflow: visible;
  margin-top: 12px;
  border: 2px solid #348ede;
  border-radius: 8px;
  background: #eaf4ff;
  box-shadow: 0 0 0 3px rgba(52, 142, 222, 0.10);
}

.advanced-config summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 9px 11px;
  color: #1d5f9f;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
}

.advanced-config summary::-webkit-details-marker {
  display: none;
}

.advanced-config-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.advanced-config-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #348ede;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.16s ease;
}

.advanced-config[open] .advanced-config-icon {
  transform: rotate(45deg);
}

.advanced-config-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #fff;
  color: #1d5f9f;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid var(--brand-blue-soft);
}

.advanced-config-status.custom {
  background: #348ede;
  border-color: #348ede;
  color: #fff;
}

.advanced-config-body {
  display: grid;
  gap: 0;
  padding: 10px;
  border-top: 1px solid rgba(52, 142, 222, 0.35);
  background: #fff;
}

.artwork-config {
  margin-top: 0;
}

.artwork-config-body {
  gap: 12px;
}

.artwork-config-actions {
  display: flex;
  justify-content: flex-end;
}

.artwork-config .artwork-note {
  margin: 0;
}

.advanced-offset-field {
  margin-bottom: 0;
}

.advanced-offset-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.advanced-offset-actions .offset-choice-button {
  justify-content: center;
  width: 100%;
}

.filters-panel {
  display: block;
  margin-bottom: 14px;
  border: 1px solid var(--brand-blue-soft);
  border-radius: 8px;
  background: #f7fbff;
}

.filters-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 9px 11px;
  color: #1d5f9f;
  cursor: pointer;
  list-style: none;
}

.filters-panel-title::-webkit-details-marker {
  display: none;
}

.filters-panel-title > span:first-child {
  display: grid;
  gap: 1px;
}

.filters-panel-title strong {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
}

.filters-panel-title small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 400;
}

.filters-panel-chevron {
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.16s ease;
}

.filters-panel[open] .filters-panel-chevron {
  transform: rotate(225deg);
}

.filters-panel-body {
  display: grid;
  gap: 10px;
  padding: 10px;
  border-top: 1px solid var(--brand-blue-soft);
}

.filters-panel:not([open]) > .filters-panel-body {
  display: none;
}

.brand-filter,
.class-filter,
.limit-filter,
.mounting-filter {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.filters-panel .brand-filter,
.filters-panel .class-filter,
.filters-panel .limit-filter,
.filters-panel .mounting-filter {
  margin-bottom: 0;
}

.class-selector {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.brand-selector {
  position: relative;
}

.brand-dropdown {
  position: relative;
}

.brand-dropdown summary {
  list-style: none;
}

.brand-dropdown summary::-webkit-details-marker {
  display: none;
}

.brand-dropdown-trigger,
.brand-dropdown-option {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 52px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.brand-dropdown-trigger {
  border-color: #348ede;
  cursor: pointer;
  box-shadow: var(--control-shadow);
}

.brand-dropdown-trigger:hover,
.brand-dropdown[open] .brand-dropdown-trigger {
  border-color: var(--vivad-blue-hover);
}

.brand-dropdown-trigger:focus-visible,
.brand-dropdown-option:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.brand-dropdown-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  display: grid;
  gap: 3px;
  padding: 5px;
  border: 1px solid var(--brand-blue-soft);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(22, 57, 89, 0.18);
}

.brand-dropdown-option {
  grid-template-columns: 70px minmax(0, 1fr) 20px;
  min-height: 48px;
  border-color: transparent;
  cursor: pointer;
}

.brand-dropdown-trigger.all-brands,
.brand-dropdown-option.all-brands {
  grid-template-columns: minmax(0, 1fr) auto;
}

.brand-dropdown-option:hover {
  border-color: var(--brand-blue-soft);
  background: #f7fbff;
}

.brand-dropdown-option.selected {
  border-color: var(--vivad-blue);
  background: #eaf4ff;
  color: var(--vivad-blue-deep);
}

.brand-option-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 34px;
}

.brand-option-logo {
  display: block;
  width: 100%;
  height: 30px;
  object-fit: contain;
}

.brand-option-name {
  min-width: 0;
  font-size: 0.86rem;
  font-weight: 700;
}

.brand-option-check {
  visibility: hidden;
  color: var(--vivad-blue-deep);
  font-size: 1rem;
  font-weight: 800;
}

.brand-dropdown-option.selected .brand-option-check {
  visibility: visible;
}

.brand-dropdown-chevron {
  width: 9px;
  height: 9px;
  margin-right: 3px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.16s ease;
}

.brand-dropdown[open] .brand-dropdown-chevron {
  transform: translateY(3px) rotate(225deg);
}

.limit-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 3px 8px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.mounting-surface-selector {
  display: block;
}

.brand-button,
.class-button {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 54px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.class-button {
  min-height: 38px;
  padding: 8px 7px;
}

.limit-option {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  min-height: 20px;
  padding: 1px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.15;
  cursor: pointer;
}

.limit-option input {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  min-height: 14px;
  padding: 0;
  border: 0;
  margin: 0;
  background: transparent;
  accent-color: #348ede;
}

.limit-option span {
  min-width: 0;
}

.mounting-option {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 36px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.mounting-option input {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #348ede;
}

.mounting-option span {
  min-width: 0;
}

.mounting-surface-select {
  width: 100%;
  min-height: 52px;
  padding: 7px 12px;
  border-color: #348ede;
  border-radius: 7px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
}

.brand-button img {
  display: block;
  width: 100%;
  max-width: 78px;
  height: 26px;
  object-fit: contain;
}

.brand-button[data-brand-filter="avery"] img {
  width: min(112px, 100%);
  max-width: 112px;
  height: auto;
  max-height: 38px;
}

.brand-button[data-brand-filter="orafol"] img,
.brand-button[data-brand-filter="3m"] img {
  width: auto;
  max-width: 88px;
  height: 34px;
  max-height: 34px;
}

.brand-button[data-brand-filter="orafol"] img {
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
}

.brand-button.selected,
.class-button.selected {
  border-color: var(--green);
  background: var(--brand-red-soft);
  color: var(--green-dark);
  box-shadow: 0 0 0 3px rgba(228, 0, 43, 0.12);
}

.limit-option.selected {
  color: #1d5f9f;
}

.limit-option.selected span {
  color: #1d5f9f;
}

.mounting-option.selected {
  border-color: #348ede;
  background: #eaf4ff;
  color: #1d5f9f;
  box-shadow: 0 0 0 3px rgba(52, 142, 222, 0.12);
}

.brand-button:hover,
.class-button:hover {
  border-color: var(--green);
  color: var(--green-dark);
}

.limit-option:hover {
  color: #1d5f9f;
}

.mounting-surface-select:hover,
.mounting-option:hover {
  border-color: #348ede;
  color: #1d5f9f;
}

.survey-path {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.survey-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.survey-pill.inferred {
  border: 1px dashed var(--brand-blue-soft);
  background: #f7fbff;
}

.survey-question {
  display: grid;
  gap: 8px;
}

.survey-question strong,
.selected-product strong {
  font-size: 0.94rem;
}

.choice-grid {
  display: grid;
  gap: 7px;
}

.choice-button {
  justify-content: flex-start;
  min-height: 36px;
  width: 100%;
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
  text-align: left;
}

.choice-button:hover {
  border-color: var(--green);
  color: var(--green-dark);
}

.choice-button.selected,
.choice-button[aria-pressed="true"] {
  border-color: #348ede;
  background: #eaf4ff;
  color: #1d5f9f;
  box-shadow: 0 0 0 3px rgba(52, 142, 222, 0.12);
}

.selected-product {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--brand-blue-soft);
  border-radius: 8px;
  background: #f7fbff;
}

.selected-product .muted {
  line-height: 1.35;
}

.product-spec-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.product-gallery-control {
  display: flex;
  max-width: 360px;
}

.product-gallery-trigger {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 62px;
  padding: 5px 9px 5px 5px;
  border: 1px solid var(--brand-blue-soft);
  border-radius: 10px;
  background: #fff;
  color: #1d5f9f;
  font: 700 0.82rem/1.15 Cabin, sans-serif;
  text-align: left;
  box-shadow: 0 2px 8px rgba(29, 95, 159, 0.08);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.product-gallery-trigger:hover {
  border-color: #348ede;
  background: #eaf4ff;
  box-shadow: 0 5px 14px rgba(29, 95, 159, 0.16);
  transform: translateY(-1px);
}

.product-gallery-trigger-media {
  display: block;
  width: 68px;
  height: 50px;
  overflow: hidden;
  border-radius: 7px;
  background: var(--surface-alt);
}

.product-gallery-trigger-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-gallery-trigger-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.product-gallery-trigger-copy strong { font-size: 0.9rem; }
.product-gallery-trigger-copy > span { color: var(--muted); font-size: 0.72rem; font-weight: 600; }

.product-gallery-trigger-count {
  padding: 5px 7px;
  border-radius: 999px;
  background: #e3f1ff;
  color: #1d5f9f;
  font-size: 0.7rem;
  white-space: nowrap;
}

.product-spec-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  width: auto;
  min-height: 42px;
  padding: 3px 9px 3px 5px;
  border: 1px solid var(--brand-blue-soft);
  border-radius: 7px;
  background: #fff;
  color: #1d5f9f;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.product-spec-label {
  white-space: nowrap;
}

.product-spec-link:hover {
  border-color: #348ede;
  background: #eaf4ff;
}

.pdf-icon {
  display: block;
  width: 28px;
  height: 34px;
  flex: 0 0 auto;
  object-fit: contain;
}

.product-surface-info {
  display: grid;
  gap: 9px;
}

.selected-product-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.selected-product-heading > div {
  display: grid;
  gap: 2px;
}

.selected-product-label {
  color: #1d5f9f;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.product-option-workflow {
  display: grid;
  gap: 10px;
}

.product-option-step {
  display: grid;
  gap: 7px;
  padding-top: 10px;
  border-top: 1px solid var(--brand-blue-soft);
}

.product-option-step-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.product-option-step-heading span {
  color: #1d5f9f;
  font-size: 0.72rem;
  font-weight: 600;
}

.product-option-choices {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.print-mode-radio-list,
.laminate-radio-list {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 2px 0 2px 1px;
}

.print-mode-radio-option,
.laminate-radio-option {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 24px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.25;
  text-transform: uppercase;
}

.print-mode-radio-option input,
.laminate-radio-option input {
  appearance: auto;
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  accent-color: var(--vivad-blue);
  cursor: pointer;
}

.print-mode-radio-option input:focus,
.print-mode-radio-option input:focus-visible,
.laminate-radio-option input:focus,
.laminate-radio-option input:focus-visible {
  box-shadow: none;
  outline: 3px solid rgba(52, 139, 226, 0.24);
  outline-offset: 2px;
}

.print-mode-radio-option.selected,
.laminate-radio-option.selected {
  color: var(--ink);
  font-weight: 600;
}

.laminate-radio-option:has(input:disabled) {
  cursor: default;
}

.laminate-radio-option input:disabled {
  cursor: default;
  opacity: 1;
}

.product-option-static {
  cursor: default;
}

.product-option-empty {
  padding: 8px 10px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  font-size: 0.82rem;
}

.selected-product-details {
  display: grid;
  gap: 7px;
  padding-top: 2px;
}

.product-general-info {
  display: grid;
  gap: 7px;
}

.product-surface-detail {
  display: grid;
  gap: 7px;
}

.product-surface-label {
  color: var(--green-dark);
  font-size: 0.8rem;
  font-weight: 700;
}

.product-description {
  padding: 10px;
  border: 1px solid rgba(19, 121, 91, 0.22);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
}

.og-preview {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  min-height: 72px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  text-align: left;
  text-decoration: none;
}

button.og-preview { cursor: pointer; }

.og-preview:hover {
  border-color: var(--green);
}

.og-preview.image-preview {
  grid-template-columns: 1fr;
  gap: 7px;
}

.og-preview-media {
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 56px;
  border-radius: 5px;
  background: var(--surface-alt);
  color: var(--green-dark);
  font-size: 1.1rem;
  font-weight: 700;
}

.og-preview-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.og-preview-media .pdf-icon {
  width: 28px;
  height: 34px;
  object-fit: contain;
}

.pdf-preview-media {
  background: #f6f9fc;
}

.image-preview-media {
  display: block;
  overflow: hidden;
  border-radius: 5px;
  background: var(--surface-alt);
}

.image-preview-media img {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  background: #fff;
}

.og-preview-body {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
}

.og-preview-site {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.og-preview-title {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.og-preview-description {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.survey-empty {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--coral);
  border-radius: 8px;
  background: #fff3f1;
  color: var(--green-dark);
  font-size: 0.86rem;
  font-weight: 700;
}

.survey-empty .ghost-button {
  justify-self: start;
  min-height: 32px;
  width: auto;
  padding: 6px 13px;
  border-color: #348EDE;
  border-radius: 999px;
  background: #348EDE;
  color: #fff;
  font-weight: 700;
}

.survey-empty .ghost-button:hover:not(:disabled) {
  border-color: #2378c4;
  background: #2378c4;
  color: #fff;
}

.survey-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.survey-actions .ghost-button {
  min-height: 32px;
  padding: 6px 13px;
  border-color: #348EDE;
  border-radius: 999px;
  background: #348EDE;
  color: #fff;
  box-shadow: 0 5px 12px rgba(52, 142, 222, 0.2);
  font-weight: 700;
}

.survey-actions .ghost-button:hover:not(:disabled) {
  border-color: #2378c4;
  background: #2378c4;
  color: #fff;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

select,
input {
  min-height: 40px;
  padding: 8px 10px;
}

textarea {
  min-height: 244px;
  resize: vertical;
  padding: 12px;
  line-height: 1.5;
  font-family: var(--font-ui);
  font-size: 0.92rem;
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(228, 0, 43, 0.14);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.segmented.two-way {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.segmented label {
  position: relative;
  min-width: 0;
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
}

.segmented input:checked + span {
  border-color: var(--green);
  background: var(--brand-red-soft);
  color: var(--green-dark);
}

.input-grid {
  align-items: start;
}

.input-grid .field {
  flex: 1;
}

.constants {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.constants div,
.metric {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f7fbff;
}

.constants span,
.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 700;
}

.constants strong,
.metric strong {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
}

.data-entry-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.element-table-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 6px;
}

.element-csv-dialog {
  width: min(620px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: 14px;
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(20, 24, 28, 0.3);
}

.element-csv-dialog::backdrop {
  background: rgba(25, 29, 33, 0.5);
  backdrop-filter: blur(3px);
}

.element-csv-dialog form {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.element-csv-dialog form > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.element-csv-heading,
.element-csv-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.element-csv-heading > button {
  width: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1f3f5;
  color: var(--muted);
  font-size: 1.2rem;
}

.csv-file-control {
  display: inline-flex;
  justify-self: start;
  cursor: pointer;
}

.csv-file-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.csv-file-control span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid var(--vivad-blue);
  border-radius: 999px;
  background: #fff;
  color: var(--vivad-blue-deep);
  font-size: 0.82rem;
  font-weight: 700;
}

.csv-file-control:focus-within span,
.csv-file-control:hover span {
  background: #eaf4ff;
  box-shadow: var(--focus-ring);
}

.element-csv-dialog textarea {
  min-height: 210px;
}

.element-csv-actions {
  justify-content: flex-end;
}

.element-entry-table {
  min-width: 560px;
}

.element-entry-table th,
.element-entry-table td {
  padding: 7px 6px;
}

.element-entry-table input {
  min-height: 34px;
  padding: 6px 8px;
}

.element-entry-table th:last-child,
.element-entry-table td:last-child {
  width: 42px;
  text-align: right;
}

.table-actions {
  display: flex;
  justify-content: flex-end;
}

.icon-button {
  width: 34px;
  min-height: 34px;
  padding: 5px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.recommendation-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 7px;
  min-width: 0;
}

.recommendation-actions .recommendation-cart-button {
  white-space: nowrap;
}

.results-panel .metric-grid {
  grid-template-columns: repeat(4, minmax(105px, 1fr)) minmax(150px, auto);
  gap: 6px;
  align-items: stretch;
}

.results-panel .metric {
  padding: 6px 8px;
}

.metric strong {
  color: var(--green-dark);
  font-size: clamp(1.05rem, 2vw, 1.5rem);
}

.breakdown {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.breakdown > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.breakdown > div > strong {
  color: var(--ink);
  white-space: nowrap;
}

.results-panel .metric strong {
  margin-top: 2px;
  font-size: clamp(0.92rem, 1.35vw, 1.16rem);
}

.results-panel .breakdown {
  margin-top: 0;
  padding-top: 6px;
}

.results-panel .breakdown:empty {
  display: none;
}

button,
.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 600;
}

button svg,
.action-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.action-link {
  text-decoration: none;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.primary-button {
  background: var(--green);
  color: #fff;
}

.primary-button:hover:not(:disabled) {
  background: var(--green-dark);
}

.ghost-button {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.ghost-button:hover:not(:disabled),
.action-link.ghost-button:hover {
  border-color: var(--green);
  color: var(--green-dark);
}

.compact {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 0.84rem;
}

.error-list {
  min-height: 20px;
  margin-top: 10px;
  color: var(--green-dark);
  font-size: 0.86rem;
}

.upload-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 86px;
  padding: 14px;
  border: 1px dashed var(--brand-blue-soft);
  border-radius: 8px;
  background: #f7fbff;
  cursor: pointer;
}

.upload-box:hover {
  border-color: var(--green);
  background: var(--brand-red-soft);
}

.upload-box input {
  width: 1px;
  height: 1px;
  opacity: 0;
  position: absolute;
  pointer-events: none;
}

.upload-box span {
  display: grid;
  gap: 4px;
}

.upload-box strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.upload-box small {
  color: var(--muted);
  font-size: 0.8rem;
}

.artwork-note {
  margin: -2px 0 10px;
  padding: 9px 10px;
  border: 1px solid rgba(196, 90, 61, 0.28);
  border-radius: 7px;
  background: #fff8df;
  color: var(--green-dark);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.4;
}

.artwork-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.artwork-fit-warning {
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid var(--coral);
  border-radius: 8px;
  background: #fff3f1;
  color: var(--green-dark);
  font-size: 0.86rem;
  line-height: 1.35;
  font-weight: 700;
}

.artwork-empty {
  color: var(--muted);
  font-size: 0.86rem;
}

.artwork-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.artwork-item img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7fbff;
}

.artwork-meta {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.artwork-meta strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artwork-meta small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.artwork-meta select {
  min-height: 34px;
  padding-block: 5px;
  font-size: 0.84rem;
}

.artwork-cropper {
  display: grid;
  gap: 8px;
}

.artwork-crop-stage {
  position: relative;
  display: grid;
  place-items: center;
  height: 180px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background:
    linear-gradient(45deg, #edf2ef 25%, transparent 25%),
    linear-gradient(-45deg, #edf2ef 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #edf2ef 75%),
    linear-gradient(-45deg, transparent 75%, #edf2ef 75%);
  background-color: #f8faf9;
  background-position: 0 0, 0 7px, 7px -7px, -7px 0;
  background-size: 14px 14px;
}

.artwork-crop-frame {
  position: relative;
  width: min(100%, calc(180px * var(--crop-aspect)));
  height: auto;
  aspect-ratio: var(--crop-aspect);
  min-width: 0;
  min-height: 0;
  overflow: visible;
  border: 0;
  box-shadow: 0 8px 18px rgba(23, 32, 28, 0.18);
  background: transparent;
  cursor: grab;
  touch-action: none;
}

.artwork-crop-frame.is-editing {
  cursor: grabbing;
}

.artwork-crop-frame::after {
  position: absolute;
  inset: 0;
  z-index: 4;
  border: 2px solid #fff;
  box-shadow:
    0 0 0 1px rgba(23, 32, 28, 0.68),
    0 0 0 999px rgba(23, 32, 28, 0.22);
  content: "";
  pointer-events: none;
}

.artwork-crop-image {
  position: absolute;
  max-width: none;
  max-height: none;
  z-index: 1;
  user-select: none;
  pointer-events: none;
}

.artwork-panel-guides {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.artwork-panel-overlap {
  position: absolute;
  top: 0;
  bottom: 0;
  min-width: 3px;
  background: rgba(228, 0, 43, 0.28);
  box-shadow: inset 1px 0 rgba(255, 255, 255, 0.64), inset -1px 0 rgba(255, 255, 255, 0.44);
}

.artwork-panel-join {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 2px dashed #e4002b;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.9));
}

.artwork-scale-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 5;
  width: 22px;
  min-height: 22px;
  padding: 0;
  border: 0;
  border-radius: 7px 0 0;
  background:
    linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.92) 41%, rgba(255, 255, 255, 0.92) 48%, transparent 49%),
    linear-gradient(135deg, transparent 58%, rgba(255, 255, 255, 0.92) 59%, rgba(255, 255, 255, 0.92) 66%, transparent 67%),
    rgba(23, 32, 28, 0.62);
  cursor: nwse-resize;
}

.artwork-crop-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.crop-action {
  min-height: 30px;
  width: 30px;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1;
}

.artwork-crop-actions output {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.artwork-error {
  padding: 8px 10px;
  border: 1px solid var(--coral);
  border-radius: 7px;
  background: #fff3f1;
  color: var(--green-dark);
  font-size: 0.84rem;
}

.offset-prompt {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--coral);
  border-radius: 8px;
  background: #fff3f1;
}

.offset-prompt.answered {
  border-color: var(--vivad-blue);
  background: #f7fbff;
}

.offset-prompt.answered p {
  color: var(--ink);
}

.offset-prompt.answered .offset-prompt-close {
  border-color: var(--line);
}

.results-panel .offset-prompt {
  margin-top: 0;
  padding: 8px 10px;
}

.offset-prompt-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.offset-prompt-close {
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border-color: var(--coral);
  background: #fff;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1;
}

.offset-prompt-close:hover {
  border-color: var(--green);
  color: var(--green-dark);
}

.offset-prompt.hidden {
  display: none;
}

.offset-prompt p {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-weight: 600;
}

.offset-prompt-header p {
  margin: 0;
}

.offset-prompt .muted {
  margin-top: 6px;
}

.offset-prompt .prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.offset-choice-button {
  background: #fff;
  color: var(--muted);
  border-color: var(--line);
}

.offset-choice-button.selected {
  border-color: var(--green);
  background: var(--brand-red-soft);
  color: var(--green-dark);
}

.offset-choice-button:hover:not(:disabled) {
  border-color: var(--green);
  color: var(--green-dark);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 0.9rem;
}

th {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

tbody tr.selected-row {
  background: var(--brand-red-soft);
}

.preview-stage {
  min-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(83, 86, 90, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(83, 86, 90, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
}

.preview-stage svg {
  display: block;
  width: auto;
  max-width: none;
  height: auto;
  margin: 0 auto;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 320px;
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .family-detail-grid {
    grid-template-columns: 1fr;
  }

  .output-workflow {
    position: static;
    max-height: none;
    overflow: visible;
    scrollbar-gutter: auto;
  }
}

@media (max-width: 760px) {
  :root {
    --recommendation-panel-space: 126px;
  }

  .app-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-lockup {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .brand-logo {
    width: min(230px, 100%);
  }

  .header-actions {
    width: 100%;
    justify-content: stretch;
  }

  .header-actions button,
  .header-actions .action-link {
    flex: 1;
  }

  .imposition-actions {
    flex: 1 1 100%;
    justify-content: flex-end;
  }

  .header-actions .imposition-actions button {
    flex: 0 0 auto;
  }

  .configurator-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell {
    grid-template-columns: 1fr;
    padding-inline: 10px;
  }

  .setup-panel,
  .input-panel,
  .artwork-panel,
  .results-panel {
    grid-column: 1;
  }

  .segmented,
  .metric-grid,
  .constants,
  .input-grid {
    grid-template-columns: 1fr;
  }

  .results-panel .metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .results-panel .metric {
    padding: 5px 4px;
  }

  .results-panel .metric span {
    font-size: 0.68rem;
  }

  .results-panel .metric strong {
    font-size: 0.82rem;
  }

  .results-panel .recommendation-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .input-grid {
    display: grid;
  }
}

/* Vivad app style-guide retrofit */
body {
  background:
    linear-gradient(180deg, #ffffff 0, #ffffff 112px, var(--paper) 112px),
    var(--paper);
  font-family: var(--font-ui);
}

.app-header {
  border-bottom-color: var(--vivad-red);
  box-shadow: 0 10px 26px rgba(83, 86, 90, 0.12);
}

.eyebrow {
  color: var(--vivad-red);
  letter-spacing: 0.02em;
}

h1,
h2,
.filters-panel-title {
  font-family: var(--font-heading);
}

h1 {
  color: var(--vivad-grey);
}

h2,
.filters-panel-title {
  color: var(--ink);
}

.surface {
  border-color: rgba(83, 86, 90, 0.16);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(83, 86, 90, 0.12);
}

.section-heading {
  border-bottom: 1px solid rgba(83, 86, 90, 0.10);
  padding-bottom: 10px;
}

button,
.action-link {
  border-radius: 999px;
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

button:focus-visible,
.action-link:focus-visible,
.choice-button:focus-visible,
.brand-button:focus-visible,
.class-button:focus-visible,
.configurator-step:focus-visible,
.configurator-guidance-button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

button:disabled {
  opacity: 0.46;
  transform: none;
  box-shadow: none;
}

.primary-button {
  border-color: var(--vivad-blue);
  background: var(--vivad-blue);
  color: #fff;
  box-shadow: var(--button-shadow);
}

.primary-button:hover:not(:disabled) {
  border-color: var(--vivad-blue-hover);
  background: var(--vivad-blue-hover);
  box-shadow: var(--button-hover-shadow);
  transform: translateY(-1px);
}

.ghost-button,
.action-link.ghost-button {
  border-color: rgba(83, 86, 90, 0.18);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 7px rgba(83, 86, 90, 0.08);
}

.ghost-button:hover:not(:disabled),
.action-link.ghost-button:hover {
  border-color: var(--vivad-blue-hover);
  background: var(--vivad-blue-hover);
  color: #fff;
  box-shadow: var(--button-hover-shadow);
  transform: translateY(-1px);
}

.help-button {
  border-color: var(--vivad-blue);
  color: var(--vivad-blue-deep);
}

.help-button:hover,
.help-button:focus-visible {
  border-color: var(--vivad-blue-hover);
  background: #eaf4ff;
  color: var(--vivad-blue-deep);
}

.help-tooltip::after {
  display: none;
}

.help-tooltip:hover::after,
.help-tooltip:focus-within::after {
  display: block;
}

.upload-box input {
  max-width: 1px;
  min-height: 1px;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.setup-reset-button,
.survey-empty .ghost-button,
.survey-actions .ghost-button,
.sheet-status .ghost-button {
  border-color: var(--vivad-blue);
  background: var(--vivad-blue);
  color: #fff;
  box-shadow: var(--button-shadow);
}

.setup-reset-button:hover:not(:disabled),
.survey-empty .ghost-button:hover:not(:disabled),
.survey-actions .ghost-button:hover:not(:disabled),
.sheet-status .ghost-button:hover:not(:disabled) {
  border-color: var(--vivad-blue-hover);
  background: var(--vivad-blue-hover);
  color: #fff;
}

#add-all-cart,
#fixed-add-all-cart {
  border-color: var(--vivad-success);
  background: var(--vivad-success);
  color: #fff;
  box-shadow: 0 4px 10px rgba(116, 191, 47, 0.26);
}

#add-all-cart:hover:not(:disabled),
#fixed-add-all-cart:hover:not(:disabled) {
  border-color: var(--vivad-success-dark);
  background: var(--vivad-success-dark);
  box-shadow: 0 8px 18px rgba(116, 191, 47, 0.30);
}

#add-all-cart.cart-submitting,
#fixed-add-all-cart.cart-submitting {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: wait;
  opacity: 1;
}

#add-all-cart.cart-submitting::before,
#fixed-add-all-cart.cart-submitting::before {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #fff;
  border-radius: 50%;
  content: "";
  animation: cart-button-spin 0.72s linear infinite;
}

@keyframes cart-button-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  #add-all-cart.cart-submitting::before,
  #fixed-add-all-cart.cart-submitting::before {
    animation-duration: 1.5s;
  }
}

select,
input {
  border-color: transparent;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--control-shadow);
}

textarea {
  border-color: rgba(83, 86, 90, 0.18);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(83, 86, 90, 0.08);
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--vivad-blue);
  box-shadow: var(--focus-ring), var(--control-shadow);
}

input::placeholder,
textarea::placeholder {
  color: rgba(83, 86, 90, 0.46);
}

.segmented span {
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(83, 86, 90, 0.08);
}

.segmented input:checked + span,
.brand-button.selected,
.class-button.selected,
.choice-button.selected,
.choice-button[aria-pressed="true"],
.offset-choice-button.selected {
  border-color: var(--vivad-blue);
  background: #eaf4ff;
  color: var(--vivad-blue-deep);
  box-shadow: 0 0 0 3px rgba(52, 139, 226, 0.13);
}

.brand-button:hover,
.class-button:hover,
.choice-button:hover,
.offset-choice-button:hover:not(:disabled),
.product-search-result:hover,
.og-preview:hover {
  border-color: var(--vivad-blue-hover);
  color: var(--vivad-blue-deep);
}

.mounting-option.selected,
.configurator-step.current {
  border-color: var(--vivad-blue);
  background: #eaf4ff;
  color: var(--vivad-blue-deep);
  box-shadow: 0 0 0 3px rgba(52, 139, 226, 0.12);
}

.status-pill.positive,
.configurator-guidance.complete {
  border-color: rgba(116, 191, 47, 0.32);
  background: var(--vivad-success-soft);
  color: var(--vivad-success-dark);
}

.configurator-guidance {
  border-left-color: var(--vivad-blue);
}

.configurator-guidance-kicker,
.configurator-guidance.complete .configurator-guidance-kicker,
.limit-option.selected,
.limit-option.selected span,
.product-spec-link,
.product-browse-nested strong {
  color: var(--vivad-blue-deep);
}

.metric strong {
  color: var(--vivad-success-dark);
}

.error-list,
.artwork-error,
.artwork-fit-warning,
.offset-prompt p,
.survey-empty {
  color: var(--vivad-red-dark);
}

.upload-box {
  border-color: var(--vivad-blue);
  background: #f7fbff;
}

.upload-box:hover,
.upload-box:focus-within {
  border-color: var(--vivad-blue-hover);
  background: #eaf4ff;
}

tbody tr.selected-row {
  background: #f7fbff;
  box-shadow: inset 4px 0 0 var(--vivad-blue);
}

.stock-option-row {
  cursor: pointer;
  transition: background 140ms ease, box-shadow 140ms ease;
}

.stock-option-row:hover {
  background: var(--vivad-blue-pale);
}

.stock-option-row:focus-visible {
  outline: 3px solid rgba(52, 139, 226, 0.28);
  outline-offset: -3px;
}

.preview-stage {
  background-color: #fff;
}

.app-toast {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 16px clamp(18px, 3vw, 36px);
  background: var(--vivad-success);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  text-shadow: 0 1px 1px rgba(83, 86, 90, 0.22);
  box-shadow: 0 8px 22px rgba(83, 86, 90, 0.20);
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.app-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.app-toast.error {
  background: var(--vivad-red);
}

.app-toast.warning {
  background: var(--vivad-grey);
}

/* Font governance: Cabin for headings, Open Sans for body and UI. */
body,
button,
.action-link,
input,
select,
textarea,
table,
.field,
.muted,
.sheet-status,
.configurator-guidance,
.product-search-result,
.product-search-empty,
.survey-pill,
.status-pill,
.selected-product,
.product-description,
.og-preview,
.artwork-note,
.artwork-empty,
.artwork-meta,
.offset-prompt,
.empty-state {
  font-family: var(--font-ui);
}

h1,
h2,
.section-heading h2,
.filters-panel-title,
.advanced-config summary {
  font-family: var(--font-heading);
}

h1 {
  font-weight: 700;
}

h2,
.section-heading h2,
.filters-panel-title {
  font-weight: 600;
}

.eyebrow,
.header-action-label,
.field > span,
th,
.metric span,
.constants span,
.status-pill,
.survey-pill,
.configurator-step span,
.configurator-guidance-kicker,
.advanced-config-status,
.product-surface-label,
.product-spec-link,
.og-preview-site {
  font-weight: 700;
}

.help-button,
.metric strong,
.constants strong,
.configurator-step strong,
.configurator-guidance strong,
.selected-product strong,
.product-search-result strong,
.artwork-meta strong,
.og-preview-title {
  font-weight: 700;
}

.brand-button,
.class-button,
.limit-option,
.mounting-option,
.mounting-surface-select,
.choice-button,
.offset-choice-button,
.configurator-guidance-button {
  font-weight: 600;
}

/* Match the lighter Vivad website button typography. */
.primary-button,
.ghost-button,
.action-link,
.setup-reset-button,
.survey-empty .ghost-button,
.survey-actions .ghost-button,
.sheet-status .ghost-button,
.configurator-guidance-button,
.choice-button,
.offset-choice-button {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.compact,
.primary-button.compact,
.ghost-button.compact,
.offset-choice-button.compact,
.sheet-status .ghost-button {
  font-size: 0.78rem;
}

.header-actions .ghost-button,
.header-actions .action-link {
  font-size: 0.86rem;
}

/* Advanced Options is a secondary disclosure, not a primary action. */
.advanced-config {
  border: 1px solid rgba(83, 86, 90, 0.18);
  background: #fff;
  box-shadow: 0 6px 16px rgba(83, 86, 90, 0.08);
}

.advanced-config:hover {
  border-color: var(--vivad-blue-soft);
  box-shadow: 0 8px 18px rgba(83, 86, 90, 0.10);
}

.advanced-config[open] {
  border-color: var(--vivad-blue);
  box-shadow:
    0 0 0 3px rgba(52, 139, 226, 0.08),
    0 10px 22px rgba(83, 86, 90, 0.12);
}

.advanced-config summary {
  min-height: 42px;
  padding: 8px 12px;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
}

.advanced-config-title {
  color: var(--ink);
}

.advanced-config-icon {
  width: 22px;
  height: 22px;
  background: var(--vivad-blue);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: none;
}

.advanced-config-status {
  min-height: 24px;
  padding: 3px 10px;
  border-color: rgba(83, 86, 90, 0.18);
  background: #fff;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  box-shadow: none;
}

.advanced-config-status.custom {
  border-color: var(--vivad-blue);
  background: #eaf4ff;
  color: var(--vivad-blue-deep);
}

.advanced-config-body {
  border-top-color: rgba(83, 86, 90, 0.12);
  background: #fff;
}

/* Data Entry should feel like a form, not a spreadsheet header. */
.element-table-wrap {
  overflow-x: hidden;
}

.element-entry-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0 6px;
}

.element-entry-table th,
.element-entry-table td {
  border-bottom: 0;
  padding: 0 6px;
  vertical-align: middle;
}

.element-entry-table th {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  text-transform: none;
}

.element-entry-table th:nth-child(1),
.element-entry-table td:nth-child(1) {
  width: 84px;
}

.element-entry-table th:nth-child(2),
.element-entry-table td:nth-child(2),
.element-entry-table th:nth-child(3),
.element-entry-table td:nth-child(3) {
  width: 110px;
}

.element-entry-table th:nth-child(4),
.element-entry-table td:nth-child(4) {
  width: auto;
}

.element-entry-table th:last-child,
.element-entry-table td:last-child {
  width: 34px;
  padding-right: 0;
}

.element-entry-table input {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 0.82rem;
}

.element-entry-table .icon-button {
  width: 30px;
  min-width: 30px;
  min-height: 30px;
  padding: 5px;
}

.element-entry-table tbody tr:only-child [data-remove-element-row] {
  visibility: hidden;
}

.element-table-panel .table-actions {
  align-self: end;
  padding-bottom: 6px;
}

/* Wide data tables use readable labels, not loud spreadsheet headers. */
.wide-panel .table-wrap {
  overflow-x: auto;
}

.wide-panel table {
  border-collapse: collapse;
}

.wide-panel th,
.wide-panel td {
  padding: 10px 9px;
}

.wide-panel th {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.2;
  text-transform: none;
  letter-spacing: 0;
}

.wide-panel thead th {
  border-bottom: 1px solid rgba(83, 86, 90, 0.18);
}

.stock-qoh-heading {
  display: grid;
  gap: 2px;
}

.stock-qoh-heading small {
  color: var(--muted-light);
  font-size: 0.66rem;
  font-weight: 500;
}

.wide-panel tbody td {
  font-size: 0.86rem;
}

.wide-panel tbody tr:last-child td {
  border-bottom-color: transparent;
}

@media (max-width: 760px) {
  .sav-family-cards {
    grid-template-columns: 1fr;
  }

  .sav-family-card {
    grid-template-columns: 72px minmax(0, 1fr);
    min-height: 92px;
  }

  .sav-family-card-media {
    width: 72px;
    height: 72px;
  }

  .sav-family-card-action {
    display: none;
  }

  .element-table-panel {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .element-table-panel .table-actions {
    padding-bottom: 0;
  }

  body {
    background:
      linear-gradient(180deg, #ffffff 0, #ffffff 170px, var(--paper) 170px),
      var(--paper);
  }

  .app-header {
    gap: 9px;
    padding: max(8px, env(safe-area-inset-top)) 12px 10px;
  }

  .brand-lockup {
    width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .brand-logo {
    width: 132px;
  }

  .brand-lockup .eyebrow {
    margin-bottom: 1px;
    font-size: 0.64rem;
  }

  .brand-lockup h1 {
    font-size: 1.35rem;
  }

  .header-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 34px;
    align-items: center;
    gap: 6px;
  }

  .header-actions > .pricing-connection,
  .header-actions > .action-link {
    width: 100%;
    min-width: 0;
    padding-inline: 10px;
  }

  #pricing-connection-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-actions .imposition-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-end;
  }

  .header-actions .strapi-admin-link {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .header-actions button,
  .header-actions .action-link {
    min-height: 40px;
  }

  .app-toast {
    font-size: 0.92rem;
  }

  .preview-stage {
    overflow-x: hidden;
  }

  .preview-stage svg {
    width: 100%;
    max-width: 100%;
    height: auto;
  }
}
.pricing-connection { gap: 8px; }
.connection-dot { width: 8px; height: 8px; border-radius: 50%; background: #a7adb3; box-shadow: 0 0 0 3px rgba(167,173,179,.16); }
.pricing-connection.is-connected .connection-dot { background: #7cbf1d; box-shadow: 0 0 0 3px rgba(124,191,29,.16); }
.pricing-connection.is-working .connection-dot { background: #478fe1; animation: pricing-pulse 1s ease-in-out infinite; }
.pricing-login-dialog { width: min(460px, calc(100% - 32px)); border: 0; border-radius: 16px; padding: 0; color: #24262a; box-shadow: 0 28px 90px rgba(20,24,28,.3); }
.pricing-login-dialog::backdrop { background: rgba(25,29,33,.55); backdrop-filter: blur(3px); }
.pricing-login-dialog form { padding: 24px; }
.pricing-login-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.pricing-login-heading h2 { margin: 0; color: #53565a; font: 700 24px/1.1 Cabin, sans-serif; }
.pricing-login-heading button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: #f1f3f5; color: #53565a; font-size: 20px; cursor: pointer; }
.pricing-login-dialog form > p { color: #71777d; font-size: 12px; line-height: 1.55; }
.pricing-login-dialog .field { margin-top: 14px; }
.pricing-login-dialog .field input { width: 100%; box-sizing: border-box; }
.pricing-login-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; padding-top: 17px; border-top: 1px solid #d8dadd; }
.pricing-login-actions button { min-width: 92px; }
@keyframes pricing-pulse { 50% { opacity: .35; transform: scale(.82); } }

.product-gallery-dialog {
  width: min(960px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(20, 24, 28, 0.34);
  overflow: hidden;
}

.product-gallery-dialog::backdrop {
  background: rgba(25, 29, 33, 0.7);
  backdrop-filter: blur(3px);
}

.product-gallery-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100dvh - 32px);
}

.product-gallery-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--line);
}

.product-gallery-heading .eyebrow { margin: 0 0 4px; }
.product-gallery-heading h2 { margin: 0; color: #53565a; font: 700 23px/1.15 Cabin, sans-serif; }
.product-gallery-heading > button {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: #f1f3f5;
  color: #53565a;
  font-size: 22px;
  cursor: pointer;
}

.product-gallery-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 20px 68px;
  background: #202327;
}

.product-gallery-stage figure { display: grid; gap: 10px; justify-items: center; margin: 0; min-width: 0; }
.product-gallery-stage img { display: block; max-width: 100%; max-height: min(65dvh, 680px); object-fit: contain; }
.product-gallery-stage figcaption { color: #f3f5f7; font-size: 0.86rem; line-height: 1.4; text-align: center; }
.product-gallery-direction {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}
.product-gallery-direction:hover { background: rgba(52, 142, 222, 0.88); }
.product-gallery-direction.previous { left: 14px; }
.product-gallery-direction.next { right: 14px; }

.product-gallery-footer { display: grid; gap: 10px; padding: 12px 20px 16px; border-top: 1px solid var(--line); }
.product-gallery-footer > span { color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.product-gallery-thumbnails { display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: thin; }
.product-gallery-thumbnail {
  width: 72px;
  height: 54px;
  flex: 0 0 auto;
  padding: 2px;
  border: 2px solid transparent;
  border-radius: 7px;
  background: #eef1f4;
  cursor: pointer;
}
.product-gallery-thumbnail.selected { border-color: #348ede; box-shadow: 0 0 0 2px rgba(52, 142, 222, 0.16); }
.product-gallery-thumbnail img { width: 100%; height: 100%; border-radius: 4px; object-fit: cover; }

@media (max-width: 620px) {
  .product-gallery-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); }
  .product-gallery-shell { max-height: calc(100dvh - 16px); }
  .product-gallery-heading { padding: 14px 16px; }
  .product-gallery-heading h2 { font-size: 19px; }
  .product-gallery-stage { min-height: 280px; padding: 12px 44px; }
  .product-gallery-direction { width: 36px; height: 36px; font-size: 28px; }
  .product-gallery-direction.previous { left: 5px; }
  .product-gallery-direction.next { right: 5px; }
  .product-gallery-footer { padding: 10px 14px 14px; }
}
