/* vendor/formens/formens-application.css */
:root {
  --bg: #f4f4f5;
  --surface: #ffffff;
  --surface-muted: #f8f8f9;
  --text: #0f172a;
  --muted: #5b6475;
  --primary: #111827;
  --black: #000000;
  --border: rgba(15, 23, 42, 0.14);
  --danger: #d4183d;
  --success: #0f8a59;

  --radius-card: 8px;
  --radius-input: 8px;

  --shadow-card: 0 8px 22px rgba(15, 23, 42, 0.08);

  --f-xs: 12px;
  --f-sm: 14px;
  --f-md: 16px;
  --f-lg: 18px;
  --f-xl: 24px;
  --select-caret-icon: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSI+PHBhdGggZD0iTTQgNmw0IDQgNC00IiBzdHJva2U9IiMxMjFBMjkiIHN0cm9rZS13aWR0aD0iMS44IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=");
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--f-md);
  line-height: 1.45;
}

.topbar {
  background: #000;
  color: #fff;
}

.topbar__inner {
  width: min(1280px, calc(100% - 48px));
  margin-inline: auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.topbar__brand {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.topbar__nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.topbar__nav button {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  padding: 0;
}

.topbar__nav button:hover {
  color: #fff;
}

.wizard-shell {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
  padding: 48px 0 56px;
}

.page-header {
  text-align: center;
  margin-bottom: 40px;
}

.page-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
}

.page-header p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.35;
}

.wizard-toolbar {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 22px;
}

.wizard-toolbar__meta {
  display: grid;
  gap: 2px;
}

.wizard-toolbar__meta p {
  margin: 0;
}

.saved-at {
  color: var(--muted);
  font-size: var(--f-xs);
}

.wizard-toolbar__buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wizard-steps {
  width: min(920px, 100%);
  margin: 0 auto 48px;
  display: flex;
  align-items: flex-start;
}

.wizard-step {
  position: relative;
  flex: 1;
  border: 0;
  background: transparent;
  color: #707787;
  font: inherit;
  cursor: pointer;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  isolation: isolate;
}

.wizard-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 24px;
  left: calc(50% + 24px);
  width: calc(100% - 48px);
  height: 2px;
  background: #cfd3db;
  transform: translateY(-50%);
  z-index: 1;
}

.wizard-step.is-complete:not(:last-child)::after,
.wizard-step.is-active:not(:last-child)::after {
  background: #111;
}

.wizard-step__dot {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 2px solid #cfd3db;
  background: #fff;
  color: #7b8394;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.15s ease;
  position: relative;
  z-index: 2;
}

.wizard-step.is-active .wizard-step__dot,
.wizard-step.is-complete .wizard-step__dot {
  border-color: #111;
  background: #111;
  color: #fff;
}

.wizard-step__label {
  font-size: 12px;
  text-align: center;
  white-space: normal;
  line-height: 1.25;
  max-width: 180px;
}

.wizard-step.is-active .wizard-step__label,
.wizard-step.is-complete .wizard-step__label {
  color: #111;
}

.error-summary {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(212, 24, 61, 0.35);
  border-radius: var(--radius-card);
  background: #fff8fa;
}

.error-summary__title {
  margin: 0 0 6px;
  color: #951a35;
  font-size: var(--f-sm);
}

.error-summary__list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.error-summary__list button {
  border: 0;
  background: transparent;
  color: #951a35;
  font: inherit;
  font-size: var(--f-xs);
  cursor: pointer;
  text-align: left;
  padding: 0;
}

.error-summary__list button:hover {
  text-decoration: underline;
}

.form-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  padding: 32px;
}

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

.step-intro {
  margin-bottom: 24px;
}

.step-intro__title {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
}

.step-intro__text {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.35;
}

.form-block {
  margin-bottom: 32px;
}

.form-block:last-child {
  margin-bottom: 0;
}

.form-block h3 {
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
}

.form-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.form-block__head--lined {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}

.form-block__head h3 {
  margin: 0;
  padding: 0;
  border: 0;
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px 24px;
}

.col-12 {
  grid-column: span 12;
}

.col-8 {
  grid-column: span 8;
}

.col-6 {
  grid-column: span 6;
}

.col-4 {
  grid-column: span 4;
}

.col-3 {
  grid-column: span 3;
}

.field {
  display: grid;
  gap: 8px;
  align-content: start;
}

.label,
label {
  font-size: 14px;
  font-weight: 500;
  color: #121a29;
}

.label--with-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 20px;
  min-height: 20px;
}

.required {
  color: var(--danger);
}

.help {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.section-note {
  margin: -8px 0 18px;
}

.input,
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: #fff;
  color: #101827;
  font: inherit;
  font-size: 16px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.input,
input,
select {
  height: 44px;
  padding: 0 16px;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  padding-right: 56px;
  background-image: var(--select-caret-icon) !important;
  background-repeat: no-repeat !important;
  background-position: right 18px center !important;
  background-size: 16px 16px !important;
}

select.is-complete-field:not([aria-invalid="true"]),
select.is-complete-field:not([aria-invalid="true"]):hover,
select.is-complete-field:not([aria-invalid="true"]):focus {
  background-image: var(--select-caret-icon) !important;
}

textarea,
textarea.input {
  height: auto;
  min-height: 110px;
  padding: 12px 14px;
  resize: vertical;
}

.input:hover,
input:hover,
select:hover,
textarea:hover {
  border-color: rgba(15, 23, 42, 0.24);
}

.is-complete-field:not([aria-invalid="true"]) {
  background-color: #edf9f0;
  border-color: #6eb38d;
}

.is-complete-field:not([aria-invalid="true"]):hover {
  background-color: #e6f5eb;
  border-color: #5ca27c;
}

.is-complete-field:not([aria-invalid="true"]):focus {
  border-color: #4f9470;
  box-shadow: 0 0 0 2px rgba(79, 148, 112, 0.18);
}

.input:focus,
input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: none;
  border-color: #0f172a;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.12);
}

.phone-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.phone-inline > select,
.phone-inline > .input[type="tel"],
.phone-inline > input[type="tel"] {
  min-width: 0;
}

.phone-inline > select {
  flex: 0 0 140px;
}

.phone-inline > .input[type="tel"],
.phone-inline > input[type="tel"] {
  flex: 1 1 auto;
}

.locked-input {
  background: #f4f5f7;
  color: #555d6f;
}

.field-error,
.error {
  min-height: 14px;
  margin: 0;
  color: var(--danger);
  font-size: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.choice-group {
  margin: 0;
  border: 0;
  padding: 0;
}

.choice-group legend {
  margin: 0 0 12px;
  padding: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0;
}

.group-helper {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.option-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
}

.option-grid--inline {
  flex-wrap: wrap;
}

.option-grid--chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
}

.option-grid.dense {
  gap: 8px 16px;
}

#b2bLanguageGroupContainer .option-grid--chips {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.option-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}

.option-card input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #000;
  cursor: pointer;
}

.option-label {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
}

.option-card.selected .option-label,
.option-card.tile--selected .option-label {
  font-weight: 500;
}

.option-card.option-disabled,
.option-card.tile--disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.choice-group[data-group="fabricOffer"] .option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.choice-group[data-group="fabricOffer"] .option-card {
  min-width: 0;
}

.choice-group[data-group="fabricOffer"] .option-card.fabric-offer-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.choice-group[data-group="fabricOffer"] .option-card.fabric-offer-hero:hover {
  border-color: rgba(15, 23, 42, 0.24);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07);
  transform: translateY(-1px);
}

.choice-group[data-group="fabricOffer"] .option-card.fabric-offer-hero input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.choice-group[data-group="fabricOffer"] .option-card.fabric-offer-hero::before {
  content: "";
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  background-color: #f3f4f6;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  border-bottom: 1px solid var(--border);
}

.choice-group[data-group="fabricOffer"] .option-card.fabric-offer-leaflets::before {
  background-image: url("./images/fabric-offer-std-private-label-leaflets.jpg");
}

.choice-group[data-group="fabricOffer"] .option-card.fabric-offer-cardboards::before {
  background-image: url("./images/fabric-offer-std-private-label-cardboards.jpg");
}

.choice-group[data-group="fabricOffer"] .option-card.fabric-offer-premium-bunch::before {
  background-image: url("./images/premium_private_label/premium_private_label_qs_bunch.jpg");
}

.choice-group[data-group="fabricOffer"] .option-card.fabric-offer-special-bunch::before {
  background-image: url("./images/special_private_label/special_private_label_qs_bunch.jpg");
}

.choice-group[data-group="fabricOffer"] .option-card.fabric-offer-louis-purple-bunch::before {
  background-image: url("./images/louis_purple_label/louis_purple_qs_bunch.jpg");
}

.choice-group[data-group="fabricOffer"] .option-card.fabric-offer-davenza-leaflets::before {
  background-image: url("./images/davenza/fabric-offer-davenza-qs-leaflet.jpg");
}

.choice-group[data-group="fabricOffer"] .option-card.fabric-offer-davenza-bunch::before {
  background-image: url("./images/davenza/fabric-offer-davenza-qs-bunch.jpg");
}

.choice-group[data-group="fabricOffer"] .option-card.fabric-offer-hero .option-label {
  min-height: 44px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  background: #f8fafc;
}

.choice-group[data-group="fabricOffer"] .option-card.fabric-offer-hero:focus-within {
  outline: 0;
  border-color: #6da983;
  box-shadow: 0 0 0 2px rgba(79, 148, 112, 0.2);
}

.choice-group[data-group="fabricOffer"] .option-card.fabric-offer-hero.selected,
.choice-group[data-group="fabricOffer"] .option-card.fabric-offer-hero.tile--selected {
  border-color: #7aa88f;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.choice-group[data-group="fabricOffer"] .option-card.fabric-offer-hero.selected .option-label,
.choice-group[data-group="fabricOffer"] .option-card.fabric-offer-hero.tile--selected .option-label {
  background: #eaf6ee;
}

.choice-group[data-group="fabricOffer"] .option-card:not(.fabric-offer-hero) {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 8px;
  background: #fff;
}

.choice-group[data-group="fabricOffer"] .option-card:not(.fabric-offer-hero) .option-label {
  white-space: normal;
  font-size: 14px;
  font-weight: 500;
}

.choice-group[data-group="fabricOffer"] .option-card:not(.fabric-offer-hero).selected,
.choice-group[data-group="fabricOffer"] .option-card:not(.fabric-offer-hero).tile--selected {
  background: #eaf6ee;
  border-color: #7aa88f;
}

.fabric-offer-addons {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.fabric-offer-addons__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: #0f172a;
}

.fabric-offer-addons__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.packaging-options {
  margin-top: 12px;
}

.packaging-options__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.packaging-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.packaging-card:hover {
  border-color: rgba(15, 23, 42, 0.24);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07);
  transform: translateY(-1px);
}

.packaging-card input[type="checkbox"] {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #6ea786;
  z-index: 2;
}

.packaging-card__media {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  background: #f3f4f6;
  overflow: hidden;
}

.packaging-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.packaging-card__label {
  padding: 6px 8px;
  height: 56px;
  min-height: 56px;
  max-height: 56px;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  color: #0f172a;
  background: #f8fafc;
  overflow: hidden;
}

.packaging-card:has(input:checked) {
  border-color: #7aa88f;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.packaging-card:has(input:checked) .packaging-card__label {
  background: #eaf6ee;
}

.packaging-card:has(input:focus-visible) {
  outline: 0;
  border-color: #6da983;
  box-shadow: 0 0 0 2px rgba(79, 148, 112, 0.2);
}

.fabric-addon-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.fabric-addon-card:hover {
  border-color: rgba(15, 23, 42, 0.24);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07);
  transform: translateY(-1px);
}

.fabric-addon-card input[type="checkbox"] {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #6ea786;
  z-index: 2;
}

.fabric-addon-card__media {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  background: #f3f4f6;
  overflow: hidden;
}

.fabric-addon-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fabric-addon-card__label {
  padding: 6px 8px;
  height: 56px;
  min-height: 56px;
  max-height: 56px;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  color: #0f172a;
  background: #f8fafc;
  overflow: hidden;
}

.fabric-addon-card:has(input:checked) {
  border-color: #7aa88f;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.fabric-addon-card:has(input:checked) .fabric-addon-card__label {
  background: #eaf6ee;
}

.fabric-addon-card:has(input:focus-visible) {
  outline: 0;
  border-color: #6da983;
  box-shadow: 0 0 0 2px rgba(79, 148, 112, 0.2);
}

.branding-category-block {
  margin-bottom: 24px;
}

.choice-group--hero {
  margin: 0;
}

.choice-group--hero legend {
  margin: 0 0 12px;
  padding: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0;
}

.choice-group--hero legend::after {
  content: none;
}

.branding-hero-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.option-card--hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: var(--radius-card);
  background: #fff;
  overflow: hidden;
  min-height: 0;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.option-card--hero:hover {
  border-color: rgba(15, 23, 42, 0.24);
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.option-card--hero input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.option-card--hero:focus-within {
  outline: 0;
  border-color: #6da983;
  box-shadow: 0 0 0 2px rgba(79, 148, 112, 0.2);
}

.option-card--hero__media {
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: #f3f4f6;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
}

.option-card--hero__image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.02);
  transform-origin: center;
}

.option-card--hero__label {
  width: 100%;
  min-height: 48px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  color: #1f2937;
  background: #f7f8fa;
}

.option-card--hero.selected,
.option-card--hero.tile--selected {
  border-color: #7aa88f;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07);
}

.option-card--hero.selected .option-card--hero__label,
.option-card--hero.tile--selected .option-card--hero__label {
  background-color: #eaf6ee;
}

.product-selection-block {
  margin: 14px 0 22px;
}

.product-selection-block__title {
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
  color: #0f172a;
}

.product-selection-block--config .grid-12 {
  gap: 12px 24px;
}

.product-selection-block--config .choice-group legend {
  margin-bottom: 8px;
}

.product-selection-block--config .field-error,
.product-selection-block--config .group-error {
  min-height: 0;
}

.product-selection-block--config .field-error:empty,
.product-selection-block--config .group-error:empty {
  display: none;
}

.product-offer-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.product-offer-grid > * {
  align-self: start;
  min-width: 0;
}

.product-offer-slot {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
}

.product-offer-card {
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: var(--radius-card);
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 6px;
  align-content: start;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.product-offer-card:hover {
  border-color: rgba(15, 23, 42, 0.24);
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.product-offer-card:focus-visible {
  outline: none;
  border-color: #6da983;
  box-shadow: 0 0 0 2px rgba(79, 148, 112, 0.18);
}

.product-offer-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  min-height: 0;
}

.product-offer-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  color: #0f172a;
  max-width: calc(100% - 52px);
  min-height: calc(1.2em * 2);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.product-offer-card__meta {
  margin: 0;
  color: #64748b;
  font-size: 11px;
  line-height: 1.3;
  min-height: calc(1.3em * 2);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.product-offer-card__media {
  position: relative;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 7px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #f2f4f6;
}

.product-offer-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(110, 167, 134, 0);
  pointer-events: none;
  transition: background-color 0.16s ease;
}

.product-offer-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 18px;
  flex: 0 0 auto;
  cursor: pointer;
}

.product-toggle input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.product-toggle__track {
  position: relative;
  width: 34px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  background: #d9dde3;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.product-toggle__track::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
  transition: transform 0.16s ease;
}

.product-toggle input:checked + .product-toggle__track {
  background: #7fac92;
  border-color: #739f86;
}

.product-toggle input:checked + .product-toggle__track::before {
  transform: translateX(16px);
}

.product-toggle input:focus-visible + .product-toggle__track {
  box-shadow: 0 0 0 2px rgba(79, 148, 112, 0.2);
}

.product-audience-panel {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
  display: block;
  min-width: 0;
}

.audience-toggle-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.audience-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  width: 100%;
  min-width: 0;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.audience-toggle input {
  position: static;
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #6ea786;
  cursor: pointer;
}

.audience-toggle span {
  display: inline-block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #334155;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: color 0.16s ease;
}

.audience-toggle input:checked + span {
  color: #123225;
  font-weight: 600;
}

.audience-toggle:has(input:checked) {
  border-color: rgba(110, 167, 134, 0.8);
  background: #eaf6ee;
}

.audience-toggle input:focus-visible {
  outline: 2px solid rgba(79, 148, 112, 0.3);
  outline-offset: 1px;
}

.audience-toggle input:disabled + span {
  opacity: 0.55;
  cursor: not-allowed;
}

.product-offer-card.is-selected-product {
  border-color: rgba(15, 23, 42, 0.14);
  background: #fff;
  box-shadow: none;
}

.product-offer-card.is-selected-product .product-offer-card__media::after {
  background: rgba(110, 167, 134, 0);
}

.labeling-configurator {
  display: grid;
  gap: 14px;
}

.labeling-empty-state {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--muted);
}

.labeling-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.labeling-column,
.labeling-shared {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: var(--radius-card);
  background: #fafbfc;
  padding: 12px;
}

.labeling-column__title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

#labelingMensColumn,
#labelingWomensColumn {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px 14px;
}

#labelingSharedColumn {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

.labeling-item {
  min-width: 0;
}

.labeling-configurator--single-side #labelingMensColumn,
.labeling-configurator--single-side #labelingWomensColumn {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.labeling-configurator--single-side .labeling-columns {
  grid-template-columns: 1fr;
}

.labeling-column--single-item > div {
  grid-template-columns: minmax(320px, 540px);
}

.labeling-configurator--single-item .labeling-columns {
  grid-template-columns: minmax(360px, 620px);
}

.labeling-configurator--single-item .labeling-column {
  max-width: 620px;
}

.labeling-item .field {
  gap: 6px;
}

.labeling-item .label {
  font-size: 13px;
}

.labeling-item .config-select {
  font-size: 14px;
  padding-left: 12px;
  padding-right: 40px;
  background-position: right 12px center !important;
}

.labeling-inline-uploader {
  margin-top: 2px;
  padding: 8px 10px;
  gap: 6px;
  background: #fff;
  border-color: rgba(15, 23, 42, 0.1);
}

.labeling-inline-uploader .label {
  font-size: 12px;
  margin: 0;
}

.labeling-inline-uploader .file-uploader__row {
  gap: 8px;
}

.labeling-inline-uploader .file-name {
  font-size: 13px;
}

.labeling-inline-uploader .file-meta {
  font-size: 11px;
  line-height: 1.2;
}

.labeling-inline-uploader .btn--sm {
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.labeling-extra-field {
  margin-top: -2px;
}

.group-error {
  margin-top: 8px;
}

.choice-group--select .select-group {
  max-width: none;
}

.config-select {
  min-width: 100%;
}

.sr-only-radio-wrap {
  display: none;
}

.step-panel[data-step-panel="1"] .grid-12 {
  gap: 14px 24px;
}

.step-panel[data-step-panel="1"] .field {
  gap: 6px;
}

.step-panel[data-step-panel="1"] .section-note {
  margin: -6px 0 12px;
}

.step-panel[data-step-panel="1"] .field-error,
.step-panel[data-step-panel="1"] .error {
  min-height: 0;
}

.step-panel[data-step-panel="1"] .field-error:empty,
.step-panel[data-step-panel="1"] .error:empty {
  display: none;
}

.tryon-list {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #fff;
}

.tryon-row {
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
}

.tryon-row:last-child {
  border-bottom: 0;
}

.tryon-row__grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  align-items: start;
  gap: 14px;
}

.tryon-label {
  font-size: 16px;
  font-weight: 500;
}

.tryon-options .choice-group {
  margin: 0;
}

.tryon-options {
  display: grid;
  gap: 8px;
  align-content: start;
}

.tryon-options .option-grid {
  gap: 8px 18px;
  align-items: center;
}

.tryon-options .group-error {
  margin-top: 4px;
}

.tryon-stock {
  display: inline-grid;
  grid-template-columns: minmax(230px, 340px);
  gap: 4px;
  margin: 0 0 0 4px;
  max-width: none;
  align-items: center;
}

.tryon-stock .input {
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 38px;
  padding: 0 12px;
  font-size: 14px;
}

.tryon-stock .field-error {
  min-height: 0;
}

.tryon-stock .field-error:empty {
  display: none;
}

.shipping-list {
  display: grid;
  gap: 14px;
}

.shipping-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 14px;
  background: #fafbfc;
}

.shipping-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.shipping-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.shipping-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.file-uploader {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 12px;
  background: #fafbfc;
  display: grid;
  gap: 8px;
}

.file-input-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-uploader__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.file-name {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.wizard-nav {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.wizard-nav__draft-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.wizard-nav__spacer {
  flex: 1;
}

.btn {
  height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn--sm,
.btn.small {
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.btn--primary,
.btn.primary {
  background: #000;
  border-color: #000;
  color: #fff;
}

.btn--primary:hover,
.btn.primary:hover {
  background: #111827;
  border-color: #111827;
}

.btn--accent {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn--accent:hover {
  background: #0b1220;
  border-color: #0b1220;
}

.btn--secondary,
.btn:not(.btn--primary):not(.btn--danger):not(.btn--accent):not(.btn--link):not(.primary):not(.danger) {
  background: #fff;
  border-color: #111;
  color: #111;
}

.btn--secondary:hover,
.btn:not(.btn--primary):not(.btn--danger):not(.btn--accent):not(.btn--link):not(.primary):not(.danger):hover {
  background: #f7f8fa;
}

.btn--danger,
.btn.danger {
  background: #fff;
  border-color: rgba(212, 24, 61, 0.5);
  color: var(--danger);
}

.btn--danger:hover,
.btn.danger:hover {
  background: rgba(212, 24, 61, 0.08);
}

.btn--link {
  border: 0;
  background: transparent;
  color: var(--primary);
  height: auto;
  padding: 0;
  font-size: 15px;
  font-weight: 400;
}

.btn--link:hover {
  text-decoration: underline;
}

[aria-invalid="true"] {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 2px rgba(212, 24, 61, 0.14);
}

.has-error {
  outline: 1px solid rgba(212, 24, 61, 0.35);
}

.output-surface {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: var(--shadow-card);
}

.output-surface__head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.output-surface__head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
}

.output-surface__body {
  padding: 16px 18px 18px;
}

.summary-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: #fafbfc;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.summary-box h3,
.summary-box h4 {
  margin: 0 0 4px;
  font-size: 16px;
}

.summary-box ul {
  margin: 0 0 0 18px;
  padding: 0;
}

.confirmation-summary {
  padding: 0;
}

.confirmation-summary__stack {
  display: grid;
  gap: 0;
}

.confirmation-summary__section {
  padding: 0;
}

.confirmation-summary__section + .confirmation-summary__section {
  margin-top: 24px;
  padding-top: 20px;
}

.confirmation-summary__section-title {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dce2eb;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
  color: #0f172a;
}

.confirmation-summary__rows {
  margin: 0;
  display: grid;
  gap: 8px;
}

.confirmation-summary__row {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: 8px 16px;
  align-items: start;
  padding: 5px 0;
  border-bottom: 1px dashed #e4e9f1;
}

.confirmation-summary__row:last-child {
  border-bottom: 0;
}

.confirmation-summary__label {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #334155;
}

.confirmation-summary__value {
  margin: 0;
  color: #111827;
  line-height: 1.45;
  font-size: 16px;
}

.confirmation-summary__empty {
  color: var(--muted);
  font-style: italic;
}

.confirmation-summary__list {
  margin: 2px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.confirmation-summary__list li::marker {
  color: #475569;
}

.confirmation-summary__list--details {
  margin: 2px 0 0;
  padding-left: 18px;
  list-style: disc;
  gap: 6px;
}

.confirmation-summary__list--details li {
  display: list-item;
}

.confirmation-summary__item-label {
  font-size: 15px;
  font-weight: 500;
  color: #334155;
}

.confirmation-summary__item-value {
  font-size: 15px;
  font-weight: 500;
  color: #111827;
}

#jsonOutput {
  min-height: 220px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.panel-actions {
  margin-top: 10px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 320px;
  padding: 10px 12px;
  border-radius: var(--radius-card);
  color: #fff;
  background: #111;
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
  z-index: 60;
  font-size: 12px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast[data-type="success"] {
  background: var(--success);
}

.toast[data-type="error"] {
  background: var(--danger);
}

.toast[data-type="warning"] {
  background: #b45309;
}

.restriction-modal[hidden] {
  display: none;
}

.restriction-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
}

.restriction-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(15, 23, 42, 0.38);
  cursor: pointer;
}

.restriction-modal__panel {
  position: relative;
  width: min(560px, calc(100vw - 28px));
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.24);
  padding: 18px;
}

.restriction-modal__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: #0f172a;
}

.restriction-modal__message {
  margin: 10px 0 0;
  font-size: 16px;
  line-height: 1.45;
  color: #334155;
}

.restriction-modal__actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 1100px) {
  .wizard-shell {
    width: calc(100% - 24px);
  }

  .branding-hero-grid {
    grid-template-columns: repeat(3, minmax(190px, 1fr));
  }

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

  .fabric-offer-addons__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  #labelingMensColumn,
  #labelingWomensColumn,
  #labelingSharedColumn {
    grid-template-columns: 1fr;
  }

  .col-8,
  .col-6,
  .col-4,
  .col-3 {
    grid-column: span 12;
  }

  #b2bLanguageGroupContainer .option-grid--chips {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tryon-row__grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tryon-options .option-grid {
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .topbar__inner {
    width: calc(100% - 20px);
    min-height: 52px;
  }

  .topbar__brand {
    font-size: 15px;
  }

  .topbar__nav {
    display: none;
  }

  .wizard-shell {
    width: calc(100% - 16px);
    padding-top: 22px;
  }

  .page-header {
    margin-bottom: 20px;
  }

  .page-header h2 {
    font-size: 24px;
  }

  .page-header p {
    font-size: 16px;
  }

  .tryon-stock .input {
    height: 38px;
  }

  .tryon-stock {
    grid-template-columns: minmax(190px, 280px);
    margin-left: 0;
  }

  .wizard-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .wizard-toolbar__buttons {
    justify-content: flex-start;
  }

  .wizard-step:not(:last-child)::after {
    display: none;
  }

  .wizard-steps {
    gap: 10px;
  }

  .wizard-step__label {
    white-space: normal;
  }

  .form-card {
    padding: 18px 14px 16px;
  }

  .step-intro__title {
    font-size: 20px;
  }

  .step-intro__text {
    font-size: 16px;
  }

  .form-block h3 {
    font-size: 18px;
    margin-bottom: 14px;
  }

  .confirmation-summary__row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .confirmation-summary__section-title {
    font-size: 18px;
  }

  .label,
  label {
    font-size: 13px;
  }

  .input,
  input,
  select {
    height: 44px;
    font-size: 15px;
  }

  .choice-group legend {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .option-label {
    font-size: 15px;
  }

  #b2bLanguageGroupContainer .option-grid--chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .branding-hero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .product-offer-card__title {
    font-size: 16px;
  }

  .product-offer-card__meta {
    min-height: calc(1.3em * 2);
  }

  .option-card--hero__label {
    min-height: 44px;
    font-size: 14px;
    padding: 7px 10px;
  }

  .product-offer-grid {
    grid-template-columns: 1fr;
  }

  .choice-group[data-group="fabricOffer"] .option-grid {
    grid-template-columns: 1fr;
  }

  .fabric-offer-addons__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .phone-inline {
    display: flex;
    gap: 8px;
  }

  .phone-inline > select {
    flex-basis: 106px;
  }

  .wizard-nav {
    flex-wrap: wrap;
  }

  .wizard-nav__draft-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .wizard-nav__draft-actions .btn {
    width: 100%;
  }

  .wizard-nav__spacer {
    display: none;
  }

  .btn--link {
    font-size: 15px;
    width: 100%;
    justify-content: flex-start;
  }
}


/* vendor/formens/registration-history.css */
/* Registration history uses the existing form typography, colours and buttons. */
.registration-history .form-card { padding: 24px 28px; }
.registration-history .step-intro { margin-bottom: 20px; }
.registration-history .form-block { margin: 0; }
.history-columns, .history-row { display: grid; grid-template-columns: minmax(180px, 1.45fr) minmax(110px, .65fr) minmax(115px, .65fr) minmax(290px, 1.25fr); gap: 24px; }
.history-columns { padding: 0 18px 10px; font-size: 13px; font-weight: 600; color: var(--muted, #64748b); }
.history-row { padding: 16px 18px; align-items: center; border-bottom: 1px solid var(--border); font-size: 14px; line-height: 1.4; }
.history-row:last-child { border-bottom: 0; }
.history-customer { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.history-customer .company { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.history-row .help { margin: 0; font-size: 13px; }
.history-actions { display: grid; grid-template-columns: 180px 32px; align-items: center; justify-content: start; gap: 8px 12px; }
.history-actions a.btn { grid-column: 1; grid-row: 1; justify-self: stretch; width: 100%; max-width: 100%; text-decoration: none; }
.history-actions .btn { min-height: 36px; padding: 7px 12px; font-size: 13px; }
.history-actions .ticket-note { grid-column: 1 / -1; grid-row: 2; }
.mobile-label { display: none; }
#removeRegistrationDialog { width: min(540px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-card, 10px); color: inherit; }
#removeRegistrationDialog::backdrop { background: rgba(15,23,42,.4); }
:root.is-embedded #removeRegistrationDialog {
  position: absolute;
  inset: auto auto auto var(--embedded-visible-center-x, 50%);
  top: var(--embedded-visible-center, var(--history-dialog-anchor-center, 50vh));
  width: min(540px, calc(var(--embedded-visible-width, 100vw) - 24px));
  max-height: calc(var(--embedded-visible-height, 100vh) - 24px);
  margin: 0;
  overflow-y: auto;
  transform: translate(-50%, -50%);
}
#removeRegistrationDialog h3 { margin: 0 0 14px; font: inherit; font-size: 20px; font-weight: 600; }
#removeRegistrationDialog p { overflow-wrap: anywhere; line-height: 1.5; }
.history-dialog-actions { margin-top: 24px; display: flex; justify-content: flex-end; gap: 10px; }
#removeRegistrationError { color: #b91c1c; }
@media(max-width: 1000px) {
 .history-columns { display:none; }
 .history-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px 20px; }
 .history-customer, .history-actions { grid-column: 1 / -1; }
 .mobile-label { display:block; font-size:12px; color:#64748b; margin-bottom:3px; }
 .registration-history .form-card { padding:20px; }
}

/* Ticket access is primary; list maintenance remains secondary. */
.history-status .status { font-weight: 700; color: #111827; }
.history-actions { position: relative; }
.registration-history #registrations { overflow: visible; }
.history-more { position: relative; grid-column: 2; grid-row: 1; }
.history-more summary { display: flex; align-items: center; justify-content: center; width: 32px; height: 36px; cursor: pointer; list-style: none; font-size: 23px; line-height: 1; color: #64748b; border-radius: 4px; }
.history-more summary::-webkit-details-marker { display: none; }
.history-more summary:hover, .history-more[open] summary { background: transparent; color: #111827; }
.history-more summary:focus-visible { outline: 2px solid #111827; outline-offset: 2px; }
.history-more__menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; width: max-content; background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 4px; box-shadow: 0 2px 6px rgba(15,23,42,.08); }
.history-more__menu button { display: block; width: 100%; min-height: 32px; padding: 6px 10px; border: 0; border-radius: 3px; background: transparent; color: #374151; text-align: left; white-space: nowrap; font: inherit; font-size: 13px; line-height: 20px; cursor: pointer; }
.history-more__menu button:hover { background: #f5f5f5; color: #111827; }
.history-more__menu button:focus-visible { outline: 2px solid #111827; outline-offset: -2px; }

#removeRegistrationDialog .remove-registration-description { margin: 0 0 8px; font-size: 16px; }
#removeRegistrationDialog #removeRegistrationMessage { margin: 0; }


/* vendor/formens/picker.css */
/* Verbatim from claudiu/b2b-new-customer-registration-form styles.css (country-picker / phone-prefix-picker).
   Reused by Formens Surveys for every searchable select. Do not edit here. */
.country-picker,
.phone-prefix-picker {
  position: relative;
  display: block;
  min-width: 0;
}
.country-picker__trigger,
.phone-prefix-picker__trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  text-align: left;
  cursor: pointer;
  background: var(--surface);
  background-image: none;
  font: inherit;
  color: inherit;
}
.country-picker__trigger:focus-visible,
.phone-prefix-picker__trigger:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
.country-picker__flag,
.phone-prefix-picker__flag {
  display: block;
  width: 18px;
  height: 13px;
  object-fit: cover;
  border-radius: 0 !important;
  clip-path: none !important;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.1);
}
.country-picker__flag--empty,
.phone-prefix-picker__flag--empty {
  background: var(--surface-muted);
}
.country-picker__label,
.phone-prefix-picker__label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.country-picker__label--placeholder,
.phone-prefix-picker__label--placeholder {
  color: var(--muted);
}
.phone-prefix-picker__label {
  flex: 0 1 auto;
  font-variant-numeric: tabular-nums;
}
.country-picker__chevron,
.phone-prefix-picker__chevron {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-left: auto;
  background: var(--select-caret-icon) center / 16px 16px no-repeat;
}
.country-picker__menu,
.phone-prefix-picker__menu {
  position: fixed;
  z-index: 1000;
  width: 320px;
  max-width: calc(100vw - 24px);
  overflow: hidden;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-strong, #cbd5e1);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}
.country-picker__options,
.phone-prefix-picker__options {
  max-height: 208px;
  overflow: auto;
  padding: 5px;
  margin: 0;
  list-style: none;
}
.country-picker__search-wrap,
.phone-prefix-picker__search-wrap {
  padding: 8px;
  border-bottom: 1px solid var(--border);
}
.country-picker__search,
.phone-prefix-picker__search {
  width: 100%;
  margin: 0;
}
.country-picker__option,
.phone-prefix-picker__option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: var(--f-sm);
  line-height: 1.3;
}
.country-picker__option--active,
.phone-prefix-picker__option--active {
  background: var(--surface-muted);
}
.country-picker__option--selected,
.phone-prefix-picker__option--selected {
  font-weight: 600;
}
.country-picker__option-name,
.phone-prefix-picker__option-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.phone-prefix-picker__option-code {
  flex: 0 0 auto;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.country-picker__empty,
.phone-prefix-picker__empty {
  padding: 10px 8px;
  color: var(--muted);
  font-size: var(--f-sm);
}


/* css/surveys.css */
/* Formens Surveys components.
   Built only from the reference tokens and patterns in vendor/formens/*.css
   (B2B New Customer Registration): border-only separation, 8px radius, black
   primary, plain-text statuses (no coloured badges), separated lists instead
   of cards inside cards. */

:root {
  /* Current reference styles.css: application containers use border-only separation. */
  --shadow-card: none;
  --line-strong: #111;
  --track: #e4e7ec;
  /* One motion and one focus ring for every interactive element. */
  --motion: 0.16s ease;
  --focus-ring: 0 0 0 2px rgba(15, 23, 42, 0.12);
}

a {
  color: inherit;
}

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

.topbar__nav a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  text-decoration: none;
}

.topbar__nav a:hover,
.topbar__nav a[aria-current="page"] {
  color: #fff;
}

.topbar__nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 6px;
}

.topbar__user {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.topbar__brand a {
  color: #fff;
  text-decoration: none;
}

.app-main {
  min-height: calc(100vh - 64px);
}

.loading,
.empty-state {
  margin: 0;
  padding: 24px 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.status-text {
  font-weight: 600;
  color: #111827;
}

.status-text--muted {
  font-weight: 500;
  color: var(--muted);
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.inline-actions--end {
  justify-content: flex-end;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

a.btn {
  text-decoration: none;
}

/* ------------------------------------------------------- separated lists */

.list-columns,
.list-row {
  display: grid;
  grid-template-columns: var(--columns, 1fr);
  gap: 20px;
  align-items: center;
}

.list-columns {
  padding: 0 18px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.list-row {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.4;
}

.list-row:last-child {
  border-bottom: 0;
}

.list-row > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.list-row__title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.list-row__title strong,
.list-row__title a {
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.list-row__title a {
  text-decoration: none;
}

.list-row__title a:hover {
  text-decoration: underline;
}

.list-row .help {
  margin: 0;
}

.mobile-label {
  display: none;
}

/* ---------------------------------------------------------------- filters */

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  align-items: end;
  margin: 0 0 16px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.filters .field {
  gap: 6px;
}

.filters .label {
  font-size: 14px;
}

/* ------------------------------------------------------------------- tabs */

.tabs {
  display: flex;
  gap: 28px;
  margin: 0 0 24px;
  border-bottom: 1px solid var(--border);
}

.tabs__tab {
  position: relative;
  border: 0;
  background: transparent;
  padding: 0 0 12px;
  color: #707787;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}

.tabs__tab:hover {
  color: #111;
}

.tabs__tab[aria-selected="true"],
.tabs__tab[aria-current="page"] {
  color: #111;
}

.tabs__tab[aria-selected="true"]::after,
.tabs__tab[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--line-strong);
}

/* ------------------------------------------------------ progress and stats */

.progress {
  display: grid;
  gap: 6px;
}

.progress__track {
  height: 6px;
  border-radius: 999px;
  background: var(--track);
  overflow: hidden;
}

.progress__fill {
  height: 100%;
  border-radius: inherit;
  background: var(--line-strong);
  transition: width 0.2s ease;
}

.progress__label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.stat-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  margin-bottom: 24px;
}

.stat {
  padding: 16px 18px;
}

.stat + .stat {
  border-left: 1px solid var(--border);
}

.stat__value {
  display: block;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
}

.stat__label {
  color: var(--muted);
  font-size: 13px;
}

/* ------------------------------------------------------------ survey form */

.save-state {
  color: var(--muted);
  font-size: 13px;
}

.save-state[data-state="error"] {
  color: var(--danger);
}

.select-filter {
  margin-bottom: 8px;
}

.confirmation-panel__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 22px;
}

.icon-btn {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: #111;
  font: inherit;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
}

.icon-btn:hover {
  border-color: #111;
}

.icon-btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

.savebar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  margin-top: 24px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.check-list {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 8px 12px;
  display: grid;
  gap: 2px;
}

.check-list .option-card {
  width: 100%;
  min-height: 32px;
}

.problem-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  color: #951a35;
  font-size: 13px;
}

/* ------------------------------------------------------------------ audit */

.details-json {
  margin: 6px 0 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--surface-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------------ modal */

.restriction-modal__panel--wide {
  width: min(960px, calc(100vw - 28px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.restriction-modal__actions {
  gap: 8px;
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 1000px) {
  .list-columns {
    display: none;
  }

  .list-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px 20px;
  }

  .list-row > :first-child,
  .list-row > .list-row__actions {
    grid-column: 1 / -1;
  }

  .mobile-label {
    display: block;
    margin-bottom: 3px;
    color: #64748b;
    font-size: 12px;
  }

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

  .stat:nth-child(3) {
    border-left: 0;
  }

  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }

}

@media (max-width: 760px) {
  .topbar__nav {
    display: flex;
    gap: 14px;
  }

  .topbar__nav a {
    font-size: 14px;
  }

  .topbar__user {
    display: none;
  }

  .wizard-nav {
    flex-wrap: wrap;
  }

  .savebar {
    flex-direction: column;
    align-items: stretch;
  }

}

/* ===================================================== revision components */

.icon {
  flex: 0 0 auto;
  display: block;
}

.icon-btn .icon {
  margin: auto;
}

.btn .icon {
  margin-left: -2px;
}

.search-select__check {
  width: 16px;
  display: inline-grid;
  place-items: center;
}

.search-select__hint {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

/* Overflow menu (reference .history-more) */
.overflow-menu summary {
  width: 44px;
  height: 44px;
  border: 1px solid #111;
  border-radius: 8px;
  background: #fff;
  color: #111;
}

.overflow-menu summary:hover {
  background: #f7f8fa;
}

.overflow-menu .history-more__menu {
  min-width: 180px;
}

.overflow-menu .history-more__menu button.is-danger {
  color: var(--danger);
}

.overflow-menu--compact summary {
  width: 36px;
  height: 36px;
  border-color: var(--border);
}

.overflow-menu {
  grid-column: auto;
  grid-row: auto;
}

/* ------------------------------------------------------------- builder */

.builder-header .wizard-toolbar__buttons {
  align-items: center;
}

.builder-notice {
  margin: -16px 0 24px;
}

.builder-tabs {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  overflow: visible;
}

.builder-tabs__list {
  display: flex;
  gap: 28px;
}

.save-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.save-status[data-state="saved"] {
  color: var(--success);
}

.save-status[data-state="error"] {
  color: var(--danger);
  white-space: normal;
}

.save-status .btn--link {
  font-size: 13px;
}

/* ------------------------------------------------------------------
   Builder canvas. One scale with the rest of the app:
   controls 44px (inputs, buttons) or 36px (small buttons, chips, icon
   buttons in card heads); labels 14/500, help and meta 13, group labels
   13/600 muted, item titles 16/500; radius 8 (circles only for numbers).
------------------------------------------------------------------ */
.readiness-line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: -12px 0 20px;
  font-size: 13px;
  color: var(--muted);
}

.readiness-line:empty {
  display: none;
}

.readiness-line .icon {
  flex: 0 0 auto;
  margin-top: 1px;
}

.readiness-line[data-state="ok"] {
  color: var(--success);
}

.readiness-line[data-state="problem"] {
  color: var(--danger);
}

.publish-button[disabled] {
  opacity: 0.45;
}

.canvas {
  display: grid;
  gap: 16px;
}

.canvas .form-card + .form-card {
  margin-top: 0;
}

.canvas-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.canvas-list {
  display: grid;
  gap: 12px;
}

/* Cards (questions and sections) share one frame and one motion. */
.q-card,
.section-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  transition: border-color var(--motion), box-shadow var(--motion), opacity var(--motion);
}

.q-card:hover,
.section-card:hover {
  border-color: rgba(15, 23, 42, 0.28);
}

.q-card.is-active {
  border-color: #111;
}

.q-card.is-dragging,
.section-card.is-dragging {
  opacity: 0.4;
}

.drop-before {
  box-shadow: 0 -2px 0 #111 !important;
}

.drop-after {
  box-shadow: 0 2px 0 #111 !important;
}

.q-card__head,
.section-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 12px 10px 8px;
}

.q-card__handle {
  flex: 0 0 auto;
  width: 24px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  cursor: grab;
  color: #9aa1ad;
  transition: color var(--motion), background-color var(--motion);
}

.q-card__handle:hover {
  color: #111;
  background: var(--surface-muted);
}

.q-card__handle:active {
  cursor: grabbing;
}

.q-card__summary {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

/* Number badge: 24px circle, the same in collapsed and open cards. */
.q-card__number {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 999px;
  border: 1px solid #cfd3db;
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  transition: background-color var(--motion), border-color var(--motion), color var(--motion);
}

.q-card.is-active .q-card__number {
  margin-top: 0;
  border-color: #111;
  background: #111;
  color: #fff;
}

.q-card__eyebrow,
.section-card__eyebrow {
  flex: 1 1 auto;
  align-self: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.q-card__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.q-card__label {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.q-card__label.is-empty {
  color: var(--muted);
  font-style: italic;
}

.q-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  color: var(--muted);
  font-size: 13px;
}

.q-card__logic {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.q-editor,
.section-card__body {
  display: grid;
  gap: 16px;
  padding: 0 20px 20px 54px;
}

.q-body {
  display: grid;
  gap: 8px;
}

.q-body--inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.q-body--inline .label {
  font-weight: 400;
  color: var(--muted);
}

/* Options: glyph, 44px input, country limit, remove. */
.q-options {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.q-option__row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto 36px;
  gap: 10px;
  align-items: center;
}

.q-option__dot,
.q-option__box,
.q-option__num {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 1px solid #9aa1ad;
  border-radius: 999px;
}

.q-option__box {
  border-radius: 3px;
}

.q-option__num {
  width: auto;
  height: auto;
  border: 0;
  color: var(--muted);
  font-size: 13px;
}

.q-option__country {
  height: 36px;
  min-width: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color var(--motion), color var(--motion), background-color var(--motion);
}

.q-option__country:hover {
  border-color: #111;
  color: #111;
}

.q-option__country.is-on {
  border-color: #111;
  color: #111;
  font-weight: 500;
}

.q-option__limit {
  display: grid;
  gap: 6px;
  margin: 4px 46px 6px 30px;
}

.q-add-option.btn--link {
  justify-self: start;
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 30px;
  font-size: 15px;
}

.icon-btn--quiet {
  border-color: transparent;
  color: var(--muted);
}

.icon-btn--quiet:hover {
  border-color: var(--border);
  color: #111;
}

/* Logic and more options: a quiet inset panel inside the open card. */
.q-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-card);
  background: var(--surface-muted);
}

.q-section__title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.q-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.q-footer__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Chips: the reference small button (36px, 13px), pressed = black outline on grey. */
.q-chip {
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: #fff;
  color: #111;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--motion), background-color var(--motion);
}

.q-chip:hover {
  border-color: #111;
}

.q-chip.is-on {
  border-color: #111;
  background: var(--surface-muted);
}

/* Required switch (reference product-toggle proportions). */
.q-required {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.q-required input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.q-required__track {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #cfd3db;
  transition: background-color var(--motion);
}

.q-required__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fff;
  transition: transform var(--motion);
}

.q-required input:checked + .q-required__track {
  background: #111;
}

.q-required input:checked + .q-required__track::after {
  transform: translateX(16px);
}

.q-required input:focus-visible + .q-required__track {
  box-shadow: var(--focus-ring);
}

/* Section card: same frame as a question card, grey so sections read as dividers. */
.canvas-add {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Answer type picker. */
.add-panel {
  padding: 20px;
  border: 1px solid #111;
  border-radius: var(--radius-card);
  background: #fff;
}

.add-panel--inline {
  margin-top: 8px;
}

.add-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.add-panel__title {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.type-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
}

.type-menu__group {
  display: grid;
  gap: 6px;
  align-content: start;
}

.type-menu__label {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.type-menu__item {
  display: grid;
  gap: 2px;
  min-height: 56px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--motion), background-color var(--motion);
}

.type-menu__item:hover {
  border-color: #111;
}

.type-menu__item strong {
  font-size: 15px;
  font-weight: 500;
}

.type-menu__item span {
  color: var(--muted);
  font-size: 13px;
}

.type-menu__item:focus-visible {
  border-color: #111;
  outline: none;
  box-shadow: var(--focus-ring);
}

.settings-stack {
  display: grid;
  gap: 32px;
}

.settings-stack .form-card + .form-card {
  margin-top: 0;
}

.choice-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.choice-tile {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: #fff;
  cursor: pointer;
}

.choice-tile input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: #000;
}

.choice-tile > span {
  display: grid;
  gap: 4px;
}

.choice-tile strong {
  font-size: 15px;
  font-weight: 500;
}

.choice-tile.is-checked {
  border-color: #111;
}

.choice-tile.is-disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.choice-tile.is-disabled.is-checked {
  opacity: 1;
}

.settings-note {
  margin-top: 10px;
}

.settings-grid {
  margin-top: 28px;
}

.audience-list {
  margin-top: 20px;
}

.audience-count {
  margin: 16px 0 0;
  font-weight: 500;
}

.check-list__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.check-list__tools .input {
  max-width: 360px;
}

.check-list__item {
  display: grid !important;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 8px;
}

.check-list__hint {
  color: var(--muted);
  font-size: 13px;
}

.savebar {
  margin-top: 0;
  padding: 16px 0;
}

.publish-summary {
  margin-top: 12px;
}

@media (max-width: 760px) {
  .builder-tabs {
    flex-direction: column;
    align-items: stretch;
  }

  .save-status {
    padding: 0 0 8px;
  }

  .topbar__nav button {
    font-size: 14px;
  }

}

.nowrap {
  white-space: nowrap;
}

.filters--compact {
  grid-template-columns: minmax(240px, 2fr) minmax(180px, 1fr);
}

.list-summary {
  margin: 0 0 8px;
}

.list-row .progress {
  max-width: 220px;
}

.empty-state .btn {
  margin-top: 12px;
}

@media (max-width: 760px) {
  .filters--compact {
    grid-template-columns: 1fr;
  }

}

.menu-button__caret {
  opacity: 0.7;
}

.menu-button__link {
  display: block;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 3px;
  color: #374151;
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
  white-space: nowrap;
}

.menu-button__link:hover {
  background: #f5f5f5;
  color: #111827;
}

.list-row__button {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.list-row__button:hover {
  text-decoration: underline;
}

.inline-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.more-filters {
  margin: -6px 0 16px;
}

.more-filters summary {
  cursor: pointer;
  font-size: 14px;
  color: #334155;
}

.filters--plain {
  border-top: 0;
  padding-top: 12px;
}

.revision-tabs {
  margin-bottom: 16px;
}

.revision-tabs .btn[aria-pressed="true"] {
  background: #111 !important;
  border-color: #111 !important;
  color: #fff !important;
}

.pager {
  margin-top: 16px;
}

.slot-gap:not(:empty) {
  margin-top: 32px;
}

.slot-gap + .form-card {
  margin-top: 32px;
}

.form-card > .filters:first-child {
  border-top: 0;
  padding-top: 0;
}

@media (max-width: 760px) {
  .topbar__inner {
    flex-wrap: wrap;
    row-gap: 6px;
    padding: 10px 0 8px;
    min-height: 0;
  }

  .topbar__brand {
    white-space: nowrap;
  }

  .topbar__nav {
    width: 100%;
    gap: 18px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .topbar__nav > :last-child {
    margin-left: auto;
  }

}

@media (max-width: 760px) {
  .q-card.is-active .q-card__head {
    flex-wrap: wrap;
  }

  .q-editor {
    padding: 0 14px 14px;
  }

  .q-option__row {
    grid-template-columns: 16px minmax(0, 1fr) auto 32px;
    gap: 6px;
  }

  .q-option__country {
    padding: 0 6px;
  }

  .q-option__limit {
    margin: 4px 0 4px 26px;
  }

  .canvas-head {
    padding: 18px 14px;
  }

}

/* Logic in plain words */
.q-logic {
  display: grid;
  gap: 12px;
}

.q-logic__row {
  display: grid;
  gap: 6px;
}

.q-logic__label {
  font-size: 13px;
  font-weight: 500;
  color: #334155;
}

.q-logic__row > .input,
.q-logic__row > select {
  max-width: 520px;
}

.q-logic__answers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Logic answers: visible checkboxes in the reference toggle box (tick the answers). */
.q-logic__answer {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: border-color var(--motion), background-color var(--motion);
}

.q-logic__answer input {
  position: static;
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #000;
  cursor: pointer;
}

.q-logic__answer:hover {
  border-color: #111;
}

.q-logic__answer.is-on {
  border-color: #111;
  background: #fff;
  font-weight: 500;
}

.q-logic__answer:has(input:focus-visible) {
  box-shadow: var(--focus-ring);
}

.q-logic__number {
  width: 120px;
}

.q-logic__sentence {
  margin: 0;
  color: #334155;
  font-size: 14px;
}

/* =======================================================================
   Layout system for a survey app, built from the reference values:
   page frames, headers, cards, lists, sign-in and dialogs.
   ======================================================================= */

.app-shell {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
  padding: 40px 0 72px;
}

.app-shell--reading {
  width: min(760px, calc(100% - 32px));
}

.app-shell > * + * {
  margin-top: 24px;
}

.app-shell > .back-link + * {
  margin-top: 0;
}

.back-link {
  display: inline-flex;
  margin-bottom: 16px;
  font-size: 15px;
  text-decoration: none;
}

/* Reference workspace header: a white box with the page title and its one action. */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.app-header__text {
  min-width: 0;
}

.app-header__title {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.app-header__subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.app-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

/* Reference form-page header: centred title and one muted line, no box. */
.page-header {
  margin-bottom: 0;
}

.page-header__title {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.app-shell .page-header + * {
  margin-top: 32px;
}

.page-header__actions {
  margin-top: 16px;
}

/* Cards inside admin pages: the reference workspace inset. */
.app-shell--app .form-card {
  padding: 24px 28px 28px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
}

.card-note {
  margin: -12px 0 20px;
  color: var(--muted);
  font-size: 13px;
}

/* Lists: rows sit in one bordered container (reference .tryon-list), column labels above. */
.list {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  overflow: hidden;
}

.list:empty {
  display: none;
}

.list-row {
  padding: 16px 20px;
}

.list-columns {
  padding: 0 20px 8px;
}

.list-summary {
  margin: 0 0 8px;
}

/* Agent survey list */
.survey-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.survey-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 28px;
}

.survey-item + .survey-item {
  border-top: 1px solid var(--border);
}

.survey-item__main {
  min-width: 0;
}

.survey-item__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.survey-item__title a {
  text-decoration: none;
}

.survey-item__title a:hover {
  text-decoration: underline;
}

.survey-item__description {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.survey-item__meta {
  margin: 8px 0 0;
  font-size: 13px;
  color: #334155;
}

.survey-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 0;
}

.survey-item__label {
  margin-right: 6px;
}

.survey-item__sep {
  margin: 0 6px;
  color: #98a2b3;
}

/* "Survey status: ● Open": the dot sits right against its word, in the state's colour (open and completed green,
   expired red, closed grey). */
.survey-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.survey-state::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #667085;
}

.survey-state--open {
  color: #067647;
}

.survey-state--open::before {
  background: #12b76a;
}

.survey-state--completed {
  color: #067647;
}

.survey-state--completed::before {
  background: #067647;
}

.survey-state--expired::before {
  background: #d92d20;
}

.survey-item__action {
  flex-shrink: 0;
}

.survey-group-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

/* Dialogs: one rhythm for every popup */
.restriction-modal__panel {
  width: min(480px, calc(100vw - 32px));
  padding: 28px 28px 24px;
}

.restriction-modal__title {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
}

.restriction-modal__message {
  margin-top: 8px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.restriction-modal__panel > .grid-12,
.restriction-modal__panel > div:not(.restriction-modal__actions) {
  margin-top: 20px;
}

.restriction-modal .field-error:empty {
  display: none;
}

.restriction-modal__actions {
  margin-top: 28px;
  gap: 8px;
}

.restriction-modal__actions .btn {
  min-width: 96px;
}

.restriction-modal .problem-list {
  font-size: 14px;
}

@media (max-width: 760px) {
  .app-shell {
    width: calc(100% - 24px);
    padding-top: 20px;
  }

  .app-header {
    flex-direction: column;
    align-items: stretch;
    padding: 18px 16px;
    gap: 14px;
  }

  .app-header__actions {
    justify-content: flex-start;
  }

  .app-shell--app .form-card {
    padding: 18px 14px;
  }

  .survey-item {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 18px 16px;
  }

  .survey-item__action .btn {
    width: 100%;
  }

  .restriction-modal__panel {
    padding: 22px 18px 18px;
  }

}

.empty-card p {
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.subject-card .list {
  margin-top: 4px;
}

.code-input.input {
  font-size: 20px;
  letter-spacing: 0.2em;
}

.resend-note {
  display: block;
  margin-top: 4px;
  font-size: 13px;
}

@media (max-width: 760px) {
  .subject-card .card-head {
    flex-direction: column;
    align-items: stretch;
  }

}

.card-head--stack {
  display: block;
}

.card-head--stack .card-note {
  margin: 6px 0 0;
}

.app-shell--builder {
  width: min(960px, calc(100% - 48px));
}

.builder-header + .readiness-line {
  margin: 10px 0 0;
}

@media (max-width: 760px) {
  .app-shell--builder {
    width: calc(100% - 24px);
  }

}

.code-input.input::placeholder {
  letter-spacing: normal;
  font-size: 16px;
}

/* Agent: customers / countries to answer for */
.subject-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.subject-list:empty {
  display: none;
}

.subject-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
}

.subject-row + .subject-row {
  border-top: 1px solid var(--border);
}

.subject-row__main {
  min-width: 0;
}

.subject-row__name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.subject-row__meta {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.subject-row__meta .is-done {
  color: #111827;
  font-weight: 600;
}

.subject-row__meta .is-active {
  color: #111827;
}

.subject-row .btn {
  flex-shrink: 0;
}

/* Settings: one card, divided sections, save at its foot */
.settings-block + .settings-block {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.settings-block__title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 500;
}

.settings-block__note {
  margin: -8px 0 16px;
}

.settings-card .savebar {
  position: static;
  margin: 28px -28px -28px;
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  background: var(--surface-muted);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}

@media (max-width: 760px) {
  .settings-card .savebar {
    margin: 24px -14px -18px;
    padding: 14px;
  }

}

/* Success dialog: one centred composition */
.restriction-modal__panel--centered {
  width: min(420px, calc(100vw - 32px));
  padding: 32px 28px 24px;
  text-align: center;
}

.restriction-modal__panel.restriction-modal__panel--centered > .confirmation-panel__icon {
  margin: 0 auto 16px;
}

.restriction-modal__panel--centered .restriction-modal__message {
  white-space: pre-line;
  color: #334155;
}

.restriction-modal__panel--centered .restriction-modal__actions {
  justify-content: center;
  flex-wrap: wrap;
}

.submitted-dialog__meta {
  margin: 8px 0 0 !important;
  color: var(--muted);
  font-size: 13px;
}

.publish-summary {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: #334155;
  font-size: 16px;
}

.survey-form__nav {
  margin-top: 32px;
}

.survey-form__status {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.survey-form__progress {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #121a29;
}

.survey-form__progress.is-error {
  color: var(--danger);
}

.survey-form__note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.survey-form__nav .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Sign-in: the reference form-card with its step-intro, nothing around it. */
.auth-card form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.auth-card form > * {
  grid-column: 1 / -1;
}

.auth-card .btn--primary {
  width: 100%;
}

.auth-card .step-intro__text strong {
  color: #121a29;
  font-weight: 500;
}

.auth-card__back {
  display: inline-flex;
  margin-bottom: 16px;
  font-size: 14px;
}

.auth-card__aside {
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* Under the sign-in card: the other way to sign in (admins with a password), quiet. */
.app-shell--auth .auth-below {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.auth-below .btn--link {
  font-size: 14px;
}

.auth-card__aside .btn--link {
  font-size: 14px;
}

@media (max-width: 760px) {
  .survey-form__nav {
    flex-wrap: wrap;
  }

  .survey-form__nav .wizard-nav__spacer {
    display: none;
  }

  .survey-form__nav .btn {
    width: 100%;
  }

}

/* Survey link: the fixed address part and the editable link in one reference input box. */
.link-input {
  display: flex;
  align-items: center;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: #fff;
  overflow: hidden;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.link-input:hover {
  border-color: rgba(15, 23, 42, 0.24);
}

.link-input:focus-within {
  border-color: #0f172a;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.12);
}

.link-input__base {
  flex: 0 0 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 0 0 16px;
  color: var(--muted);
  font-size: 16px;
}

.link-input .link-input__control {
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
  padding: 0 16px 0 1px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.link-input .link-input__control:focus {
  box-shadow: none;
}

.link-input.is-disabled {
  background: #f4f5f7;
}

.link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.link-row__address {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 16px;
  color: #121a29;
}

.link-actions {
  margin-top: 16px;
}

@media (max-width: 760px) {
  .link-row {
    flex-direction: column;
    align-items: stretch;
  }

}

.link-field .field-error:empty {
  display: none;
}

.link-actions {
  margin-top: 20px;
}

/* Long checkbox labels in settings wrap inside their column instead of running into the next one. */
.settings-card .option-card {
  align-items: flex-start;
}

.settings-card .option-label {
  white-space: normal;
}

.settings-card .option-card input {
  margin-top: 2px;
  flex-shrink: 0;
}

body:not(:has(.topbar)) .app-main {
  min-height: 100vh;
}

/* Links inside list rows read at the row's text size. */
.list-row .btn--link {
  font-size: 14px;
}

.details-json {
  margin: 8px 0 0;
}

/* Reduced motion: keep state changes, drop the movement. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

}

/* Repeating rows of fields (agent customers): 44px controls, remove button centred on the row. */
.sub-list {
  display: grid;
  gap: 8px;
}

.sub-row {
  display: grid;
  grid-template-columns: var(--columns, 1fr auto);
  gap: 10px;
  align-items: center;
}

.add-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}

@media (max-width: 760px) {
  .sub-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
  }

  .sub-row > :nth-child(2) {
    grid-column: 1 / -1;
  }

}

/* "More" menus inside cards and lists: the reference borderless trigger. */
.list-row .overflow-menu summary,
.q-card .overflow-menu summary,
.section-card .overflow-menu summary,
.overflow-menu--compact summary {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  transition: background-color var(--motion), color var(--motion);
}

.list-row .overflow-menu summary:hover,
.q-card .overflow-menu summary:hover,
.section-card .overflow-menu summary:hover,
.overflow-menu--compact summary:hover,
.overflow-menu[open] summary {
  background: #e9eaee;
  color: #111;
}

.app-shell--builder .builder-tabs {
  margin-bottom: 20px;
}

/* Survey details: one compact card. */
.canvas-head.form-card {
  padding: 20px 24px;
}

/* Questions: compact white rows. */
.canvas-list {
  gap: 8px;
}

.q-card__head {
  min-height: 52px;
  padding: 8px 8px 8px 4px;
  gap: 8px;
}

.q-card__summary {
  gap: 10px;
}

.q-card__number {
  width: 22px;
  height: 22px;
  font-size: 11px;
}

.q-card__label {
  font-size: 15px;
  line-height: 1.35;
}

.q-card__meta {
  font-size: 12px;
}

/* The question being edited: lifted above the others, tools grouped inside. */
.q-card.is-active {
  border-color: #111;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.1);
  margin: 6px 0;
}

.q-card.is-active .q-card__head {
  border-bottom: 1px solid var(--border);
}

.q-card__eyebrow {
  font-size: 12px;
}

.q-editor {
  gap: 14px;
  padding: 16px 20px 16px 38px;
}

/* Options: a quiet list; the answer glyph shows the kind of choice. */
.q-options {
  gap: 6px;
}

.q-option__row {
  grid-template-columns: 18px minmax(0, 1fr) auto 32px;
  gap: 8px;
}

.q-option__country {
  height: 32px;
  padding: 0 10px;
  border-color: transparent;
  background: transparent;
  font-size: 12px;
}

.q-option__country:hover {
  border-color: var(--border);
  background: #fff;
}

.q-option__country.is-on {
  border-color: #111;
  background: #fff;
}

.q-option__limit {
  margin: 2px 40px 4px 26px;
}

.q-add-option.btn--link {
  margin-left: 26px;
  font-size: 14px;
}

.q-section {
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
}

/* Card footer: Required on the left, the optional tools as small toggles. */
.q-footer {
  padding-top: 12px;
}

.q-chip {
}

.q-chip.is-on {
  border-color: #111;
  background: #111;
  color: #fff;
}

.q-required {
  font-size: 13px;
}

/* Answer type picker: same compact density. */
.add-panel {
  padding: 16px;
}

.add-panel__head {
  margin-bottom: 12px;
}

.add-panel__title {
  font-size: 15px;
}

.type-menu {
  gap: 12px;
}

.type-menu__item {
  min-height: 0;
  padding: 7px 10px;
}

.type-menu__item strong {
  font-size: 14px;
}

.type-menu__item span {
  font-size: 12px;
}

/* Settings tab inside the builder uses the same density. */
.app-shell--builder .settings-block__title,
.app-shell--builder .card-title {
  font-size: 16px;
}

.app-shell--builder .choice-tile strong {
  font-size: 14px;
}

.app-shell--builder .form-card {
  padding: 20px 24px;
}

@media (max-width: 760px) {
  .q-editor {
    padding: 14px 12px 14px 12px;
  }

  .app-shell--builder .form-card,
  .canvas-head.form-card {
    padding: 16px;
  }

}

/* Builder header: compact, so the questions start higher. */
.app-shell--builder .app-header {
  padding: 16px 24px;
}

.app-shell--builder .app-header__title {
  font-size: 18px;
}

.app-shell--builder .app-header__subtitle {
  font-size: 13px;
}

.app-shell--builder > .back-link + * {
  margin-top: 12px;
}

.app-shell--builder .settings-card .savebar {
  margin: 24px -24px -20px;
  padding: 12px 24px;
}

@media (max-width: 760px) {
  .app-shell--builder .settings-card .savebar {
    margin: 20px -16px -16px;
    padding: 12px 16px;
  }

}

/* ------------------------------------------------------------------
   Sections in the builder (task GW0aY0YgCaWyfixIR945k): each section is
   its own container, so where one ends and the next begins is obvious.
   - container: darker than the page, 1px #cfd3db border, 10px radius;
   - head strip: white, "Section N of M", labelled title and intro fields;
   - body: the section's white question cards and its own "Add question".
------------------------------------------------------------------ */
.section-groups {
  display: grid;
  gap: 24px;
}

.section-group {
  border: 1px solid #cfd3db;
  border-radius: 10px;
  background: #e9ebef;
  overflow: hidden;
}

.section-group .section-card,
.section-group .section-card:hover {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 14px 20px 18px;
  border: 0;
  border-bottom: 1px solid #cfd3db;
  border-radius: 0;
  background: #fff;
}

.section-group .section-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0;
}

.section-group .section-card__eyebrow {
  flex: 1 1 auto;
  color: #111;
  font-size: 13px;
  font-weight: 600;
}

.section-group .section-card__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 12px 16px;
  padding: 0;
}

.section-group__questions {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.section-group__empty {
  margin: 0;
  padding: 14px 16px;
  border: 1px dashed #b9bec8;
  border-radius: var(--radius-card);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.section-group .add-panel--inline {
  margin-top: 0;
}

.section-group .q-card.is-active {
  margin: 4px 0;
}

/* A question dragged onto a section heading lands first in that section. */
.section-group .section-card.drop-after {
  box-shadow: inset 0 -2px 0 #111 !important;
}

@media (max-width: 760px) {
  .section-group .section-card__body {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-group .section-card,
  .section-group .section-card:hover {
    padding: 12px 14px 14px;
  }

  .section-group__questions {
    padding: 8px;
  }

}

/* Saved but not yet published: a neutral notice, not a success. */
.readiness-line[data-state="pending"] {
  color: #6b4e00;
}

/* ==================================================================
   Shared frame (task czyjggZX2dLrwApCGIPt9)
   One width per kind of page, the admin top bar aligned with its pages,
   one spacing rhythm, one back link, one focus ring.
   ================================================================== */
:root {
  --w-app: 1040px;      /* every admin page, and the top bar content above it */
  --w-reading: 720px;   /* agent pages and the admin preview: forms never stretch */
  --w-auth: 440px;      /* sign-in */
}

.topbar__inner {
  width: min(var(--w-app), calc(100% - 48px));
}

.app-shell,
.app-shell--builder {
  width: min(var(--w-app), calc(100% - 48px));
  padding: 32px 0 64px;
}

.app-shell--reading {
  width: min(var(--w-reading), calc(100% - 32px));
  padding-top: 24px;
}

/* Sign-in has no header row: the card sits a little below the top, never stuck to it. */
.app-shell--auth {
  width: min(var(--w-auth), calc(100% - 32px));
  padding-top: clamp(32px, 12vh, 112px);
}

.app-shell > * + * {
  margin-top: 20px;
}

.app-shell .page-header + * {
  margin-top: 24px;
}

/* Back link: icon + label, the same on every page. */
.back-link,
.btn--link.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 15px;
  color: #121a29;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.app-shell > .back-link + *,
.app-shell > .brand-bar + * {
  margin-top: 12px;
}

.app-shell--builder > .back-link + * {
  margin-top: 12px;
}

/* Agent page row (no top bar, no app name): back route left, Sign out right. */
.brand-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 32px;
}

.brand-bar .back-link {
  font-size: 14px;
  white-space: nowrap;
}

.brand-bar__action.btn--link {
  color: var(--muted);
  font-size: 14px;
}

.brand-bar__action.btn--link:hover {
  color: #111;
}

.app-shell > .brand-bar + .page-header {
  margin-top: 24px;
}

/* Keyboard focus: one visible ring on every control that has no border of its own. */
a:focus-visible,
summary:focus-visible,
.btn:focus-visible,
.btn--link:focus-visible,
.icon-btn:focus-visible,
.q-card__summary:focus-visible,
.list-row__button:focus-visible,
.tabs__tab:focus-visible,
.type-menu__item:focus-visible,
.q-chip:focus-visible,
.q-option__country:focus-visible,
.topbar a:focus-visible,
.topbar button:focus-visible {
  outline: 2px solid #0f172a;
  outline-offset: 2px;
  box-shadow: none;
}

.topbar a:focus-visible,
.topbar button:focus-visible {
  outline-color: #fff;
}

.choice-tile:has(input:focus-visible) {
  outline: 2px solid #0f172a;
  outline-offset: 2px;
  border-radius: 4px;
}

@media (max-width: 760px) {
  .app-shell,
  .app-shell--builder {
    width: calc(100% - 24px);
    padding: 20px 0 48px;
  }

  .app-shell--reading,
  .app-shell--auth {
    width: calc(100% - 24px);
    padding-top: 16px;
  }

  .app-shell--auth {
    padding-top: 32px;
  }

  .topbar__inner {
    width: calc(100% - 24px);
  }

}

.brand-bar .brand-bar__action.btn--link {
  width: auto;
  flex: 0 0 auto;
  margin-left: auto;
}

/* ==================================================================
   Agent journey (task zW9dYzrqBF3Tc4Unp1FMS)
   ================================================================== */

/* Survey list: one status line; done ones read quieter. */
.survey-item__meta {
  color: #334155;
  font-weight: 500;
}

.survey-item.is-done .survey-item__meta {
  color: var(--muted);
  font-weight: 400;
}

/* The status area under the questions only speaks after a refused submit. */
.survey-form__status:not(:has(.survey-form__progress:not(:empty))):not(:has(.survey-form__note)) {
  display: none;
}

/* Short notices on agent pages (closed, all submitted, nothing assigned). */
.notice-card p {
  margin: 0;
  color: #334155;
  font-size: 15px;
}

/* Submitted customers / countries under the questionnaire. */
.submitted-card .card-title {
  margin: 0 0 14px;
  font-size: 16px;
}

.submitted-card .subject-list {
  margin: 0;
}

/* ==================================================================
   Survey management (task 9RPKDpzoYLS1zYQzFuyaT)
   ================================================================== */
.cell-stack {
  display: grid;
  gap: 2px;
}

.help.is-pending {
  color: #6b4e00;
}

.help.is-problem {
  color: var(--danger);
}

/* Everyday card actions as labelled icon buttons (tooltips + accessible names). */
.q-card__tools {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

/* The single survey status under the title in the builder. */
.survey-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}

.survey-status[data-state="busy"] {
  color: var(--muted);
}

.survey-status[data-state="pending"] {
  color: #6b4e00;
}

.survey-status[data-state="error"] {
  color: var(--danger);
}

.survey-status .btn--link {
  font-size: 13px;
}

/* Empty or failed lists: no column headings or frame around a message. */
.list-columns:has(+ .list > .empty-state),
.list-columns:has(+ .list > .error-summary) {
  display: none;
}

.list:has(> .empty-state),
.list:has(> .error-summary) {
  border: 0;
}

/* First paint while the app loads its data. */
.app-main > .loading {
  padding-top: 64px;
}

.section-group__add.btn {
  justify-self: start;
  width: auto;
  gap: 6px;
}

/* A single checkbox with its label on one line (audit log: "Show automatic data refreshes"). */
.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 12px;
  color: #334155;
  font-size: 14px;
  cursor: pointer;
}

/* A card head's title with its description below (title over text, never overlapping), the action on the right. */
.card-head:has(> div > .card-title + .card-note) {
  align-items: flex-start;
}

.card-head > div > .card-title + .card-note {
  margin: 4px 0 0;
}

/* A note under a table keeps its distance from the table. */
.fc-admin-table + .card-note,
.fc-admin-table + p {
  margin: 14px 0 0;
}

/* When the NAV data was last brought up to date (data-freshness.js): one quiet line. */
.data-fresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.data-fresh:empty {
  display: none;
}

.data-fresh[data-state="problem"] svg {
  color: #b42318;
}



/* The signed-in agent's actions: "Admin" (admins only) just before "Sign out". */
.account-actions {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}


/* css/controls.css */
/* ==================================================================
   Formens Surveys — shared controls and question blocks
   (task pBKXEtokrspUVLy1XqIuh)

   The single source for the size, spacing and states of every control,
   used by the agent form, the admin builder, settings and the preview.
   Loaded after surveys.css; page styles must not resize controls.

   Compact on desktop, accessible targets on touch / small screens:
     control  40px / 15px   (44px / 16px on touch and phones: no iOS zoom)
     small    32px / 14px   (40px on touch)
   ================================================================== */

:root {
  --control-h: 40px;
  --control-h-sm: 32px;
  --control-font: 15px;
  --control-font-sm: 14px;
  --control-pad: 12px;
  --control-radius: 8px;
  --control-border: var(--border);
  --control-border-hover: rgba(15, 23, 42, 0.28);
  --control-focus: #0f172a;
  --control-error-ring: 0 0 0 2px rgba(212, 24, 61, 0.14);
  --field-gap: 6px;
  --question-rule: #e7e9ee;
  --menu-max: 280px;
}

@media (max-width: 760px), (pointer: coarse) {
  :root {
    --control-h: 44px;
    --control-h-sm: 40px;
    --control-font: 16px;
  }
}

/* ------------------------------------------------------------ fields */

.input,
input.input,
select.input,
textarea.input,
.country-picker__trigger,
.search-select .country-picker__trigger {
  height: var(--control-h);
  min-height: var(--control-h);
  padding: 0 var(--control-pad);
  border: 1px solid var(--control-border);
  border-radius: var(--control-radius);
  font-size: var(--control-font);
  line-height: 1.3;
}

textarea.input {
  height: auto;
  min-height: 88px;
  padding: 9px var(--control-pad);
  line-height: 1.45;
}

select.input,
.country-picker__trigger {
  padding-right: 36px;
  background-position: right 12px center !important;
}

.country-picker__trigger {
  position: relative;
}

.country-picker__chevron {
  position: absolute;
  right: 12px;
}

/* Small controls: inline filters and the answer type in a card head. */
.input--sm,
.input--inline,
select.input--inline {
  display: inline-block;
  width: auto;
  height: var(--control-h-sm);
  min-height: var(--control-h-sm);
  padding: 0 32px 0 10px;
  font-size: var(--control-font-sm);
  background-position: right 10px center !important;
}

.input::placeholder,
textarea.input::placeholder {
  color: #8a93a3;
}

/* A select still on its empty choice reads like a placeholder. */
select.input:has(option[value=""]:checked) {
  color: #6b7280;
}

.input:hover:where(:not(:disabled)),
.country-picker__trigger:hover:where(:not(:disabled)) {
  border-color: var(--control-border-hover);
}

.input:disabled,
.country-picker__trigger:disabled,
.input.locked-input {
  background-color: #f4f5f7;
  color: var(--muted);
  cursor: not-allowed;
}

.input.locked-input {
  pointer-events: none;
}

/* One focus treatment for every field (inputs, selects, pickers, the link field). */
.input:focus,
input.input:focus,
select.input:focus,
textarea.input:focus,
.country-picker__trigger:focus-visible,
.country-picker__trigger[aria-expanded="true"],
.link-input:focus-within {
  outline: none;
  border-color: var(--control-focus);
  box-shadow: var(--focus-ring);
}

/* One error treatment: red border + soft ring on the field, the message under it. */
.input[aria-invalid="true"],
input.input[aria-invalid="true"],
select.input[aria-invalid="true"],
textarea.input[aria-invalid="true"],
.country-picker__trigger[aria-invalid="true"],
.link-input:has([aria-invalid="true"]) {
  border-color: var(--danger) !important;
  box-shadow: var(--control-error-ring);
}

/*
 * Completed: the reference green (registration form styles.css). A field holding
 * a valid value keeps it after blur; clearing the value removes it. It never
 * means "saved": nothing is stored before Submit. Error and disabled win.
 */
.is-complete-field:not([aria-invalid="true"]):not(:disabled) {
  background-color: #edf9f0;
  border-color: #6eb38d;
}

.is-complete-field:not([aria-invalid="true"]):not(:disabled):hover {
  background-color: #e6f5eb;
  border-color: #5ca27c;
}

.is-complete-field:not([aria-invalid="true"]):not(:disabled):focus,
.is-complete-field:not([aria-invalid="true"]):not(:disabled):focus-visible,
.country-picker__trigger.is-complete-field[aria-expanded="true"]:not([aria-invalid="true"]) {
  border-color: #4f9470;
  box-shadow: 0 0 0 2px rgba(79, 148, 112, 0.18);
}

/* The completed select keeps its caret (the reference re-asserts it). */
select.input.is-complete-field {
  background-image: var(--select-caret-icon) !important;
}

/* ------------------------------------------------- field anatomy */

.field {
  display: grid;
  gap: var(--field-gap);
  align-content: start;
}

.label,
.field > label.label {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: #121a29;
}

.help {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.field-error {
  min-height: 0;
  margin: 0;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.4;
}

.field-error:empty {
  display: none;
}

/* The message carries an alert icon, so an error does not rely on colour. */
.field-error:not(:empty) {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.field-error .icon {
  flex: 0 0 auto;
  margin-top: 2px;
}

/* ------------------------------------------------- choices */

.choice-group {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.choice-group legend:not(.sr-only) {
  float: left;
  width: 100%;
  margin: 0 0 var(--field-gap);
  padding: 0;
}

.choice-group legend:not(.sr-only) + * {
  clear: both;
}

.choice-group > .help {
  margin: 0 0 8px;
}

.option-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
}

.option-grid--stacked {
  flex-direction: column;
  gap: 4px;
}

.option-grid--chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 24px;
}

.option-grid--chips .option-card {
  justify-self: start;
  max-width: 100%;
}

.option-card {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 28px;
  padding: 3px 0;
  cursor: pointer;
}

.option-card input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: #000;
}

.option-label {
  font-size: var(--control-font);
  font-weight: 400;
  line-height: 1.35;
  white-space: normal;
}

/* Choice states: hover tint, selected label weight (reference), keyboard ring, disabled fade. */
.option-card {
  margin: 0 -6px;
  padding-left: 6px;
  padding-right: 8px;
  border-radius: 6px;
  transition: background-color var(--motion, 0.16s) ease;
}

.option-card:hover:not(:has(input:disabled)) {
  background-color: #f1f2f4;
}

.option-card.selected .option-label {
  font-weight: 500;
}

.option-card:has(input:focus-visible) {
  outline: 2px solid var(--control-focus);
  outline-offset: 0;
}

.option-card:has(input:disabled) {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 760px), (pointer: coarse) {
  .option-card {
    min-height: 40px;
    align-items: center;
  }

  .option-card input {
    width: 18px;
    height: 18px;
    margin-top: 0;
  }

  .option-grid--chips {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ------------------------------------------------- buttons */

.btn {
  height: var(--control-h);
  min-height: var(--control-h);
  padding: 0 16px;
  font-size: var(--control-font);
}

.btn--sm,
.btn.small,
.app-header__actions .btn,
.app-header__actions .menu-button summary.btn,
.section-group__add.btn,
.q-chip {
  height: var(--control-h-sm);
  min-height: var(--control-h-sm);
  padding: 0 12px;
  font-size: var(--control-font-sm);
}

.btn--link {
  height: auto;
  min-height: 0;
  padding: 0;
}

.icon-btn,
.app-header__actions .overflow-menu summary,
.overflow-menu summary {
  width: var(--control-h-sm);
  height: var(--control-h-sm);
}

.app-header__actions .icon-btn,
.app-header__actions .overflow-menu summary {
  border: 1px solid var(--border);
}

/* ------------------------------------------------- menus (pickers and ⋯) */

/* The open list is bounded by the viewport (the picker sets --menu-max when it opens) and scrolls. */
.country-picker__menu {
  display: flex;
  flex-direction: column;
}

.country-picker__options {
  max-height: var(--menu-max);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.country-picker__search-wrap .input {
  height: var(--control-h-sm);
  min-height: var(--control-h-sm);
  font-size: var(--control-font-sm);
}

.country-picker__option {
  min-height: 32px;
  padding: 6px 10px;
  font-size: var(--control-font-sm);
}

/* Reference highlight (surface-muted) plus a dark edge, so the keyboard position reads at a glance. */
/* The highlighted option: a quiet background only, no accent bar. */
.country-picker__option--active {
  background: #f1f2f4;
}

@media (max-width: 760px), (pointer: coarse) {
  .country-picker__option {
    min-height: 40px;
  }
}

.history-more__menu {
  max-height: min(320px, 60vh);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.history-more__menu button:focus-visible,
.history-more__menu a:focus-visible {
  outline: 2px solid var(--control-focus);
  outline-offset: -2px;
}

/* ==================================================================
   Survey composition: the questionnaire (agent form) and its admin preview,
   plus the other survey pages that share the frame (submitted answers, closed).

   Colours are the B2B registration form's own (its styles.css, the stylesheet
   that page loads): background --bg #f4f4f5, surface #fff with a border and no
   shadow, text #0f172a / field text #101827, muted #5b6475, border
   rgba(15,23,42,.14) / hover .24, focus #0f172a + 2px rgba(15,23,42,.12),
   error #d4183d + 2px rgba(212,24,61,.14), completed #edf9f0 / #6eb38d
   (hover #e6f5eb / #5ca27c, focus #4f9470), buttons #000 / hover #111827.
   Font: the reference system stack, inherited from body.

   One centred column (760 max). Heading: "Survey title", title, introduction,
   required note. One white surface (28 padding, 18 on phones). Question block:
     Question 1        13/400 muted
     6
     question text     18/600 (17 phones), required * after it; help 14 muted
     10
     Your answer       13/400 muted
     6
     control           44 high, value 15 (16 on phones: no iOS zoom)
   24 above and below each block, one subtle divider between blocks.
   ================================================================== */

.survey-shell {
  --survey-ink: var(--text);
  --survey-pad: 28px;
  --q-number-gap: 6px;
  --q-gap: 10px;
  --q-space: 24px;
  --section-space: 32px;
  --control-h: 44px;
  --control-font: 15px;
  --control-pad: 14px;
  --control-border-hover: rgba(15, 23, 42, 0.24);
  --control-focus: #0f172a;
  --focus-ring: 0 0 0 2px rgba(15, 23, 42, 0.12);
  --shadow-card: none;
}

.app-shell--reading.survey-shell {
  width: min(760px, calc(100% - 32px));
}

@media (max-width: 760px), (pointer: coarse) {
  .survey-shell {
    --control-font: 16px;
  }
}

@media (max-width: 760px) {
  .survey-shell {
    --survey-pad: 18px;
    --section-space: 28px;
  }

  .app-shell--reading.survey-shell {
    width: calc(100% - 24px);
  }
}

/* The white surface: border only, like the reference. */
.survey-shell .form-card {
  padding: var(--survey-pad);
  box-shadow: none;
}

.survey-shell .input,
.survey-shell .country-picker__trigger {
  color: #101827;
}

/* Survey heading, on the same left edge as the questions (card padding + its 1px border). */
.survey-shell > .survey-heading {
  display: grid;
  gap: 4px;
  margin-top: 24px;
  padding: 0 calc(var(--survey-pad) + 1px);
}

.survey-shell > .survey-heading + * {
  margin-top: 20px;
}

.survey-heading__label,
.q-block__number,
.q-block__answer-label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
}

.survey-heading__title {
  margin: 0;
  color: var(--survey-ink);
  font-size: var(--f-xl, 24px);
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: break-word;
}

.survey-heading__description {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-line;
  overflow-wrap: break-word;
}

.survey-heading__note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

/* Sections inside the surface. */
.survey-form .grid-12 {
  gap: 0;
}

.survey-form .form-block {
  margin: 0;
}

.survey-form .form-block + .form-block {
  margin-top: var(--section-space);
}

.survey-form .form-block h3 {
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--survey-ink);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.survey-form .form-block .section-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: var(--f-sm, 14px);
  line-height: 1.45;
}

/* Question block. */
.q-block {
  display: grid;
  gap: var(--q-gap);
  padding: var(--q-space) 0;
}

/* A section without a heading starts straight with its first question. */
.survey-form .form-block > .grid-12:first-child > .q-block:first-child {
  padding-top: 0;
}

/* The next section heading or the Submit row follows: no padding stacked on their own gap. */
.survey-form .form-block .grid-12 > .q-block:last-child {
  padding-bottom: 0;
}

.q-block:not([hidden]) ~ .q-block:not([hidden]) {
  border-top: 1px solid var(--question-rule);
}

.q-block__question,
.q-block__answer {
  display: grid;
  min-width: 0;
}

.q-block__question {
  gap: 0;
}

.q-block__number {
  margin-bottom: var(--q-number-gap);
}

.q-block__answer {
  gap: var(--field-gap);
}

.q-block__text {
  margin: 0;
  color: var(--survey-ink);
  font-size: var(--f-lg, 18px);
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.q-block__help {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: var(--f-sm, 14px);
  line-height: 1.45;
  white-space: pre-line;
}

/* Multiline answers keep the reference textarea proportions. */
.survey-shell textarea.input {
  min-height: 110px;
  padding: 12px 14px;
}

/* Choices start on the same edge as the text: the hover tint bleeds outward, not the label inward. */
.q-block .option-grid {
  padding: 0;
}

.q-block .option-grid--stacked,
.q-block .option-grid--chips {
  row-gap: 2px;
}

/* Short values get a field sized for them; text and lists keep the full width. */
.q-block input[type="date"].input,
.q-block input[type="number"].input {
  max-width: 260px;
}

/* Information text between questions: plain text on the same edge, no bar or panel. */
.question-statement {
  margin: 0;
  color: #334155;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-line;
}

@media (max-width: 760px) {
  .survey-heading__title {
    font-size: 20px;
  }

  .survey-form .form-block h3 {
    font-size: 18px;
  }

  .q-block__text {
    font-size: 17px;
  }

  .q-block input[type="date"].input,
  .q-block input[type="number"].input {
    max-width: none;
  }
}

/* ------------------------------------------------- builder fields (same controls, no resizing) */

.canvas-head .grid-12 {
  gap: 14px;
}

.canvas-intro.input {
  min-height: 64px;
}

/* The question text is a one-line textarea that grows with its text. */
.q-label.input {
  min-height: var(--control-h);
  padding-top: 9px;
  padding-bottom: 9px;
  font-weight: 500;
  resize: none;
  overflow: hidden;
}

.q-type.input {
  flex: 0 0 auto;
  width: 180px;
}

.history-more.opens-up .history-more__menu {
  top: auto;
  bottom: calc(100% + 6px);
}

/* Open menus float above the page (menu.js placeMenu): never clipped by the card or list they sit in. */
.history-more .history-more__menu.is-floating,
.history-more.opens-up .history-more__menu.is-floating {
  position: fixed;
  right: auto;
  bottom: auto;
  z-index: 1000;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.history-more__menu button,
.history-more__menu a {
  min-height: 32px;
  font-size: var(--control-font-sm);
}

@media (max-width: 760px), (pointer: coarse) {
  .history-more__menu button,
  .history-more__menu a {
    min-height: 40px;
  }
}

/* Questionnaire buttons keep the reference button type (16/500). */
.survey-shell .btn:not(.btn--sm):not(.btn--link) {
  font-size: 16px;
}


/* css/forecast.css */
/* ==================================================================
   Customer Forecast (agent), in the layout of the B2B registration form's
   "All Customers" directory (all-customers.css): one bordered table of
   customers with filters, summary line and column headings; a row expands
   into the customer's 2027 forecast table and shop locations. Plain text
   statuses, no cards inside cards, the same 8px radius and borders.
   ================================================================== */

.app-shell--reading.survey-shell--wide {
  width: min(1120px, calc(100% - 48px));
}

.survey-shell .form-card.fc-dir {
  /* One volume column per reporting period (--fc-periods is set from the server's periods). */
  --fc-dir-columns: minmax(240px, 1.7fr) 84px repeat(var(--fc-periods, 2), 128px) minmax(150px, 1fr) 20px;
  --fc-dir-gap: 18px;
  padding: 26px 28px 28px;
}

.fc-dir__note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.fc-note {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.fc-shop {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(120px, 0.8fr) minmax(180px, 1fr);
  gap: 16px;
  align-items: start;
}

.fc-shop {
  padding: 12px 0;
  border-bottom: 1px solid #dde1e7;
  font-size: 13px;
  line-height: 1.4;
}

.fc-shop:last-child {
  border-bottom: 0;
}

.fc-shop > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fc-flat-preview__list {
  margin: 12px 0 0;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.5;
}

/* ---------- smaller screens: the reference's stacked rows with labels ---------- */

@media (max-width: 1120px) {

  .fc-shop .mobile-label {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
  }

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

  .fc-shop > div:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .app-shell--reading.survey-shell--wide {
    width: calc(100% - 24px);
  }

  .survey-shell .form-card.fc-dir {
    padding: 20px 16px;
  }

  .fc-shop {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- admin: Customer forecast progress ---------- */

.fc-admin-data__status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0 0;
  color: #2f7a52;
  font-size: 14px;
}

.fc-admin-data__status.is-problem {
  color: var(--danger);
}

.fc-admin-table {
  width: 100%;
  margin-top: 16px;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.fc-admin-table th,
.fc-admin-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  font-weight: 400;
}

.fc-admin-table th:first-child,
.fc-admin-table td:first-child {
  padding-left: 0;
  text-align: left;
}

.fc-admin-table thead th {
  color: var(--muted);
  font-size: 13px;
}

.fc-admin-table tbody th {
  font-weight: 500;
}

.fc-admin-table tr.is-muted {
  color: var(--muted);
}

.forecast-info__list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .fc-admin-table {
    font-size: 13px;
  }

  .fc-admin-table th,
.fc-admin-table td {
    padding: 8px 4px;
  }
}

/* ==================================================================
   Customer Forecast worksheet: one grid, three equal year bands.
   Each category has one width (measured by the page), repeated in 2025, 2026
   and 2027 Forecast (table-layout: fixed, one <colgroup>), so the three groups
   render at the same width and header, body and totals share the same column
   boundaries. The customer column takes the rest; the … column is narrow.
   Fits 1280 × 720 (with a classic 17px scrollbar) without horizontal scrolling.
   The header is two compact horizontal rows: years, then the categories
   repeated under each year.
   Dropdowns use the B2B registration form's filter dropdown (all-customers.css):
   8px radius, #98a2b3 menu border, #eef2f6 hover, CSS caret flipping on open.
   ================================================================== */

.app-shell--reading.survey-shell--sheet {
  width: min(1600px, calc(100% - 24px));
  padding-top: 12px;
  padding-bottom: 24px;
}

.survey-shell--sheet > .brand-bar + * {
  margin-top: 8px;
}

.survey-shell .form-card.fc-sheet-card {
  --fc-col-actions: 32px;
  --fc-row-h: 40px;
  --fc-divider: rgba(100, 116, 139, 0.45); /* between years: slightly stronger */
  --fc-rule: rgba(148, 163, 184, 0.28);
  --fc-col-rule: rgba(148, 163, 184, 0.24); /* between categories */
  --fc-alt: #f7f8fa;
  --fc-head-bg: #f8fafc;
  padding: 14px;
}

/* Compact header: title, save state, Review. */
.fc-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.fc-sheet__title {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.3;
}

.fc-sheet__head-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.fc-sheet__head-actions > a,
.fc-sheet__head-actions > button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.fc-sheet__saved {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.fc-sheet__saved[data-state="saved"] {
  color: var(--muted);
}

/* The one prominent state: something did not save. */
.fc-sheet__saved[data-state="error"] {
  padding: 4px 10px;
  border: 1px solid rgba(212, 24, 61, 0.35);
  border-radius: var(--radius-input, 8px);
  background: #fff5f6;
  color: #9f1239;
  font-weight: 600;
}

.fc-sheet__retry {
  margin-left: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

/* One toolbar row: search, country, (sort on small screens), status filters. */
.fc-sheet__toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.survey-shell .fc-sheet__toolbar .input {
  width: auto;
  height: 34px;
  min-height: 34px;
  font-size: 13px;
}

.survey-shell .fc-sheet__toolbar #fcSearch {
  flex: 0 1 280px;
  min-width: 180px;
}

.survey-shell .fc-sheet__toolbar #fcCountry {
  flex: 0 0 auto;
  min-width: 150px;
}

/* The grid lives in the page: the browser's own vertical scrollbar, header and totals pinned to the viewport. */
.fc-sheet {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-card, 8px);
  background: var(--surface);
  /* clip (not hidden): it rounds the corners without making a scroll container, so the sticky header still follows the page. */
  overflow: clip;
}

.fc-sheet[aria-busy="true"] {
  opacity: 0.6;
}

.fc-grid {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

/* The category columns get their widths from the page (one per category, the same in every year band);
   the customer column takes the rest. */

.fc-col-actions {
  width: var(--fc-col-actions);
}

.fc-grid th,
.fc-grid td {
  padding: 0 8px;
  border-bottom: 1px solid var(--fc-rule);
  background: var(--surface);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  vertical-align: middle;
  font-weight: 400;
}

/* ---------- header ---------- */
.fc-grid thead {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--fc-head-bg);
  box-shadow: 0 1px 0 var(--border);
}

.fc-grid thead th,
.fc-grid thead td {
  padding: 0;
  border-bottom: 0;
  background: transparent;
  overflow: visible;
}

.fc-grid__sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.fc-grid__sort > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.fc-grid__sort-icon {
  display: inline-flex;
  opacity: 0;
}

.fc-grid__sort:hover,
.fc-grid__sort.is-active {
  color: var(--text);
}

.fc-grid__sort:hover .fc-grid__sort-icon,
.fc-grid__sort.is-active .fc-grid__sort-icon {
  opacity: 1;
}

.fc-grid__sort:focus-visible {
  outline: 2px solid #111827;
  outline-offset: 2px;
  border-radius: 3px;
}

/* Customer spans both header rows, left-aligned with the customer names. */
.fc-grid thead .fc-grid__customer-head {
  padding: 0 8px;
  vertical-align: middle;
}

/* Row 1: the years, centred over their three columns. */
.fc-grid thead .fc-grid__year {
  height: 30px;
  text-align: center;
}

.fc-grid thead .fc-grid__year .fc-grid__sort {
  justify-content: center;
}

/* Row 2: one heading per column. Each column is centred as a unit: heading, quantity with its unit, dropdown and
   total share one vertical axis. */
.fc-grid thead .fc-grid__cat {
  height: 32px;
  padding: 0 4px;
  border-top: 1px solid var(--fc-rule);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

/* Subtle rules between categories, from the heading through the rows to the totals. */
.fc-grid thead .fc-grid__cat,
.fc-grid tbody td:not(.fc-grid__actions),
.fc-grid tfoot td:not(.fc-grid__actions) {
  box-shadow: inset 1px 0 0 var(--fc-col-rule);
}

/* One thin vertical divider between year groups, continuous through both header rows, the rows and the totals.
   Drawn as an inset shadow, not a border: a border would add a fraction of a pixel to the columns in fixed
   layout and the three year groups would no longer be exactly equal. */
.fc-grid thead .fc-grid__year + .fc-grid__year,
.fc-grid thead .fc-grid__cat.is-group-start:not(:first-child) {
  box-shadow: inset 1px 0 0 var(--fc-divider);
}

/* A restrained tint for 2027 Forecast. */
.fc-grid thead .fc-grid__year--forecast,
.fc-grid thead .fc-grid__cat--forecast {
  background: #f1f8f3;
}

.fc-grid thead .fc-grid__year--forecast .fc-grid__sort,
.fc-grid thead .fc-grid__cat--forecast {
  color: #2f5f45;
}

/* Header labels in the Formens type: 12px semibold, as written (2025, 2026, 2027 Forecast). Each sort button fills
   its header cell with its width contained, so its text never adds a fraction of a pixel to the fixed columns. */
.fc-grid thead .fc-grid__sort {
  width: 100%;
  min-height: 28px;
  contain: inline-size;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

/* ---------- body ---------- */
.fc-grid tbody tr > * {
  height: var(--fc-row-h);
}

/* Alternating rows across the whole row, the pinned customer column included. */
.fc-grid tbody tr:nth-child(even) > * {
  background: var(--fc-alt);
}

.fc-grid tbody tr:hover > * {
  background: #f1f4f8;
}

/* Subtle band dividers on the same boundaries as the year labels. */
.fc-grid tbody td.is-group-start,
.fc-grid tfoot td.is-group-start {
  box-shadow: inset 1px 0 0 var(--fc-divider);
}

.fc-grid .fc-grid__customer + td.is-group-start,
.fc-grid thead .fc-grid__cat:first-child {
  box-shadow: none;
}

/* Long names: in full on hover, or while the row has focus, as a small label just above the row (below it for
   the first row, under the pinned header), so the row's own values stay visible. */
.fc-grid tbody th.fc-grid__customer {
  overflow: visible;
}

.fc-grid tbody th.fc-grid__customer.is-truncated:hover,
.fc-grid tbody tr:focus-within > th.fc-grid__customer.is-truncated {
  z-index: 3;
}

.fc-grid tbody th.fc-grid__customer.is-truncated:hover::after,
.fc-grid tbody tr:focus-within > th.fc-grid__customer.is-truncated::after {
  content: attr(data-name);
  position: absolute;
  left: 4px;
  bottom: calc(100% - 6px);
  z-index: 5;
  padding: 4px 8px;
  border-radius: 6px;
  background: #101827;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
}

.fc-grid tbody tr:first-child > th.fc-grid__customer.is-truncated::after {
  top: calc(100% - 6px);
  bottom: auto;
}

/* Customer column: pinned when the grid scrolls sideways (phones). */
.fc-grid .fc-grid__customer-head,
.fc-grid tbody th.fc-grid__customer,
.fc-grid tfoot th.fc-grid__customer {
  position: sticky;
  left: 0;
  z-index: 2;
  border-right: 1px solid var(--fc-divider);
}

.fc-grid thead .fc-grid__customer-head {
  background: var(--fc-head-bg);
}

.fc-grid__customer > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fc-grid__name {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.fc-grid__meta {
  display: flex !important;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.fc-grid__meta-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.fc-grid__flag {
  flex: 0 0 auto;
  color: #92400e;
  font-weight: 600;
}

.fc-grid tr.is-unsaved th.fc-grid__customer {
  box-shadow: inset 3px 0 0 var(--danger);
}

.fc-grid .fc-grid__num {
  padding: 0 4px;
  text-align: center;
}

/* "4.8 pcs": the unit smaller, on the same line. */
.fc-unit {
  margin-left: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.fc-grid__none {
  color: #a8b0bb;
}

/* ---------- 2027 cells: compact dropdowns inside the shared columns ---------- */
.fc-grid td.fc-grid__fc {
  padding: 0 3px;
}

/* Triggers (and the volume field in their place) as compact as their content, centred in the cell: the page sets
   --fc-pick-<column> from the measured content. */
.fc-pick[data-col="0"], .fc-pick[data-col="0"] + .fc-pick__editor { max-width: var(--fc-pick-0, none); }

.fc-pick[data-col="1"], .fc-pick[data-col="1"] + .fc-pick__editor { max-width: var(--fc-pick-1, none); }

.fc-pick[data-col="2"], .fc-pick[data-col="2"] + .fc-pick__editor { max-width: var(--fc-pick-2, none); }

.fc-pick[data-col="3"], .fc-pick[data-col="3"] + .fc-pick__editor { max-width: var(--fc-pick-3, none); }

.fc-pick[data-col="4"], .fc-pick[data-col="4"] + .fc-pick__editor { max-width: var(--fc-pick-4, none); }

.fc-pick[data-col="5"], .fc-pick[data-col="5"] + .fc-pick__editor { max-width: var(--fc-pick-5, none); }

.fc-pick {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  height: 30px;
  margin: 0 auto;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input, 8px);
  background: #fff;
  color: #101827;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.fc-pick:hover:where(:not(:disabled)) {
  border-color: rgba(15, 23, 42, 0.24);
}

.fc-pick:focus-visible,
.fc-grid__fc.is-open .fc-pick {
  outline: none;
  border-color: #0f172a;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.12);
}

.fc-pick:disabled {
  cursor: default;
  background: #f4f5f7;
}

.fc-pick__text {
  display: flex;
  flex: 1 1 auto;
  align-items: baseline;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.fc-pick__text > * {
  flex: 0 0 auto;
}

.fc-pick__choice {
  font-weight: 600;
}

.fc-pick__sep {
  color: #98a2b3;
}

.fc-pick.is-empty .fc-pick__choice {
  color: #8a93a3;
  font-weight: 400;
}

/* A manual volume shows the value and unit alone. When a trigger is too narrow, the dot, then the unit, then the
   adjustment step aside (the number always stays whole). */
.fc-pick.is-empty .fc-pick__sep,
.fc-pick.is-manual .fc-pick__sep,
.fc-pick.is-manual .fc-pick__choice,
.fc-pick.is-tight .fc-pick__sep,
.fc-pick.is-tighter .fc-pick__value .fc-unit,
.fc-pick.is-tightest .fc-pick__choice {
  display: none;
}

/* The B2B caret: a bordered square turned 45° (down), 225° when open (up). */
.fc-pick__caret {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin: -3px 1px 0 0;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  color: #475467;
  transform: rotate(45deg);
  transition: transform 0.14s ease, margin 0.14s ease;
}

.fc-grid__fc.is-open .fc-pick__caret {
  margin-top: 3px;
  transform: rotate(225deg);
}

.fc-grid__fc.is-complete .fc-pick {
  border-color: #6eb38d;
  background: #edf9f0;
}

.fc-grid__fc.is-complete .fc-pick__value {
  color: #2f7a52;
  font-weight: 600;
}

.fc-grid__fc.is-complete .fc-pick:focus-visible,
.fc-grid__fc.is-complete.is-open .fc-pick {
  border-color: #4f9470;
  box-shadow: 0 0 0 2px rgba(79, 148, 112, 0.18);
}

.fc-grid__fc.is-invalid .fc-pick,
.fc-grid__fc.is-invalid .fc-pick__editor {
  border-color: var(--danger);
  box-shadow: 0 0 0 2px rgba(212, 24, 61, 0.14);
}

/* Custom volume: a numeric field in place of the dropdown, same size. */
.fc-pick__editor {
  display: none;
  margin: 0 auto;
  align-items: center;
  gap: 4px;
  width: 100%;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #0f172a;
  border-radius: var(--radius-input, 8px);
  background: #fff;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.12);
}

.fc-grid__fc.is-editing .fc-pick {
  display: none;
}

.fc-grid__fc.is-editing .fc-pick__editor {
  display: flex;
}

.fc-pick__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 26px;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #101827;
  font: inherit;
  font-size: 13px;
  text-align: right;
}

.survey-shell .fc-pick__input:focus {
  border: 0;
  box-shadow: none;
}

.fc-pick__unit {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
}

/* ---------- the popup (cell options and row actions), B2B filter dropdown ---------- */
.fc-menu {
  position: fixed;
  z-index: 70;
  max-height: min(280px, calc(100vh - 24px));
  padding: 4px;
  overflow-y: auto;
  border: 1px solid #98a2b3;
  border-radius: var(--radius-input, 8px);
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.18);
  color: #101827;
  font-size: 14px;
}

.fc-menu[hidden] {
  display: none;
}

.fc-menu__option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px 8px 8px;
  border-radius: 3px;
  line-height: 1.35;
  white-space: nowrap;
  cursor: pointer;
}

.fc-menu--actions .fc-menu__option {
  padding-left: 12px;
}

.fc-menu__option:focus {
  outline: none;
}

.fc-menu__option.is-selected {
  background: #f5f7fa;
  font-weight: 600;
}

.fc-menu__option:hover,
.fc-menu__option.is-active {
  background: #eef2f6;
}

/* Keyboard position: a visible ring around the whole item (no side accent). */
.fc-menu.is-keyboard .fc-menu__option.is-active {
  box-shadow: inset 0 0 0 2px rgba(15, 23, 42, 0.5);
}

.fc-menu__option.is-separated {
  margin-top: 5px;
}

.fc-menu__option.is-separated::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 4px;
  right: 4px;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
}

.fc-menu__check {
  display: inline-flex;
  flex: 0 0 16px;
  justify-content: center;
}

.fc-menu__label {
  flex: 1 1 auto;
}

.fc-menu__value {
  margin-left: 16px;
  color: #5b6475;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.fc-menu__option--clear,
.fc-menu__option--clear .fc-menu__value {
  color: var(--muted);
}

.fc-menu__option--retry {
  color: var(--danger);
}

/* ---------- row actions: one ⋮ button in a narrow, unlabeled cell ---------- */
.fc-grid td.fc-grid__actions {
  padding: 0 3px 0 0;
  text-align: center;
  text-overflow: clip;
}

.fc-grid__more {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-input, 8px);
  background: transparent;
  color: #475467;
  cursor: pointer;
}

.fc-grid__more:hover,
.fc-grid__actions.is-open .fc-grid__more {
  background: #eef2f6;
  color: #101827;
}

.fc-grid__more:focus-visible {
  outline: none;
  border-color: #0f172a;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.12);
}

.fc-grid tr.is-unsaved .fc-grid__more {
  color: var(--danger);
}

.fc-grid tr.is-unsaved .fc-grid__more::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--danger);
}

/* ---------- totals over the whole filtered result, pinned to the bottom of the viewport ---------- */
.fc-grid tfoot {
  position: sticky;
  bottom: 0;
  z-index: 3;
}

.fc-grid tfoot th,
.fc-grid tfoot td {
  height: 38px;
  border-top: 1px solid var(--border);
  border-bottom: 0;
  background: var(--fc-head-bg);
  font-weight: 600;
}

.fc-grid tfoot .fc-grid__meta {
  font-weight: 400;
}

.fc-grid tfoot .fc-grid__total-fc {
  background: #eef7f1;
  color: #2f7a52;
}

.fc-grid__empty {
  padding: 24px 16px !important;
  color: var(--muted);
  white-space: normal !important;
}

.fc-shops-dialog {
  margin-top: 0;
}

/* ---------- numbered pages below the grid ---------- */
.fc-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.fc-pager:empty {
  display: none;
}

.fc-pager__range {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.fc-pager__pages {
  display: flex;
  align-items: center;
  gap: 4px;
}

.fc-pager__page,
.fc-pager__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input, 8px);
  background: #fff;
  color: #101827;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.fc-pager__page:hover:where(:not(.is-current)),
.fc-pager__step:hover:where(:not(:disabled)) {
  background: #eef2f6;
}

.fc-pager__page.is-current {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
  font-weight: 600;
}

.fc-pager__step:disabled {
  opacity: 0.4;
  cursor: default;
}

.fc-pager__page:focus-visible,
.fc-pager__step:focus-visible {
  outline: none;
  border-color: #0f172a;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.12);
}

.fc-pager__gap {
  min-width: 20px;
  color: var(--muted);
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .fc-pick__caret {
    transition: none;
  }
}

@media (max-width: 760px) {
  .app-shell--reading.survey-shell--sheet {
    width: calc(100% - 16px);
  }

  /* Phones scroll the grid sideways under the pinned customer column; the bands keep their equal widths. */
  .survey-shell .form-card.fc-sheet-card {
    padding: 12px 10px;
  }

  .fc-col-customer {
    width: 136px;
  }

  .fc-sheet {
    overflow-x: auto;
  }

  .survey-shell .fc-sheet__toolbar #fcSearch {
    flex: 1 1 100%;
  }

  .survey-shell .fc-sheet__toolbar #fcCountry {
    flex: 1 1 40%;
    min-width: 0;
  }

  .fc-grid__meta .fc-grid__meta-text {
    display: none;
  }
}

/* ==================================================================
   Stage 1 "Market outlook": each question in one centred white card
   (580px, the B2B registration form's card: subtle border, its radius,
   24px padding) on the light page background. Inside, one left edge:
   "Market outlook" and progress, the question, Order history as compact
   rows, the 2027 forecast field with its unit and feedback, Back / Next.
   B2B controls: 40px on desktop, 44px touch.
   ================================================================== */

.app-shell--reading.fc-ask-shell {
  width: min(580px, calc(100% - 24px));
  --control-h: 40px;
}

@media (max-width: 760px), (pointer: coarse) {
  .app-shell--reading.fc-ask-shell {
    --control-h: 44px;
  }
}

.fc-ask {
  margin-top: 20px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card, 8px);
  background: #fff;
}

.fc-ask__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
}

.fc-ask__progress {
  margin: 0;
  font-size: 13px;
  line-height: 18px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.fc-ask__title {
  margin: 0;
  color: var(--survey-ink, var(--text));
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.fc-ask__intro {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.fc-ask__form {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.fc-ask__question {
  margin: 0;
  color: var(--survey-ink, var(--text));
  font-size: 23px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: break-word;
}

.fc-ask__note {
  margin: -14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.fc-ask__label {
  display: block;
  margin: 0 0 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

/* Order history: plain rows, the period left, the value on one right edge, subtle separators. */
.fc-ask__rows {
  margin: 0;
  border-top: 1px solid var(--border);
}

.fc-ask__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.fc-ask__row dt {
  color: var(--muted);
  font-size: 14px;
}

.fc-ask__row dd {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.fc-ask__row-unit {
  display: inline-block;
  min-width: 64px;
  margin-left: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  text-align: left;
}

.fc-ask__field {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* A standard 16px field, modest width, neutral while editing; the B2B focus style comes from controls.css. */
.survey-shell .fc-ask__input {
  flex: 0 1 300px;
  min-width: 0;
  height: var(--control-h);
  min-height: var(--control-h);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.survey-shell .fc-ask__input[aria-invalid="true"],
.survey-shell .fc-ask__input[aria-invalid="true"]:focus {
  border-color: var(--danger);
  box-shadow: var(--control-error-ring);
}

.fc-ask__unit {
  flex: 0 0 auto;
  min-width: 64px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.fc-ask__status,
.fc-ask__error {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 6px 0 0;
  font-size: 13px;
}

.fc-ask__status {
  color: var(--muted);
}

.fc-ask__error {
  color: var(--danger);
}

.fc-ask__status:empty,
.fc-ask__error:empty {
  display: none;
}

.fc-ask__retry,
.fc-sheet__retry {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

/* The action line, attached to the form: Back left, Next right, on the column's edges. */
.fc-ask__nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.fc-ask__nav .btn--primary {
  margin-left: auto;
}

.survey-shell .fc-ask__nav .fc-ask__btn {
  height: var(--control-h);
  min-height: var(--control-h);
  padding: 0 16px;
  font-size: 15px;
}

@media (max-width: 560px) {
  .fc-ask {
    margin-top: 12px;
    padding: 18px 16px;
  }

  .fc-ask__question {
    font-size: 21px;
  }

  .survey-shell .fc-ask__input {
    flex: 1 1 auto;
  }

  .fc-ask__unit {
    min-width: 0;
  }

  .survey-shell .fc-ask__nav .fc-ask__btn {
    flex: 1 1 0;
    min-width: 0;
  }
}

/* ==================================================================
   Stage 2 "Customer forecasts": compact heading with Back to market,
   save state and Submit forecast; progress next to the filters.
   ================================================================== */

.fc-sheet__heading {
  display: grid;
  gap: 2px;
}

.fc-sheet__back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.fc-sheet__back:hover {
  color: var(--text);
  text-decoration: underline;
}

.fc-sheet-card .fc-sheet__title {
  font-size: 20px;
}

.survey-shell .fc-sheet__head .fc-sheet__submit.btn {
  height: 36px;
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

.fc-sheet__submit-note {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.45;
}

.fc-sheet__submit-note > svg {
  margin-right: 6px;
  vertical-align: -2px;
}

.fc-sheet__submit-note:empty {
  display: none;
}

.fc-sheet__submit-note[data-kind="submitted"] {
  color: #2f7a52;
}

.fc-sheet__submit-note[data-kind="attention"],
.fc-sheet__submit-note[data-kind="error"] {
  padding: 8px 12px;
  border: 1px solid rgba(212, 24, 61, 0.35);
  border-radius: var(--radius-input, 8px);
  background: #fff5f6;
  color: #9f1239;
}

.fc-sheet__progress {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.fc-sheet__progress strong {
  color: var(--text);
}

.fc-sheet__progress[data-done="true"] {
  color: #2f7a52;
}

/* The customer the agent is taken to after an incomplete Submit. */
.fc-grid tbody tr.is-attention > * {
  background: #fff7e6 !important;
}

.fc-card.is-attention {
  background: #fff7e6;
}

/* ---------- phones: one card per customer ---------- */
.fc-cards {
  display: grid;
}

.fc-cards__empty {
  margin: 0;
  padding: 20px 14px;
  color: var(--muted);
}

.fc-card {
  padding: 12px 12px 14px;
  border-bottom: 1px solid var(--border);
}

.fc-card:nth-child(even) {
  background: #fafbfc;
}

.fc-card:last-child {
  border-bottom: 0;
}

.fc-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.fc-card__who {
  display: grid;
  min-width: 0;
}

.fc-card__who .fc-grid__name {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.fc-card__who .fc-grid__meta {
  display: block !important;
  color: var(--muted);
  font-size: 12px;
}

.fc-card__head .fc-grid__actions {
  flex: 0 0 auto;
}

/* Category | 2025 | 2026 to 15 Nov | 2027: the same figures and controls as the grid's columns. */
.fc-card__grid {
  display: grid;
  grid-template-columns: minmax(64px, 0.9fr) minmax(52px, auto) minmax(52px, auto) minmax(112px, 1.6fr);
  align-items: center;
  gap: 6px 8px;
  font-size: 13px;
}

.fc-card__year {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
  line-height: 1.2;
}

.fc-card__year--forecast {
  color: #2f5f45;
  font-weight: 600;
  text-align: left;
  padding-left: 2px;
}

.fc-card__cat {
  color: var(--text);
  font-weight: 600;
}

.fc-card .fc-grid__num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.fc-card .fc-grid__fc {
  min-width: 0;
}

.fc-card .fc-pick,
.fc-card .fc-pick__editor {
  max-width: none;
  height: 36px;
}

/* ---------- submitted ---------- */
.fc-done {
  display: grid;
  justify-items: start;
  gap: 10px;
  max-width: 560px;
  margin-inline: auto;
  padding: 32px 28px;
}

.fc-done__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #edf9f0;
  color: #2f7a52;
}

.fc-done__title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.fc-done__title:focus {
  outline: none;
}

.fc-done__text {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 15px;
}

@media (max-width: 760px) {
  .fc-sheet__head-actions {
    width: 100%;
    justify-content: space-between;
  }

  .fc-sheet__progress {
    width: 100%;
  }
}

/* ---------- stage 2 header, toolbar and final action area ---------- */
.fc-sheet__lead {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.fc-sheet__head-actions {
  align-self: flex-end;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.fc-sheet__toolbar[hidden],
.fc-pager[hidden] {
  display: none;
}

.survey-shell .fc-sheet__toolbar #fcStatus {
  flex: 0 0 auto;
  min-width: 180px;
}

.fc-sheet__actions {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.fc-sheet__actions-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fc-sheet__actions .fc-sheet__submit-note {
  margin: 0 0 12px;
}

.survey-shell .fc-sheet__actions .fc-sheet__submit.btn {
  height: var(--control-h);
  min-height: var(--control-h);
  padding: 0 18px;
  font-size: var(--control-font);
}

/* 2027 totals are partial: "so far" under the number. */
.fc-grid__so-far {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  line-height: 1;
}

.fc-grid tfoot th,
.fc-grid tfoot td {
  height: 42px;
}

/* ---------- phones: the customer list ---------- */
.fc-plist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.fc-plist li + li {
  border-top: 1px solid var(--border);
}

.fc-plist__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 8px 12px;
  border: 0;
  background: #fff;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.fc-plist li:nth-child(even) .fc-plist__item {
  background: #fafbfc;
}

.fc-plist__item:focus-visible {
  outline: 2px solid #0f172a;
  outline-offset: -2px;
}

.fc-plist__main {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
}

.fc-plist__name {
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.fc-plist__meta {
  color: var(--muted);
  font-size: 12px;
}

.fc-plist__status {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f2f4;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.fc-plist__status.is-complete {
  background: #edf9f0;
  color: #2f7a52;
}

.fc-plist__status.is-in_progress {
  background: #fff7e6;
  color: #92400e;
}

.fc-plist__chevron {
  display: inline-flex;
  color: var(--muted);
}

/* ---------- phones: one customer at a time ---------- */
.fc-editor {
  padding: 4px 12px 12px;
}

.fc-editor__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
}

.fc-editor__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-right: auto;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}

.fc-editor__pos {
  color: var(--muted);
  font-size: 13px;
}

.fc-editor__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input, 8px);
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.fc-editor__step:disabled {
  opacity: 0.4;
  cursor: default;
}

.fc-editor .fc-card {
  padding: 4px 0 0;
  border: 0;
  background: none;
}

.fc-editor .fc-card__who .fc-grid__name {
  font-size: 18px;
}

.fc-editor .fc-card__head {
  align-items: center;
  margin: 8px 0 12px;
}

.fc-editor .fc-pick,
.fc-editor .fc-pick__editor {
  height: 44px;
}

@media (max-width: 760px) {
  .fc-sheet__head-actions {
    align-self: stretch;
    flex-direction: row;
    justify-content: space-between;
  }

  .survey-shell .fc-sheet__toolbar #fcStatus,
  .survey-shell .fc-sheet__toolbar #fcCountry {
    flex: 1 1 40%;
    min-width: 0;
  }

  .fc-sheet__actions .btn {
    flex: 1 1 auto;
  }
}

/* ------------------------------------------------------------------
   Admin "Forecast data" (forecast-records-view.js): the sealed submissions per agent, per customer and in total.
   Uses .tabs and .fc-admin-table; dense tables for the account lists.
   ------------------------------------------------------------------ */

.fr .fr-tabs {
  flex-wrap: wrap;
  row-gap: 8px;
  margin: 16px 0 0;
}

.fr-stack {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  min-width: 0;
}

.fr-stack > .fc-admin-table {
  margin-top: 0;
}

.fr-body {
  overflow-x: auto;
}

.fr-dense th,
.fr-dense td {
  padding: 6px 8px;
  font-size: 13px;
}

.fr-dense tbody th .help,
.fc-admin-table tbody th .help {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.fr-comment {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left !important;
}

.fr-ref {
  font-size: 12px;
  white-space: nowrap;
}

.fr-flag {
  color: var(--danger);
  font-size: 12px;
}

.fr-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  justify-self: start;
}

.fr-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.fr-subtitle {
  margin: 8px 0 0;
  font-size: 15px;
  font-weight: 600;
}

.fr-market p,
.fr-stack > p {
  margin: 0;
  font-size: 14px;
}

.fr-quote {
  margin: 0;
  padding: 8px 12px;
  border-left: 2px solid var(--border);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.fr-note {
  display: grid;
  gap: 6px;
}

.fr-note__who {
  margin: 0;
  font-size: 14px;
}

.fr-list {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.6;
}

.fr-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.fr-filters .input {
  width: auto;
  min-width: 180px;
}

.fr-spacer {
  flex: 1;
}

.fr-check {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  font-size: 14px;
}

.fr-check.is-ok svg {
  color: var(--success, #12804a);
}

.fr-check.is-bad {
  color: var(--danger);
}

.fr-check-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  white-space: nowrap;
}

/* ------------------------------------------------------------------
   The "2027 forecast" sheet for admins (forecast-table-view.js): a plain spreadsheet, as the Excel file shows it.
   White, thin gridlines, bold headings, numbers on the right; no fills or zebra stripes. The heading row and the
   row numbers stay in view while scrolling inside the sheet.
   ------------------------------------------------------------------ */

/* The page grows with its table: the browser's own scrollbars move it, never a box inside the page. */
.app-shell--full {
  width: max-content;
  min-width: calc(100% - 48px);
  max-width: none;
  margin-inline: 24px;
}

/* Forecast data card: its title and note on the left, the table and Excel links on the right. */
.fr > .card-head {
  align-items: flex-start;
  margin-bottom: 0;
}

.fr > .card-head .card-note {
  margin: 4px 0 0;
}

.fr-actions {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 760px) {
  .fr > .card-head {
    flex-direction: column;
  }

  .fr-actions {
    justify-content: flex-start;
  }
}

.xt-card {
  padding: 20px 20px 24px;
}




.xt-summary {
  margin: 14px 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.xt-summary strong {
  color: var(--text, #101827);
  font-weight: 600;
}

.xt-title {
  margin: 28px 0 10px;
  font-size: 16px;
  font-weight: 600;
}

.xt-count {
  color: var(--muted);
  font-weight: 400;
}

.xt-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

/* Test submissions: a dashed outline marks them as apart from the real forecast. */
.xt-scroll--tests {
  outline: 1px dashed var(--border);
  outline-offset: 4px;
}

.xt-scroll {
  border: 1px solid #d4d4d4;
  background: #fff;
}

.xt-scroll:focus-visible {
  outline: 2px solid var(--focus, #1d4ed8);
  outline-offset: 2px;
}

.xt {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
  font-size: 13px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.xt th,
.xt td {
  max-width: 340px;
  padding: 5px 8px;
  overflow: hidden;
  border-right: 1px solid #e1e1e1;
  border-bottom: 1px solid #e1e1e1;
  background: #fff;
  color: #101827;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: top;
}

.xt thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom-color: #a6a6a6;
  font-weight: 700;
}

.xt .is-num {
  text-align: right;
}

.xt .is-date {
  color: #475467;
}

/* Row numbers, as in Excel (row 1 is the heading row). */
.xt .xt-n {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 34px;
  color: #98a2b3;
  font-weight: 400;
  text-align: right;
}

.xt thead .xt-n {
  z-index: 3;
}

.xt-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.xt-sort:focus-visible {
  outline: 2px solid var(--focus, #1d4ed8);
  outline-offset: 2px;
}

.xt-sort__dir {
  color: #667085;
  font-size: 9px;
}

.xt tbody tr:hover td {
  background: #f7f9fc;
}

@media (max-width: 760px) {
  .app-shell--full {
    min-width: calc(100% - 24px);
    margin-inline: 12px;
  }

}

/* A customer whose agent has not submitted a forecast: a light red row, a little stronger on hover. The same light
   red (#fdecea) fills these rows in the Excel file. */
.xt tbody tr.is-missing td {
  background: #fdecea;
}

.xt tbody tr.is-missing:hover td {
  background: #fad7d3;
}

/* The page is as wide as the sheet and scrolls with the browser's own scrollbars. Scrolling sideways moves only the
   sheet: the top bar, the back link, the title with Download Excel, the filters and the summary keep the width of the
   window (--xt-page, set by the page) and stay where they are, like Excel's ribbon above its grid. */
body:has(.app-shell--full) {
  width: max-content;
  min-width: 100%;
}

body:has(.app-shell--full) .topbar {
  position: sticky;
  left: 0;
  z-index: 5;
  box-sizing: border-box;
  width: calc(var(--xt-page, calc(100vw - 48px)) + 48px);
}

.app-shell--full > .back-link,
.app-shell--full > .app-header {
  position: sticky;
  left: 24px;
}

/* Inside the card nothing is pinned: the summary, filters, titles and both sheets scroll with the page (Claudiu). */

.app-shell--full > .app-header {
  box-sizing: border-box;
  width: var(--xt-page, calc(100vw - 48px));
}

.xt-card .xt-summary,
.xt-card .xt-title,
.xt-card .empty-state {
  max-width: calc(var(--xt-page, calc(100vw - 48px)) - 58px);
}

/* Two-line headings: the product, then the year. */
.xt thead th {
  white-space: pre-line;
  vertical-align: bottom;
}

.xt-sort {
  align-items: flex-end;
  text-align: left;
}

.is-num .xt-sort {
  justify-content: flex-end;
  text-align: right;
}

/* The agent's trend % after a 2027 forecast figure: "8,190 (-7%)". */
.xt-sfx {
  margin-left: 6px;
  color: #667085;
}

/* Two-line headings are centred over their column (numbers stay right-aligned below). */
.xt thead th.is-2l {
  text-align: center;
}

.xt thead th.is-2l .xt-sort {
  justify-content: center;
  text-align: center;
}

/* Small labels next to an agent's name ("Test account", "Changed since"), and cells that must not wrap. */
.fr-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  border: 1px solid var(--border, #e4e7ec);
  border-radius: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  vertical-align: 1px;
  white-space: nowrap;
}

.fr-tag--warn {
  border-color: #fedf89;
  background: #fffaeb;
  color: #93370d;
}

.fr-nowrap {
  white-space: nowrap;
}

.fr-empty {
  margin: 0;
}

/* The new clients sheet is narrow: as wide as its columns (not stretched to the forecast sheet's width). */
.xt-scroll--pinned {
  width: max-content;
  max-width: calc(var(--xt-page, calc(100vw - 48px)) - 58px);
}

.xt-scroll--pinned .xt {
  min-width: 0;
}

/* ---------- heading filters (as in Excel) ---------- */

.xt-head {
  display: inline-flex;
  align-items: flex-end;
  gap: 4px;
}

.xt-sort--static {
  cursor: default;
}

/* The filter button: a thin glyph, quiet until hovered; dark when its column is filtered. */
.xt-filter {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: none;
  color: #b0b8c4;
  cursor: pointer;
  transition: color 0.12s ease, background-color 0.12s ease;
}

.xt-filter svg {
  stroke-width: 2.25;
}

.xt-filter:hover,
.xt-filter[aria-expanded="true"] {
  background: #eef0f3;
  color: #101827;
}

.xt-filter:focus-visible {
  outline: 2px solid var(--focus, #1d4ed8);
  outline-offset: 1px;
}

.xt-filter.is-active {
  background: #101827;
  color: #fff;
}

/* The panel: sized to its content (sm / md / lg), left-aligned under its heading. */
.xt-pop {
  position: fixed;
  z-index: 60;
  box-sizing: border-box;
  width: 264px;
  max-width: calc(100vw - 16px);
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.16);
  color: #101827;
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
}

.xt-pop--sm {
  width: 224px;
}

.xt-pop--lg {
  width: 320px;
}

.xt-pop__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 12px;
  border-bottom: 1px solid #eaecf0;
}

.xt-pop__title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xt-pop__sorts {
  display: inline-flex;
  flex: none;
  gap: 2px;
}

.xt-pop__sort {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: #667085;
  cursor: pointer;
}

.xt-pop__sort:hover {
  background: #f2f4f7;
  color: #101827;
}

.xt-pop__sort.is-on {
  background: #101827;
  color: #fff;
}

.xt-pop__body {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
}

.xt-pop .input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 34px;
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.xt-pop select.input {
  padding-right: 30px;
}

.xt-pop__vals {
  display: grid;
  gap: 6px;
}

.xt-pop__vals.is-two {
  grid-template-columns: 1fr 1fr;
}

.xt-pop [hidden] {
  display: none !important;
}

.xt-pop__hint,
.xt-pop__error {
  margin: 0;
  font-size: 12px;
}

.xt-pop__hint {
  color: #667085;
}

.xt-pop__error {
  color: var(--danger, #b42318);
}

.xt-pop__error:empty {
  display: none;
}

.xt-pop__list {
  max-height: 232px;
  margin: 0 -4px;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  overscroll-behavior: contain;
}

.xt-pop__opts {
  display: grid;
  gap: 2px;
  margin: 0 -4px;
}

.xt-pop__opts > .input {
  width: calc(100% - 8px);
  margin: 0 4px 6px 28px;
  width: calc(100% - 32px);
}

.xt-pop__opt {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 3px 4px;
  border-radius: 4px;
  cursor: pointer;
}

.xt-pop__opt:hover {
  background: #f5f6f8;
}

.xt-pop__all {
  margin: 0 -4px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f0f1f3;
  border-radius: 0;
  font-weight: 500;
}

.xt-pop input[type="checkbox"],
.xt-pop input[type="radio"] {
  flex: none;
  width: 15px;
  height: 15px;
  min-width: 15px;
  min-height: 15px;
  margin: 0;
  appearance: auto;
  accent-color: #101827;
}

.xt-pop__val {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xt-pop__val.is-blank {
  color: #667085;
  font-style: italic;
}

.xt-pop__count {
  flex: none;
  color: #98a2b3;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.xt-pop__more {
  padding: 6px 4px;
  color: #667085;
  font-size: 12px;
}

.xt-pop__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid #eaecf0;
}

.xt-pop__clear {
  padding: 0;
  border: 0;
  background: none;
  color: #667085;
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.xt-pop__clear:hover {
  color: #101827;
}

/* The filters in use, under the summary: each one a chip that removes it. */
.xt-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  max-width: calc(var(--xt-page, calc(100vw - 48px)) - 58px);
  margin: -2px 0 12px;
}

.xt-chips__label {
  color: var(--muted);
  font-size: 13px;
}

.xt-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px 3px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  background: #f9fafb;
  color: #101827;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.xt-chip:hover {
  border-color: #98a2b3;
  background: #f2f4f7;
}

.xt-chip svg {
  color: #667085;
}

/* Without a toolbar, the summary opens the card. */
.xt-card .xt-summary {
  margin-top: 0;
}

/* Agents' comments: one general comment per agent, shown in full (wrapped), not cut like the customer cells. */
.xt-scroll--comments td:last-child {
  min-width: 420px;
  max-width: 900px;
  white-space: pre-wrap;
}

.xt-tests-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}


/* css/forecast-document.css */
/* ==================================================================
   Forecast page (public/js/agent/capacity-view.js): the 2027 capacity forecast on one page, organized as the
   management reference in demo-data/ (saved_resource.html), in the light Formens style.

   Composition
     page (Formens grey) → introduction and agent strip → section cards 1–5 → review card. Inside section 1:
     the portfolio overview, then one customer container per account (rank and name above, Tailoring | Shirts
     product cards, the note below). Nothing floats or sticks over the page.

   System (every container uses it; no component-specific exceptions)
     Surfaces   card #fff, 1px rgba(15,23,42,.1) · customer container #f8f9fb, 1px #eaecf0 ·
                product card, entry (exception, client), summary product #fff, 1px #e4e7ec · radius 8 everywhere
     Padding    card 28/32 · customer 18/20 · product and entries 16/18
     Gaps       cards 20 · inside a card 20 · customers 14 · inside a product 12
     Type       26/650 title · 19/600 section · 17/600 customer · 15/600 product, entry · 15 body
                14 help, metadata, history labels · 13 field labels, units
     Numbers    tabular everywhere · history 15 regular, secondary · changes 13/500 · product estimate 18/700 ·
                overview forecast 16/700 · review forecast 28/700 (the strongest figure on the page)
     Controls   40px (44px on phones), radius 8; secondary buttons 40px; "Add a note" 32px; Submit 44px
     Colour     ink #101828 · text #344054 · secondary #475467 · tertiary #667085 · controls #c4c9d1 ·
                up #067647 · down #b42318 · attention #d92d20 (icons, borders and text, never a filled box)
   ================================================================== */

.fd {
  --fd-ink: #101828;
  --fd-text: #344054;
  --fd-muted: #475467;
  --fd-subtle: #667085;
  --fd-faint: #98a2b3;
  --fd-rule: #e4e7ec;
  --fd-card-border: rgba(15, 23, 42, 0.1);
  --fd-tint: #f8f9fb;
  --fd-tint-border: #eaecf0;
  --fd-control: #c4c9d1;
  --fd-hover: #f2f4f7;
  --fd-up: #067647;
  --fd-down: #b42318;
  --fd-attn: #d92d20;
  --fd-ok: #079455;
  --fd-ring: 0 0 0 3px rgba(16, 24, 40, 0.12);
  --fd-radius: 8px;
  --fd-width: 1040px;
  --fd-card-pad: 28px 32px;
  --control-h: 40px;
  --control-font: 15px;
  --control-pad: 12px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: var(--fd-text);
  font-size: 15px;
  line-height: 1.5;
}

.fd-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.fd-num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.fd :focus-visible {
  outline: 2px solid var(--fd-ink);
  outline-offset: 2px;
}

/* ---------- page ---------- */

.fd-top__inner,
.fd-column {
  box-sizing: border-box;
  width: min(var(--fd-width), calc(100% - 32px));
  margin-inline: auto;
}

.fd-top__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
}

.fd-top__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--fd-muted);
  font-size: 14px;
  text-decoration: none;
}

.fd-top__back:hover {
  color: var(--fd-ink);
}

.fd-page {
  flex: 1 0 auto;
  padding-bottom: 48px;
}

.fd-column,
.fd-form {
  display: grid;
  gap: 20px;
}

.fd-card {
  padding: var(--fd-card-pad);
  border: 1px solid var(--fd-card-border);
  border-radius: var(--fd-radius);
  background: #fff;
  scroll-margin-top: 16px;
}

/* ---------- introduction: title, purpose, units, agent ---------- */

.fd-intro {
  display: grid;
  gap: 8px;
  padding-top: 8px;
}

.fd-title {
  margin: 0;
  color: var(--fd-ink);
  font-size: 26px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.fd-title:focus {
  outline: none;
}

.fd-lede {
  margin: 0;
  text-wrap: pretty;
  color: var(--fd-text);
  font-size: 15px;
  line-height: 1.6;
}

.fd-units {
  margin: 0;
  color: var(--fd-muted);
  font-size: 14px;
}

.fd-units strong {
  margin-right: 8px;
  color: var(--fd-ink);
  font-weight: 600;
}

.fd-agent {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  margin: 8px 0 0;
  padding: 12px 16px;
  border: 1px solid var(--fd-card-border);
  border-radius: var(--fd-radius);
  background: #fff;
  color: var(--fd-muted);
  font-size: 14px;
}

.fd-agent strong {
  color: var(--fd-ink);
  font-weight: 600;
}

/* Test accounts: "Claudiu Juretchi (test agent), viewing as [agent]" with the agent picker in the line. */
.fd-agent--test {
  align-items: center;
}

.fd-agent__switch {
  display: inline-flex;
  flex: 1 1 520px;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.fd-agent__label {
  color: var(--fd-muted);
}

/* This one picker keeps its arrow at the end of the box; its width is set to the longest agent name (agentSwitch). */
.fd .fd-agent__switch .country-picker {
  flex: 0 1 auto;
  min-width: 0;
}

.fd .fd-agent__switch .country-picker__trigger {
  width: 100%;
  min-width: 0;
}

.fd-agent__switch .country-picker__label {
  flex: 1 1 auto;
}

.fd-agent__switch .country-picker__chevron {
  margin-left: auto;
}

.fd-agent__switch .country-picker__trigger {
  height: 36px;
  min-height: 36px;
}

.fd-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--fd-ink);
}

.fd-notice svg {
  color: var(--fd-attn);
}

.fd-empty {
  margin: 0;
  color: var(--fd-muted);
}

/* ---------- section cards ---------- */

.fd-section {
  display: grid;
  gap: 20px;
}

.fd-section__head {
  display: grid;
  gap: 4px;
}

.fd-section__title {
  margin: 0;
  color: var(--fd-ink);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
}

/* "Section 1:" before the title, same size and weight, one step quieter. */
.fd-section__num {
  color: var(--fd-subtle);
  font-variant-numeric: tabular-nums;
}

.fd-section__help {
  max-width: 96ch;
  margin: 0;
  color: var(--fd-muted);
}

/* A sub-part of a section (exceptions, reasons). */
.fd-sub {
  display: grid;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--fd-rule);
}

.fd-sub__title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  color: var(--fd-ink);
  font-size: 15px;
  font-weight: 600;
}

.fd-sub__help {
  max-width: 96ch;
  margin: -6px 0 0;
  color: var(--fd-muted);
  font-size: 14px;
}

/* "How these figures are calculated": a quiet closed row that opens into a short definition list. */
.fd-explain {
  border: 1px solid var(--fd-rule);
  border-radius: var(--fd-radius);
  background: var(--fd-tint);
  color: var(--fd-muted);
  font-size: 14px;
}

.fd-explain summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--fd-radius);
  color: var(--fd-text);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.fd-explain summary::-webkit-details-marker {
  display: none;
}

.fd-explain summary:hover {
  background: var(--fd-hover);
}

.fd-explain__chevron {
  flex: none;
  color: var(--fd-subtle);
  transform: rotate(-90deg);
  transition: transform 0.15s ease;
}

.fd-explain[open] .fd-explain__chevron {
  transform: none;
}

/* Each term is a small heading over its paragraph, using the full width of the box. */
.fd-explain__list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 14px 16px 16px 38px;
  border-top: 1px solid var(--fd-rule);
}

.fd-explain__list dt {
  margin: 0 0 2px;
  color: var(--fd-ink);
  font-weight: 600;
}

.fd-explain__list dt:not(:first-child) {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--fd-rule);
}

.fd-explain__list dd {
  margin: 0;
  color: var(--fd-text);
  line-height: 1.6;
  text-wrap: pretty;
}

@media (max-width: 640px) {
  .fd-explain__list {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .fd-explain__list dd {
    margin-bottom: 8px;
  }
}

/* ---------- portfolio overview: history columns, then the forecast columns ---------- */

.fd-overview {
  display: grid;
  gap: 10px;
}

.fd-overview__table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.fd-overview__title {
  padding-bottom: 10px;
  color: var(--fd-ink);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  caption-side: top;
}

.fd-overview__title span {
  margin-left: 10px;
  color: var(--fd-muted);
  font-size: 14px;
  font-weight: 400;
}

.fd-overview__col-product {
  width: 26%;
}

.fd-overview__table th,
.fd-overview__table td {
  padding: 10px 0 10px 16px;
  border-bottom: 1px solid var(--fd-rule);
  text-align: right;
  vertical-align: baseline;
  white-space: nowrap;
}

.fd-overview__table > :not(caption) > tr > :first-child {
  padding-left: 0;
  text-align: left;
}

.fd-overview__table thead th {
  padding-top: 0;
  border-bottom-color: var(--fd-control);
  color: var(--fd-muted);
  font-size: 13px;
  font-weight: 500;
}

.fd-overview__table tbody th {
  color: var(--fd-ink);
  font-size: 15px;
  font-weight: 600;
}

.fd-overview__table tbody th span {
  margin-left: 8px;
  color: var(--fd-subtle);
  font-size: 13px;
  font-weight: 400;
}

.fd-overview__table td {
  color: var(--fd-muted);
  font-size: 15px;
}

/* The forecast columns: set off by a rule, the forecast in ink and bold. */
.fd-overview__table tr > :nth-child(4) {
  padding-right: 20px;
}

.fd-overview__table .is-forecast {
  padding-left: 24px;
  border-left: 1px solid var(--fd-rule);
}

.fd-overview__table thead .is-forecast {
  color: var(--fd-ink);
  font-weight: 600;
}

.fd-overview__table td.is-forecast .fd-num {
  color: var(--fd-ink);
  font-size: 15px;
  font-weight: 600;
}

/* ---------- a customer container: rank and name, Tailoring | Shirts cards, note ---------- */

.fd-customers {
  display: grid;
  gap: 14px;
}

.fd-customer {
  display: grid;
  gap: 14px;
  padding: 18px 20px 20px;
  border: 1px solid var(--fd-tint-border);
  border-radius: var(--fd-radius);
  background: var(--fd-tint);
}

.fd-customer__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  min-width: 0;
}

.fd-customer__name {
  margin: 0;
  color: var(--fd-ink);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.fd-customer__meta {
  margin: 0 0 0 4px;
  color: var(--fd-muted);
  font-size: 14px;
}

/* How an account is named everywhere (accountName in capacity-view.js):
   "1. ATELIER 5 (TL DESIGN SARL) - France". The customer no. carries the weight; the company and the
   country are secondary. No flags anywhere in the app. */
.fd-acc__rank {
  margin-right: 2px;
  font-variant-numeric: tabular-nums;
}

.fd-acc__no {
  color: var(--fd-ink);
  font-weight: 600;
}

.fd-acc__name,
.fd-acc__where {
  color: var(--fd-muted);
  font-weight: 400;
}

.fd .country-picker__option .country-picker__option-name {
  white-space: normal;
}

.fd-acc__sep {
  margin: 0 3px;
  color: var(--fd-faint);
}

/* An account's 2026 volumes in words, under its name in the account picker. */
.fd-vol {
  color: var(--fd-subtle);
  white-space: normal;
}

.fd-vol .fd-num {
  color: var(--fd-text);
  font-weight: 600;
}

.fd-vol__part {
  white-space: nowrap;
}

.fd-vol__label {
  color: var(--fd-muted);
}

.fd-products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

/* ---------- a product card: history → forecast → 2027 estimate ---------- */

.fd-product {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--fd-rule);
  border-radius: var(--fd-radius);
  background: #fff;
}

.fd-product__name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  margin: 0;
  color: var(--fd-ink);
  font-size: 15px;
  font-weight: 600;
}

.fd-product__unit {
  color: var(--fd-subtle);
  font-size: 13px;
  font-weight: 400;
}

/* What happened: reference rows, label left, figure right. */
.fd-history {
  display: grid;
  margin: 0;
}

/* A hairline under each row (not under the last), so each label stays with its value. */
.fd-history__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  border-bottom: 1px solid #dde1e7;
}

.fd-history__row:last-child {
  border-bottom: 0;
}

.fd-history dt {
  color: var(--fd-subtle);
  font-size: 14px;
}

.fd-history dd {
  margin: 0;
  color: var(--fd-muted);
  font-size: 15px;
}

/* What the agent decides: the trend and its % in one control; each label stands over its part. */
.fd-input {
  display: grid;
  gap: 6px;
}

.fd-input__label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--fd-ink);
  font-size: 13px;
  font-weight: 600;
}

.fd-input__label label + label {
  color: var(--fd-subtle);
  font-weight: 400;
}

.fd-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px 84px;
  align-items: stretch;
  height: var(--control-h);
  border: 1px solid var(--fd-control);
  border-radius: var(--fd-radius);
  background: #fff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.fd-control:hover {
  border-color: var(--fd-faint);
}

.fd-control:focus-within {
  border-color: var(--fd-ink);
  box-shadow: var(--fd-ring);
}

.fd-control__trend,
.fd-control__pct {
  min-width: 0;
  height: 100%;
  margin: 0;
  border: 0;
  background-color: transparent;
  color: var(--fd-ink);
  font: inherit;
  font-size: var(--control-font);
  outline: none;
}

.fd-control__trend {
  padding: 0 34px 0 var(--control-pad);
  border-radius: 7px 0 0 7px;
  font-weight: 500;
  background-image: linear-gradient(45deg, transparent 50%, var(--fd-ink) 50%), linear-gradient(135deg, var(--fd-ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
  appearance: none;
}

/* The frame shows focus for the whole control; its two parts draw no outline of their own. */
.fd-control__trend:focus-visible,
.fd-control__pct:focus-visible {
  outline: none;
}

.fd-control__trend:has(option[value=""]:checked) {
  color: var(--fd-ink);
  font-weight: 600;
}

/*
 * Completed: green, exactly as the B2B registration form (styles.css .is-complete-field): tint #edf9f0, border
 * #6eb38d; hover #e6f5eb / #5ca27c; focus border #4f9470 with a soft green ring. An invalid or missing field keeps its
 * error look. background-color only (never the shorthand), so a select keeps its chevron.
 */
.fd .is-complete-field:not([aria-invalid="true"]),
.fd-control:not(:has(.fd-control__trend option[value=""]:checked)):not(:has(:disabled)):not(:has([aria-invalid="true"])),
.fd .country-picker.is-filled .country-picker__trigger:not(:disabled):not([aria-invalid="true"]) {
  border-color: #6eb38d;
  background-color: #edf9f0;
}

.fd .is-complete-field:not([aria-invalid="true"]):hover,
.fd-control:not(:has(.fd-control__trend option[value=""]:checked)):not(:has(:disabled)):not(:has([aria-invalid="true"])):hover,
.fd .country-picker.is-filled .country-picker__trigger:not(:disabled):not([aria-invalid="true"]):hover {
  border-color: #5ca27c;
  background-color: #e6f5eb;
}

.fd .is-complete-field:not([aria-invalid="true"]):focus,
.fd-control:not(:has(.fd-control__trend option[value=""]:checked)):not(:has(:disabled)):not(:has([aria-invalid="true"])):focus-within,
.fd .country-picker.is-filled .country-picker__trigger:not(:disabled):not([aria-invalid="true"]):focus-visible {
  border-color: #4f9470;
  box-shadow: 0 0 0 2px rgba(79, 148, 112, 0.18);
}

/* The keyboard focus outline of a completed field is green too (the registration form never turns it navy). */
.fd .is-complete-field:not([aria-invalid="true"]):focus-visible,
.fd .country-picker.is-filled .country-picker__trigger:not(:disabled):not([aria-invalid="true"]):focus-visible {
  outline-color: #4f9470;
}

/* Where the agent still has to choose: a light tint and a firmer border until it is answered, then green. */
.fd-control:has(.fd-control__trend option[value=""]:checked):not(:has(:disabled)) {
  border-color: #8a99ad;
  background: #f1f5fb;
}

.fd-control:has(.fd-control__trend option[value=""]:checked):not(:has(:disabled)):hover {
  border-color: #5f6f86;
}

.fd .country-picker:not(.is-filled) .country-picker__trigger:not(:disabled) {
  border-color: #8a99ad;
  background: #f1f5fb;
}

.fd .country-picker:not(.is-filled) .country-picker__trigger:not(:disabled):hover {
  border-color: #5f6f86;
}

.fd .country-picker:not(.is-filled) .country-picker__label--placeholder {
  color: var(--fd-ink);
  font-weight: 600;
}

.fd-control__divider {
  margin-block: 8px;
  background: var(--fd-rule);
}

.fd-control__pctwrap {
  position: relative;
  display: block;
}

.fd-control__pct {
  width: 100%;
  padding: 0 28px 0 8px;
  border-radius: 0 7px 7px 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.fd-control__unit {
  position: absolute;
  top: 50%;
  right: 12px;
  color: var(--fd-subtle);
  transform: translateY(-50%);
  pointer-events: none;
}

.fd-control:has(.fd-control__pct[aria-invalid="true"]) {
  border-color: var(--fd-attn);
}

.fd-control:has(:disabled) {
  background: #f9fafb;
}

/* What the trend and its % mean, under the control. */
.fd-input__explain {
  margin: 2px 0 0;
  color: var(--fd-muted);
  font-size: 13px;
  line-height: 1.45;
}

.fd-input__explain:empty {
  display: none;
}

.fd-error {
  margin: 4px 0 0;
  color: var(--fd-down);
  font-size: 13px;
}

.fd-error:empty {
  display: none;
}

/* What it gives: the output of the card, under a light rule; proportionate, not a headline. */
.fd-result {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  padding-top: 10px;
  border-top: 1px solid var(--fd-rule);
}

.fd-result__label {
  color: var(--fd-muted);
  font-size: 14px;
}

.fd-result__value {
  display: inline-flex;
  align-items: baseline;
  color: var(--fd-ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}

/* The calculation behind the estimate: 2026 estimate ± % = 2027, and the difference in units. */
.fd-result__calc {
  flex-basis: 100%;
  margin: 0;
  color: var(--fd-muted);
  font-size: 13px;
  text-align: right;
}

.fd-result__diff {
  margin-left: 8px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.fd-result__diff.is-up {
  color: var(--fd-up);
}

.fd-result__diff.is-down {
  color: var(--fd-down);
}

.fd-result__diff.is-flat {
  color: var(--fd-subtle);
}

.fd-result__value.is-empty {
  color: var(--fd-faint);
  font-size: 15px;
  font-weight: 400;
}

.fd-unit {
  margin-left: 5px;
  color: var(--fd-subtle);
  font-size: 13px;
  font-weight: 400;
}

.fd-delta {
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.fd-history .fd-delta,
.fd-overview__table .fd-delta {
  font-size: 14px;
}

.fd-delta.is-up {
  color: var(--fd-up);
}

.fd-delta.is-down {
  color: var(--fd-down);
}

.fd-delta.is-flat,
.fd-delta.is-none {
  color: var(--fd-subtle);
}

.fd-delta.is-strong {
  font-size: 15px;
  font-weight: 600;
}

/* A required answer still missing after a refused Submit (or a jump from the review). */
.fd-product.is-missing {
  border-color: var(--fd-attn);
}

.fd-product.is-missing .fd-product__name,
.fd-product.is-missing .fd-input__label > label:first-child {
  color: var(--fd-down);
}

.fd-product.is-missing .fd-control {
  border-color: var(--fd-attn);
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.12);
}

/* ---------- fields, notes, buttons ---------- */

.fd .input {
  box-sizing: border-box;
  width: 100%;
  height: var(--control-h);
  min-height: var(--control-h);
  padding-inline: var(--control-pad);
  border-color: var(--fd-control);
  border-radius: var(--fd-radius);
  background-color: #fff;
  font-size: var(--control-font);
}

.fd .input:focus {
  border-color: var(--fd-ink);
  box-shadow: var(--fd-ring);
}

.fd select.input {
  padding-right: 36px;
}

.fd .fd-textarea {
  height: auto;
  min-height: 96px;
  padding-block: 10px;
  line-height: 1.5;
  resize: vertical;
}

.fd .input[aria-invalid="true"] {
  border-color: var(--fd-attn);
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.12);
}

.fd .fd-input--num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.fd-field {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
}

.fd-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  padding: 0;
  color: var(--fd-ink);
  font-size: 13px;
  font-weight: 600;
}

.fd-label__hint {
  color: var(--fd-subtle);
  font-size: 13px;
  font-weight: 400;
}

/* The customer's note: a small secondary button, then a field across the customer. */
.fd-note {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.fd-note.is-open {
  justify-items: stretch;
}

/* "Note  optional" on the left, Cancel (or Remove note) on the right: the note can always be dropped again. */
.fd-note__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fd-note__cancel {
  font-size: 13px;
}

.fd-notebtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--fd-control);
  border-radius: var(--fd-radius);
  background: #fff;
  color: var(--fd-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.fd-notebtn:hover {
  border-color: var(--fd-faint);
  background: var(--fd-hover);
}

.fd-notebtn svg {
  color: var(--fd-muted);
}

.fd-linkbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 0;
  border: 0;
  background: none;
  color: var(--fd-ink);
  font: inherit;
  font-size: 14px;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.fd-linkbtn--quiet {
  color: var(--fd-muted);
  text-decoration: none;
}

.fd-linkbtn--quiet:hover {
  color: var(--fd-ink);
  text-decoration: underline;
}

.fd .fd-addbtn {
  justify-self: start;
  gap: 8px;
  height: 40px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--fd-radius);
  font-size: 14px;
}

/* ---------- entries: flagged accounts and new clients share one treatment ---------- */

.fd-exceptions,
.fd-clients {
  display: grid;
  gap: 12px;
}

.fd-exceptions:empty {
  display: none;
}

.fd-exception,
.fd-client {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--fd-rule);
  border-radius: var(--fd-radius);
  background: #fff;
}

.fd-exception__main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

/* The two labels share a line: the account label sits at the height of the trend label. */
.fd-exception__main > .fd-field {
  gap: 6px;
}

.fd-exception__main > .fd-field > .fd-label {
  min-height: 19px;
}

.fd-exception__empty {
  margin: 0;
  color: var(--fd-muted);
  font-size: 14px;
}

/* The chosen account per product: history, then the 2027 figure its own trend gives. */
.fd-mini {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.fd-mini th,
.fd-mini td {
  padding: 7px 0 7px 16px;
  border-bottom: 1px solid var(--fd-rule);
  text-align: right;
  white-space: nowrap;
}

.fd-mini > :not(caption) > tr > :first-child {
  padding-left: 0;
  text-align: left;
}

.fd-mini thead th {
  padding-top: 0;
  color: var(--fd-subtle);
  font-size: 13px;
  font-weight: 500;
}

.fd-mini tbody tr:last-child > * {
  border-bottom: 0;
}

.fd-mini tbody th {
  color: var(--fd-ink);
  font-weight: 600;
}

.fd-mini tbody th span {
  margin-left: 6px;
  color: var(--fd-subtle);
  font-size: 12px;
  font-weight: 400;
}

.fd-mini td {
  color: var(--fd-muted);
}

.fd-mini .is-forecast {
  padding-left: 20px;
  border-left: 1px solid var(--fd-rule);
}

/* The cell before the forecast column keeps its numbers clear of the vertical separator. */
.fd-mini > :not(caption) > tr > :has(+ .is-forecast) {
  padding-right: 20px;
}

.fd-mini thead .is-forecast {
  color: var(--fd-ink);
  font-weight: 600;
}

.fd-mini td.is-forecast .fd-num {
  color: var(--fd-ink);
  font-weight: 700;
}

.fd-num.is-none {
  color: var(--fd-faint);
}

/* The account picker in the forecast: a quiet menu, each account with its code, country and 2026 volume. */
.fd .country-picker__menu {
  border-color: var(--fd-control);
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.1);
}

.fd .country-picker__search-wrap {
  padding: 6px;
  border-bottom-color: var(--fd-rule);
}

.fd .country-picker__search {
  height: 36px;
  min-height: 36px;
  font-size: 14px;
}

.fd .country-picker__search:focus {
  border-color: var(--fd-ink);
  box-shadow: var(--fd-ring);
}

.fd .country-picker__options {
  max-height: 280px;
  padding: 4px;
}

.fd .country-picker__options:focus,
.fd .country-picker__options:focus-visible {
  outline: none;
}

.fd .country-picker__option {
  padding: 7px 10px;
  border-radius: 6px;
}

.fd .country-picker__option--active {
  background: var(--fd-hover);
}

.fd .country-picker__option--selected .country-picker__option-name {
  font-weight: 600;
}

.country-picker__option-text {
  display: grid;
  min-width: 0;
}

.country-picker__option-detail {
  overflow: hidden;
  color: var(--fd-subtle, #667085);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fd .country-picker__option-text {
  gap: 2px;
}

.fd .country-picker__option-detail {
  font-size: 13px;
}

.fd-exception__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 24px;
}

.fd-exception__foot .fd-note {
  flex: 1 1 320px;
}

.fd-client__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.fd-client__title {
  margin: 0;
  color: var(--fd-ink);
  font-size: 15px;
  font-weight: 600;
}

/* Four equal columns, every field the same height and width: the name takes two, then country and offer type; the second
   row is product, volume, likelihood and start. */
.fd-client__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 16px;
  align-items: start;
}

.fd-client__grid > :nth-child(1) {
  grid-column: span 2;
}

.fd-client__grid .input,
.fd-client__grid select.input {
  width: 100%;
  min-width: 0;
}

.fd-clients__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.fd-clients__total {
  margin: 0;
  color: var(--fd-muted);
  font-size: 14px;
}

.fd-clients__total:empty {
  display: none;
}

/* ---------- section 3: reasons ---------- */

.fd-checks {
  margin: 0;
  padding: 0;
  border: 0;
}

.fd-checks__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 20px;
  margin-top: 6px;
}

.fd-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  color: var(--fd-ink);
  cursor: pointer;
}

.fd-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--fd-ink);
}

/* ---------- review: totals, what is missing, Submit ---------- */

.fd-review {
  display: grid;
  gap: 20px;
}

.fd-review__body {
  display: grid;
  gap: 20px;
}

.fd-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.fd-summary__product {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--fd-rule);
  border-radius: var(--fd-radius);
}

.fd-summary__name {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  color: var(--fd-ink);
  font-size: 15px;
  font-weight: 600;
}

.fd-summary__figures {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin: 0;
}

.fd-summary__from,
.fd-summary__to {
  display: grid;
  gap: 0;
}

.fd-summary__label {
  color: var(--fd-subtle);
  font-size: 13px;
}

.fd-summary__from .fd-num {
  color: var(--fd-muted);
  font-size: 17px;
}

.fd-summary__to {
  grid-template-columns: auto auto;
  column-gap: 10px;
  align-items: baseline;
}

.fd-summary__to .fd-summary__label {
  grid-column: 1 / -1;
}

.fd-summary__to .fd-num {
  color: var(--fd-ink);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
}

.fd-summary__arrow {
  display: grid;
  padding-bottom: 4px;
  color: var(--fd-faint);
}

.fd-summary__split {
  margin: 0;
  color: var(--fd-muted);
  font-size: 14px;
}

/* The state: ready, or the missing answers as a list to work through (icon and words, not a red box). */
.fd-verdict {
  display: grid;
  gap: 10px;
}

.fd-verdict__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 0;
  color: var(--fd-ink);
  font-size: 15px;
  font-weight: 600;
}

.fd-verdict__title svg {
  flex: 0 0 auto;
  color: var(--fd-attn);
}

.fd-verdict.is-ready .fd-verdict__title,
.fd-verdict.is-ready .fd-verdict__title svg {
  color: var(--fd-up);
}

/* One line per account or section still missing an answer; the whole line takes the agent to it. */
.fd-verdict__items {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fd-verdict__items > li + li {
  border-top: 1px solid var(--fd-rule);
}

.fd-verdict__item {
  display: flex;
  align-items: baseline;
  gap: 8px 16px;
  width: 100%;
  padding: 9px 4px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--fd-ink);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.fd-verdict__item:hover {
  background: var(--fd-hover);
}

.fd-verdict__item:focus-visible {
  outline: 2px solid var(--fd-ink);
  outline-offset: 1px;
}

.fd-verdict__scope {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.fd-verdict__what {
  flex: none;
  color: var(--fd-ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--fd-faint);
  text-underline-offset: 3px;
}

.fd-verdict__item:hover .fd-verdict__what {
  text-decoration-color: currentColor;
}

.fd-verdict__only {
  color: var(--fd-muted);
  font-weight: 400;
}

.fd-verdict__item svg {
  flex: none;
  align-self: center;
  color: var(--fd-subtle);
}

/* Save state and its note on the left; Temporary save, then Submit, on the right of the card. */
.fd-submission__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}

.fd-submission__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-left: auto;
}

.fd .fd-tempsave {
  height: 44px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--fd-radius);
  font-size: 15px;
  font-weight: 500;
}

.fd .fd-submit {
  height: 44px;
  min-height: 44px;
  padding: 0 28px;
  border-radius: var(--fd-radius);
  font-size: 15px;
  font-weight: 600;
}

.fd-submission__meta {
  display: grid;
  flex: 1 1 320px;
  gap: 2px;
}

/* The save state is on the Temporary save button; this line is announced to screen readers and shown only on failure. */
.fd-save {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* After a submission: saved changes that Formens receives only with a new submission. */
.fd-resubmit {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  color: var(--fd-ink);
  font-size: 14px;
  font-weight: 600;
}

.fd-resubmit[hidden] {
  display: none;
}

.fd-resubmit svg {
  flex: none;
  margin-top: 3px;
  color: var(--fd-down);
}

.fd-save[data-state="error"] {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--fd-down);
  font-size: 14px;
  font-weight: 600;
}

.fd .fd-tempsave {
  gap: 6px;
}

.fd .btn.fd-tempsave[data-state="saved"] {
  border-color: #abefc6;
  background: #ecfdf3;
  color: var(--fd-up);
}

.fd .fd-tempsave[data-state="saved"] svg {
  color: var(--fd-up);
}

.fd-submitnote:empty {
  display: none;
}

.fd-submitnote {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fd-ink);
}

.fd-submitnote svg {
  color: var(--fd-attn);
}

/* ---------- after submitting: a confirmation, like a dialog over the page ---------- */

.fd-confirm {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 180px);
  padding: 24px 0 48px;
}

.fd-confirm__panel {
  display: grid;
  justify-items: center;
  width: min(100%, 480px);
  padding: 40px 36px 32px;
  border: 1px solid var(--fd-rule);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 24px 48px -16px rgba(16, 24, 40, 0.18);
  text-align: center;
}

/* The Formens mark: a black seal; its check draws itself once (still when motion is reduced). */
.fd-confirm__seal {
  margin-bottom: 22px;
}

.fd-confirm__disc {
  fill: var(--fd-ink);
}

.fd-confirm__tick {
  fill: none;
  stroke: #fff;
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: fd-tick 420ms cubic-bezier(0.65, 0, 0.35, 1) 160ms forwards;
}

@keyframes fd-tick {
  to {
    stroke-dashoffset: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fd-confirm__tick {
    animation: none;
    stroke-dashoffset: 0;
  }
}

.fd-confirm__title {
  max-width: 340px;
  margin: 0;
  color: var(--fd-ink);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.fd-confirm__title:focus {
  outline: none;
}

.fd-confirm__thanks {
  margin: 8px 0 0;
  color: var(--fd-muted);
  font-size: 15px;
}

/* What was recorded: one line per product, the 2027 figure first. */
.fd-confirm__totals {
  display: grid;
  width: 100%;
  margin: 26px 0 0;
  border-top: 1px solid var(--fd-rule);
  text-align: left;
}

.fd-confirm__caption {
  padding: 14px 0 2px;
  color: var(--fd-subtle);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fd-confirm__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--fd-rule);
}

.fd-confirm__row dt {
  display: grid;
  gap: 2px;
}

.fd-confirm__product {
  color: var(--fd-ink);
  font-size: 15px;
  font-weight: 600;
}

.fd-confirm__unit {
  color: var(--fd-subtle);
  font-size: 13px;
}

.fd-confirm__row dd {
  display: grid;
  justify-items: end;
  gap: 2px;
  margin: 0;
}

.fd-confirm__value {
  color: var(--fd-ink);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.1;
}

.fd-confirm__change {
  color: var(--fd-subtle);
  font-size: 13px;
  white-space: nowrap;
}

.fd .fd-confirm__action {
  width: 100%;
  margin-top: 28px;
}

@media (max-width: 760px) {
  .fd-confirm {
    min-height: 0;
    padding-top: 8px;
  }

  .fd-confirm__panel {
    padding: 32px 22px 24px;
  }
}

/* ---------- ≤760: product cards and grids stack ---------- */

@media (max-width: 760px) {
  .fd {
    --fd-card-pad: 22px 20px;
  }

  .fd-products,
  .fd-summary,
  .fd-exception__main {
    grid-template-columns: minmax(0, 1fr);
  }

  .fd-customer {
    padding: 16px;
  }

  .fd-checks__grid,
  .fd-client__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fd-client__grid > :nth-child(n) {
    grid-column: auto;
  }

  .fd-client__grid > :nth-child(1) {
    grid-column: 1 / -1;
  }

  .fd-verdict__item {
    flex-wrap: wrap;
  }

  .fd-verdict__what {
    flex-basis: 100%;
    order: 3;
  }

  .fd-mini thead {
    display: none;
  }

  .fd-mini,
  .fd-mini tbody {
    display: block;
  }

  .fd-mini tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--fd-rule);
  }

  .fd-mini tbody tr:last-child {
    border-bottom: 0;
  }

  .fd-mini th,
  .fd-mini td {
    padding: 0 !important;
    border: 0 !important;
    text-align: left;
  }

  .fd-mini tbody th {
    grid-column: 1 / -1;
  }

  .fd-mini td::before {
    content: attr(data-label);
    display: block;
    color: var(--fd-subtle);
    font-size: 12px;
  }
}

/* ---------- ≤600: phones ---------- */

@media (max-width: 600px) {
  .fd {
    --fd-card-pad: 20px 16px;
    --control-h: 44px;
    --control-font: 16px;
  }

  .fd-top__inner,
  .fd-column {
    width: calc(100% - 24px);
  }

  .fd-column,
  .fd-form {
    gap: 12px;
  }

  .fd-title {
    font-size: 23px;
  }

  .fd-section__title {
    font-size: 18px;
  }

  .fd-customer {
    padding: 14px 12px;
  }

  .fd-product {
    padding: 14px;
  }

  /* The overview table becomes one block per product, each figure with its column name. */
  .fd-overview__table thead,
  .fd-overview__table colgroup {
    display: none;
  }

  .fd-overview__table,
  .fd-overview__table tbody {
    display: block;
  }

  /* Per product: the three history figures on one line, the forecast and its change on the next. */
  .fd-overview__table tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--fd-rule);
  }

  .fd-overview__table th,
  .fd-overview__table td {
    padding: 0 !important;
    border: 0 !important;
    text-align: left;
  }

  .fd-overview__table tbody th {
    grid-column: 1 / -1;
  }

  .fd-overview__table td.is-forecast {
    grid-column: span 2;
  }

  .fd-overview__table td::before {
    content: attr(data-label);
    display: block;
    color: var(--fd-subtle);
    font-size: 12px;
  }

  .fd-checks__grid,
  .fd-client__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .fd-client__grid > :nth-child(n) {
    grid-column: auto;
  }

  .fd-control {
    grid-template-columns: minmax(0, 1fr) 1px 72px;
  }

  .fd-control__trend {
    padding-left: 10px;
    padding-right: 28px;
    background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  }

  .fd-summary__to .fd-num {
    font-size: 19px;
  }

  .fd-result__calc {
    text-align: left;
  }

  .fd-submission__buttons {
    width: 100%;
    margin-left: 0;
  }

  .fd-submission__buttons > .btn {
    flex: 1 1 0;
    padding-inline: 12px;
  }
}

/* A flagged account still missing its trend, or a trend still missing its account, after a refused Submit. */
.fd-exception.is-missing {
  border-color: var(--fd-attn);
}

.fd-exception.is-missing[data-missing="trend"] .fd-control,
.fd-exception.is-missing[data-missing="account"] .country-picker__trigger {
  border-color: var(--fd-attn);
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.12);
}

/* ---------- dropdowns hug their value: the arrow sits right after it, never at the far end ---------- */

.fd .country-picker {
  width: fit-content;
  max-width: 100%;
  min-width: min(100%, 200px);
}

.fd .country-picker__trigger {
  width: auto;
  max-width: 100%;
  min-width: 100%;
  gap: 10px;
}

.fd .country-picker__label {
  flex: 0 1 auto;
}

.fd .country-picker__chevron {
  position: static;
  margin-left: 0;
}

.fd select.input {
  min-width: 160px;
  max-width: 100%;
  background-position: right 12px center !important;
}

/* The trend list inside its frame: its width is set to its value in the script (fitSelect), so the arrow follows the
   value; the empty part of the frame opens it too. */
.fd-control__trend {
  justify-self: start;
  max-width: 100%;
}

.fd-control {
  cursor: pointer;
}

.fd-control__pct {
  cursor: text;
}

/* A product without 2026 volume: a plain line instead of the trend (nothing to forecast, nothing to answer). */
.fd-product__none {
  margin: 0;
  padding: 12px 14px;
  border: 1px dashed var(--fd-rule);
  border-radius: 8px;
  color: var(--fd-muted);
  font-size: 14px;
  line-height: 1.45;
}

/* A product without 2026 orders: the optional volume the agent expects in 2027 instead of a trend. */
.fd-expected {
  display: grid;
  gap: 12px;
}

.fd-expected__text {
  margin: 0;
  color: var(--fd-muted);
  font-size: 14px;
  line-height: 1.45;
}

.fd .fd-expected__input {
  max-width: 180px;
}
