@import url("https://fonts.googleapis.com/css2?family=Elms+Sans:ital,wght@0,100..900;1,100..900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Hanken+Grotesk:wght@400;500;600;700;800&family=Spectral:wght@400;500;600&display=swap");

:root {
  --bg: #f3f4f6;
  --card: #ffffff;
  --primary: #722f37;
  --primary-deep: #4b1d25;
  --primary-soft: #f7eef1;
  --text: #111827;
  --muted: #667085;
  --border: #d0d5dd;
  --green: #15803d;
  --red: #be123c;
  --amber: #b45309;
  --blue: #2563eb;
  --shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  --font-display: "Elms Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-sans: "Elms Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* V6.35 WineTest backoffice tabs and Decision Telemetry Lab */
body.tech-surface .app-header {
  padding-bottom: 10px;
}

body.tech-surface .brand-copy {
  width: 100%;
  min-width: 0;
}

body.tech-surface .title-row {
  align-items: center;
}

body.tech-surface .header-stack {
  align-items: center;
}

body.tech-surface #datasetStat {
  flex-direction: row;
  min-height: 34px;
}

body.tech-surface #datasetStat span + span {
  display: none;
}

body.tech-surface .header-surface-nav {
  width: 100%;
  display: flex;
  gap: 0;
  margin-top: 18px;
  padding: 0 2px;
  border-bottom: 1px solid rgba(105, 65, 70, 0.22);
  overflow-x: auto;
  box-shadow: none;
}

body.tech-surface .header-surface-nav .surface-nav-button {
  min-height: 38px;
  margin: 0 -1px -1px 0;
  padding: 9px 18px 10px;
  border-color: rgba(105, 65, 70, 0.22);
  border-bottom-color: rgba(105, 65, 70, 0.22);
  border-radius: 10px 10px 0 0;
  background: rgba(255, 255, 255, 0.62);
  color: #5d3b43;
  box-shadow: none;
  font-size: 12px;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

body.tech-surface .header-surface-nav .surface-nav-button:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.86);
}

body.tech-surface .header-surface-nav .surface-nav-button.active {
  position: relative;
  z-index: 1;
  border-color: rgba(114, 47, 55, 0.42);
  border-bottom-color: #fff;
  background: #fff;
  color: var(--primary);
  box-shadow: 0 -1px 0 rgba(114, 47, 55, 0.08), 0 2px 0 #fff;
}

.surface-page-rnd {
  display: grid;
  gap: 16px;
}

.rnd-lab {
  display: grid;
  gap: 16px;
  border-color: rgba(81, 99, 112, 0.2);
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.96) 260px),
    var(--card);
}

.rnd-tool-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(240px, 1fr) minmax(120px, .45fr);
  gap: 10px;
  align-items: stretch;
}

.rnd-tool-grid .barcode-header-action,
.rnd-tool-grid .autotest-header-action,
.rnd-random-action {
  width: 100%;
  min-height: 58px;
  border-radius: 8px;
  box-shadow: none;
}

.rnd-random-action {
  border-color: rgba(114, 47, 55, 0.32);
  background: #fff7f8;
  color: var(--primary);
  font-size: 13px;
}

.rnd-panel-slot {
  min-width: 0;
}

.rnd-panel-slot:empty {
  display: none;
}

.rnd-panel-slot .autotest-card,
.rnd-panel-slot .alternatives-card {
  margin: 0;
  width: 100%;
}

body.prod-surface .surface-page-rnd {
  display: none !important;
}

.feedback-dashboard {
  gap: 12px;
}

.feedback-grid {
  grid-template-columns: 1fr;
  gap: 12px;
}

.feedback-table-card,
.feedback-detail-card {
  width: 100%;
}

.feedback-table-card .feedback-table-scroll {
  max-height: 190px;
}

.feedback-detail-card .feedback-table-scroll {
  max-height: 620px;
}

.feedback-table {
  table-layout: fixed;
}

.feedback-table th,
.feedback-table td {
  overflow-wrap: anywhere;
}

.feedback-detail-card .feedback-table th:nth-child(1),
.feedback-detail-card .feedback-table td:nth-child(1) {
  width: 11%;
}

.feedback-detail-card .feedback-table th:nth-child(2),
.feedback-detail-card .feedback-table td:nth-child(2) {
  width: 13%;
}

.feedback-detail-card .feedback-table th:nth-child(3),
.feedback-detail-card .feedback-table td:nth-child(3) {
  width: 24%;
}

.feedback-detail-card .feedback-table th:nth-child(4),
.feedback-detail-card .feedback-table td:nth-child(4) {
  width: 12%;
}

.feedback-detail-card .feedback-table th:nth-child(5),
.feedback-detail-card .feedback-table td:nth-child(5),
.feedback-detail-card .feedback-table th:nth-child(6),
.feedback-detail-card .feedback-table td:nth-child(6) {
  width: 20%;
}

@media (max-width: 900px) {
  .rnd-tool-grid {
    grid-template-columns: 1fr;
  }

  body.tech-surface .header-surface-nav .surface-nav-button {
    padding-inline: 13px;
  }
}

* { box-sizing: border-box; }
html { max-width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.4;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body.prod-surface {
  --bg: #f6fcff;
  --card: #ffffff;
  --primary: #2f7fbf;
  --primary-deep: #1f567f;
  --primary-soft: rgba(222, 243, 255, 0.72);
  --border: #cfe8f8;
  --prod-number: #78bce9;
  --prod-glow-edge: 0 0 0 1px rgba(47, 127, 191, 0.26), 0 16px 40px rgba(47, 127, 191, 0.14);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  background: linear-gradient(180deg, #fbfeff 0%, #f3fbff 100%);
}

.app-header {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 18px 16px 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.brand-lockup {
  flex: 1 1 auto;
  max-width: none;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 92px;
}
.brand-logo-frame {
  flex: 0 0 auto;
  width: 86px;
  height: 86px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(114, 47, 55, 0.18);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(39, 18, 18, 0.10);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.brand-logo-frame:focus-visible {
  outline: 3px solid rgba(122, 38, 51, 0.35);
  outline-offset: 3px;
}
.brand-logo-frame img {
  width: 123px;
  height: 123px;
  max-width: none;
  display: block;
  transform: translate(-19px, -8px);
}
.brand-copy {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
}
.app-header h1 {
  flex: 0 0 auto;
  margin: 0;
  min-width: max-content;
  font-size: 31px;
  line-height: 1.06;
  color: var(--primary);
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}
body.prod-surface .brand-lockup {
  min-height: 92px;
}
body.prod-surface .title-row {
  --prod-brand-title-size: clamp(42px, 3.7vw, 56px);
  min-height: 88px;
  align-items: flex-start;
}
body.prod-surface .app-header h1 {
  font-size: var(--prod-brand-title-size);
  line-height: 0.98;
  font-weight: 500;
}
body.prod-surface .brand-title-main {
  word-spacing: -0.13em;
}
body.prod-surface .brand-title-version {
  display: inline-block;
  margin-left: clamp(3px, 0.08em, 5px);
  font-size: 0.5em;
  line-height: 1;
  vertical-align: baseline;
  transform: translateY(-0.06em);
  word-spacing: normal;
}
.brand-playground {
  color: #18c95b;
}
.app-header p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.header-subtitle { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.surface-nav {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  min-height: 34px;
}
body.tech-surface .surface-nav {
  display: flex;
}
body.tech-surface .header-subtitle,
body.prod-surface .header-subtitle {
  display: none !important;
}
body.prod-surface .surface-nav {
  display: none !important;
}
.surface-nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.surface-nav-button:hover {
  transform: translateY(-1px);
}
.surface-nav-button.active {
  border-color: rgba(114, 47, 55, 0.55);
  background: #fff7f8;
  box-shadow: 0 0 0 2px rgba(114, 47, 55, 0.08), var(--shadow);
}
.alt-quiz-nav-button {
  border-color: rgba(24, 201, 91, 0.34);
  color: #116b34;
}
.alt-quiz-nav-button.active {
  border-color: rgba(24, 201, 91, 0.58);
  background: #f0fdf4;
  box-shadow: 0 0 0 2px rgba(24, 201, 91, 0.11), var(--shadow);
}
.surface-page[hidden] {
  display: none !important;
}
body.prod-surface .surface-page-database {
  display: none !important;
}
body.prod-surface .surface-page-alt-quiz {
  display: none !important;
}
.title-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: nowrap;
  position: relative;
}
.research-engine-credit { display: none; }
body.tech-surface .research-engine-credit,
body.prod-surface .research-engine-credit {
  display: block;
  position: absolute;
  top: 35px;
  left: 0;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  pointer-events: none;
}
body.prod-surface .research-engine-credit {
  top: calc(var(--prod-brand-title-size, 56px) + 10px);
  font-size: clamp(13px, 1.05vw, 16px);
  font-weight: 700;
  font-style: italic;
  line-height: 1.12;
}
.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}
.language-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}
.language-option:hover {
  background: #f8fafc;
  border-color: #eef2f6;
}
.language-option.active {
  background: var(--primary-soft);
  border-color: rgba(114, 47, 55, 0.35);
  box-shadow: inset 0 0 0 1px rgba(114, 47, 55, 0.18);
}
body.tech-surface .language-option[data-lang="el"] {
  display: none !important;
}
.header-stack {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
  margin-left: auto;
}
.header-stat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  min-height: 38px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
  box-shadow: var(--shadow);
}
.header-stat.subtle { color: var(--muted); }
body.tech-surface #datasetStat {
  flex-direction: column;
  gap: 2px;
  line-height: 1.18;
}
body.tech-surface #datasetStat span { display: block; }

.autotest-header-action {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  flex: 0 0 238px;
  min-height: 40px;
  padding: 6px 12px;
  border: 1px solid rgba(21, 128, 61, 0.34);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #ecfdf3);
  color: #14532d;
  box-shadow: var(--shadow);
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.autotest-header-action:hover {
  border-color: rgba(21, 128, 61, 0.58);
  box-shadow: 0 6px 18px rgba(21, 128, 61, 0.14);
}
.autotest-header-action:focus-visible {
  outline: 3px solid rgba(21, 128, 61, 0.24);
  outline-offset: 2px;
}
.autotest-action-icon {
  position: relative;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 10px;
  border: 1px solid rgba(21, 128, 61, 0.24);
  background:
    radial-gradient(circle at 50% 50%, rgba(21, 128, 61, 0.18) 0 24%, transparent 25%),
    conic-gradient(from 0deg, #16a34a, #22c55e, #86efac, #16a34a);
  box-shadow: inset 0 0 0 7px #fff;
}
.autotest-action-icon::before,
.autotest-action-icon::after {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  height: 2px;
  border-radius: 999px;
  background: #14532d;
}
.autotest-action-icon::before { top: 9px; }
.autotest-action-icon::after { bottom: 9px; }
.autotest-action-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.autotest-action-title {
  font-size: 10.5px;
  line-height: 1.05;
  font-weight: 900;
}
.autotest-action-subtitle {
  color: #166534;
  font-size: 9px;
  line-height: 1.1;
  font-weight: 700;
}
body.prod-surface .autotest-header-action,
body.prod-surface .autotest-card,
body.prod-surface .tech-wine-db-card,
body.prod-surface .session-stats-panel,
body.prod-surface .barcode-header-action {
  display: none !important;
}

body.prod-surface .title-row {
  width: 100%;
  min-width: 0;
}

body.prod-surface .language-switcher {
  flex: 0 0 auto;
  margin-left: 14px;
}

body.prod-surface .header-stack {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 10px;
  flex: 1 1 0;
  min-width: 0;
}

body.prod-surface .header-stat {
  width: 100%;
  max-width: 230px;
  min-width: 0;
  flex: 0 1 230px;
  min-height: 40px;
  padding: 7px 12px;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  text-wrap: balance;
}

@media (min-width: 721px) {
  body.prod-surface #totalQuizStat {
    flex-basis: 230px;
    max-width: 230px;
    white-space: nowrap;
  }
  body.prod-surface #datasetStat {
    flex-basis: 292px;
    max-width: 292px;
    white-space: nowrap;
  }
}

.container {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 16px;
}
.app-header > *,
.hero > *,
.card-head > *,
.quiz-layout > *,
.results-grid > *,
.controls-grid > *,
.profile-kpis > *,
.recs-row > *,
.rec-card > * {
  min-width: 0;
}
.card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
h2 { margin: 0; font-size: 15px; color: var(--primary); }
h3 { margin: 16px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
h1, h2, h3, p, .header-stat, .badge, .answer-title, .answer-subtitle {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #475467;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.badge.good { background: #ecfdf3; color: var(--green); }
.badge.warn { background: #fffaeb; color: var(--amber); }
.badge.bad { background: #fff1f3; color: var(--red); }

.hero {
  display: grid;
  grid-template-columns: minmax(210px, 24%) minmax(0, 1fr);
  align-items: stretch;
  gap: 18px;
  background: linear-gradient(135deg, #ffffff, #fff7f8);
}
.hero-copy {
  min-width: 0;
  align-self: center;
}
.hero > .session-stats-panel,
.hero > .session-globe-panel {
  grid-column: 2;
}
.hero h2 { font-size: 20px; }
.hero p { margin: 6px 0 0; max-width: 32ch; color: var(--muted); font-size: 12px; line-height: 1.35; }
.hero-flow-image {
  display: none;
  width: 100%;
  height: auto;
  margin-top: 14px;
  border: 1px solid rgba(114, 47, 55, 0.16);
  border-radius: 12px;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
body.prod-surface .hero {
  display: flex;
  align-items: flex-start;
  padding: 8px 14px 10px;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(47, 127, 191, 0.14);
  box-shadow: 0 1px 8px rgba(47, 127, 191, 0.06);
}
body.prod-surface .hero > .hero-copy {
  width: 100%;
}
body.prod-surface .hero h2 {
  display: none;
}
body.prod-surface .hero p {
  margin: 0;
  max-width: none;
  color: var(--primary-deep);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.36;
}
body.prod-surface .hero-flow-image {
  display: block;
  width: calc(100% + 34px);
  max-width: none;
  margin-left: -17px;
  margin-right: -17px;
  border-left: 0;
  border-right: 0;
  border-radius: 0 0 12px 12px;
}
.session-stats-panel {
  min-width: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 8px 10px;
  border: 1px solid rgba(114, 47, 55, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 18px rgba(20, 31, 51, 0.06);
}
.session-lab-stats-panel {
  background: rgba(255, 255, 255, 0.78);
}
.session-stats-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
}
.session-stats-head h3 {
  margin: 0;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.session-stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 0.86fr)) minmax(130px, 1fr) minmax(130px, 1.12fr);
  align-items: stretch;
  gap: 6px;
}
.session-stat-box {
  min-width: 0;
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}
.session-stat-box span {
  display: block;
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}
.session-stat-box strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 13px;
  line-height: 1;
}
.session-source-stat strong,
.session-stat-countries strong {
  font-size: 12px;
  line-height: 1.2;
  word-break: break-word;
}
.session-stats-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 5px;
}
.session-stats-foot p {
  margin: 0;
  max-width: none;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.18;
}
.session-stats-foot span {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f4f6f9;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}
.session-globe-panel {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(114, 47, 55, 0.16);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(20, 31, 51, 0.07);
}
.session-globe-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.48fr) minmax(280px, 0.52fr);
  align-items: stretch;
  gap: 10px;
  min-width: 0;
}
.session-globe-canvas-wrap {
  min-width: 0;
}
.session-globe-canvas {
  display: block;
  width: 100%;
  height: 260px;
  border: 1px solid rgba(114, 47, 55, 0.14);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 48%, #e8f6ff, #f7fcff 58%, #ffffff 100%);
}
.session-visit-table-panel {
  min-width: 0;
  max-height: 260px;
  overflow: auto;
  scrollbar-width: thin;
  border: 1px solid rgba(47, 127, 191, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.86);
}
.session-visit-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  color: var(--text);
  font-size: 10px;
  line-height: 1.22;
}
.session-visit-table th,
.session-visit-table td {
  padding: 7px 8px;
  border-bottom: 1px solid rgba(47, 127, 191, 0.12);
  text-align: left;
  vertical-align: top;
}
.session-visit-table th {
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(235, 247, 255, 0.72);
}
.session-visit-table th:nth-child(1),
.session-visit-table td:nth-child(1) {
  width: 22%;
}
.session-visit-table th:nth-child(2),
.session-visit-table td:nth-child(2) {
  width: 44%;
}
.session-visit-table th:nth-child(3),
.session-visit-table td:nth-child(3) {
  width: 34%;
}
.session-visit-table td {
  font-weight: 800;
  overflow-wrap: anywhere;
}
.session-visit-empty td {
  color: var(--muted);
  font-weight: 800;
}
.session-globe-legend {
  min-height: 18px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
}
body.prod-surface .session-lab-stats-panel,
body.prod-surface .session-globe-panel,
body.prod-surface .session-access-panel {
  display: none !important;
}
.session-access-panel {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(47, 127, 191, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 22px rgba(20, 31, 51, 0.07);
}
.session-access-table {
  border: 1px solid rgba(47, 127, 191, 0.18);
  border-radius: 10px;
  display: block;
  max-height: 210px;
  overflow: auto;
  scrollbar-width: thin;
}
.session-access-table td:first-child {
  color: #8a2432;
  font-weight: 900;
  text-transform: uppercase;
}
body.tech-surface .hero {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 31%);
  align-items: start;
  gap: 10px 14px;
}
body.tech-surface .hero > .hero-copy {
  display: none;
}
body.tech-surface .hero > #sessionStatsPanel {
  grid-column: 1;
  grid-row: 1;
}
body.tech-surface .hero > #sessionStatsProdPanel {
  grid-column: 1;
  grid-row: 2;
}
body.tech-surface .hero > #techAccessPanel {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  height: 210px;
  max-height: 210px;
}
body.tech-surface .hero > #wineLabGlobePanel {
  grid-column: 1 / -1;
  grid-row: 3;
}
body.tech-surface .session-access-panel {
  min-height: 0;
}
body.tech-surface .session-access-table {
  align-self: stretch;
}
.hero-actions {
  position: fixed;
  right: 18px;
  top: 18px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 210px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(10px);
}

.btn-generate, .btn-secondary {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.18;
}
.hero-actions .btn-generate,
.hero-actions .btn-secondary {
  width: 100%;
  min-height: 40px;
}
.hero-actions .btn-generate { min-height: 48px; }
.hero-actions .action-quiz-stat {
  width: 100%;
  border-radius: 10px;
  padding: 8px 10px;
  text-align: center;
  line-height: 1.2;
  white-space: normal;
}
.btn-generate { background: var(--primary); color: #fff; }
.btn-secondary { background: #f2f4f7; color: #344054; border: 1px solid var(--border); }
.btn-generate:hover, .btn-secondary:hover { filter: brightness(0.97); }

.quiz-layout {
  display: contents;
}
.quiz-panel {
  order: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.quiz-question {
  padding: 14px;
  background: var(--quiz-bg, var(--card));
  border-color: var(--quiz-border, var(--border));
}
.quiz-panel > .quiz-question:nth-child(1) { --quiz-bg: #fff1f2; --quiz-border: #fecdd3; }
.quiz-panel > .quiz-question:nth-child(2) { --quiz-bg: #fff4ed; --quiz-border: #fed7aa; }
.quiz-panel > .quiz-question:nth-child(3) { --quiz-bg: #fffbeb; --quiz-border: #fde68a; }
.quiz-panel > .quiz-question:nth-child(4) { --quiz-bg: #f7fee7; --quiz-border: #d9f99d; }
.quiz-panel > .quiz-question:nth-child(5) { --quiz-bg: #ecfdf5; --quiz-border: #bbf7d0; }
.quiz-panel > .quiz-question:nth-child(6) { --quiz-bg: #ecfeff; --quiz-border: #a5f3fc; }
.quiz-panel > .quiz-question:nth-child(7) { --quiz-bg: #eff6ff; --quiz-border: #bfdbfe; }
.quiz-panel > .quiz-question:nth-child(8) { --quiz-bg: #f5f3ff; --quiz-border: #ddd6fe; }
.quiz-panel > .quiz-question:nth-child(9) { --quiz-bg: #fdf2f8; --quiz-border: #fbcfe8; }
.quiz-panel > .quiz-question:nth-child(10) { --quiz-bg: #f0fdfa; --quiz-border: #99f6e4; }
body.prod-surface .quiz-panel > .quiz-question {
  --quiz-bg: rgba(255, 255, 255, 0.92);
  --quiz-border: rgba(47, 127, 191, 0.20);
}
.quiz-question-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.quiz-question h2 { font-size: 16px; }
.quiz-question p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
body.prod-surface .quiz-panel {
  counter-reset: quizq;
}
body.prod-surface .quiz-question {
  position: relative;
}
body.prod-surface .quiz-question-head {
  counter-increment: quizq;
  align-items: center;
  justify-content: center;
  padding: 0 66px;
  position: relative;
  text-align: center;
  min-height: 60px;
}
body.prod-surface .quiz-question-head > div {
  width: 100%;
  min-width: 0;
}
body.prod-surface .quiz-question:not(.price-question) .quiz-question-head::before {
  content: counter(quizq);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: var(--prod-number);
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 0.95;
  box-shadow: none;
}
body.prod-surface .quiz-question h2 {
  color: var(--primary-deep);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}
body.prod-surface .quiz-question p {
  text-align: center;
}
.question-weight {
  font-size: 11px;
  color: var(--primary);
  font-weight: 900;
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 5px 8px;
}
.answer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}
.answer-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #fcfcfd;
  min-height: 118px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: .15s ease;
}
.answer-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.answer-card.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px var(--primary);
}
.answer-title { font-size: 14px; font-weight: 900; color: #1d2939; }
.answer-subtitle { color: var(--muted); font-size: 12px; }
.answer-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(208, 213, 221, 0.85);
  background: #f8fafc;
  margin-top: auto;
}
.quiz-question[data-question-id="q3"] .answer-image {
  aspect-ratio: 16 / 9;
  object-fit: contain;
  padding: 0;
  background: radial-gradient(circle at 50% 42%, #ffffff 0%, #f6f7f9 58%, #eef1f5 100%);
}
.answer-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: auto; }
.tag-pill {
  font-size: 10px;
  color: #344054;
  background: #eef2f6;
  border-radius: 999px;
  padding: 3px 6px;
  font-weight: 700;
}
.answer-card.selected .tag-pill { background: #fff; color: var(--primary); }

.alt-quiz-lab {
  display: grid;
  gap: 16px;
  border-color: rgba(24, 201, 91, 0.25);
  background:
    linear-gradient(180deg, rgba(240, 253, 244, 0.92), rgba(255, 255, 255, 0.94) 260px),
    var(--card);
}
.alt-quiz-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}
.alt-quiz-kicker {
  display: inline-flex;
  margin-bottom: 6px;
  color: #15803d;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}
.alt-quiz-head h2 {
  margin: 0;
  font-size: 22px;
  color: #122033;
}
.alt-quiz-head p {
  max-width: 780px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.alt-quiz-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 440px;
}
.alt-quiz-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.alt-quiz-status-grid > div {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(208, 213, 221, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}
.alt-quiz-status-grid span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.alt-quiz-status-grid strong {
  display: block;
  margin-top: 3px;
  color: #122033;
  font-size: 14px;
}
.alt-gate-clear { color: #15803d !important; }
.alt-gate-warn { color: #a16207 !important; }
.alt-gate-fail { color: #b42318 !important; }
.alt-quiz-panel {
  display: grid;
  gap: 14px;
}
.alt-quiz-question {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(208, 213, 221, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}
.alt-quiz-question-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.alt-quiz-question-index {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 14px;
  font-weight: 950;
}
.alt-quiz-question h3 {
  margin: 0;
  font-size: 16px;
  color: #1d2939;
}
.alt-quiz-question p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.alt-answer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}
.alt-answer-card {
  display: grid;
  grid-template-rows: auto auto minmax(148px, 1fr) auto;
  gap: 7px;
  min-height: 286px;
  padding: 10px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  color: #1d2939;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.05);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.alt-answer-card:hover {
  transform: translateY(-1px);
  border-color: rgba(24, 201, 91, 0.45);
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.09);
}
.alt-answer-card.selected {
  border-color: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.16), 0 8px 22px rgba(16, 24, 40, 0.1);
}
.alt-answer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #667085;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.alt-risk {
  padding: 3px 6px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.alt-risk-clear {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}
.alt-risk-warn {
  background: #fef3c7;
  border-color: #facc15;
  color: #854d0e;
}
.alt-risk-fail {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}
.alt-answer-title {
  color: #101828;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.2;
}
.alt-answer-subtitle {
  min-height: 34px;
  color: #475467;
  font-size: 12px;
  line-height: 1.35;
}
.alt-answer-card .answer-image {
  width: 100%;
  margin: 0;
  aspect-ratio: 16 / 9;
}
.alt-image-brief {
  display: grid;
  gap: 6px;
  min-height: 148px;
  padding: 8px;
  border: 1px solid rgba(47, 127, 191, 0.18);
  border-radius: 7px;
  background: rgba(239, 249, 255, 0.72);
  color: #24394c;
  font-size: 10.5px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.alt-image-brief-row {
  display: grid;
  gap: 2px;
}
.alt-image-brief-row > span {
  color: #607486;
  font-size: 8.5px;
  font-weight: 950;
  line-height: 1.1;
  text-transform: uppercase;
}
.alt-image-brief-row > strong {
  color: #1d3345;
  font-weight: 800;
}
.alt-answer-cluster {
  color: #344054;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.feedback-dashboard {
  display: grid;
  gap: 16px;
  border-color: rgba(47, 134, 199, 0.24);
  background:
    linear-gradient(180deg, rgba(239, 249, 255, 0.9), rgba(255, 255, 255, 0.94) 280px),
    var(--card);
}
.feedback-dashboard-head {
  align-items: start;
}
.feedback-dashboard-head p {
  max-width: 820px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 750;
}
.feedback-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
}
.feedback-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}
.feedback-filters input,
.feedback-filters select {
  min-height: 40px;
  border: 1px solid rgba(177, 213, 238, 0.95);
  border-radius: 8px;
  padding: 0 11px;
  background: rgba(255, 255, 255, 0.92);
  color: #1d2939;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
}
.feedback-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 14px;
  align-items: start;
}
.feedback-table-card,
.feedback-detail-card {
  min-width: 0;
  border: 1px solid rgba(177, 213, 238, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  overflow: hidden;
}
.feedback-table-card h3,
.feedback-detail-card h3 {
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(177, 213, 238, 0.7);
  color: #1f4e70;
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}
.feedback-table-scroll {
  max-height: 560px;
  overflow: auto;
  border: 0;
  border-radius: 0;
}
.feedback-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.feedback-table th,
.feedback-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(177, 213, 238, 0.54);
  text-align: left;
  vertical-align: top;
}
.feedback-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(235, 248, 255, 0.98);
  color: #496579;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}
.feedback-table td {
  color: #26384b;
  font-weight: 800;
}
.feedback-table td strong,
.feedback-table td span {
  display: block;
}
.feedback-table td span {
  margin-top: 3px;
  color: #667085;
  font-size: 11px;
  line-height: 1.35;
}
.feedback-session-row {
  cursor: pointer;
}
.feedback-session-row:hover,
.feedback-row-active {
  background: rgba(47, 134, 199, 0.08);
}
@media (max-width: 720px) {
  .surface-nav {
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .surface-nav-button {
    padding-inline: 11px;
  }
  .alt-quiz-head {
    grid-template-columns: 1fr;
  }
  .alt-quiz-actions {
    justify-content: flex-start;
    max-width: none;
  }
  .alt-quiz-status-grid {
    grid-template-columns: 1fr;
  }
  .alt-answer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .alt-answer-card {
    min-height: 220px;
  }
  .feedback-filters,
  .feedback-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 430px) {
  .alt-answer-grid {
    grid-template-columns: 1fr;
  }
}

body.prod-surface .answer-card {
  position: relative;
  container-type: inline-size;
  isolation: isolate;
  overflow: hidden;
  border-color: rgba(47, 127, 191, 0.20);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease), background-color 0.22s var(--ease);
}

body.prod-surface .answer-card > * {
  position: relative;
  z-index: 1;
}

body.prod-surface .answer-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--prod-glow-edge);
}

body.prod-surface .answer-card:hover .answer-image {
  transform: scale(1.05);
  filter: none;
}

body.prod-surface .answer-card.selected {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 1px var(--primary), 0 10px 30px rgba(47, 127, 191, 0.12);
  animation: prodAnswerPopIn 0.28s var(--ease);
}

body.prod-surface .answer-card::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 20%, rgba(218, 242, 255, 0.22) 38%, rgba(255, 255, 255, 0.62) 50%, rgba(218, 242, 255, 0.20) 62%, transparent 80%);
  opacity: 0;
  transform: translateX(-34%) skewX(-10deg);
  transition: opacity 0.24s var(--ease), transform 0.34s var(--ease);
}

body.prod-surface .answer-card:hover::before {
  opacity: 0.72;
  transform: translateX(34%) skewX(-10deg);
  animation: none;
}

body.prod-surface .answer-card.selected::before {
  inset: 0;
  background: rgba(111, 184, 232, 0.20);
  opacity: 1;
  transform: none;
  animation: none;
}

body.prod-surface .answer-card::after {
  content: "\2713";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  width: 50%;
  height: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(47, 127, 191, 0.26);
  box-shadow: 0 6px 18px rgba(47, 127, 191, 0.22);
  color: rgba(255, 255, 255, 0.94);
  font-size: 34cqw;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.6);
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease);
}

body.prod-surface .answer-card.selected::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

body.prod-surface .answer-card.selected .answer-image {
  filter: none;
}

body.prod-surface .answer-image {
  background: #ffffff;
  filter: saturate(0.9) brightness(1.02);
  transition: transform 0.34s var(--ease), filter 0.34s var(--ease), box-shadow 0.34s var(--ease);
}

@keyframes prodAnswerPopIn {
  0% { opacity: 0.92; transform: scale(0.95); }
  60% { opacity: 1; transform: scale(1.012); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes prodRevealUp {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.99);
    filter: blur(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes prodFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

body.prod-surface .surface-page:not([hidden]) {
  animation: prodFadeIn 0.42s var(--ease) both;
}

body.prod-surface .quiz-panel > .quiz-question,
body.prod-surface .quiz-panel > .price-range-block {
  animation: prodRevealUp 0.5s var(--ease) both;
}

body.prod-surface .quiz-panel > *:nth-child(1) { animation-delay: 0.02s; }
body.prod-surface .quiz-panel > *:nth-child(2) { animation-delay: 0.06s; }
body.prod-surface .quiz-panel > *:nth-child(3) { animation-delay: 0.10s; }
body.prod-surface .quiz-panel > *:nth-child(4) { animation-delay: 0.14s; }
body.prod-surface .quiz-panel > *:nth-child(5) { animation-delay: 0.18s; }
body.prod-surface .quiz-panel > *:nth-child(6) { animation-delay: 0.22s; }
body.prod-surface .quiz-panel > *:nth-child(7) { animation-delay: 0.26s; }
body.prod-surface .quiz-panel > *:nth-child(8) { animation-delay: 0.30s; }
body.prod-surface .quiz-panel > *:nth-child(9) { animation-delay: 0.34s; }
body.prod-surface .quiz-panel > *:nth-child(10) { animation-delay: 0.38s; }
body.prod-surface .quiz-panel > *:nth-child(11) { animation-delay: 0.42s; }

.expert-card { order: 2; }
.sticky-summary {
  order: 3;
  position: static;
  top: auto;
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(360px, 1.2fr) minmax(300px, 0.95fr);
  gap: 14px;
  align-items: start;
}
.sticky-summary > * { min-width: 0; }
.sticky-summary > .card-head {
  grid-column: 1;
  grid-row: 1;
}
.sticky-summary > .profile-kpis {
  grid-column: 1;
  grid-row: 2;
}
.sticky-summary > h3:nth-of-type(1) {
  grid-column: 1;
  grid-row: 3;
}
.sticky-summary > .bars {
  grid-column: 1;
  grid-row: 4;
}
.sticky-summary > h3:nth-of-type(2) {
  grid-column: 1;
  grid-row: 5;
}
.sticky-summary > .prob-list {
  grid-column: 1;
  grid-row: 6;
}
.sticky-summary > h3:nth-of-type(3) {
  grid-column: 1;
  grid-row: 7;
}
.sticky-summary > .tag-cloud {
  grid-column: 1;
  grid-row: 8;
}
.sticky-summary > .calc-details {
  grid-column: 2;
  grid-row: 1 / span 8;
  margin-top: 0;
}
.sticky-summary > .profile-radar-block {
  grid-column: 3;
  grid-row: 1 / span 8;
  margin-top: 0;
}
.sticky-summary > h3 { margin-top: 0; }
.profile-kpis {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.profile-kpis div {
  background: #f8fafc;
  border: 1px solid #eef2f6;
  border-radius: 10px;
  padding: 10px;
}
.profile-kpis span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; font-weight: 800; }
.profile-kpis strong { display: block; font-size: 14px; margin-top: 4px; }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 95px 1fr 44px; align-items: center; gap: 8px; font-size: 11px; }
.bar-track { height: 9px; border-radius: 999px; background: #eef2f6; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.prob-list { display: flex; flex-direction: column; gap: 7px; }
.prob-group { border: 1px solid #eef2f6; border-radius: 10px; padding: 8px; background: #fcfcfd; }
.prob-group strong { display: block; margin-bottom: 5px; font-size: 11px; color: var(--primary); }
.prob-items { display: flex; flex-wrap: wrap; gap: 5px; }
.prob-item { font-size: 10px; background: #f2f4f7; border-radius: 999px; padding: 3px 6px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-cloud .tag-pill { background: var(--primary-soft); color: var(--primary); }
.calc-details {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fcfcfd;
  padding: 12px;
}
.calc-details h3 { margin-top: 0; }
.calc-table-wrap {
  overflow-x: auto;
  border: 1px solid #eef2f6;
  border-radius: 10px;
}
.calc-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  font-size: 10px;
}
.calc-table th,
.calc-table td {
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #eef2f6;
  padding: 7px 8px;
}
.calc-table th {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 9px;
  font-weight: 900;
  background: #f8fafc;
}
.calc-table tr:last-child td { border-bottom: 0; }
.calc-table td:first-child { color: var(--primary); font-weight: 800; }
.calc-table td:nth-child(3) { white-space: nowrap; color: #101828; }

.expert-card { padding: 0; overflow: hidden; }
details summary {
  list-style: none;
  cursor: pointer;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  color: var(--primary);
}
details summary::-webkit-details-marker { display: none; }
details summary small { color: var(--muted); font-weight: 600; }
details[open] summary { border-bottom: 1px solid var(--border); }
.controls-grid {
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(260px, 1fr);
  gap: 16px;
}
.control-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.control-row label { width: 132px; flex: 0 0 132px; font-size: 11px; color: var(--muted); font-weight: 800; }
.control-row input[type="range"] { flex: 1; accent-color: var(--primary); }
.control-row span { width: 38px; text-align: right; font-size: 11px; color: var(--primary); font-weight: 900; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.field label { font-size: 10px; text-transform: uppercase; color: var(--muted); font-weight: 900; }
input[type="number"], select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px;
  font-size: 12px;
  background: #fff;
}

body.prod-surface {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.prod-surface .card,
body.prod-surface .quiz-question,
body.prod-surface .sticky-summary,
body.prod-surface .rec-card {
  background-color: #ffffff;
}

body.prod-surface .card,
body.prod-surface .hero,
body.prod-surface .quiz-question,
body.prod-surface .answer-card,
body.prod-surface .answer-image,
body.prod-surface .price-range-block,
body.prod-surface .price-segment,
body.prod-surface .sticky-summary,
body.prod-surface .profile-kpis div,
body.prod-surface .prob-group,
body.prod-surface .calc-row,
body.prod-surface .calc-details,
body.prod-surface .profile-radar-block,
body.prod-surface .rec-card,
body.prod-surface .rec-sensory,
body.prod-surface .signature-box,
body.prod-surface .reason-line,
body.prod-surface .rec-profile-description,
body.prod-surface .wine-data-quality,
body.prod-surface .rec-bottle-visual {
  border-radius: 0 !important;
}
body.prod-surface h1,
body.prod-surface h2,
body.prod-surface .hero h2,
body.prod-surface .quiz-question h2,
body.prod-surface .price-range-head h2,
body.prod-surface .answer-title,
body.prod-surface .rec-name,
body.prod-surface .rec-score {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  letter-spacing: 0;
}
.form-grid.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sub-panel { background: #f8fafc; border: 1px solid #eef2f6; border-radius: 10px; padding: 10px; margin-top: 8px; }
.hidden { display: none !important; }

.filter-note {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.alert-banner {
  margin: 0 16px 0;
  background: #fffaeb;
  border: 1px solid #fedf89;
  color: #92400e;
  border-radius: 10px;
  padding: 10px;
  font-size: 12px;
  display: none;
}

.results-grid {
  order: 4;
  display: block;
}
.recs-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.rec-card {
  border: 1px solid var(--border);
  border-top: 5px solid var(--primary);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}
.rec-card.exploration { border-top-color: var(--blue); }
.rec-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.rec-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: clamp(13px, 0.9vw, 15px);
  font-weight: 900;
  line-height: 1.12;
  color: var(--primary);
  min-height: 0;
  overflow-wrap: anywhere;
}
body.prod-surface .rec-name {
  font-size: clamp(20px, 1.35vw, 24px);
}
.rec-role-badge {
  flex: 0 1 128px;
  justify-content: center;
  max-width: 128px;
  min-height: 0;
  border-radius: 10px;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}
.rec-card.exploration .rec-name { color: var(--blue); }
.rec-score-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 8px 0 4px;
}
.rec-score { font-size: 28px; font-weight: 950; line-height: 1; }
.rec-score-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
body.prod-surface .calc-details {
  display: none;
}
.rec-meta { color: var(--muted); font-size: 10px; margin: 6px 0 8px; }
.wine-sensory-profile {
  border: 1px solid #eef2f6;
  border-radius: 10px;
  background: #fcfcfd;
  padding: 8px;
  margin: 8px 0;
}
.wine-sensory-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 900;
  color: var(--primary);
  text-transform: uppercase;
}
.wine-sensory-title small {
  font-size: 9px;
  color: var(--muted);
  text-transform: none;
  font-weight: 700;
}

.legend-target,
.legend-wine {
  display: inline-block;
  vertical-align: middle;
  position: relative;
}
.legend-target {
  width: 2px;
  height: 14px;
  border-radius: 2px;
  background: #111827;
  margin: 0 4px 0 2px;
  transform: translateY(-1px);
}
.legend-wine {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
  border: 1px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(114,47,55,.25);
  margin: 0 4px 0 2px;
}
.sensory-legend-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin: -1px 0 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}
.sensory-legend-row span {
  white-space: normal;
  overflow-wrap: anywhere;
}
.sensory-scale-list { display: flex; flex-direction: column; gap: 5px; }
.sensory-row {
  display: grid;
  grid-template-columns: 62px minmax(72px, 1fr) 70px;
  gap: 6px;
  align-items: center;
  font-size: 10px;
}
.sensory-label { color: #344054; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sensory-scale {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: visible;
}
.sensory-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: rgba(114, 47, 55, 0.28);
}
.target-marker {
  position: absolute;
  top: -4px;
  width: 2px;
  height: 16px;
  border-radius: 2px;
  background: #111827;
  transform: translateX(-1px);
}
.wine-marker {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
  border: 1px solid #ffffff;
  transform: translate(-4px, -50%);
  box-shadow: 0 0 0 1px rgba(114,47,55,.25);
}
.sensory-value {
  color: var(--muted);
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}
.rec-diagnostics-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 10px;
  align-items: stretch;
  margin-top: 8px;
}
body.prod-surface .rec-diagnostics-layout {
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 12px;
}
.rec-reasons { display: flex; flex-direction: column; gap: 4px; font-size: 11px; }
.reason-line { background: #f8fafc; border-radius: 8px; padding: 5px 7px; display: flex; justify-content: space-between; gap: 10px; }
.reason-line span,
.reason-line strong { min-width: 0; overflow-wrap: anywhere; }
.signature-line {
  align-items: flex-start;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 7px 8px;
}
.signature-title {
  flex: 0 0 auto;
  color: #344054;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.signature-chips {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 5px;
  font-size: 12px;
  line-height: 1;
}
.signature-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 950;
  line-height: 1.1;
  white-space: normal;
  width: max-content;
  max-width: 100%;
}
.signature-chip__label {
  font-size: 10px;
  font-weight: 850;
  text-transform: none;
  opacity: .82;
}
.signature-chip__value {
  font-weight: 950;
}
.signature-chip--color {
  background: #e0f2fe;
  border-color: #38bdf8;
  color: #075985;
}
.signature-chip--sweetness {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #78350f;
}
.signature-chip--acidity {
  background: #dcfce7;
  border-color: #22c55e;
  color: #14532d;
}
.signature-chip--body {
  background: #fce7f3;
  border-color: #ec4899;
  color: #831843;
}
.signature-chip--extra {
  background: #ede9fe;
  border-color: #8b5cf6;
  color: #4c1d95;
}
.rec-profile-description {
  margin: 8px 0 0;
  border-left: 3px solid rgba(114, 47, 55, .32);
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff8fa;
  color: #344054;
  font-size: 12px;
  line-height: 1.42;
  overflow-wrap: anywhere;
}
body.prod-surface .rec-reasons > .rec-profile-description {
  margin: 0;
  padding: 6px 8px;
  line-height: 1.35;
}
.gemini-card-note {
  border-left-color: rgba(37, 99, 235, .42);
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}
.gemini-card-note__head {
  margin-bottom: 5px;
  color: #145ca8;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.gemini-card-note__status {
  margin-bottom: 5px;
  color: #667085;
  font-size: 11px;
  font-weight: 800;
}
.gemini-card-note p {
  margin: 4px 0 0;
}
.gemini-card-note strong {
  color: #17263a;
}
.gemini-card-note__fallback {
  color: #344054;
}
.rec-bottle-visual {
  margin: 0;
  min-width: 0;
  min-height: 188px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  border: 1px solid #eef2f6;
  border-radius: 10px;
  background-color: #ffffff !important;
  background-image: none !important;
  background-clip: padding-box;
  isolation: isolate;
  opacity: 1;
  mix-blend-mode: normal;
  overflow: hidden;
  padding: 8px;
}
body.prod-surface .rec-bottle-visual {
  min-height: 220px;
}
.rec-bottle-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 224px;
  object-fit: contain;
  background-color: #ffffff;
  filter: none;
  opacity: 1;
  mix-blend-mode: normal;
}
body.prod-surface .rec-bottle-image {
  max-height: 252px;
}
.wine-data-quality {
  margin-top: 10px;
  padding: 8px 9px;
  border: 1px solid #eef2f6;
  border-left: 4px solid #94a3b8;
  border-radius: 9px;
  background: #fcfcfd;
  color: #344054;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.wine-data-quality--a { border-left-color: #15803d; }
.wine-data-quality--aminus { border-left-color: #16a34a; }
.wine-data-quality--b { border-left-color: #2563eb; }
.wine-data-quality--cplus { border-left-color: #b45309; }
.wine-data-quality__label {
  font-weight: 800;
  margin-right: 4px;
  color: var(--muted);
}
.wine-data-quality__tier {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #101828;
  font-weight: 900;
  margin-right: 6px;
}
.wine-data-quality__score {
  color: var(--muted);
  margin-left: 4px;
  font-weight: 800;
}
.wine-data-quality__review {
  display: block;
  margin-top: 4px;
  color: var(--amber);
  font-weight: 800;
}
.empty-state { color: var(--muted); padding: 18px; text-align: center; border: 1px dashed var(--border); border-radius: 12px; }
.table-container { overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.contribution-table-wrap { overflow: visible; }
.contribution-card .table-container { overflow: visible; }
.contribution-card table { table-layout: auto; }
.debug-scroll { max-height: 520px; }
.autotest-card { order: 4; }
.debug-card { order: 5; }
.tech-wine-db-card { order: 6; }
.autotest-help {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}
.autotest-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.autotest-actions .btn-generate,
.autotest-actions .btn-secondary {
  min-height: 38px;
  padding: 8px 14px;
}
.autotest-clear {
  color: var(--red);
}
.autotest-status {
  margin-bottom: 10px;
}
.autotest-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.autotest-summary-item {
  padding: 10px;
  border: 1px solid #eef2f6;
  border-radius: 10px;
  background: #f8fafc;
}
.autotest-summary-item span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.autotest-summary-item strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 18px;
}
.autotest-table {
  min-width: 980px;
}
.autotest-run-cell {
  font-weight: 900;
  color: var(--primary);
  white-space: nowrap;
}
.autotest-run-id {
  display: inline-block;
  max-width: 130px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}
.autotest-answer-list,
.autotest-rec-list,
.autotest-warning-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.autotest-answer-list li,
.autotest-rec-list li {
  padding: 5px 7px;
  border-radius: 8px;
  background: #f8fafc;
}
.autotest-answer-list strong,
.autotest-rec-list strong {
  color: var(--primary);
}
.autotest-axis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}
.autotest-axis-chip {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 7px;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 11px;
}
.autotest-axis-chip strong {
  color: var(--primary);
}
.autotest-warning-pill {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 5px 7px;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 10px;
  font-weight: 800;
}
.autotest-warning-none {
  display: inline-flex;
  padding: 5px 7px;
  border-radius: 999px;
  background: #ecfdf3;
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
}
.tech-wine-db-help {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.tech-wine-db-controls {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) repeat(4, minmax(130px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}
.tech-wine-db-controls label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.tech-wine-db-controls input,
.tech-wine-db-controls select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 9px;
}
.tech-wine-db-reset {
  min-height: 36px;
  padding: 8px 12px;
  white-space: nowrap;
}
.tech-wine-db-status {
  min-height: 28px;
  margin-bottom: 10px;
  padding: 7px 9px;
  border-radius: 9px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.tech-wine-db-status[data-tone="error"] {
  background: #fef2f2;
  color: #991b1b;
}
.tech-wine-db-status[data-tone="ok"] {
  background: #ecfdf3;
  color: #166534;
}
.tech-wine-db-anchor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  background: #f0f9ff;
  color: #075985;
  font-size: 12px;
}
.tech-wine-db-anchor strong {
  display: block;
  color: var(--primary);
  font-size: 13px;
}
.tech-wine-db-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}
.tech-wine-db-range {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.tech-wine-db-pager-actions {
  display: flex;
  gap: 8px;
}
.tech-wine-db-scroll {
  max-height: 640px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}
.tech-wine-db-table {
  min-width: 4200px;
  table-layout: auto;
}
.tech-wine-db-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
}
.tech-wine-db-table th,
.tech-wine-db-table td {
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tech-wine-db-table td:first-child,
.tech-wine-db-table td:nth-child(2) {
  font-weight: 800;
  color: var(--primary);
}
@media (max-width: 720px) {
  .autotest-header-action {
    flex: 1 1 100%;
    width: 100%;
  }
  .autotest-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .autotest-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .tech-wine-db-controls {
    grid-template-columns: 1fr;
  }
  .tech-wine-db-reset {
    width: 100%;
  }
  .tech-wine-db-anchor,
  .tech-wine-db-pager {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .tech-wine-db-pager {
    flex-direction: column;
  }
  .tech-wine-db-pager-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th, td { padding: 8px 10px; border-bottom: 1px solid #eef2f6; text-align: left; vertical-align: top; }
th { background: #f8fafc; color: var(--muted); text-transform: uppercase; font-size: 10px; white-space: nowrap; }
tr.selected { background: #f0fdf4; }
tr.exploration-row { background: #eff6ff; }
tr.skipped { opacity: .55; }

@media (max-width: 1180px) {
  .hero-actions {
    top: 18px;
    right: 16px;
    bottom: auto;
    width: 210px;
    flex-direction: column;
  }
  .hero-actions .btn-generate,
  .hero-actions .btn-secondary {
    width: 100%;
  }
  .hero-actions .action-quiz-stat {
    width: 100%;
    flex: 0 0 auto;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  body { padding-bottom: 0; }
}

@media (max-width: 1180px) {
  .results-grid { grid-template-columns: 1fr; }
  .sticky-summary {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.95fr);
  }
  .sticky-summary > .card-head,
  .sticky-summary > .profile-kpis,
  .sticky-summary > h3:nth-of-type(1),
  .sticky-summary > .bars,
  .sticky-summary > h3:nth-of-type(2),
  .sticky-summary > .prob-list,
  .sticky-summary > h3:nth-of-type(3),
  .sticky-summary > .tag-cloud {
    grid-column: 1;
  }
  .sticky-summary > .profile-radar-block {
    grid-column: 2;
    grid-row: 1 / span 7;
  }
  .sticky-summary > .calc-details {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .controls-grid { grid-template-columns: repeat(2, 1fr); }
  .recs-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 721px) and (max-width: 1180px) {
  body.prod-surface .title-row {
    flex-wrap: wrap;
  }
  body.prod-surface .header-stack {
    flex: 1 1 100%;
    margin-left: auto;
  }
}
@media (max-width: 980px) {
  body.tech-surface .hero {
    grid-template-columns: 1fr;
  }
  body.tech-surface .hero > #sessionStatsPanel,
  body.tech-surface .hero > #sessionStatsProdPanel,
  body.tech-surface .hero > #techAccessPanel,
  body.tech-surface .hero > #wineLabGlobePanel {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}
@media (max-width: 720px) {
  .app-header {
    max-width: 100%;
    padding: 12px 10px 8px;
    gap: 10px;
  }
  .app-header, details summary { flex-direction: column; align-items: stretch; }
  .app-header > div,
  .hero > .hero-copy,
  .hero > .session-stats-panel,
  .hero > .session-globe-panel,
  .hero > .session-access-panel {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
  }
  .session-globe-canvas {
    height: 230px;
  }
  .session-globe-layout {
    grid-template-columns: 1fr;
  }
  .session-visit-table-panel {
    max-height: 210px;
  }
  .brand-lockup {
    flex: 1 1 auto;
    min-height: 66px;
    gap: 10px;
    align-items: center;
  }
  .brand-logo-frame {
    width: 60px;
    height: 60px;
    border-radius: 14px;
  }
  .brand-logo-frame img {
    width: 86px;
    height: 86px;
    transform: translate(-13px, -6px);
  }
  body.prod-surface .brand-lockup {
    min-height: 66px;
  }
  body.prod-surface .title-row {
    --prod-brand-title-size: 20px;
    min-height: 44px;
  }
  .app-header p,
  .hero p {
    max-width: calc(100dvw - 20px);
  }
  .app-header h1 { font-size: 20px; line-height: 1.15; }
  .app-header p { font-size: 12px; }
  body.tech-surface .research-engine-credit,
  body.prod-surface .research-engine-credit {
    top: 27px;
    font-size: 11px;
  }
  .title-row {
    align-items: center;
    flex-wrap: wrap;
  }
  .language-switcher {
    flex: 0 0 auto;
  }
  .header-stack {
    width: 100%;
    margin-left: 0;
    flex: 1 1 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .header-stat {
    flex: 1 1 100%;
    width: 100%;
    border-radius: 10px;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  body.prod-surface .brand-lockup {
    display: block;
    min-height: 0;
  }
  body.prod-surface .brand-logo-frame {
    display: none;
  }
  body.prod-surface .brand-copy {
    width: 100%;
  }
  body.prod-surface .title-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "title title"
      "credit credit"
      "language stats";
    align-items: start;
    gap: 4px 8px;
    min-height: 0;
    width: 100%;
  }
  body.prod-surface .app-header h1 {
    grid-area: title;
    justify-self: center;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
  }
  body.prod-surface .research-engine-credit {
    position: static;
    grid-area: credit;
    justify-self: center;
    max-width: 100%;
    font-size: 10px;
    line-height: 1.12;
    text-align: center;
    white-space: normal;
  }
  body.prod-surface .language-switcher {
    grid-area: language;
    justify-self: start;
    align-self: start;
    margin-left: 0;
  }
  body.prod-surface .header-stack {
    grid-area: stats;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    margin-left: 0;
  }
  body.prod-surface .header-stat {
    max-width: none;
    flex: 1 1 auto;
    min-height: 38px;
    padding: 6px 8px;
    font-size: 11px;
    line-height: 1.1;
  }
  .container {
    padding: 0 10px 18px;
    gap: 10px;
  }
  .card {
    border-radius: 12px;
    padding: 12px;
  }
  .hero {
    gap: 10px;
    grid-template-columns: 1fr;
  }
  .hero h2 { font-size: 17px; }
  .hero p { font-size: 12px; }
  .session-stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .session-stat-countries {
    grid-column: 1 / -1;
  }
  .session-stats-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .hero-actions {
    top: auto;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: calc(100dvw - 20px);
    max-width: calc(100dvw - 20px);
    flex-direction: row;
    gap: 8px;
    padding: 8px;
    border-radius: 12px;
  }
  .hero-actions .btn-generate,
  .hero-actions .btn-secondary {
    flex: 1 1 0;
    min-width: 0;
    white-space: normal;
    padding: 10px 8px;
    font-size: 11px;
    min-height: 44px;
  }
  .hero-actions .action-quiz-stat {
    flex: 1.35 1 0;
    min-width: 0;
    padding: 8px 6px;
    font-size: 10px;
  }
  body { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
  .controls-grid { grid-template-columns: 1fr; }
  .answer-grid { grid-template-columns: 1fr; }
  body.prod-surface .answer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .sticky-summary {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .sticky-summary > .card-head,
  .sticky-summary > .profile-kpis,
  .sticky-summary > h3,
  .sticky-summary > .bars,
  .sticky-summary > .prob-list,
  .sticky-summary > .tag-cloud,
  .sticky-summary > .calc-details,
  .sticky-summary > .profile-radar-block {
    grid-column: auto;
    grid-row: auto;
  }
  .profile-kpis { grid-template-columns: 1fr; }
  .quiz-layout,
  .results-grid {
    gap: 10px;
  }
  .quiz-question {
    padding: 12px;
  }
  .quiz-question h2 { font-size: 15px; }
  .answer-card {
    min-height: 96px;
    padding: 11px;
  }
  body.prod-surface .answer-card {
    min-height: 0;
    padding: 8px;
    gap: 6px;
  }
  body.prod-surface .answer-title {
    font-size: 11px;
    line-height: 1.15;
    text-align: center;
  }
  body.prod-surface .answer-subtitle {
    font-size: 9.5px;
    line-height: 1.25;
    text-align: center;
  }
  body.prod-surface .answer-image {
    aspect-ratio: 4 / 3;
    margin-top: 0;
  }
  .card-head {
    flex-direction: column;
    align-items: stretch;
  }
  .card-head .badge {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
  }
  .bar-row {
    grid-template-columns: 74px minmax(0, 1fr) 40px;
    gap: 6px;
  }
  .calc-details,
  .profile-radar-block {
    padding: 10px;
  }
  .calc-table-wrap {
    overflow: visible;
    border: 0;
  }
  .calc-table {
    min-width: 0;
    font-size: 10px;
  }
  .calc-table thead {
    display: none;
  }
  .calc-table,
  .calc-table tbody,
  .calc-table tr,
  .calc-table td {
    display: block;
    width: 100%;
  }
  .calc-table tr {
    border: 1px solid #eef2f6;
    border-radius: 10px;
    background: #fff;
    margin-bottom: 8px;
    overflow: hidden;
  }
  .calc-table td {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 8px;
    border-bottom: 1px solid #eef2f6;
    padding: 7px 8px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .calc-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
  }
  .calc-table td:last-child { border-bottom: 0; }
  .radar-chart {
    min-height: 300px;
    padding: 0;
  }
  .radar-chart svg {
    max-width: 330px;
  }
  .recs-row {
    grid-template-columns: 1fr;
  }
  .rec-head {
    flex-direction: column;
  }
  .rec-name {
    min-height: 0;
  }
  .rec-role-badge {
    flex: 0 1 auto;
    max-width: 100%;
    width: 100%;
  }
  .reason-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }
  .rec-diagnostics-layout {
    grid-template-columns: minmax(0, 1fr) 82px;
    gap: 8px;
  }
  body.prod-surface .rec-diagnostics-layout {
    grid-template-columns: minmax(0, 1fr) 88px;
  }
  .rec-bottle-visual,
  body.prod-surface .rec-bottle-visual {
    min-height: 176px;
    padding: 6px;
  }
  .rec-bottle-image,
  body.prod-surface .rec-bottle-image {
    max-height: 200px;
  }
  .signature-line {
    grid-template-columns: 1fr;
  }
  .signature-chips {
    align-items: flex-start;
    justify-content: flex-start;
  }
  .sensory-row {
    grid-template-columns: 58px minmax(0, 1fr) 64px;
  }
  .calibration-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .calibration-save {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .container { padding-left: 8px; padding-right: 8px; }
  .app-header { padding-left: 8px; padding-right: 8px; }
  .card { padding: 10px; }
  .hero-actions {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: calc(100dvw - 16px);
    max-width: calc(100dvw - 16px);
  }
  .btn-generate,
  .btn-secondary {
    border-radius: 9px;
  }
  .answer-title { font-size: 13px; }
  .answer-subtitle { font-size: 11px; }
  .profile-kpis div { padding: 9px; }
  .bar-row {
    grid-template-columns: 70px minmax(0, 1fr) 38px;
    font-size: 10px;
  }
  .prob-item,
  .tag-pill {
    font-size: 9px;
  }
  .calc-table td {
    grid-template-columns: 78px minmax(0, 1fr);
  }
  .radar-chart {
    min-height: 276px;
  }
  .radar-chart svg {
    max-width: 292px;
  }
  .sensory-row {
    grid-template-columns: 54px minmax(0, 1fr);
  }
  .calibration-row {
    grid-template-columns: 60px minmax(0, 1fr) 40px;
  }
  .sensory-value {
    grid-column: 2;
    text-align: left;
    white-space: normal;
  }
}


.profile-radar-block {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fcfcfd;
  padding: 12px;
}
.profile-radar-block h3 { margin-top: 0; }
.radar-chart {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 380px;
  overflow: visible;
  padding: 6px 0;
}
.radar-chart svg { width: 100%; max-width: 460px; height: auto; display: block; overflow: visible; }
.radar-ring { fill: none; stroke: #e5e7eb; stroke-width: 1; }
.radar-axis { stroke: #cbd5e1; stroke-width: 1; }
.radar-profile { fill: rgba(114, 47, 55, 0.18); stroke: var(--primary); stroke-width: 2.5; }
.radar-point { fill: var(--primary); stroke: #ffffff; stroke-width: 1.5; }
.radar-label { font-size: 10px; font-weight: 800; fill: #475467; }
.radar-value { font-size: 9px; font-weight: 700; fill: var(--primary); }
.radar-note { margin-top: 6px; color: var(--muted); font-size: 11px; text-align: center; }

@media (max-width: 720px) {
  .profile-radar-block { padding: 10px; }
  .radar-chart {
    min-height: 300px;
    padding: 0;
  }
  .radar-chart svg {
    max-width: 330px;
  }
}

@media (max-width: 430px) {
  .radar-chart {
    min-height: 276px;
  }
  .radar-chart svg {
    max-width: 292px;
  }
}

/* V5.6 layout adjustment: wider debug table and fixed radar label space */
.debug-card {
  overflow: hidden;
}
.debug-card .table-container {
  width: 100%;
  overflow-x: auto;
}
.debug-card table {
  min-width: 1180px;
}
.debug-wine-name {
  min-width: 260px;
}

@media (max-width: 720px) {
  .debug-card {
    padding: 10px;
  }
  .debug-card .card-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .debug-scroll {
    max-height: 460px;
  }
}


/* Price range filter */
.price-range-block {
  display: grid;
  gap: 18px;
  padding: 20px;
  border-top: 0;
}
.price-range-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
}
.price-range-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.price-range-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 32px;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  text-align: center;
}
.price-range-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(102, 112, 133, 0.2);
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
}
.price-segmented {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 3px;
  align-items: stretch;
}
.price-segment {
  --price-soft: rgba(255, 232, 201, 0.58);
  --price-active: rgba(255, 205, 137, 0.9);
  --price-glow: rgba(255, 186, 105, 0.32);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  height: 42px;
  padding: 0 8px;
  border: 0;
  border-radius: 14px;
  background: var(--price-soft);
  color: var(--text);
  cursor: pointer;
  opacity: 0.78;
  transition: background-color 180ms ease-out, opacity 180ms ease-out, box-shadow 180ms ease-out;
}
.price-segment[data-price-tone="1"] {
  --price-soft: rgba(207, 244, 215, 0.56);
  --price-active: rgba(137, 232, 153, 0.9);
  --price-glow: rgba(88, 196, 110, 0.28);
}
.price-segment[data-price-tone="2"] {
  --price-soft: rgba(214, 235, 251, 0.58);
  --price-active: rgba(154, 210, 249, 0.92);
  --price-glow: rgba(88, 163, 214, 0.28);
}
.price-segment[data-price-tone="3"] {
  --price-soft: rgba(251, 216, 231, 0.58);
  --price-active: rgba(247, 141, 184, 0.9);
  --price-glow: rgba(223, 74, 136, 0.28);
}
.price-segment[data-price-tone="4"] {
  --price-soft: rgba(231, 218, 251, 0.58);
  --price-active: rgba(195, 163, 246, 0.9);
  --price-glow: rgba(142, 103, 224, 0.28);
}
.price-segment[data-price-tone="5"] {
  --price-soft: rgba(228, 234, 244, 0.62);
  --price-active: rgba(202, 214, 235, 0.92);
  --price-glow: rgba(82, 104, 139, 0.22);
}
.price-segment:hover {
  opacity: 0.95;
  box-shadow: 0 6px 16px var(--price-glow);
}
.price-segment.selected {
  background: var(--price-active);
  opacity: 1;
  box-shadow: 0 9px 22px var(--price-glow);
}
.price-segment-check {
  opacity: 0;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}
.price-segment.selected .price-segment-check {
  opacity: 1;
}
.price-segment-label {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.08;
  text-align: center;
  white-space: normal;
}
@media (max-width: 720px) {
  .price-range-block {
    gap: 12px;
    padding: 14px 12px;
  }
  .price-range-head h2 { font-size: 20px; }
  .price-range-head p { font-size: 12px; line-height: 1.35; }
  .price-range-status { min-height: 28px; gap: 8px; font-size: 16px; }
  .price-range-status-icon { width: 24px; height: 24px; font-size: 12px; }
  .price-segmented {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
  }
  .price-segment {
    height: 36px;
    border-radius: 11px;
    padding: 0 3px;
  }
  .price-segment-label { font-size: 12.5px; }
  .price-segment-check { font-size: 10px; }
}

/* WineTest optional experimental inputs */
.optional-inputs-block {
  display: grid;
  gap: 18px;
  padding: 18px;
  border-top: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(233, 246, 255, 0.86)),
    var(--card);
}
body.prod-surface .optional-inputs-block {
  display: none !important;
}
.optional-inputs-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 18px;
  align-items: center;
}
.optional-eyebrow {
  display: inline-flex;
  margin-bottom: 6px;
  color: #2f6fa5;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.optional-inputs-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.12;
}
.optional-inputs-head p,
.optional-card-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.optional-globe {
  position: relative;
  width: 82px;
  height: 82px;
  border: 1px solid rgba(64, 145, 199, 0.28);
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.95), transparent 32%),
    radial-gradient(circle at 50% 54%, rgba(76, 169, 221, 0.2), rgba(255, 255, 255, 0.92) 68%);
  box-shadow: inset 0 0 24px rgba(62, 141, 190, 0.12), 0 12px 26px rgba(60, 126, 174, 0.13);
  overflow: hidden;
}
.optional-globe::before,
.optional-globe::after,
.optional-globe-ring {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(55, 133, 188, 0.22);
  border-radius: 999px;
}
.optional-globe::before { transform: scaleX(0.48); }
.optional-globe::after { transform: scaleY(0.52); }
.optional-globe-ring {
  inset: 31px 7px;
  border-width: 1px 0 0;
}
.optional-globe-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #2b8fd6;
  box-shadow: 0 0 0 5px rgba(43, 143, 214, 0.12);
}
.optional-globe-dot-a { left: 22px; top: 24px; }
.optional-globe-dot-b { right: 18px; top: 38px; }
.optional-globe-dot-c { left: 40px; bottom: 18px; }
.optional-inputs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.optional-input-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(114, 154, 190, 0.28);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 34px rgba(79, 130, 174, 0.1);
}
.optional-input-card.recording {
  border-color: rgba(43, 143, 214, 0.54);
  box-shadow: 0 16px 36px rgba(43, 143, 214, 0.16);
}
.optional-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}
.optional-card-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.15;
}
.optional-timer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(43, 143, 214, 0.24);
  border-radius: 999px;
  background: rgba(238, 248, 255, 0.96);
  color: #245c8a;
  font-size: 13px;
  font-weight: 900;
}
.optional-shape-canvas,
.optional-kaleidoscope-canvas {
  display: block;
  width: 100%;
  height: 220px;
  border: 1px solid rgba(114, 154, 190, 0.34);
  border-radius: 14px;
  background: #ffffff;
}
.optional-shape-canvas {
  touch-action: none;
  cursor: crosshair;
}
.optional-kaleidoscope-canvas {
  cursor: pointer;
  box-shadow: inset 0 0 0 8px #ffffff, inset 0 0 42px rgba(36, 111, 164, 0.1);
}
.optional-rhythm-pad {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-height: 220px;
  padding: 10px;
  border: 1px solid rgba(114, 154, 190, 0.34);
  border-radius: 14px;
  background: #ffffff;
  outline: none;
  overflow: hidden;
}
.optional-rhythm-pad:focus-visible {
  box-shadow: 0 0 0 3px rgba(43, 143, 214, 0.2);
}
.optional-rhythm-zone {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  border: 1px solid rgba(114, 154, 190, 0.22);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(238, 248, 255, 0.82), rgba(255, 255, 255, 0.78));
  color: var(--text);
  cursor: pointer;
  transition: background-color 180ms ease-out, box-shadow 180ms ease-out;
}
.optional-rhythm-zone:hover {
  background: rgba(225, 243, 255, 0.96);
  box-shadow: 0 9px 18px rgba(60, 126, 174, 0.12);
}
.optional-rhythm-zone span {
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}
.optional-rhythm-zone small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.optional-rhythm-visual {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  height: 52px;
  z-index: 3;
  pointer-events: none;
}
.rhythm-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(52, 80, 112, 0.16);
}
.rhythm-line-left { top: 14px; }
.rhythm-line-right { bottom: 14px; }
.rhythm-hit {
  position: absolute;
  width: 5px;
  height: 18px;
  margin-left: -2px;
  border-radius: 999px;
  background: #2b8fd6;
  box-shadow: 0 0 0 4px rgba(43, 143, 214, 0.1);
}
.rhythm-hit-left { top: 5px; }
.rhythm-hit-right {
  bottom: 5px;
  background: #d75b70;
  box-shadow: 0 0 0 4px rgba(215, 91, 112, 0.1);
}
.optional-input-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.optional-input-actions .btn-secondary {
  min-height: 34px;
  padding: 8px 12px;
  font-size: 12px;
}
.optional-stop {
  color: #7b2737;
}
.optional-skip {
  margin-left: auto;
}
.optional-status {
  min-height: 20px;
  color: #486a8a;
  font-size: 12px;
  font-weight: 800;
}
@media (max-width: 760px) {
  .optional-inputs-block {
    gap: 14px;
    padding: 14px 12px;
  }
  .optional-inputs-head {
    grid-template-columns: minmax(0, 1fr);
  }
  .optional-globe {
    display: none;
  }
  .optional-inputs-grid {
    grid-template-columns: 1fr;
  }
  .optional-shape-canvas,
  .optional-kaleidoscope-canvas,
  .optional-rhythm-pad {
    height: 196px;
  }
  .optional-rhythm-zone span {
    font-size: 28px;
  }
  .optional-skip {
    margin-left: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .optional-rhythm-zone,
  .optional-input-card,
  .optional-kaleidoscope-canvas,
  .price-segment {
    transition: none;
  }
}

/* V5.9 feedback and LocalStorage session log */
.feedback-panel {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.calibration-panel {
  padding-top: 0;
  border-top: 0;
}
.calibration-panel[open] {
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.calibration-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid rgba(21, 128, 61, 0.28);
  border-radius: 10px;
  background: linear-gradient(180deg, #dcfce7 0%, #bbf7d0 100%);
  color: #14532d;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 2px 6px rgba(21, 128, 61, 0.12);
  list-style: none;
}
.calibration-toggle::-webkit-details-marker { display: none; }
.calibration-toggle::after {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 8px;
  border-radius: 999px;
  background: rgba(20, 83, 45, 0.12);
  font-size: 15px;
  line-height: 1;
}
.calibration-panel[open] .calibration-toggle::after {
  content: "–";
}
.calibration-content {
  padding-top: 10px;
}
.feedback-title {
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.calibration-note {
  margin: -2px 0 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}
.calibration-sliders {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.calibration-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 42px;
  gap: 7px;
  align-items: center;
  font-size: 10px;
}
.calibration-label {
  color: #344054;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calibration-row input[type="range"] {
  min-width: 0;
  accent-color: var(--primary);
}
.calibration-row strong {
  color: var(--primary);
  font-size: 10px;
  text-align: right;
  white-space: nowrap;
}
.calibration-comment {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 10px;
}
.calibration-comment span {
  color: #344054;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.calibration-comment textarea {
  width: 100%;
  min-height: 74px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  color: var(--text);
  background: #ffffff;
  font: inherit;
  font-size: 12px;
  line-height: 1.35;
}
.calibration-comment textarea:focus {
  outline: 2px solid rgba(21, 128, 61, 0.22);
  border-color: rgba(21, 128, 61, 0.48);
}
.calibration-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.calibration-save {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 8px 10px;
  font-size: 11px;
}
.calibration-save:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.calibration-status {
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.feedback-log-card { margin-top: 0; }
.log-note {
  color: var(--muted);
  font-size: 12px;
  margin-top: 0;
}
.log-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.btn-secondary.danger {
  border-color: #fecaca;
  color: #991b1b;
}
.log-preview {
  min-height: 70px;
  max-height: 180px;
  overflow: auto;
  background: #0f172a;
  color: #e5e7eb;
  border-radius: 10px;
  padding: 10px;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
}


/* V5.10 imported JSON log reader */
.log-reader-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.log-reader-block h3 {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--primary);
}
.file-input {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  font-size: 12px;
  color: #344054;
}
.log-reader-summary {
  margin: 8px 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
  font-size: 12px;
  color: #344054;
}
.log-reader-table-wrap {
  max-height: 340px;
}
.log-reader-table {
  min-width: 1120px;
}
.log-reader-table td, .log-reader-table th {
  font-size: 11px;
}
.feedback-positive { color: #027a48; font-weight: 800; }
.feedback-neutral { color: #b54708; font-weight: 800; }
.feedback-negative { color: #b42318; font-weight: 800; }
.feedback-missing { color: #667085; font-weight: 800; }

.btn-generate:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

/* Prod-only summary compaction: sensory profile left, radar center, tags right. */
body.prod-surface .sticky-summary {
  --prod-summary-cell-border: rgba(47, 127, 191, 0.18);
  grid-template-columns: minmax(280px, 0.98fr) minmax(360px, 1.08fr) minmax(260px, 0.82fr);
  grid-template-rows: auto 1fr;
  align-items: stretch;
  gap: 0 18px;
  margin-top: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
body.prod-surface .sticky-summary > .card-head,
body.prod-surface .sticky-summary > .profile-kpis,
body.prod-surface .sticky-summary > h3:nth-of-type(2),
body.prod-surface .sticky-summary > .prob-list,
body.prod-surface .sticky-summary > .calc-details {
  display: none !important;
}
body.prod-surface .sticky-summary > .profile-kpis {
  display: none !important;
}
body.prod-surface .sticky-summary > h3:nth-of-type(1) {
  grid-column: 1;
  grid-row: 1;
  align-self: stretch;
  margin: 0;
}
body.prod-surface .sticky-summary > .bars {
  grid-column: 1;
  grid-row: 2;
  align-self: stretch;
}
body.prod-surface .sticky-summary > h3:nth-of-type(3) {
  grid-column: 3;
  grid-row: 1;
  align-self: stretch;
  margin: 0;
}
body.prod-surface .sticky-summary > .tag-cloud {
  grid-column: 3;
  grid-row: 2;
  align-self: stretch;
}
body.prod-surface .sticky-summary > .profile-radar-block {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: stretch;
}
body.prod-surface .sticky-summary > h3:nth-of-type(1),
body.prod-surface .sticky-summary > h3:nth-of-type(3) {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 13px 16px 8px;
  border: 1px solid var(--prod-summary-cell-border);
  border-bottom: 0;
  background: #ffffff;
  color: #5b6f86;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.035em;
  line-height: 1.2;
  text-transform: uppercase;
}
body.prod-surface .profile-radar-block {
  padding: 13px 16px 16px;
  border: 1px solid var(--prod-summary-cell-border);
  background: #ffffff;
}
body.prod-surface .profile-radar-block h3 {
  margin: 0 0 10px;
  color: #5b6f86;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.035em;
  line-height: 1.2;
  text-transform: uppercase;
}
body.prod-surface .radar-chart {
  min-height: 300px;
  padding: 0;
}
body.prod-surface .radar-chart svg {
  max-width: 360px;
}
body.prod-surface .radar-note {
  display: none;
}
body.prod-surface .bars,
body.prod-surface .tag-cloud {
  padding: 6px 16px 16px;
  border: 1px solid var(--prod-summary-cell-border);
  border-top: 0;
  background: #ffffff;
}
body.prod-surface .tag-cloud {
  align-content: start;
}
body.prod-surface .expert-card {
  display: none !important;
}
body.prod-surface .expert-card .controls-grid {
  padding: 0;
  border: 0;
  background: transparent;
}

@media (max-width: 1180px) and (min-width: 721px) {
  body.prod-surface .sticky-summary {
    grid-template-columns: minmax(280px, 1fr) minmax(320px, 1fr);
    grid-template-rows: auto 1fr auto auto;
  }
  body.prod-surface .sticky-summary > h3:nth-of-type(1) { grid-row: 1; }
  body.prod-surface .sticky-summary > .bars { grid-row: 2; }
  body.prod-surface .sticky-summary > h3:nth-of-type(3),
  body.prod-surface .sticky-summary > .tag-cloud {
    grid-column: 1;
  }
  body.prod-surface .sticky-summary > h3:nth-of-type(3) { grid-row: 3; }
  body.prod-surface .sticky-summary > .tag-cloud { grid-row: 4; }
  body.prod-surface .sticky-summary > h3:nth-of-type(3) {
    margin-top: 14px;
  }
  body.prod-surface .sticky-summary > .profile-radar-block {
    grid-column: 2;
    grid-row: 1 / span 4;
  }
}

@media (max-width: 720px) {
  body.prod-surface .sticky-summary {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto auto auto;
    gap: 0;
    width: 100%;
    margin-top: 18px;
  }
  body.prod-surface .sticky-summary > .card-head,
  body.prod-surface .sticky-summary > .profile-kpis,
  body.prod-surface .sticky-summary > h3,
  body.prod-surface .sticky-summary > .bars,
  body.prod-surface .sticky-summary > .tag-cloud,
  body.prod-surface .sticky-summary > .profile-radar-block {
    grid-column: 1 / -1 !important;
    width: 100%;
    min-width: 0;
    justify-self: stretch;
  }

  body.prod-surface .sticky-summary > h3:nth-of-type(1) {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    margin-top: 0;
  }
  body.prod-surface .sticky-summary > .bars {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    margin-top: 0;
  }
  body.prod-surface .sticky-summary > .profile-radar-block {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
    margin-top: 14px;
  }
  body.prod-surface .sticky-summary > h3:nth-of-type(3) {
    grid-column: 1 / -1 !important;
    grid-row: 4 !important;
    margin-top: 14px;
  }
  body.prod-surface .sticky-summary > .tag-cloud {
    grid-column: 1 / -1 !important;
    grid-row: 5 !important;
    margin-top: 0;
  }
}

/* Surface action placement: controls live after the price range, not as a floating bar. */
body.tech-surface .header-quiz-total-stat {
  display: none !important;
}

.quiz-inline-actions-slot {
  display: none;
}

body.tech-surface .hero > .hero-actions,
body.prod-surface .hero > .hero-actions {
  display: none;
}

body.tech-surface .quiz-inline-actions-slot,
body.prod-surface .quiz-inline-actions-slot {
  display: block;
  margin: 4px 16px 20px;
  padding: 14px;
  border: 4px solid #8a2432;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(138, 36, 50, 0.10);
}

body.tech-surface .quiz-inline-actions-slot .hero-actions,
body.prod-surface .quiz-inline-actions-slot .hero-actions {
  position: static;
  inset: auto;
  z-index: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body.tech-surface .quiz-inline-actions-slot .hero-actions .btn-generate,
body.tech-surface .quiz-inline-actions-slot .hero-actions .btn-secondary,
body.tech-surface .quiz-inline-actions-slot .hero-actions .action-quiz-stat,
body.prod-surface .quiz-inline-actions-slot .hero-actions .btn-generate,
body.prod-surface .quiz-inline-actions-slot .hero-actions .btn-secondary,
body.prod-surface .quiz-inline-actions-slot .hero-actions .action-quiz-stat {
  min-height: 60px;
  width: 100%;
  border-radius: 12px;
}

body.tech-surface .quiz-inline-actions-slot .hero-actions .btn-generate,
body.tech-surface .quiz-inline-actions-slot .hero-actions .btn-secondary,
body.prod-surface .quiz-inline-actions-slot .hero-actions .btn-generate,
body.prod-surface .quiz-inline-actions-slot .hero-actions .btn-secondary {
  font-size: 15px;
}

body.tech-surface .quiz-inline-actions-slot .hero-actions .action-quiz-stat,
body.prod-surface .quiz-inline-actions-slot .hero-actions .action-quiz-stat {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: #fff;
  max-width: none;
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.18;
  color: #334155;
  overflow-wrap: anywhere;
}

body.tech-surface .visual-taste-portrait {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(47, 134, 199, 0.28);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(232, 247, 255, 0.72)),
    radial-gradient(circle at 12% 10%, rgba(101, 199, 221, 0.18), transparent 34%);
  box-shadow: 0 10px 24px rgba(41, 94, 128, 0.10);
}

body.tech-surface .visual-taste-portrait-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

body.tech-surface .visual-taste-portrait h3 {
  margin: 0;
  color: var(--primary-deep);
  font-size: 16px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: none;
}

body.tech-surface .visual-taste-eyebrow,
body.tech-surface .visual-taste-label {
  color: var(--primary);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.tech-surface .visual-taste-body,
body.tech-surface .visual-taste-prompt {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

body.tech-surface .visual-taste-label {
  display: block;
  margin: 12px 0 7px;
}

body.tech-surface .visual-taste-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

body.tech-surface .visual-taste-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(47, 134, 199, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--primary-deep);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
}

body.tech-surface .visual-taste-prompt {
  padding: 10px 12px;
  border-left: 3px solid var(--primary);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

@media (max-width: 720px) {
  body.prod-surface .answer-card::after {
    width: 52%;
    height: 52%;
    border-radius: 16px;
    font-size: 34cqw;
  }

  body.prod-surface .quiz-question-head {
    padding: 0 46px;
    min-height: 56px;
  }
  body.prod-surface .quiz-question:not(.price-question) .quiz-question-head::before {
    width: 38px;
    height: auto;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    color: var(--prod-number);
    font-size: 40px;
    line-height: 0.95;
  }
  body.prod-surface .quiz-question h2 {
    font-size: 17px;
  }
}

@media (max-width: 720px) {
  body.tech-surface,
  body.prod-surface {
    padding-bottom: 12px;
  }

  body.tech-surface .quiz-inline-actions-slot .hero-actions,
  body.prod-surface .quiz-inline-actions-slot .hero-actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  body.tech-surface .quiz-inline-actions-slot,
  body.prod-surface .quiz-inline-actions-slot {
    margin: 4px 8px 16px;
    padding: 10px;
    border-width: 4px;
    border-radius: 18px;
  }

  body.tech-surface .quiz-inline-actions-slot .hero-actions .btn-generate,
  body.tech-surface .quiz-inline-actions-slot .hero-actions .btn-secondary,
  body.tech-surface .quiz-inline-actions-slot .hero-actions .action-quiz-stat,
  body.prod-surface .quiz-inline-actions-slot .hero-actions .btn-generate,
  body.prod-surface .quiz-inline-actions-slot .hero-actions .btn-secondary,
  body.prod-surface .quiz-inline-actions-slot .hero-actions .action-quiz-stat {
    min-height: 50px;
  }

  body.tech-surface .quiz-inline-actions-slot .hero-actions .btn-generate,
  body.tech-surface .quiz-inline-actions-slot .hero-actions .btn-secondary,
  body.prod-surface .quiz-inline-actions-slot .hero-actions .btn-generate,
  body.prod-surface .quiz-inline-actions-slot .hero-actions .btn-secondary {
    font-size: 13px;
  }

  body.tech-surface .quiz-inline-actions-slot .hero-actions .action-quiz-stat,
  body.prod-surface .quiz-inline-actions-slot .hero-actions .action-quiz-stat {
    padding: 9px 10px;
    font-size: 12.5px;
  }

  body.tech-surface .visual-taste-portrait {
    margin-top: 10px;
    padding: 12px;
  }

  body.tech-surface .visual-taste-portrait-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  body.tech-surface .visual-taste-body,
  body.tech-surface .visual-taste-prompt {
    font-size: 12.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.prod-surface .surface-page:not([hidden]),
  body.prod-surface .quiz-panel > .quiz-question,
  body.prod-surface .quiz-panel > .price-range-block {
    animation: none;
  }
  body.prod-surface .answer-card.selected::before,
  body.prod-surface .answer-card:hover::before,
  body.prod-surface .answer-card.selected::after {
    animation: none;
    transition: none;
  }
  body.prod-surface .answer-card:hover,
  body.prod-surface .answer-card:hover .answer-image,
  body.prod-surface .answer-card:hover::before {
    transform: none;
  }
  body.prod-surface .answer-card.selected::after {
    transform: translate(-50%, -50%) scale(1);
  }
}

/* WineLab local Atelier Vitre preview. Scoped to prod only; WineTest remains untouched. */
body.prod-surface {
  --bg: #f4ecdd;
  --card: rgba(255, 253, 250, 0.72);
  --primary: #7a2633;
  --primary-deep: #4d1b24;
  --primary-soft: rgba(122, 38, 51, 0.08);
  --text: #34302c;
  --muted: #766b60;
  --border: rgba(94, 85, 77, 0.16);
  --gold: #b89150;
  --sage: #7e9070;
  --glass: rgba(255, 253, 250, 0.62);
  --glass-strong: rgba(255, 253, 250, 0.84);
  --glass-line: rgba(255, 255, 255, 0.82);
  --atelier-shadow: 0 22px 60px -30px rgba(80, 60, 50, 0.42);
  --atelier-ring: 0 0 0 1px rgba(255,255,255,0.75) inset, 0 1px 0 rgba(255,255,255,0.85) inset;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Cormorant Garamond", Georgia, serif;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --prod-control-font-size: clamp(18px, 1.45vw, 24px);
  --prod-inline-action-font-size: clamp(17px, 1.25vw, 21px);
  --prod-price-compact-font-size: clamp(14px, 1.05vw, 18px);
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-display);
  background:
    radial-gradient(72% 48% at 83% -5%, rgba(247, 231, 196, 0.95) 0%, rgba(247, 231, 196, 0) 62%),
    radial-gradient(60% 52% at 8% 98%, rgba(167, 181, 154, 0.35) 0%, rgba(167, 181, 154, 0) 64%),
    linear-gradient(180deg, #f7eedf 0%, #eee2cc 48%, #e5d8bd 100%);
}

body.prod-surface::before {
  content: "";
  position: fixed;
  inset: auto -12vw 0 -12vw;
  height: 48vh;
  z-index: -1;
  pointer-events: none;
  opacity: 0.58;
  background:
    radial-gradient(60% 120% at 20% 100%, rgba(174, 179, 137, 0.75) 0%, transparent 61%),
    radial-gradient(55% 120% at 52% 100%, rgba(194, 195, 157, 0.72) 0%, transparent 58%),
    radial-gradient(68% 120% at 88% 100%, rgba(217, 216, 184, 0.82) 0%, transparent 62%);
  filter: blur(34px);
}

body.prod-surface .app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  width: calc(100% - 32px);
  max-width: 1284px;
  margin: 0 auto;
  min-height: 96px;
  padding: 8px 0 2px;
  border-bottom: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.prod-surface .brand-lockup {
  min-height: 96px;
  align-items: flex-start;
  gap: 18px;
}

body.prod-surface .brand-logo-frame {
  position: relative;
  width: 190px;
  height: 96px;
  padding: 0;
  border: 0;
  border-radius: 0 !important;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

body.prod-surface .brand-logo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: none;
  opacity: 0;
}

body.prod-surface .brand-logo-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #e7a13a;
  -webkit-mask: url("/assets/brand/blooming-w-blue-monogram-transparent.png?v=20260727-blooming-monogram-2") center / cover no-repeat;
  mask: url("/assets/brand/blooming-w-blue-monogram-transparent.png?v=20260727-blooming-monogram-2") center / cover no-repeat;
  filter:
    drop-shadow(0 0 2px rgba(111, 184, 232, 0.72))
    drop-shadow(0 0 6px rgba(111, 184, 232, 0.52))
    drop-shadow(0 0 13px rgba(111, 184, 232, 0.26));
}

body.prod-surface .title-row {
  --prod-brand-title-size: clamp(29px, 2.3vw, 34px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  grid-template-areas:
    "title . language how stats"
    "credit . . . .";
  min-height: 84px;
  align-items: start;
  column-gap: clamp(8px, 0.8vw, 12px);
  row-gap: 0;
  position: relative;
  width: 100%;
}

body.prod-surface .app-header h1 {
  grid-area: title;
  min-width: 0;
  max-width: 100%;
  color: var(--primary);
  font-family: var(--font-sans);
  font-size: var(--prod-brand-title-size);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 0.98;
  text-transform: none;
}

body.prod-surface .brand-title-main {
  word-spacing: -0.06em;
}

body.prod-surface .brand-title-version {
  display: inline-block;
  margin-left: clamp(3px, 0.08em, 5px);
  color: var(--primary);
  font-family: var(--font-sans);
  font-size: 0.5em;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
  vertical-align: baseline;
  transform: translateY(-0.06em);
}

body.prod-surface .research-engine-credit {
  position: absolute;
  top: calc(var(--prod-brand-title-size, 56px) + 10px);
  left: 0;
  margin-top: 0;
  color: var(--primary);
  font-size: clamp(13px, 1.05vw, 16px);
  font-weight: 900 !important;
  font-style: italic;
  font-variation-settings: "wght" 900;
  letter-spacing: 0;
  line-height: 1.12;
  text-transform: none;
  white-space: nowrap;
}

body.prod-surface .language-switcher,
body.prod-surface .header-stat {
  border: 1px solid rgba(94, 85, 77, 0.14);
  border-radius: 999px !important;
  background: rgba(255, 253, 250, 0.58);
  box-shadow: 0 12px 34px -28px rgba(80, 60, 50, 0.45), var(--atelier-ring);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

body.prod-surface #totalQuizStat {
  display: none !important;
}

body.prod-surface .language-option {
  color: var(--muted);
}

body.prod-surface .language-option[data-lang="el"] { order: 1; }
body.prod-surface .language-option[data-lang="en"] { order: 2; }
body.prod-surface .language-option[data-lang="ru"] { order: 3; }

body.prod-surface .language-option.active {
  background: #7a2633;
  color: #fff8f3;
  box-shadow: 0 10px 24px -16px rgba(122, 38, 51, 0.76);
}

body.prod-surface .language-switcher {
  grid-area: language;
  flex: 0 0 auto;
  width: auto;
  min-width: max-content;
  max-width: max-content;
  min-height: 0;
  margin-left: 0;
  align-self: start;
  margin-top: calc(var(--prod-brand-title-size, 56px) * 0.31);
}

body.prod-surface .header-stack {
  grid-area: stats;
  flex: 0 1 auto;
  min-width: 0;
  margin-left: 0;
  gap: 12px;
  justify-content: flex-end;
  align-items: flex-end;
  align-self: start;
  margin-top: calc(var(--prod-brand-title-size, 56px) * 0.31);
  flex-wrap: nowrap;
}

body.prod-surface .header-stat {
  flex: 0 0 auto;
  width: max-content;
  max-width: min(38vw, 430px);
  height: 38px;
  min-height: 38px;
  padding: 7px 22px;
  color: var(--text);
  font: 700 18px/1.08 var(--font-display);
  white-space: nowrap;
  overflow-wrap: normal;
  text-wrap: balance;
}

body.prod-surface #totalQuizStat {
  flex-basis: auto;
  max-width: min(34vw, 360px);
  font: 700 18px/1.08 var(--font-display);
}

body.prod-surface #datasetStat {
  flex-basis: auto;
  max-width: min(39vw, 390px);
  font: 700 18px/1.08 var(--font-display);
}

body.prod-surface .container {
  max-width: 1380px;
  padding: 4px clamp(16px, 3.6vw, 48px) 68px;
  gap: 6px;
}

body.prod-surface .hero {
  display: block;
  order: 1;
  padding: 17px 22px;
  border: 1px solid rgba(94, 85, 77, 0.13);
  border-radius: 22px !important;
  background: var(--glass);
  box-shadow: var(--atelier-shadow), var(--atelier-ring);
  backdrop-filter: blur(22px) saturate(118%);
  -webkit-backdrop-filter: blur(22px) saturate(118%);
}

body.prod-surface .hero p {
  max-width: none;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 17.25px;
  font-weight: 700;
  line-height: 1.42;
}

body.prod-surface .hero-flow-image {
  display: none;
}

body.prod-surface .quiz-layout {
  order: 2;
  display: grid;
  grid-template-columns: minmax(620px, 1.8fr) minmax(150px, 0.38fr) minmax(260px, 0.67fr);
  gap: 8px;
  align-items: stretch;
}

.quiz-alchemy-bottle {
  display: none;
}

body.prod-surface:not(.prod-results-mode) .quiz-alchemy-bottle {
  --alchemy-photo-brightness: 1;
  --alchemy-photo-saturation: 1;
  --alchemy-photo-contrast: 1;
  position: relative;
  display: flex;
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(94, 85, 77, 0.14);
  border-top-color: rgba(255, 255, 255, 0.86);
  border-left-color: rgba(255, 255, 255, 0.62);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 253, 250, 0.76), rgba(247, 237, 219, 0.58));
  box-shadow: var(--atelier-shadow), var(--atelier-ring);
  isolation: isolate;
}

body.prod-surface .quiz-alchemy-bottle::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 28%),
    radial-gradient(80% 24% at 50% 88%, rgba(184, 145, 80, 0.12), transparent 78%);
}

body.prod-surface .alchemy-state-stack {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

body.prod-surface .alchemy-state {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: 50% 50%;
  opacity: 0;
  transform: scale(1.004);
  transform-origin: 50% 70%;
  filter:
    brightness(var(--alchemy-photo-brightness))
    saturate(var(--alchemy-photo-saturation))
    contrast(var(--alchemy-photo-contrast));
  transition:
    opacity 980ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 900ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 1100ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.prod-surface .alchemy-state.is-active {
  z-index: 1;
  opacity: 1;
  transform: scale(1);
}

body.prod-surface .quiz-alchemy-bottle.is-transitioning .alchemy-state {
  will-change: opacity, transform;
}

body.prod-surface .alchemy-transition-bloom,
body.prod-surface .alchemy-transition-sheen {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
}

body.prod-surface .alchemy-transition-bloom {
  background:
    radial-gradient(ellipse 28% 65% at 50% 52%, rgba(226, 242, 255, 0.42), rgba(184, 214, 237, 0.12) 45%, transparent 74%);
  transform: scale(0.94);
  transform-origin: 50% 58%;
  mix-blend-mode: screen;
}

body.prod-surface .alchemy-transition-sheen {
  inset: 5% 22% 4%;
  background: linear-gradient(104deg, transparent 28%, rgba(255, 255, 255, 0.1) 42%, rgba(220, 240, 255, 0.62) 50%, rgba(255, 235, 194, 0.22) 57%, transparent 72%);
  filter: blur(4px);
  transform: translateX(-130%) skewX(-8deg);
  mix-blend-mode: screen;
}

body.prod-surface .quiz-alchemy-bottle.is-transitioning .alchemy-transition-bloom,
body.prod-surface .quiz-alchemy-bottle.is-transitioning .alchemy-transition-sheen {
  will-change: opacity, transform;
}

body.prod-surface .alchemy-object-layer {
  position: absolute;
  inset: 14% 20% 8%;
  z-index: 3;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  body.prod-surface .alchemy-state {
    transition-duration: 0.01ms !important;
  }

  body.prod-surface .alchemy-transition-bloom,
  body.prod-surface .alchemy-transition-sheen {
    display: none;
  }
}

body.prod-surface.prod-results-mode .quiz-alchemy-bottle {
  display: none !important;
}

body.prod-surface .quiz-panel {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  height: 100%;
  max-height: 1800px;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 360ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    max-height 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.prod-surface .quiz-step-shell {
  position: relative;
  overflow: hidden;
  min-height: 0;
  height: 100%;
  padding: clamp(16px, 2.1vw, 28px) clamp(46px, 4vw, 54px) clamp(22px, 2.2vw, 30px);
  border: 1px solid rgba(94, 85, 77, 0.14);
  border-top-color: rgba(255,255,255,0.86);
  border-left-color: rgba(255,255,255,0.62);
  border-radius: 28px !important;
  background: linear-gradient(180deg, rgba(255,253,250,0.72), rgba(255,253,250,0.52));
  box-shadow: var(--atelier-shadow), var(--atelier-ring);
  backdrop-filter: blur(28px) saturate(122%);
  -webkit-backdrop-filter: blur(28px) saturate(122%);
}

body.prod-surface .quiz-step-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42% 32% at 82% 12%, rgba(247,231,196,0.44), transparent 70%),
    radial-gradient(34% 38% at 12% 92%, rgba(126,144,112,0.18), transparent 72%);
}

body.prod-surface .quiz-step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  transform: translateY(-8px);
}

body.prod-surface .quiz-step-eyebrow {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  color: var(--muted);
  font-size: 18.7px;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.08;
  text-transform: uppercase;
}

body.prod-surface .quiz-step-eyebrow::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  margin-left: 14px;
  background: rgba(94, 85, 77, 0.16);
}

body.prod-surface .quiz-step-counter {
  flex: 0 0 auto;
  padding: 10px 18px;
  border: 1px solid rgba(94, 85, 77, 0.13);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.65);
  color: var(--text);
  font-size: 20.4px;
  font-weight: 700;
  line-height: 1.04;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
  box-shadow: var(--atelier-ring);
}

body.prod-surface .quiz-step-progress {
  height: 6px;
  margin-bottom: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(122, 38, 51, 0.1);
}

body.prod-surface .quiz-step-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b89150, #7a2633);
  transition: width 760ms cubic-bezier(0.4, 0, 0.2, 1);
}

body.prod-surface #resetQuizBtn {
  display: none;
}

body.prod-surface .quiz-step-question {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.prod-surface .quiz-step-question .quiz-question-head {
  display: block;
  min-height: 0;
  margin: 0 0 18px;
  padding: 0;
}

body.prod-surface .quiz-step-question .quiz-question-head > div {
  max-width: 820px;
  margin: 0;
}

body.prod-surface .quiz-step-question .quiz-question-head::before {
  content: none !important;
  display: none !important;
}

body.prod-surface .quiz-step-question h2 {
  margin: 0;
  color: #2d2520;
  font-family: var(--font-display);
  font-size: clamp(26px, 2.52vw, 44px);
  font-weight: 700;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
  letter-spacing: 0;
  line-height: 1.02;
  text-align: left;
  text-transform: none;
}

body.prod-surface .quiz-step-question p {
  max-width: 62ch;
  margin: 16px 0 0;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.48;
  text-align: left;
}

body.prod-surface .answer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body.prod-surface .quiz-answer-stage {
  position: relative;
}

body.prod-surface .answer-card {
  container-type: inline-size;
  position: relative;
  display: grid;
  grid-template-rows: minmax(128px, auto) auto;
  min-height: 0;
  gap: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(94, 85, 77, 0.14);
  border-top-color: rgba(255,255,255,0.78);
  border-radius: 22px !important;
  background: rgba(255, 253, 250, 0.58);
  box-shadow: 0 18px 42px -30px rgba(80, 60, 50, 0.38), var(--atelier-ring);
  backdrop-filter: blur(16px) saturate(116%);
  -webkit-backdrop-filter: blur(16px) saturate(116%);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

body.prod-surface .answer-card:hover {
  transform: translateY(-2px);
  border-color: rgba(122, 38, 51, 0.22);
  background: rgba(255, 253, 250, 0.72);
  box-shadow: 0 24px 54px -30px rgba(80, 60, 50, 0.48), var(--atelier-ring);
}

body.prod-surface .answer-card.selected {
  border-color: rgba(122, 38, 51, 0.58);
  background: rgba(255, 250, 246, 0.86);
  box-shadow: 0 24px 58px -28px rgba(122, 38, 51, 0.42), 0 0 0 1px rgba(122,38,51,0.16) inset;
}

body.prod-surface .answer-card::before {
  top: 14px;
  left: 14px;
  width: auto;
  height: auto;
  padding: 5px 9px;
  border: 1px solid rgba(255,255,255,0.54);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.35);
  color: rgba(255,255,255,0.92);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
}

body.prod-surface .answer-card.selected::after {
  top: 14px;
  right: 14px;
  left: auto;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255,255,255,0.76);
  border-radius: 999px;
  background: #7a2633;
  color: #fff;
  font-size: 16px;
  transform: none;
  box-shadow: 0 10px 20px -10px rgba(122, 38, 51, 0.8);
}

body.prod-surface .answer-image {
  order: 1;
  width: 100%;
  height: 100%;
  min-height: 128px;
  margin: 0;
  border: 0;
  border-radius: 0 !important;
  background: #e7dcc7;
  object-fit: cover;
  filter: saturate(0.92) contrast(0.94);
}

body.prod-surface .answer-title,
body.prod-surface .answer-subtitle {
  position: relative;
  z-index: 1;
  display: block;
  text-align: left;
}

body.prod-surface .answer-title {
  order: 2;
  padding: 13px 14px 15px;
  color: #2f2924;
  font-family: var(--font-serif);
  font-size: clamp(16px, 7.2cqw, 23px);
  font-weight: 700;
  line-height: 1.08;
}

body.prod-surface .answer-subtitle {
  display: none !important;
}

body.prod-surface .quiz-step-nav {
  position: absolute;
  inset: 0 -45px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  pointer-events: none;
}

body.prod-surface .btn-generate,
body.prod-surface .btn-secondary {
  min-height: 46px;
  border-radius: 11px !important;
  padding: 12px 20px;
  font-size: var(--prod-control-font-size);
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
  text-wrap: nowrap;
}

body.prod-surface .btn-generate {
  border: 1px solid #5c1a25;
  background: linear-gradient(180deg, #9c4350, #7a2633);
  color: #fff8f3;
  box-shadow: 0 16px 34px -20px rgba(122, 38, 51, 0.7), 0 1px 0 rgba(255,255,255,0.22) inset;
}

body.prod-surface .btn-secondary {
  border: 1px solid rgba(94, 85, 77, 0.14);
  background: rgba(255, 253, 250, 0.66);
  color: var(--text);
  box-shadow: var(--atelier-ring);
}

body.prod-surface .quiz-step-nav button {
  pointer-events: auto;
  flex: 0 0 auto;
  width: 36px;
  min-width: 36px;
  height: 76px;
  min-height: 76px;
  padding: 0;
  text-align: center;
  border-radius: 13px !important;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
  text-wrap: nowrap;
}

body.prod-surface .quiz-step-nav .quiz-step-back {
  border-color: rgba(94, 85, 77, 0.18);
  background: rgba(255, 253, 250, 0.78);
  color: #5e554d;
  box-shadow: 0 14px 28px -22px rgba(80, 60, 50, 0.52), var(--atelier-ring);
}

body.prod-surface .quiz-step-nav .quiz-step-next {
  border-color: rgba(122, 38, 51, 0.28);
  background: linear-gradient(180deg, rgba(154, 67, 80, 0.15), rgba(122, 38, 51, 0.09));
  color: #7a2633;
  box-shadow: 0 16px 30px -22px rgba(122, 38, 51, 0.64), var(--atelier-ring);
}

body.prod-surface .quiz-step-nav-icon {
  display: block;
  width: 18px;
  height: 26px;
  margin: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.prod-surface .quiz-step-nav button:disabled {
  opacity: 0.34;
}

body.prod-surface .quiz-step-nav-budget {
  inset: auto auto 22px 6px;
}

body.prod-surface .quiz-step-restart {
  display: flex;
  justify-content: center;
  margin: 15px 0 0;
}

body.prod-surface .quiz-step-restart-button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font: 700 14px/1.08 var(--font-display);
  cursor: pointer;
}

body.prod-surface .quiz-step-restart-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(122, 38, 51, 0.28);
  border-radius: 50%;
  background: rgba(255, 253, 250, 0.72);
  color: #7a2633;
  font-family: Arial, sans-serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  box-shadow: 0 12px 28px -20px rgba(122, 38, 51, 0.62), var(--atelier-ring);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

body.prod-surface .quiz-step-restart-button:hover .quiz-step-restart-icon {
  transform: rotate(-24deg);
  border-color: rgba(122, 38, 51, 0.52);
  background: rgba(255, 250, 246, 0.94);
}

body.prod-surface .quiz-step-restart-button:focus-visible {
  outline: 2px solid rgba(122, 38, 51, 0.62);
  outline-offset: 5px;
  border-radius: 8px;
}

body.prod-surface .quiz-step-restart-label {
  letter-spacing: 0;
}

body.prod-surface .results-restart-button {
  display: none;
  flex: 0 0 auto;
}

body.prod-surface.prod-results-mode .results-restart-button {
  display: inline-flex;
}

body.prod-surface .btn-generate:hover,
body.prod-surface .btn-secondary:hover {
  filter: none;
}

body.prod-surface .price-range-block {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.prod-surface .price-range-head h2 {
  margin: 0;
  color: #2d2520;
  font-family: var(--font-display);
  font-size: clamp(26px, 2.52vw, 44px);
  line-height: 1.08;
}

body.prod-surface .price-range-head p {
  max-width: 58ch;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 16px;
}

body.prod-surface .price-range-status {
  border: 1px solid rgba(94, 85, 77, 0.13);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.62);
  font-family: var(--font-display);
  font-size: var(--prod-control-font-size);
  font-weight: 700;
  line-height: 1.18;
}

body.prod-surface .price-range-status-icon {
  background: rgba(184, 145, 80, 0.16);
  color: #8a6a2e;
}

body.prod-surface .price-segmented {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.prod-surface .price-segment {
  --price-soft: rgba(248, 226, 179, 0.68);
  --price-active: rgba(245, 212, 143, 0.92);
  --price-glow: rgba(184, 145, 80, 0.24);
  min-height: 62px;
  padding: 10px 14px;
  border: 1px solid rgba(94, 85, 77, 0.13);
  border-radius: 18px !important;
  background: linear-gradient(180deg, rgba(255, 253, 250, 0.46), var(--price-soft));
  color: var(--text);
  box-shadow: 0 14px 30px -26px var(--price-glow), var(--atelier-ring);
  opacity: 1;
  overflow: hidden;
  text-align: center;
}

body.prod-surface .price-segment[data-price-tone="1"] {
  --price-soft: rgba(208, 238, 202, 0.74);
  --price-active: rgba(174, 223, 165, 0.94);
  --price-glow: rgba(96, 153, 85, 0.24);
}

body.prod-surface .price-segment[data-price-tone="2"] {
  --price-soft: rgba(201, 226, 242, 0.76);
  --price-active: rgba(167, 211, 237, 0.94);
  --price-glow: rgba(72, 138, 177, 0.24);
}

body.prod-surface .price-segment[data-price-tone="3"] {
  --price-soft: rgba(245, 214, 225, 0.76);
  --price-active: rgba(235, 184, 202, 0.94);
  --price-glow: rgba(172, 84, 116, 0.24);
}

body.prod-surface .price-segment[data-price-tone="4"] {
  --price-soft: rgba(222, 214, 241, 0.78);
  --price-active: rgba(197, 184, 229, 0.94);
  --price-glow: rgba(122, 95, 177, 0.22);
}

body.prod-surface .price-segment[data-price-tone="5"] {
  --price-soft: rgba(232, 224, 209, 0.84);
  --price-active: rgba(212, 201, 182, 0.96);
  --price-glow: rgba(125, 104, 74, 0.20);
}

body.prod-surface .price-segment.selected {
  border-color: rgba(122, 38, 51, 0.52);
  background: linear-gradient(180deg, rgba(255, 253, 250, 0.34), var(--price-active));
  color: var(--primary);
  box-shadow: 0 16px 34px -22px var(--price-glow), var(--atelier-ring);
}

body.prod-surface .price-segment-check {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  text-align: center;
}

body.prod-surface .price-segment-label {
  display: block;
  width: 100%;
  padding: 0 14px;
  font-family: var(--font-display);
  font-size: var(--prod-control-font-size);
  font-weight: 700;
  line-height: 1.18;
  text-align: center;
  overflow-wrap: normal;
  text-wrap: nowrap;
  white-space: nowrap;
}

body.prod-surface .price-segment[data-price-id="no_strict"] .price-segment-label {
  display: -webkit-box;
  padding: 0 6px;
  font-size: var(--prod-control-font-size);
  line-height: 1.18;
  overflow: hidden;
  overflow-wrap: normal;
  text-wrap: balance;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body.prod-surface .quiz-inline-actions-slot {
  margin: 18px 0 0;
  padding: 14px;
  border: 1px solid rgba(122, 38, 51, 0.28);
  border-radius: 22px !important;
  background: rgba(255, 253, 250, 0.62);
  box-shadow: 0 18px 42px -28px rgba(80, 60, 50, 0.36), var(--atelier-ring);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body.prod-surface .quiz-inline-actions-slot .hero-actions {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.65fr) minmax(0, 1fr);
  gap: 12px;
}

body.prod-surface .quiz-inline-actions-slot .hero-actions .btn-secondary {
  order: 1;
}

body.prod-surface .quiz-inline-actions-slot .hero-actions .action-quiz-stat {
  order: 2;
}

body.prod-surface .quiz-inline-actions-slot .hero-actions .btn-generate {
  order: 3;
}

body.prod-surface .quiz-inline-actions-slot .hero-actions .action-quiz-stat {
  min-height: 54px;
  border-color: rgba(94, 85, 77, 0.13);
  border-radius: 999px !important;
  background: rgba(255, 253, 250, 0.72);
  color: var(--muted);
  font-size: var(--prod-inline-action-font-size);
  font-weight: 700;
  line-height: 1.12;
  box-shadow: var(--atelier-ring);
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: balance;
}

body.prod-surface .quiz-inline-actions-slot .hero-actions .btn-generate,
body.prod-surface .quiz-inline-actions-slot .hero-actions .btn-secondary {
  font-size: var(--prod-control-font-size);
  line-height: 1.12;
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: balance;
  hyphens: none;
}

body.prod-surface .sticky-summary {
  position: sticky;
  grid-column: 3;
  grid-row: 1;
  top: 104px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-height: none;
  overflow: hidden;
  margin-top: 0 !important;
  padding: 10px;
  border: 1px solid rgba(94, 85, 77, 0.14);
  border-top-color: rgba(255,255,255,0.84);
  border-radius: 28px !important;
  background: rgba(255, 253, 250, 0.66);
  box-shadow: var(--atelier-shadow), var(--atelier-ring);
  backdrop-filter: blur(26px) saturate(118%);
  -webkit-backdrop-filter: blur(26px) saturate(118%);
}

body.prod-surface .sticky-summary > .card-head,
body.prod-surface .sticky-summary > .profile-kpis,
body.prod-surface .sticky-summary > h3:nth-of-type(2),
body.prod-surface .sticky-summary > .prob-list,
body.prod-surface .sticky-summary > .calc-details {
  display: none !important;
}

body.prod-surface .sticky-summary > h3:nth-of-type(1),
body.prod-surface .sticky-summary > .bars,
body.prod-surface .sticky-summary > h3:nth-of-type(3),
body.prod-surface .sticky-summary > .tag-cloud,
body.prod-surface .sticky-summary > .profile-radar-block {
  display: block !important;
  width: 100%;
  min-width: 0;
  margin: 0;
  grid-column: auto !important;
  grid-row: auto !important;
}

body.prod-surface .sticky-summary > h3,
body.prod-surface .profile-radar-block h3 {
  color: #111111;
  font-family: var(--font-sans);
  font-size: 20.2px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.04;
  text-transform: uppercase;
}

body.prod-surface .sticky-summary > h3:nth-of-type(1),
body.prod-surface .sticky-summary > h3:nth-of-type(3),
body.prod-surface .profile-radar-block h3 {
  color: #111111 !important;
  font-size: 20.2px !important;
  font-weight: 700 !important;
  line-height: 1.04 !important;
}

body.prod-surface .bars,
body.prod-surface .tag-cloud,
body.prod-surface .profile-radar-block {
  border: 1px solid rgba(94, 85, 77, 0.12);
  border-radius: 18px !important;
  background: rgba(255, 253, 250, 0.54);
  box-shadow: var(--atelier-ring);
}

body.prod-surface .bar-label,
body.prod-surface .prob-group strong {
  color: var(--muted);
}

body.prod-surface .sticky-summary > .profile-radar-block {
  order: 1;
}

body.prod-surface .sticky-summary > h3:nth-of-type(1) {
  order: 2;
}

body.prod-surface .sticky-summary > .bars {
  order: 3;
}

body.prod-surface .sticky-summary > h3:nth-of-type(3) {
  order: 4;
}

body.prod-surface .sticky-summary > .tag-cloud {
  order: 5;
}

body.prod-surface .bars,
body.prod-surface .tag-cloud {
  padding: 10px;
}

body.prod-surface .bars {
  gap: 10px;
}

body.prod-surface .profile-radar-block {
  display: flex !important;
  flex-direction: column;
  min-height: clamp(292px, 25vw, 360px);
  padding: 10px;
  overflow: hidden;
}

body.prod-surface .bar-row {
  grid-template-columns: minmax(80px, 0.78fr) minmax(0, 1fr) 42px;
  gap: 9px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
}

body.prod-surface .bar-track {
  height: 11px;
  background: rgba(122, 38, 51, 0.08);
}

body.prod-surface .bar-fill {
  background: linear-gradient(90deg, #b89150, #7a2633);
  transition: width 460ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.prod-surface .bar-row strong {
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  transition: opacity 180ms ease, color 180ms ease;
}

body.prod-surface .tag-cloud {
  display: flex !important;
  flex-wrap: wrap;
  align-content: flex-start;
  column-gap: 6px;
  row-gap: 8px;
  min-height: 218px;
  max-width: 100%;
  overflow: hidden;
  position: relative;
}

body.prod-surface .tag-pill {
  display: block;
  flex: 0 1 auto;
  box-sizing: border-box;
  font-family: var(--font-sans);
  max-width: 100%;
  min-width: 0;
  min-height: 24px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.18;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  opacity: 0;
  transform: translateY(7px) scale(0.98);
  transition:
    opacity 480ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.prod-surface .tag-pill.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

body.prod-surface .tag-pill.is-exiting {
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
}

body.prod-surface .radar-label {
  font-size: 13.2px;
  font-weight: 700;
}

body.prod-surface .radar-value {
  font-size: 11.8px;
  font-weight: 700;
}

body.prod-surface .radar-chart {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
}

body.prod-surface .radar-chart svg {
  width: 100%;
  max-width: min(100%, 430px);
  margin: 0 auto;
}

body.prod-surface .radar-profile {
  fill: rgba(122, 38, 51, 0.16);
  stroke: var(--primary);
}

body.prod-surface .radar-point {
  fill: var(--primary);
}

body.prod-surface .radar-profile,
body.prod-surface .radar-point,
body.prod-surface .radar-value {
  transition: opacity 180ms ease;
}

body.prod-surface .live-preview-pulse {
  animation: prod-live-preview-pulse 540ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes prod-live-preview-pulse {
  0% {
    filter: saturate(1);
  }
  42% {
    filter: saturate(1.18) brightness(1.03);
  }
  100% {
    filter: saturate(1);
  }
}

body.prod-surface .radar-note {
  display: none;
  color: var(--muted);
}

body.prod-surface .prob-list {
  display: flex !important;
  gap: 8px;
}

body.prod-surface .prob-group {
  padding: 11px 12px;
}

body.prod-surface .tag-pill,
body.prod-surface .prob-item {
  border: 1px solid rgba(94, 85, 77, 0.12);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.72);
  color: var(--primary);
}

body.prod-surface .tag-pill {
  border-color: var(--tag-border, rgba(94, 85, 77, 0.12));
  background: var(--tag-bg, rgba(255, 253, 250, 0.72));
  color: var(--tag-color, var(--primary));
}

body.prod-surface .tag-pill:nth-child(10n + 1) { --tag-bg: rgba(122, 38, 51, 0.10); --tag-border: rgba(122, 38, 51, 0.24); --tag-color: #7a2633; }
body.prod-surface .tag-pill:nth-child(10n + 2) { --tag-bg: rgba(184, 145, 80, 0.16); --tag-border: rgba(184, 145, 80, 0.30); --tag-color: #80602b; }
body.prod-surface .tag-pill:nth-child(10n + 3) { --tag-bg: rgba(126, 144, 112, 0.17); --tag-border: rgba(126, 144, 112, 0.31); --tag-color: #556449; }
body.prod-surface .tag-pill:nth-child(10n + 4) { --tag-bg: rgba(47, 127, 191, 0.11); --tag-border: rgba(47, 127, 191, 0.25); --tag-color: #2f668f; }
body.prod-surface .tag-pill:nth-child(10n + 5) { --tag-bg: rgba(143, 86, 145, 0.12); --tag-border: rgba(143, 86, 145, 0.26); --tag-color: #714875; }
body.prod-surface .tag-pill:nth-child(10n + 6) { --tag-bg: rgba(176, 92, 61, 0.13); --tag-border: rgba(176, 92, 61, 0.28); --tag-color: #8f4c35; }
body.prod-surface .tag-pill:nth-child(10n + 7) { --tag-bg: rgba(74, 132, 126, 0.13); --tag-border: rgba(74, 132, 126, 0.28); --tag-color: #3f6d68; }
body.prod-surface .tag-pill:nth-child(10n + 8) { --tag-bg: rgba(142, 105, 55, 0.13); --tag-border: rgba(142, 105, 55, 0.26); --tag-color: #72542d; }
body.prod-surface .tag-pill:nth-child(10n + 9) { --tag-bg: rgba(95, 103, 158, 0.12); --tag-border: rgba(95, 103, 158, 0.26); --tag-color: #555c8d; }
body.prod-surface .tag-pill:nth-child(10n) { --tag-bg: rgba(156, 63, 88, 0.11); --tag-border: rgba(156, 63, 88, 0.26); --tag-color: #85364c; }

body.prod-surface .prob-item {
  background: rgba(255, 253, 250, 0.72);
  color: var(--primary);
}

body.prod-surface .results-grid {
  order: 3;
}

body.prod-surface.prod-results-mode .quiz-layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

body.prod-surface.prod-results-mode .quiz-panel {
  max-height: 0;
  opacity: 0;
  transform: translateY(-14px);
  pointer-events: none;
  overflow: hidden;
}

body.prod-surface.prod-results-mode .quiz-panel > * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

body.prod-surface.prod-results-mode .sticky-summary {
  display: grid !important;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
  grid-template-rows: auto minmax(120px, auto) auto minmax(100px, 1fr);
  gap: 10px 14px;
  width: 100%;
  margin-top: 0 !important;
  padding: 0;
  overflow: visible;
  position: static;
  transform-origin: left top;
}

body.prod-surface.prod-results-mode .sticky-summary > .profile-radar-block {
  grid-column: 1;
  grid-row: 1 / span 4;
  order: initial;
  min-height: clamp(520px, 43vw, 680px);
  margin: 0;
}

body.prod-surface.prod-results-mode .profile-radar-block {
  display: flex !important;
  flex-direction: column;
}

body.prod-surface.prod-results-mode .radar-chart {
  flex: 1 1 auto;
  min-height: clamp(430px, 37vw, 580px);
  display: flex;
  align-items: center;
  justify-content: center;
}

body.prod-surface.prod-results-mode .radar-chart svg {
  width: min(100%, 560px);
  max-width: 560px;
}

body.prod-surface.prod-results-mode .sticky-summary > h3:nth-of-type(1) {
  grid-column: 2;
  grid-row: 1;
  order: initial;
  margin: 0;
}

body.prod-surface.prod-results-mode .sticky-summary > .bars {
  grid-column: 2;
  grid-row: 2;
  order: initial;
  margin: 0;
}

body.prod-surface.prod-results-mode .sticky-summary > h3:nth-of-type(3) {
  grid-column: 2;
  grid-row: 3;
  order: initial;
  margin: 0;
}

body.prod-surface.prod-results-mode .sticky-summary > .tag-cloud {
  grid-column: 2;
  grid-row: 4;
  order: initial;
  min-height: 112px;
  margin: 0;
}

body.prod-surface.prod-results-mode .results-grid {
  margin-top: 12px;
}

body.prod-surface .recs-card,
body.prod-surface .rec-card {
  border: 1px solid rgba(94, 85, 77, 0.14);
  border-radius: 24px !important;
  background: rgba(255, 253, 250, 0.72);
  box-shadow: var(--atelier-shadow), var(--atelier-ring);
  backdrop-filter: blur(20px) saturate(116%);
  -webkit-backdrop-filter: blur(20px) saturate(116%);
}

body.prod-surface .rec-card {
  border-top: 1px solid rgba(94, 85, 77, 0.14);
}

body.prod-surface .rec-name {
  color: #2e2924;
  font-family: var(--font-serif);
}

body.prod-surface,
body.prod-surface * {
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  font-synthesis-weight: auto;
}

body.prod-surface .quiz-step-question.quiz-question:not(.price-question) .quiz-question-head::before {
  content: none !important;
  display: none !important;
}

@media (max-width: 1180px) {
  body.prod-surface .quiz-layout {
    grid-template-columns: minmax(150px, 0.34fr) minmax(0, 0.66fr);
  }

  body.prod-surface .quiz-panel {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  body.prod-surface:not(.prod-results-mode) .quiz-alchemy-bottle {
    grid-column: 1;
    grid-row: 2;
    min-height: 520px;
  }

  body.prod-surface .sticky-summary {
    grid-column: 2;
    grid-row: 2;
    position: static;
    max-height: none;
    overflow: hidden;
  }
}

@media (max-width: 720px) {
  body.prod-surface .app-header {
    position: relative;
    min-height: auto;
    padding: 10px 12px 4px;
  }

  body.prod-surface .brand-lockup {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 78px;
  }

  body.prod-surface .brand-logo-frame {
    display: block;
    width: 124px;
    height: 64px;
    border-radius: 0 !important;
  }

  body.prod-surface .brand-logo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: none;
  }

  body.prod-surface .title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "title title"
      "credit credit"
      "language language"
      "how how"
      "stats stats";
    align-items: start;
    gap: 4px 8px;
    min-height: 0;
    width: 100%;
  }

  body.prod-surface .app-header h1 {
    grid-area: title;
    justify-self: start;
    min-width: 0;
    max-width: 100%;
    font-size: clamp(18px, 5.2vw, 22px);
    line-height: 1.05;
    text-align: left;
    white-space: normal;
    overflow-wrap: normal;
    text-wrap: balance;
  }

  body.prod-surface .research-engine-credit {
    position: static;
    grid-area: credit;
    justify-self: start;
    max-width: 100%;
    margin-top: 0;
    font-size: 10px;
    line-height: 1.12;
    text-align: left;
    white-space: normal;
  }

  body.prod-surface .language-switcher {
    grid-area: language;
    justify-self: end;
    align-self: start;
    width: auto;
    min-width: max-content;
    max-width: max-content;
    margin-left: 0;
  }

  body.prod-surface .prod-intro-how-button {
    justify-self: end;
    width: max-content;
    max-width: 100%;
    min-height: 36px;
    margin-top: 0;
    padding: 8px 12px;
  }

  body.prod-surface .header-stack {
    position: static;
    grid-area: stats;
    min-width: 0;
    width: 100%;
    margin-left: 0;
    gap: 8px;
  }

  body.prod-surface .header-stat {
    width: 100%;
    max-width: 100%;
    flex-basis: auto;
    border-radius: 999px !important;
    font-size: 15px;
    white-space: normal;
  }

  body.prod-surface .container {
    padding: 6px 10px 28px;
    gap: 8px;
  }

  body.prod-surface .hero {
    padding: 14px;
    border-radius: 18px !important;
  }

  body.prod-surface .hero p {
    font-size: 15px;
  }

  body.prod-surface .quiz-step-shell {
    min-height: auto;
    padding: 18px 12px;
    border-radius: 20px !important;
  }

  body.prod-surface .quiz-step-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
  }

  body.prod-surface .quiz-step-eyebrow {
    width: 100%;
    font-size: 16px;
    letter-spacing: 0.12em;
  }

  body.prod-surface .quiz-step-counter {
    align-self: flex-start;
    font-size: 17px;
  }

  body.prod-surface .quiz-step-question h2 {
    font-size: clamp(21px, 7vw, 30px);
  }

  body.prod-surface .quiz-step-question p {
    font-size: 14px;
  }

  body.prod-surface .answer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  body.prod-surface .answer-card {
    grid-template-rows: minmax(104px, auto) auto;
    min-height: 0;
    border-radius: 18px !important;
  }

  body.prod-surface .answer-image {
    min-height: 104px;
  }

  body.prod-surface .answer-title {
    padding: 11px 10px 13px;
    font-size: clamp(14px, 8cqw, 18px);
    line-height: 1.08;
  }

  body.prod-surface .answer-subtitle {
    display: none !important;
  }

  body.prod-surface .quiz-step-nav {
    position: relative;
    inset: auto;
    display: flex;
    gap: 8px;
    margin-top: 16px;
  }

  body.prod-surface .quiz-step-nav button {
    width: 64px;
    min-width: 64px;
    height: 38px;
    min-height: 38px;
    border-radius: 11px !important;
  }

  body.prod-surface .quiz-step-hint {
    position: static;
    order: 0;
    text-align: center;
  }

  body.prod-surface .quiz-step-nav-budget {
    width: max-content;
  }

  body.prod-surface .price-segmented {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.prod-surface .quiz-inline-actions-slot .hero-actions {
    grid-template-columns: 1fr;
  }

  body.prod-surface .sticky-summary {
    padding: 12px;
    border-radius: 20px !important;
  }

  body.prod-surface .quiz-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  body.prod-surface .quiz-panel,
  body.prod-surface .quiz-alchemy-bottle,
  body.prod-surface .sticky-summary {
    grid-column: 1;
  }

  body.prod-surface .quiz-panel { grid-row: 1; }
  body.prod-surface .quiz-alchemy-bottle { grid-row: 2; }
  body.prod-surface .sticky-summary { grid-row: 3; }

  body.prod-surface:not(.prod-results-mode) .quiz-alchemy-bottle {
    min-height: 320px;
    max-height: 360px;
    border-radius: 20px;
  }

  body.prod-surface .alchemy-state {
    object-fit: contain;
  }

  @media (prefers-reduced-motion: reduce) {
    body.prod-surface .alchemy-state {
      transition-duration: 0.01ms !important;
    }
  }

  body.prod-surface .profile-radar-block {
    min-height: 320px;
  }

  body.prod-surface .tag-cloud {
    overflow: hidden;
  }

  body.prod-surface .profile-kpis {
    grid-template-columns: 1fr;
  }

  body.prod-surface.prod-results-mode .sticky-summary {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto auto auto !important;
    gap: 0;
  }

  body.prod-surface.prod-results-mode .sticky-summary > .profile-radar-block {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    min-height: 420px;
    margin: 0 0 12px !important;
  }

  body.prod-surface.prod-results-mode .radar-chart {
    min-height: 340px;
  }

  body.prod-surface.prod-results-mode .sticky-summary > h3:nth-of-type(1) {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
  }

  body.prod-surface.prod-results-mode .sticky-summary > .bars {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
  }

  body.prod-surface.prod-results-mode .sticky-summary > h3:nth-of-type(3) {
    grid-column: 1 / -1 !important;
    grid-row: 4 !important;
    margin-top: 12px !important;
  }

body.prod-surface.prod-results-mode .sticky-summary > .tag-cloud {
    grid-column: 1 / -1 !important;
    grid-row: 5 !important;
  }
}

/* V6.52 live hotfix: keep Database management contained after all legacy overrides. */
body.tech-surface .surface-page-database {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
}

body.tech-surface .surface-page-database .wine-lookup-card,
body.tech-surface .surface-page-database .tech-wine-db-card {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box;
}

body.tech-surface .surface-page-database .wine-lookup-card .feedback-dashboard-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px) !important;
  gap: 14px !important;
  align-items: center !important;
}

body.tech-surface .surface-page-database .wine-lookup-card .feedback-dashboard-head > div,
body.tech-surface .surface-page-database .wine-lookup-card .feedback-dashboard-head h2,
body.tech-surface .surface-page-database .wine-lookup-card .feedback-dashboard-head p {
  min-width: 0 !important;
  max-width: 100% !important;
}

body.tech-surface .surface-page-database .wine-lookup-card .feedback-dashboard-head p {
  overflow-wrap: anywhere;
}

body.tech-surface .surface-page-database .barcode-header-action {
  display: inline-flex !important;
  justify-self: end !important;
  width: min(420px, 100%) !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

body.tech-surface .surface-page-database .tech-wine-db-controls {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(118px, 1fr)) auto !important;
}

body.tech-surface .surface-page-database .tech-wine-db-scroll {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  overflow-y: auto !important;
  overscroll-behavior-x: contain;
}

body.tech-surface .surface-page-database .tech-wine-db-table {
  width: max-content !important;
  min-width: 1800px !important;
  max-width: none !important;
  table-layout: auto !important;
}

body.tech-surface .surface-page-database .tech-wine-db-table th,
body.tech-surface .surface-page-database .tech-wine-db-table td {
  max-width: 240px;
}

body.tech-surface .surface-page-database .tech-wine-db-table th:nth-child(2),
body.tech-surface .surface-page-database .tech-wine-db-table td:nth-child(2) {
  min-width: 260px;
}

@media (max-width: 900px) {
  body.tech-surface .surface-page-database .wine-lookup-card .feedback-dashboard-head,
  body.tech-surface .surface-page-database .tech-wine-db-controls {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.tech-surface .surface-page-database .barcode-header-action {
    justify-self: stretch !important;
  }
}

/* V6.52 database width fix: keep the wide wine table inside its own scroller. */
body.tech-surface .surface-page-database {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

body.tech-surface .surface-page-database .wine-lookup-card,
body.tech-surface .surface-page-database .tech-wine-db-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

body.tech-surface .surface-page-database .wine-lookup-card .feedback-dashboard-head {
  width: 100%;
  min-width: 0;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px) !important;
  align-items: center;
}

body.tech-surface .surface-page-database .wine-lookup-card .feedback-dashboard-head > div {
  min-width: 0;
}

body.tech-surface .surface-page-database .wine-lookup-card .feedback-dashboard-head p {
  overflow-wrap: anywhere;
}

body.tech-surface .surface-page-database .barcode-header-action {
  display: inline-flex !important;
  justify-self: end;
  width: min(420px, 100%) !important;
  max-width: 100%;
  min-width: 0;
}

body.tech-surface .surface-page-database .tech-wine-db-controls {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(118px, 1fr)) auto;
}

body.tech-surface .surface-page-database .tech-wine-db-scroll {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto !important;
  overflow-y: auto;
  overscroll-behavior-x: contain;
}

body.tech-surface .surface-page-database .tech-wine-db-table {
  width: max-content;
  min-width: 1800px;
  max-width: none;
  table-layout: auto;
}

body.tech-surface .surface-page-database .tech-wine-db-table th,
body.tech-surface .surface-page-database .tech-wine-db-table td {
  max-width: 240px;
}

body.tech-surface .surface-page-database .tech-wine-db-table th:nth-child(2),
body.tech-surface .surface-page-database .tech-wine-db-table td:nth-child(2) {
  min-width: 260px;
}

html,
body {
  max-width: 100%;
}

@media (max-width: 900px) {
  body.tech-surface .surface-page-database .wine-lookup-card .feedback-dashboard-head {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.tech-surface .surface-page-database .barcode-header-action {
    justify-self: stretch;
  }

  body.tech-surface .surface-page-database .tech-wine-db-controls {
    grid-template-columns: 1fr;
  }
}

/* V6.52 follow-up: full-width tabs and collapsible visit dashboard */
body.tech-surface .header-surface-nav {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  flex-wrap: wrap;
  align-content: flex-end;
  row-gap: 0;
  overflow: visible !important;
  scrollbar-width: none;
}

body.tech-surface .header-surface-nav::-webkit-scrollbar {
  display: none;
}

body.tech-surface .header-surface-nav .surface-nav-button {
  flex: 0 1 auto;
}

body.tech-surface .tech-dashboard-stack {
  display: block;
  border: 1px solid rgba(47, 134, 199, 0.34);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(246, 252, 255, 0.96), rgba(255, 255, 255, 0.98)),
    var(--card);
  box-shadow: 0 16px 42px rgba(47, 134, 199, 0.11);
}

body.tech-surface .tech-dashboard-summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  list-style: none;
  cursor: pointer;
  color: #213547;
}

body.tech-surface .tech-dashboard-summary::-webkit-details-marker {
  display: none;
}

body.tech-surface .tech-dashboard-summary::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-right: 2px solid #2f86c7;
  border-bottom: 2px solid #2f86c7;
  transform: rotate(45deg);
  transition: transform .18s ease;
}

body.tech-surface .tech-dashboard-stack[open] > .tech-dashboard-summary::before {
  transform: rotate(225deg) translate(-1px, -1px);
}

body.tech-surface .tech-dashboard-summary-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

body.tech-surface .tech-dashboard-summary-counts {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  color: #4f6374;
  font-size: 12px;
  font-weight: 850;
}

body.tech-surface .tech-dashboard-summary-counts span {
  white-space: nowrap;
}

body.tech-surface .tech-dashboard-summary-counts span + span::before {
  content: "/";
  margin-right: 8px;
  color: rgba(47, 134, 199, 0.62);
}

body.tech-surface .tech-dashboard-summary-counts strong {
  color: #19384f;
  font-size: 14px;
  font-weight: 950;
}

body.tech-surface .tech-dashboard-body {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

body.tech-surface .tech-dashboard-stack:not([open]) {
  box-shadow: 0 10px 26px rgba(47, 134, 199, 0.09);
}

body.tech-surface .tech-dashboard-stack:not([open]) > .tech-dashboard-summary {
  border-bottom: 0;
}

body.tech-surface .tech-dashboard-card {
  box-shadow: none;
}

@media (max-width: 720px) {
  body.tech-surface .header-surface-nav {
    overflow: visible !important;
  }

  body.tech-surface .tech-dashboard-summary {
    align-items: flex-start;
  }

  body.tech-surface .tech-dashboard-summary-counts {
    flex-wrap: wrap;
  }
}

/* V6.52 taxonomy shell: Dashboard / Quiz Lab / Telemetry Lab / Database / R&D */
body.prod-surface .surface-page-dashboard,
body.prod-surface .backoffice-page-head,
body.prod-surface .workspace-segmented {
  display: none !important;
}

body.tech-surface .container {
  max-width: 1480px;
}

body.tech-surface .surface-page {
  min-width: 0;
}

body.tech-surface .surface-page:not([hidden]) {
  display: grid;
  gap: 14px;
}

body.tech-surface .header-surface-nav {
  justify-content: flex-start;
  column-gap: 0;
  border-bottom-color: rgba(47, 86, 120, 0.22);
}

body.tech-surface .header-surface-nav .surface-nav-button {
  min-width: 118px;
  min-height: 40px;
  padding: 10px 18px 11px;
  border-color: rgba(47, 86, 120, 0.22);
  color: #3f4d5c;
  background: rgba(255, 255, 255, 0.7);
}

body.tech-surface .header-surface-nav .surface-nav-button.active {
  border-color: rgba(47, 134, 199, 0.46);
  border-bottom-color: #fff;
  color: #185f90;
  background: #fff;
}

body.tech-surface .header-surface-nav .surface-nav-button:focus-visible,
body.tech-surface .workspace-segment:focus-visible,
body.tech-surface .tech-dashboard-summary:focus-visible {
  outline: 3px solid rgba(47, 134, 199, 0.28);
  outline-offset: 2px;
}

body.tech-surface .surface-page-dashboard {
  margin-top: 10px;
}

body.tech-surface .surface-page-dashboard .tech-dashboard-stack {
  margin: 0;
}

body.tech-surface .backoffice-page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-color: rgba(47, 134, 199, 0.3);
  box-shadow: 0 14px 34px rgba(47, 134, 199, 0.08);
}

body.tech-surface .backoffice-page-head h2 {
  margin: 4px 0 0;
  color: #1f3346;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: 0;
}

body.tech-surface .backoffice-page-head p {
  max-width: 780px;
  margin: 6px 0 0;
  color: #5a7084;
  font-size: 13px;
  line-height: 1.45;
}

body.tech-surface .workspace-segmented {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: min(100%, 240px);
  padding: 4px;
  border: 1px solid rgba(177, 213, 238, 0.86);
  border-radius: 9px;
  background: rgba(239, 248, 255, 0.72);
}

body.tech-surface .workspace-segment {
  min-height: 34px;
  padding: 8px 13px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #415b70;
  font: inherit;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

body.tech-surface .workspace-segment:hover {
  background: rgba(255, 255, 255, 0.7);
}

body.tech-surface .workspace-segment.active {
  color: #174d75;
  background: #fff;
  box-shadow: 0 5px 14px rgba(47, 134, 199, 0.14);
}

body.tech-surface .surface-page-feedback .feedback-dashboard,
body.tech-surface .surface-page-database .wine-lookup-card,
body.tech-surface .surface-page-database .tech-wine-db-card,
body.tech-surface .surface-page-rnd .rnd-lab,
body.tech-surface .surface-page-alt-quiz .alt-quiz-lab,
body.tech-surface .surface-page-home .hero {
  margin-top: 0;
}

body.tech-surface .surface-page-home,
body.tech-surface .surface-page-alt-quiz,
body.tech-surface .surface-page-feedback,
body.tech-surface .surface-page-database,
body.tech-surface .surface-page-rnd {
  margin-top: 10px;
}

body.tech-surface .tech-dashboard-body,
body.tech-surface .feedback-grid,
body.tech-surface .tech-wine-db-scroll,
body.tech-surface .debug-scroll,
body.tech-surface .table-container {
  min-width: 0;
}

body.tech-surface .surface-page-database .wine-lookup-card .feedback-dashboard-head,
body.tech-surface .surface-page-rnd .feedback-dashboard-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

body.tech-surface .surface-page-database .barcode-header-action,
body.tech-surface .surface-page-rnd .autotest-header-action,
body.tech-surface .surface-page-rnd .rnd-random-action {
  box-shadow: none;
}

@media (max-width: 900px) {
  body.tech-surface .header-surface-nav .surface-nav-button {
    min-width: 0;
    flex: 1 1 150px;
  }

  body.tech-surface .backoffice-page-head,
  body.tech-surface .surface-page-database .wine-lookup-card .feedback-dashboard-head,
  body.tech-surface .surface-page-rnd .feedback-dashboard-head {
    grid-template-columns: 1fr;
  }

  body.tech-surface .workspace-segmented {
    width: 100%;
    justify-content: stretch;
  }

  body.tech-surface .workspace-segment {
    flex: 1 1 0;
  }
}

@media (max-width: 520px) {
  body.tech-surface .header-surface-nav .surface-nav-button {
    flex-basis: calc(50% - 2px);
    padding-inline: 10px;
  }

  body.tech-surface .backoffice-page-head {
    padding: 13px;
  }
}

/* V6.35 final overrides: WineTest backoffice tabs and Decision Telemetry Lab */
body.tech-surface .app-header { padding-bottom: 10px; }
body.tech-surface .brand-copy { width: 100%; min-width: 0; }
body.tech-surface .title-row { align-items: center; }
body.tech-surface .header-stack { align-items: center; }
body.tech-surface #datasetStat { flex-direction: row; min-height: 34px; }
body.tech-surface #datasetStat span + span { display: none !important; }
body.tech-surface .header-surface-nav {
  width: 100%;
  display: flex !important;
  gap: 0;
  margin-top: 18px;
  padding: 0 2px;
  border-bottom: 1px solid rgba(105, 65, 70, 0.22);
  overflow-x: auto;
  box-shadow: none;
}
body.tech-surface .header-surface-nav .surface-nav-button {
  min-height: 38px;
  margin: 0 -1px -1px 0;
  padding: 9px 18px 10px;
  border-color: rgba(105, 65, 70, 0.22);
  border-bottom-color: rgba(105, 65, 70, 0.22);
  border-radius: 10px 10px 0 0;
  background: rgba(255, 255, 255, 0.62);
  color: #5d3b43;
  box-shadow: none;
  font-size: 12px;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
body.tech-surface .header-surface-nav .surface-nav-button:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.86);
}
body.tech-surface .header-surface-nav .surface-nav-button.active {
  position: relative;
  z-index: 1;
  border-color: rgba(114, 47, 55, 0.42);
  border-bottom-color: #fff;
  background: #fff;
  color: var(--primary);
  box-shadow: 0 -1px 0 rgba(114, 47, 55, 0.08), 0 2px 0 #fff;
}
.surface-page-rnd { display: grid; gap: 16px; }
.rnd-lab {
  display: grid;
  gap: 16px;
  border-color: rgba(81, 99, 112, 0.2);
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.96) 260px),
    var(--card);
}
.rnd-tool-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(240px, 1fr) minmax(120px, .45fr);
  gap: 10px;
  align-items: stretch;
}
.rnd-tool-grid .barcode-header-action,
.rnd-tool-grid .autotest-header-action,
.rnd-random-action {
  width: 100%;
  min-height: 58px;
  border-radius: 8px;
  box-shadow: none;
}
.rnd-random-action {
  border-color: rgba(114, 47, 55, 0.32);
  background: #fff7f8;
  color: var(--primary);
  font-size: 13px;
}
.rnd-panel-slot { min-width: 0; }
.rnd-panel-slot:empty { display: none; }
.rnd-panel-slot .autotest-card,
.rnd-panel-slot .alternatives-card {
  margin: 0;
  width: 100%;
}
body.prod-surface .surface-page-rnd { display: none !important; }
.feedback-dashboard { gap: 12px; }
.feedback-grid { grid-template-columns: 1fr; gap: 12px; }
.feedback-table-card,
.feedback-detail-card { width: 100%; }
.feedback-table-card .feedback-table-scroll { max-height: 190px; }
.feedback-detail-card .feedback-table-scroll { max-height: 620px; }
.feedback-table { table-layout: fixed; }
.feedback-table th,
.feedback-table td { overflow-wrap: anywhere; }
.feedback-detail-card .feedback-table th:nth-child(1),
.feedback-detail-card .feedback-table td:nth-child(1) { width: 11%; }
.feedback-detail-card .feedback-table th:nth-child(2),
.feedback-detail-card .feedback-table td:nth-child(2) { width: 13%; }
.feedback-detail-card .feedback-table th:nth-child(3),
.feedback-detail-card .feedback-table td:nth-child(3) { width: 24%; }
.feedback-detail-card .feedback-table th:nth-child(4),
.feedback-detail-card .feedback-table td:nth-child(4) { width: 12%; }
.feedback-detail-card .feedback-table th:nth-child(5),
.feedback-detail-card .feedback-table td:nth-child(5),
.feedback-detail-card .feedback-table th:nth-child(6),
.feedback-detail-card .feedback-table td:nth-child(6) { width: 20%; }
@media (max-width: 900px) {
  .rnd-tool-grid { grid-template-columns: 1fr; }
  body.tech-surface .header-surface-nav .surface-nav-button { padding-inline: 13px; }
}

/* V6.36 header collision fix and readable telemetry signals */
body.tech-surface .brand-lockup {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  column-gap: 14px;
  align-items: start;
}

body.tech-surface .brand-logo-frame {
  grid-column: 1;
  grid-row: 1;
  width: 88px;
  height: 88px;
}

body.tech-surface .brand-copy {
  display: grid;
  grid-column: 2;
  min-width: 0;
}

body.tech-surface .title-row {
  min-height: 52px;
  align-items: flex-start;
  padding-top: 4px;
}

body.tech-surface .title-row h1 {
  padding-bottom: 18px;
  line-height: 1.05;
}

body.tech-surface .research-engine-credit {
  position: absolute !important;
  top: 38px !important;
  left: 0 !important;
  font-size: 12px;
  line-height: 1.1;
  white-space: nowrap;
}

body.tech-surface .language-switcher {
  margin-top: 3px;
}

body.tech-surface .header-stack {
  padding-top: 1px;
}

body.tech-surface .header-surface-nav {
  grid-column: 1 / -1;
  margin-top: 20px !important;
}

.feedback-signal-summary {
  display: grid;
  grid-template-columns: repeat(7, minmax(92px, 1fr));
  gap: 8px;
}

.feedback-signal-chip {
  min-width: 0;
  border: 1px solid rgba(177, 213, 238, 0.78);
  border-radius: 8px;
  padding: 8px 9px;
  background: rgba(255, 255, 255, 0.82);
}

.feedback-signal-chip span {
  display: block;
  color: #496579;
  font-size: 9px;
  font-weight: 950;
  line-height: 1.15;
  text-transform: uppercase;
}

.feedback-signal-chip em {
  display: block;
  min-height: 22px;
  margin-top: 3px;
  color: #607486;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.18;
}

.feedback-signal-chip strong {
  display: block;
  margin-top: 4px;
  color: #1f4e70;
  font-size: 16px;
  font-weight: 950;
}

.feedback-event-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 3px 8px;
  background: #edf7ff;
  color: #1f4e70;
  font-size: 9.5px;
  font-weight: 950;
  line-height: 1.05;
}

.feedback-event-pill.mouse { background: #fff7ed; color: #9a3412; }
.feedback-event-pill.layout { background: #eff6ff; color: #1d4ed8; }
.feedback-event-pill.focus { background: #f0fdf4; color: #166534; }
.feedback-event-pill.change { background: #fff1f2; color: #be123c; }
.feedback-event-pill.summary { background: #f7fee7; color: #3f6212; }

@media (max-width: 980px) {
  .feedback-signal-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.tech-surface .brand-lockup {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  body.tech-surface .brand-logo-frame {
    width: 76px;
    height: 76px;
  }
}

/* V6.36 measured header fix: title, credit and tabs must not overlap. */
body.tech-surface .title-row {
  display: grid !important;
  grid-template-columns: minmax(0, max-content) auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 0;
  min-height: 76px;
  align-items: start;
}

body.tech-surface .title-row h1 {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  padding: 0 !important;
  line-height: 1.05;
}

body.tech-surface .research-engine-credit {
  position: static !important;
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  margin-top: -2px;
}

body.tech-surface .language-switcher {
  grid-column: 2;
  grid-row: 1;
}

body.tech-surface .prod-intro-how-button {
  grid-column: 3;
  grid-row: 1;
}

body.tech-surface .header-stack {
  grid-column: 4;
  grid-row: 1 / span 2;
}

body.tech-surface .header-surface-nav {
  margin-top: 18px !important;
}

/* WineLab intro screen: local production preview only. */
body.tech-surface .prod-intro-screen,
body.tech-surface .prod-intro-how-button,
body.tech-surface .prod-how-screen {
  display: none !important;
}

.prod-quiz-screen[hidden],
.prod-intro-screen[hidden],
.prod-how-screen[hidden] {
  display: none !important;
}

body.prod-surface.prod-intro-mode .surface-nav,
body.prod-surface.prod-intro-mode .barcode-header-action,
body.prod-surface.prod-intro-mode .autotest-header-action,
body.prod-surface.prod-how-mode .surface-nav,
body.prod-surface.prod-how-mode .barcode-header-action,
body.prod-surface.prod-how-mode .autotest-header-action {
  display: none !important;
}

/* V6.52 Playground dashboard rail and R&D tab split */
body.prod-surface .tech-dashboard-stack,
body.prod-surface .wine-lookup-card {
  display: none !important;
}

body.tech-surface .tech-dashboard-stack {
  display: grid;
  gap: 12px;
  margin: 10px 0 16px;
}

body.tech-surface .tech-dashboard-card {
  padding: 14px;
  border-color: rgba(47, 134, 199, 0.34);
  box-shadow: 0 16px 42px rgba(47, 134, 199, 0.11);
}

body.tech-surface .tech-winelab-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(260px, 0.78fr);
  gap: 14px;
  align-items: stretch;
}

body.tech-surface .tech-dashboard-main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(132px, 1fr);
  gap: 10px;
}

body.tech-surface .tech-dashboard-card .session-stats-panel,
body.tech-surface .tech-dashboard-card .session-globe-panel,
body.tech-surface .tech-dashboard-card .session-access-panel {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

body.tech-surface .tech-dashboard-card .session-stats-row {
  grid-template-columns: repeat(5, minmax(96px, 1fr));
}

body.tech-surface .tech-winelab-visit-log {
  max-height: 168px;
}

body.tech-surface .tech-winelab-globe {
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
}

body.tech-surface .tech-winelab-globe .session-globe-canvas {
  height: 216px;
}

body.tech-surface .tech-winetest-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(280px, 0.58fr);
  gap: 14px;
}

body.tech-surface .tech-winetest-dashboard .session-access-panel {
  min-height: 0;
  max-height: 210px;
}

body.tech-surface .tech-winetest-dashboard .session-access-table {
  max-height: 172px;
}

body.tech-surface .hero > .hero-copy {
  grid-column: 1 / -1;
}

body.tech-surface .hero {
  grid-template-columns: minmax(0, 1fr);
}

.wine-lookup-card {
  margin-bottom: 12px;
}

.wine-lookup-card .barcode-header-action {
  width: min(420px, 100%);
  min-height: 58px;
}

.rnd-tool-grid.rnd-tool-grid-compact {
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 0.36fr);
}

@media (max-width: 1100px) {
  body.tech-surface .tech-winelab-dashboard,
  body.tech-surface .tech-winetest-dashboard {
    grid-template-columns: 1fr;
  }

  body.tech-surface .tech-dashboard-card .session-stats-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body.tech-surface .tech-dashboard-card .session-stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wine-lookup-card .feedback-dashboard-head {
    align-items: stretch;
  }

  .wine-lookup-card .barcode-header-action,
  .rnd-tool-grid.rnd-tool-grid-compact {
    width: 100%;
    grid-template-columns: 1fr;
  }
}

body.prod-surface.prod-intro-mode .header-stack,
body.prod-surface.prod-how-mode .header-stack {
  height: auto;
  margin-top: calc(var(--prod-brand-title-size, 56px) * 0.31);
  align-items: center;
  align-self: start;
  justify-content: flex-end;
  gap: 8px;
}

body.prod-surface.prod-intro-mode #totalQuizStat,
body.prod-surface.prod-intro-mode #datasetStat,
body.prod-surface.prod-how-mode #totalQuizStat,
body.prod-surface.prod-how-mode #datasetStat {
  display: inline-flex;
  width: auto;
  max-width: 260px;
  height: 38px;
  min-height: 0;
  flex: 0 1 auto;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid rgba(94, 85, 77, 0.14);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.58);
  box-shadow: 0 12px 34px -28px rgba(80, 60, 50, 0.45), var(--atelier-ring);
  color: #7a2633;
  font-family: var(--font-sans);
  font-size: clamp(11px, 0.82vw, 13px);
  font-weight: 850 !important;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: none;
  white-space: nowrap;
  overflow-wrap: normal;
  text-align: center;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

body.prod-surface #totalQuizStat[hidden] {
  display: none !important;
}

body.prod-surface.prod-intro-mode #totalQuizStat,
body.prod-surface.prod-how-mode #totalQuizStat {
  min-width: 170px;
}

body.prod-surface.prod-intro-mode #datasetStat,
body.prod-surface.prod-how-mode #datasetStat {
  min-width: 206px;
}

body.prod-surface.prod-intro-mode .container,
body.prod-surface.prod-how-mode .container {
  max-width: 1284px;
  padding-top: clamp(4px, 1.4vw, 18px);
}

body.prod-surface .prod-intro-screen {
  order: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  align-items: start;
  gap: clamp(28px, 6vw, 86px);
  min-height: calc(100vh - 126px);
  padding: clamp(8px, 1.4vw, 18px) 4px 42px;
}

body.prod-surface .prod-intro-hero-copy {
  min-width: 0;
}

body.prod-surface .prod-intro-how-button {
  display: none;
  grid-area: how;
  align-items: center;
  justify-content: center;
  justify-self: start;
  align-self: start;
  min-width: clamp(116px, 10vw, 148px);
  min-height: 38px;
  margin-top: calc(var(--prod-brand-title-size, 56px) * 0.31);
  padding: 8px 14px;
  border: 1px solid rgba(94, 85, 77, 0.14);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.58);
  color: #3a2630;
  font-family: var(--font-display);
  font-size: clamp(15px, 1.16vw, 17px);
  font-weight: 700;
  line-height: 1.12;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 12px 34px -28px rgba(80, 60, 50, 0.45), var(--atelier-ring);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

body.prod-surface.prod-intro-mode .prod-intro-how-button,
body.prod-surface.prod-how-mode .prod-intro-how-button {
  display: inline-flex;
}

body.prod-surface .prod-intro-how-button:hover {
  transform: translateY(-1px);
  border-color: rgba(58, 38, 48, 0.34);
  background: rgba(255, 253, 250, 0.74);
}

body.prod-surface .prod-intro-how-button:focus-visible {
  outline: 3px solid rgba(122, 38, 51, 0.28);
  outline-offset: 3px;
}

body.prod-surface .prod-intro-hero-copy h1 {
  max-width: 650px;
  margin: 0;
  color: #3a2630;
  font-family: "Cormorant Garamond", "Spectral", Georgia, serif !important;
  font-size: clamp(58px, 7.2vw, 96px);
  font-weight: 500 !important;
  letter-spacing: 0;
  line-height: 0.98;
}

body.prod-surface .prod-intro-hero-copy h1 em {
  color: #a32b3c;
  font-style: italic;
  font-weight: 500 !important;
}

body.prod-surface .prod-intro-lede {
  max-width: 500px;
  margin: clamp(20px, 2.4vw, 28px) 0 0;
  color: #7c6a73;
  font-family: "Hanken Grotesk", var(--font-sans);
  font-size: clamp(15px, 1.16vw, 17px);
  font-weight: 600 !important;
  line-height: 1.55;
}

body.prod-surface .prod-intro-readouts {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 4.2vw, 52px);
  margin-top: clamp(23px, 2.95vw, 34px);
}

body.prod-surface .prod-intro-readout-number {
  color: #a32b3c;
  font-family: "Cormorant Garamond", "Spectral", Georgia, serif !important;
  font-size: clamp(30px, 3.1vw, 40px);
  font-weight: 500 !important;
  line-height: 0.9;
}

body.prod-surface .prod-intro-readout-label {
  margin-top: 8px;
  color: #a0909a;
  font-family: "JetBrains Mono", ui-monospace, monospace !important;
  font-size: 10px;
  font-weight: 500 !important;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
}

body.prod-surface .prod-intro-divider {
  grid-column: 1 / -1;
  width: 100%;
  height: 1px;
  margin-top: clamp(12px, 1.8vw, 24px);
  background: linear-gradient(90deg, rgba(120, 80, 95, 0.26), transparent);
}

body.prod-surface .prod-intro-preview {
  grid-column: 1 / -1;
  max-width: 760px;
  padding-top: clamp(26px, 4.2vw, 48px);
}

body.prod-surface .prod-intro-section-eyebrow {
  display: block;
  color: #a32b3c;
  font-family: "JetBrains Mono", ui-monospace, monospace !important;
  font-size: 11px;
  font-weight: 500 !important;
  letter-spacing: 0.22em;
  line-height: 1.2;
  text-transform: uppercase;
}

body.prod-surface .prod-intro-preview h2 {
  margin: 18px 0 0;
  color: #3a2630;
  font-family: "Cormorant Garamond", "Spectral", Georgia, serif !important;
  font-size: clamp(34px, 3.8vw, 52px);
  font-weight: 500 !important;
  line-height: 1.04;
}

body.prod-surface .prod-intro-preview p {
  max-width: 520px;
  margin: 14px 0 0;
  color: #7c6a73;
  font-family: "Hanken Grotesk", var(--font-sans);
  font-size: 14px;
  font-weight: 600 !important;
  line-height: 1.5;
}

body.prod-surface .prod-intro-preview-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: clamp(24px, 3vw, 34px);
  color: #6e5862;
  font-family: "JetBrains Mono", ui-monospace, monospace !important;
  font-size: 12px;
  font-weight: 500 !important;
}

body.prod-surface .prod-intro-progress {
  flex: 1 1 240px;
  min-width: 180px;
  height: 6px;
  overflow: hidden;
  border: 1px solid rgba(120, 80, 95, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.6);
}

body.prod-surface .prod-intro-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #ecd89e, #e5b988 24%, #f2c8cf 50%, #e0909c 74%, #c2a6d2);
}

body.prod-surface .prod-intro-instrument:hover {
  transform: translateY(-2px);
}

body.prod-surface .prod-intro-instrument {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;
  width: min(100%, 424px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 220ms var(--ease);
}

body.prod-surface .prod-intro-instrument svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 20px 45px rgba(80, 48, 58, 0.08));
}

body.prod-surface .prod-intro-radar-poly {
  transform-origin: 180px 180px;
  animation: introRadarPulse 3.8s var(--ease) infinite;
}

body.prod-surface .prod-intro-sweep {
  position: absolute;
  top: 9%;
  left: 9%;
  right: 9%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(214, 174, 94, 0.54), rgba(216, 149, 157, 0.25) 15%, transparent 28%);
  mask: radial-gradient(circle, transparent 42%, #000 43%);
  -webkit-mask: radial-gradient(circle, transparent 42%, #000 43%);
  animation: introRadarSpin 7s linear infinite;
  pointer-events: none;
}

body.prod-surface .prod-intro-start-cta {
  display: block;
  margin-top: clamp(14px, 1.8vw, 24px);
  color: #a32b3c;
  font-family: "Cormorant Garamond", "Spectral", Georgia, serif !important;
  font-size: clamp(33.35px, 4.14vw, 55.2px);
  font-weight: 500 !important;
  line-height: 0.98;
  letter-spacing: 0;
  text-align: center;
}

body.prod-surface .prod-intro-instrument:focus-visible {
  outline: 3px solid rgba(122, 38, 51, 0.34);
  outline-offset: 5px;
}

body.prod-surface .prod-how-screen {
  order: 0;
  min-height: calc(100vh - 126px);
  padding: clamp(8px, 1.4vw, 18px) 4px 42px;
}

body.prod-surface .prod-how-figure {
  width: 100%;
  max-width: 1284px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(94, 85, 77, 0.14);
  border-radius: 14px;
  background: rgba(255, 253, 250, 0.74);
  box-shadow: var(--atelier-shadow), var(--atelier-ring);
}

body.prod-surface .prod-how-flow-image {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  object-fit: contain;
}

body.prod-surface .prod-how-preview {
  margin-top: clamp(26px, 4.2vw, 48px);
}

@keyframes introRadarSpin {
  to { transform: rotate(360deg); }
}

@keyframes introRadarPulse {
  0%, 100% { opacity: 0.74; transform: scale(0.985); }
  50% { opacity: 1; transform: scale(1.025); }
}

@media (prefers-reduced-motion: reduce) {
  body.prod-surface .prod-intro-sweep,
  body.prod-surface .prod-intro-radar-poly {
    animation: none;
  }
}

@media (max-width: 920px) {
  body.prod-surface .prod-intro-screen {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 16px;
  }

  body.prod-surface .prod-intro-instrument {
    order: -1;
    width: min(78vw, 360px);
  }

  body.prod-surface .prod-intro-how-button {
    width: max-content;
    max-width: 100%;
  }
}

@media (max-width: 720px) {
  body.prod-surface .prod-intro-screen {
    gap: 20px;
    padding: 8px 2px 28px;
  }

  body.prod-surface .prod-how-screen {
    padding: 8px 2px 28px;
  }

  body.prod-surface .prod-intro-hero-copy h1 {
    font-size: clamp(40px, 13vw, 58px);
  }

  body.prod-surface .prod-intro-how-button {
    min-width: 0;
    min-height: 44px;
    padding: 10px 14px;
    font-size: 15px;
  }

  body.prod-surface .prod-intro-start-cta {
    font-size: clamp(27.6px, 9.2vw, 39.1px);
  }

  body.prod-surface .prod-intro-lede {
    font-size: 15px;
  }

  body.prod-surface .prod-intro-preview-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  body.prod-surface .prod-intro-progress {
    width: 100%;
    flex-basis: auto;
  }
}

/* Local WineLab atelier alternatives table and sharper surface geometry. */
body.prod-surface .hero {
  border-radius: 11px !important;
}

body.prod-surface .quiz-step-shell,
body.prod-surface .sticky-summary {
  border-radius: 14px !important;
}

body.prod-surface .answer-card,
body.prod-surface .quiz-inline-actions-slot,
body.prod-surface .bars,
body.prod-surface .profile-radar-block,
body.prod-surface .tag-cloud {
  border-radius: 11px !important;
}

body.prod-surface .price-segment,
body.prod-surface .profile-kpi,
body.prod-surface .prob-item {
  border-radius: 9px !important;
}

body.prod-surface .quiz-step-counter,
body.prod-surface .quiz-step-nav .quiz-step-hint,
body.prod-surface .quiz-inline-actions-slot .hero-actions .btn-generate,
body.prod-surface .quiz-inline-actions-slot .hero-actions .btn-secondary,
body.prod-surface .quiz-inline-actions-slot .hero-actions .action-quiz-stat {
  border-radius: 11px !important;
}

body.prod-surface .recs-card,
body.prod-surface .rec-card,
body.prod-surface .debug-card {
  border-radius: 12px !important;
}

body.prod-surface .debug-card {
  order: 5;
  padding: clamp(16px, 1.4vw, 22px);
  border: 1px solid rgba(94, 85, 77, 0.14);
  background: rgba(255, 253, 250, 0.74);
  box-shadow: var(--atelier-shadow), var(--atelier-ring);
  backdrop-filter: blur(20px) saturate(116%);
  -webkit-backdrop-filter: blur(20px) saturate(116%);
}

body.prod-surface .debug-card .card-head {
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 12px;
}

body.prod-surface .debug-card .card-head h2 {
  margin: 0;
  color: #2e2924;
  font-size: clamp(24px, 1.68vw, 34px);
  line-height: 1.02;
}

body.prod-surface .debug-card .debug-badge {
  display: none;
}

body.prod-surface .debug-card .table-container {
  width: 100%;
  max-height: 600px;
  overflow: auto;
  border: 1px solid rgba(94, 85, 77, 0.15);
  border-radius: 6px !important;
  background: rgba(255, 253, 250, 0.58);
}

body.prod-surface .debug-card table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: clamp(14.5px, 0.95vw, 16.5px);
}

body.prod-surface .debug-card th,
body.prod-surface .debug-card td {
  padding: 12px 11px;
  border-bottom: 1px solid rgba(94, 85, 77, 0.12);
  color: #332b27;
  line-height: 1.2;
  text-align: left;
  vertical-align: top;
}

body.prod-surface .debug-card th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(255, 253, 250, 0.94);
  color: #7a2633;
  font-size: clamp(13px, 0.82vw, 15px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.prod-surface .debug-card td {
  font-size: clamp(14.5px, 0.95vw, 16.5px);
}

body.prod-surface .debug-card tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.34);
}

body.prod-surface .debug-card tbody tr:hover td {
  background: rgba(122, 38, 51, 0.05);
}

body.prod-surface .debug-card .debug-wine-name {
  min-width: 280px;
  max-width: 380px;
  color: #241f1b;
}

body.prod-surface .debug-card .debug-match,
body.prod-surface .debug-card .debug-price {
  white-space: nowrap;
}

body.prod-surface .debug-card .debug-match {
  color: #7a2633;
}

body.prod-surface .debug-card .debug-signature {
  min-width: 210px;
  color: #5d5046;
}

body.prod-surface .debug-card .debug-role {
  min-width: 150px;
  color: #5b4f45;
}

@media (max-width: 720px) {
  body.prod-surface .debug-card {
    padding: 12px;
  }

  body.prod-surface .debug-card .card-head h2 {
    font-size: 22px;
  }

  body.prod-surface .debug-card table {
    min-width: 900px;
  }

  body.prod-surface .debug-card th,
  body.prod-surface .debug-card td {
    padding: 10px 9px;
  }

}

/* Greek copy renders optically heavier/larger in this display face.
   Keep the Wine Logic Lab brand unchanged, but scale localized Greek UI text to 80%. */
body.prod-surface[data-lang="el"] {
  --prod-control-font-size: clamp(14.4px, 1.16vw, 19.2px);
  --prod-inline-action-font-size: clamp(12px, 0.896vw, 13.6px);
}

body.prod-surface[data-lang="el"] #totalQuizStat,
body.prod-surface[data-lang="el"] .header-quiz-total-stat {
  font-size: 14.4px;
  line-height: 1.08;
}

body.prod-surface[data-lang="el"] #datasetStat {
  font-size: 14.4px;
  line-height: 1.08;
}

body.prod-surface[data-lang="el"].prod-intro-mode #totalQuizStat,
body.prod-surface[data-lang="el"].prod-intro-mode #datasetStat,
body.prod-surface[data-lang="el"].prod-how-mode #totalQuizStat,
body.prod-surface[data-lang="el"].prod-how-mode #datasetStat {
  font-size: clamp(10px, 0.74vw, 11.2px);
  line-height: 1.2;
}

body.prod-surface[data-lang="el"] .prod-intro-how-button {
  font-size: clamp(12px, 0.928vw, 13.6px);
}

body.prod-surface[data-lang="el"] .prod-intro-hero-copy h1 {
  font-size: clamp(46.4px, 5.76vw, 76.8px);
  line-height: 0.98;
}

body.prod-surface[data-lang="el"] .prod-intro-lede {
  font-size: clamp(12px, 0.928vw, 13.6px);
}

body.prod-surface[data-lang="el"] .prod-intro-readout-label {
  font-size: 8px;
}

body.prod-surface[data-lang="el"] .prod-intro-section-eyebrow {
  font-size: 8.8px;
}

body.prod-surface[data-lang="el"] .prod-intro-preview h2 {
  font-size: clamp(27.2px, 3.04vw, 41.6px);
}

body.prod-surface[data-lang="el"] .prod-intro-preview p {
  font-size: 11.2px;
}

body.prod-surface[data-lang="el"] .prod-intro-preview-meta {
  font-size: 9.6px;
}

body.prod-surface[data-lang="el"] .prod-intro-instrument text {
  font-size: 80%;
}

body.prod-surface[data-lang="el"] .prod-intro-start-cta {
  font-size: clamp(26.68px, 3.312vw, 44.16px);
}

body.prod-surface[data-lang="el"] .hero h2 {
  font-size: 80%;
}

body.prod-surface[data-lang="el"] .hero p {
  font-size: 12.8px;
}

body.prod-surface[data-lang="el"] .quiz-step-eyebrow {
  font-size: 16.32px;
}

body.prod-surface[data-lang="el"] .quiz-step-counter {
  font-size: 16.32px;
}

body.prod-surface[data-lang="el"] .quiz-step-question h2,
body.prod-surface[data-lang="el"] .price-range-head h2 {
  font-size: clamp(20.8px, 2.016vw, 35.2px);
}

body.prod-surface[data-lang="el"] .quiz-step-question p {
  font-size: clamp(12px, 1vw, 14.4px);
}

body.prod-surface[data-lang="el"] .answer-title {
  font-size: clamp(14.4px, 5.92cqw, 20.8px);
}

body.prod-surface[data-lang="el"] .price-range-head p {
  font-size: 12.8px;
}

body.prod-surface[data-lang="el"] .price-segment[data-price-id="no_strict"] .price-segment-label {
  font-size: var(--prod-control-font-size);
}

body.prod-surface[data-lang="el"] .sticky-summary > h3,
body.prod-surface[data-lang="el"] .sticky-summary > h3:nth-of-type(1),
body.prod-surface[data-lang="el"] .sticky-summary > h3:nth-of-type(3),
body.prod-surface[data-lang="el"] .profile-radar-block h3 {
  font-size: 16.16px !important;
}

body.prod-surface[data-lang="el"] .bar-row {
  font-size: 11.2px;
}

body.prod-surface[data-lang="el"] .tag-pill {
  font-size: 9.6px;
}

body.prod-surface[data-lang="el"] .radar-label {
  font-size: 11.04px;
}

body.prod-surface[data-lang="el"] .radar-value {
  font-size: 9.92px;
}

body.prod-surface[data-lang="el"] .rec-name {
  font-size: 0.8em;
}

body.prod-surface[data-lang="el"] .rec-score {
  font-size: 22.4px;
}

body.prod-surface[data-lang="el"] .rec-score-label,
body.prod-surface[data-lang="el"] .reason-line,
body.prod-surface[data-lang="el"] .signature-chips,
body.prod-surface[data-lang="el"] .rec-profile-description,
body.prod-surface[data-lang="el"] .wine-sensory-title,
body.prod-surface[data-lang="el"] .sensory-row,
body.prod-surface[data-lang="el"] .sensory-legend-row,
body.prod-surface[data-lang="el"] .debug-card table,
body.prod-surface[data-lang="el"] .debug-card td {
  font-size: 80%;
}

body.prod-surface[data-lang="el"] .debug-card .card-head h2 {
  font-size: clamp(19.2px, 1.344vw, 27.2px);
}

body.prod-surface[data-lang="el"] .debug-card th {
  font-size: clamp(10.4px, 0.656vw, 12px);
}

body.prod-surface[data-lang="el"] .debug-card table,
body.prod-surface[data-lang="el"] .debug-card td {
  font-size: clamp(11.6px, 0.76vw, 13.2px);
}

@media (max-width: 720px) {
  body.prod-surface[data-lang="el"] .prod-intro-hero-copy h1 {
    font-size: clamp(32px, 10.4vw, 46.4px);
  }

  body.prod-surface[data-lang="el"] .prod-intro-how-button {
    font-size: 12px;
  }

  body.prod-surface[data-lang="el"] .prod-intro-start-cta {
    font-size: clamp(22.08px, 7.36vw, 31.28px);
  }

  body.prod-surface[data-lang="el"] .quiz-step-question h2,
  body.prod-surface[data-lang="el"] .price-range-head h2 {
    font-size: clamp(16.8px, 5.6vw, 24px);
  }

  body.prod-surface[data-lang="el"] .answer-title {
    font-size: clamp(11.2px, 6.4cqw, 14.4px);
  }

  body.prod-surface[data-lang="el"] #datasetStat,
  body.prod-surface[data-lang="el"] #totalQuizStat,
  body.prod-surface[data-lang="el"] .header-quiz-total-stat {
    font-size: 12px;
  }

  body.prod-surface[data-lang="el"] .debug-card .card-head h2 {
    font-size: 17.6px;
  }
}

/* Final result state: quiz fades out, radar moves left, profile and tags stack right. */
body.prod-surface.prod-results-mode .quiz-panel {
  max-height: 0 !important;
  opacity: 0 !important;
  transform: none !important;
  pointer-events: none !important;
  overflow: hidden !important;
  transition: none !important;
}

body.prod-surface.prod-results-mode .sticky-summary {
  display: grid !important;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr) !important;
  grid-template-rows: auto minmax(120px, auto) auto minmax(100px, 1fr) !important;
  gap: 10px 14px !important;
  width: 100% !important;
  margin-top: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  position: static !important;
  align-items: stretch !important;
}

body.prod-surface.prod-results-mode .sticky-summary > .profile-radar-block {
  grid-column: 1 !important;
  grid-row: 1 / span 4 !important;
  order: 1 !important;
  min-height: clamp(520px, 43vw, 680px) !important;
  margin: 0 !important;
}

body.prod-surface.prod-results-mode .sticky-summary > h3:nth-of-type(1) {
  grid-column: 2 !important;
  grid-row: 1 !important;
  order: 2 !important;
  margin: 0 !important;
}

body.prod-surface.prod-results-mode .sticky-summary > .bars {
  grid-column: 2 !important;
  grid-row: 2 !important;
  order: 3 !important;
  margin: 0 !important;
}

body.prod-surface.prod-results-mode .sticky-summary > h3:nth-of-type(3) {
  grid-column: 2 !important;
  grid-row: 3 !important;
  order: 4 !important;
  margin: 0 !important;
}

body.prod-surface.prod-results-mode .sticky-summary > .tag-cloud {
  grid-column: 2 !important;
  grid-row: 4 !important;
  order: 5 !important;
  min-height: 112px !important;
  margin: 0 !important;
}

body.prod-surface.prod-results-mode .radar-chart {
  flex: 1 1 auto !important;
  min-height: clamp(430px, 37vw, 580px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body.prod-surface.prod-results-mode .radar-chart svg {
  width: min(100%, 560px) !important;
  max-width: 560px !important;
}

body.prod-surface.prod-results-mode .results-grid {
  margin-top: 12px !important;
}

@media (max-width: 720px) {
  body.prod-surface.prod-results-mode .sticky-summary {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto auto auto !important;
    gap: 0 !important;
  }

  body.prod-surface.prod-results-mode .sticky-summary > .profile-radar-block {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    min-height: 420px !important;
    margin: 0 0 12px !important;
  }

  body.prod-surface.prod-results-mode .radar-chart {
    min-height: 340px !important;
  }

  body.prod-surface.prod-results-mode .sticky-summary > h3:nth-of-type(1) {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
  }

  body.prod-surface.prod-results-mode .sticky-summary > .bars {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
  }

  body.prod-surface.prod-results-mode .sticky-summary > h3:nth-of-type(3) {
    grid-column: 1 / -1 !important;
    grid-row: 4 !important;
    margin-top: 12px !important;
  }

  body.prod-surface.prod-results-mode .sticky-summary > .tag-cloud {
    grid-column: 1 / -1 !important;
    grid-row: 5 !important;
  }
}

/* V6.52 Playground WineLab dashboard: balanced stats / visits / globe row. */
body.tech-surface .tech-winelab-dashboard {
  grid-template-columns: minmax(220px, 240px) minmax(0, 1fr) minmax(340px, 370px) !important;
  grid-template-areas: "stats visits globe";
  min-height: 318px;
  gap: 12px;
  align-items: stretch;
}

body.tech-surface .tech-winelab-dashboard .tech-dashboard-main {
  display: contents;
}

body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel {
  grid-area: stats;
  align-self: stretch;
  justify-self: stretch;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 7px;
}

body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel .session-stats-row {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-auto-rows: minmax(0, 1fr);
  align-self: stretch;
  gap: 6px;
  width: 100%;
  min-height: 0;
}

body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel .session-stat-box {
  display: grid;
  align-content: center;
  width: 100%;
  min-height: 0;
  padding: 7px 9px;
}

body.tech-surface .tech-winelab-dashboard .session-stats-foot {
  align-items: flex-start;
  gap: 6px;
  margin-top: 0;
}

body.tech-surface .tech-winelab-dashboard .session-stats-foot p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body.tech-surface .tech-winelab-visit-log {
  grid-area: visits;
  align-self: stretch;
  justify-self: stretch;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none !important;
}

body.tech-surface .tech-winelab-visit-log .session-visit-table {
  height: 100%;
}

body.tech-surface .tech-winelab-globe {
  grid-area: globe;
  align-self: stretch;
  justify-self: stretch;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
}

body.tech-surface .tech-winelab-globe .session-globe-canvas-wrap {
  display: grid;
  min-height: 0;
}

body.tech-surface .tech-winelab-globe .session-globe-canvas {
  height: 100% !important;
  min-height: 220px;
}

@media (max-width: 1120px) {
  body.tech-surface .tech-winelab-dashboard {
    grid-template-columns: minmax(210px, 240px) minmax(0, 1fr) !important;
    grid-template-areas:
      "stats visits"
      "globe globe";
    min-height: 0;
  }

  body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel .session-stats-row {
    grid-auto-rows: minmax(44px, auto);
  }

  body.tech-surface .tech-winelab-globe .session-globe-canvas {
    height: 216px !important;
    min-height: 216px;
  }
}

@media (max-width: 760px) {
  body.tech-surface .tech-winelab-dashboard {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      "stats"
      "visits"
      "globe";
  }

  body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel .session-stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* V6.52 Playground dashboard combined row: WineLab left, WineTest right. */
body.tech-surface .tech-dashboard-body {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px) !important;
  align-items: stretch;
  gap: 12px;
}

body.tech-surface .tech-winelab-dashboard {
  grid-template-columns: minmax(168px, 190px) minmax(280px, 1fr) minmax(280px, 320px) !important;
  min-height: 304px;
  gap: 10px;
}

body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel,
body.tech-surface .tech-winetest-dashboard #sessionStatsPanel {
  gap: 6px;
}

body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel .session-stat-box,
body.tech-surface .tech-winetest-dashboard #sessionStatsPanel .session-stat-box {
  min-height: 36px;
  padding: 6px 8px;
}

body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel .session-stat-box span,
body.tech-surface .tech-winetest-dashboard #sessionStatsPanel .session-stat-box span {
  font-size: 7.5px;
  line-height: 1.15;
}

body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel .session-stat-box strong,
body.tech-surface .tech-winetest-dashboard #sessionStatsPanel .session-stat-box strong {
  margin-top: 2px;
  font-size: 12px;
}

body.tech-surface .tech-winelab-visit-log,
body.tech-surface .tech-winetest-dashboard .session-access-panel {
  min-height: 0;
  height: 100%;
}

body.tech-surface .tech-winetest-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) minmax(104px, 0.45fr);
  min-height: 304px;
  gap: 10px;
  align-items: stretch;
}

body.tech-surface .tech-winetest-dashboard #sessionStatsPanel {
  align-self: stretch;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

body.tech-surface .tech-winetest-dashboard #sessionStatsPanel .session-stats-row {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-auto-rows: minmax(0, 1fr);
  gap: 6px;
  min-height: 0;
}

body.tech-surface .tech-winetest-dashboard #sessionStatsPanel .session-stats-foot {
  align-items: flex-start;
  gap: 6px;
  margin-top: 0;
}

body.tech-surface .tech-winetest-dashboard #sessionStatsPanel .session-stats-foot p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body.tech-surface .tech-winetest-dashboard .session-access-panel {
  align-self: stretch;
  max-height: none !important;
}

body.tech-surface .tech-winetest-dashboard .session-access-table {
  height: 100%;
  max-height: none !important;
  min-height: 0;
}

@media (max-width: 1180px) {
  body.tech-surface .tech-dashboard-body {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 320px) !important;
  }

  body.tech-surface .tech-winelab-dashboard {
    grid-template-columns: minmax(158px, 180px) minmax(0, 1fr) !important;
  }
}

@media (max-width: 900px) {
  body.tech-surface .tech-dashboard-body {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.tech-surface .tech-winetest-dashboard {
    grid-template-rows: auto minmax(120px, auto);
    min-height: 0;
  }
}

/* V6.52 Playground dashboard: all visit/stat modules in one row. */
body.tech-surface .tech-dashboard-body {
  display: grid !important;
  grid-template-columns:
    minmax(184px, 198px)
    minmax(164px, 0.60fr)
    minmax(250px, 0.92fr)
    minmax(184px, 198px)
    minmax(164px, 0.60fr) !important;
  grid-template-areas: "wlstats wlvisits globe wtstats wtlog";
  min-height: 296px;
  gap: 9px;
  align-items: stretch;
}

body.tech-surface .tech-winelab-dashboard,
body.tech-surface .tech-winetest-dashboard,
body.tech-surface .tech-winelab-dashboard .tech-dashboard-main {
  display: contents !important;
}

body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel {
  grid-area: wlstats;
}

body.tech-surface .tech-winelab-visit-log {
  grid-area: wlvisits;
}

body.tech-surface .tech-winelab-globe {
  grid-area: globe;
}

body.tech-surface .tech-winetest-dashboard #sessionStatsPanel {
  grid-area: wtstats;
}

body.tech-surface .tech-winetest-dashboard #techAccessPanel {
  grid-area: wtlog;
}

body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel,
body.tech-surface .tech-winetest-dashboard #sessionStatsPanel,
body.tech-surface .tech-winelab-visit-log,
body.tech-surface .tech-winelab-globe,
body.tech-surface .tech-winetest-dashboard #techAccessPanel {
  align-self: stretch;
  justify-self: stretch;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel,
body.tech-surface .tech-winetest-dashboard #sessionStatsPanel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 5px;
}

body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel .session-stats-row,
body.tech-surface .tech-winetest-dashboard #sessionStatsPanel .session-stats-row {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-auto-rows: minmax(35px, 1fr);
  gap: 5px;
  min-height: 0;
}

body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel .session-stat-box,
body.tech-surface .tech-winetest-dashboard #sessionStatsPanel .session-stat-box {
  display: grid;
  align-content: center;
  min-height: 0;
  padding: 5px 7px;
}

body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel .session-stat-box span,
body.tech-surface .tech-winetest-dashboard #sessionStatsPanel .session-stat-box span {
  font-size: 7px;
  line-height: 1.12;
}

body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel .session-stat-box strong,
body.tech-surface .tech-winetest-dashboard #sessionStatsPanel .session-stat-box strong {
  margin-top: 2px;
  font-size: 11.5px;
}

body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel .session-stats-foot,
body.tech-surface .tech-winetest-dashboard #sessionStatsPanel .session-stats-foot {
  gap: 5px;
  margin-top: 0;
  align-items: flex-start;
}

body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel .session-stats-foot p,
body.tech-surface .tech-winetest-dashboard #sessionStatsPanel .session-stats-foot p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body.tech-surface .tech-winelab-visit-log,
body.tech-surface .tech-winetest-dashboard #techAccessPanel {
  max-height: none !important;
}

body.tech-surface .tech-winetest-dashboard #techAccessPanel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

body.tech-surface .tech-winetest-dashboard #techAccessPanel .session-access-table {
  height: 100%;
  max-height: none !important;
  min-height: 0;
}

body.tech-surface .tech-winelab-globe {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 7px;
}

body.tech-surface .tech-winelab-globe .session-globe-canvas-wrap {
  display: grid;
  min-height: 0;
}

body.tech-surface .tech-winelab-globe .session-globe-canvas {
  height: 100% !important;
  min-height: 210px;
}

@media (max-width: 1180px) {
  body.tech-surface .tech-dashboard-body {
    grid-template-columns:
      minmax(150px, 164px)
      minmax(178px, 0.86fr)
      minmax(150px, 164px)
      minmax(178px, 0.86fr) !important;
    grid-template-areas:
      "wlstats wlvisits wtstats wtlog"
      "globe globe globe globe";
    min-height: 0;
  }

  body.tech-surface .tech-winelab-globe .session-globe-canvas {
    height: 216px !important;
    min-height: 216px;
  }
}

@media (max-width: 820px) {
  body.tech-surface .tech-dashboard-body {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas:
      "wlstats"
      "wlvisits"
      "globe"
      "wtstats"
      "wtlog";
  }

  body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel .session-stats-row,
  body.tech-surface .tech-winetest-dashboard #sessionStatsPanel .session-stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* V6.52 Playground dashboard: uniform WineLab/WineTest module chrome. */
body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel,
body.tech-surface .tech-winetest-dashboard #sessionStatsPanel {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel .session-stats-head,
body.tech-surface .tech-winetest-dashboard #sessionStatsPanel .session-stats-head,
body.tech-surface .tech-winelab-visit-log .session-stats-head,
body.tech-surface .tech-winetest-dashboard #techAccessPanel .session-stats-head,
body.tech-surface .tech-winelab-globe .session-stats-head {
  min-height: 24px;
  margin-bottom: 0;
  padding-inline: 4px;
}

body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel .session-stats-head h3,
body.tech-surface .tech-winetest-dashboard #sessionStatsPanel .session-stats-head h3,
body.tech-surface .tech-winelab-visit-log .session-stats-head h3,
body.tech-surface .tech-winetest-dashboard #techAccessPanel .session-stats-head h3,
body.tech-surface .tech-winelab-globe .session-stats-head h3 {
  color: #1d3345;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.16;
  letter-spacing: 0.02em;
}

body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel .session-stat-box,
body.tech-surface .tech-winetest-dashboard #sessionStatsPanel .session-stat-box {
  min-height: 32px;
  padding: 4px 7px;
  border-radius: 7px;
}

body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel .session-stats-foot,
body.tech-surface .tech-winetest-dashboard #sessionStatsPanel .session-stats-foot {
  min-height: 14px;
  justify-content: flex-end;
}

body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel .session-stats-foot p,
body.tech-surface .tech-winetest-dashboard #sessionStatsPanel .session-stats-foot p,
body.tech-surface .tech-winelab-globe .session-globe-legend {
  display: none !important;
}

body.tech-surface .tech-winelab-visit-log,
body.tech-surface .tech-winetest-dashboard #techAccessPanel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

body.tech-surface .tech-winelab-visit-log .session-visit-table,
body.tech-surface .tech-winetest-dashboard #techAccessPanel .session-access-table {
  display: block;
  height: 100%;
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(47, 127, 191, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

body.tech-surface .tech-winelab-visit-log .session-visit-table thead,
body.tech-surface .tech-winetest-dashboard #techAccessPanel .session-access-table thead,
body.tech-surface .tech-winelab-visit-log .session-visit-table tbody,
body.tech-surface .tech-winetest-dashboard #techAccessPanel .session-access-table tbody {
  display: table;
  width: 100%;
  table-layout: fixed;
}

body.tech-surface .tech-winetest-dashboard #techAccessPanel .session-access-table {
  max-height: none !important;
}

body.tech-surface .tech-winelab-visit-log .session-visit-empty td,
body.tech-surface .tech-winetest-dashboard #techAccessPanel .session-visit-empty td {
  color: var(--muted) !important;
  font-weight: 800;
  text-transform: none !important;
}

body.tech-surface .tech-winelab-globe {
  grid-template-rows: auto minmax(0, 1fr);
}

/* V6.52 Playground dashboard: compact fixed-height logs with internal scrollbars. */
body.tech-surface .tech-dashboard-body {
  height: 304px;
  max-height: 304px;
  min-height: 0 !important;
  overflow: hidden;
}

body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel,
body.tech-surface .tech-winetest-dashboard #sessionStatsPanel,
body.tech-surface .tech-winelab-visit-log,
body.tech-surface .tech-winelab-globe,
body.tech-surface .tech-winetest-dashboard #techAccessPanel {
  height: 304px !important;
  max-height: 304px !important;
  min-height: 0 !important;
  overflow: hidden;
}

body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel .session-stats-row,
body.tech-surface .tech-winetest-dashboard #sessionStatsPanel .session-stats-row {
  grid-auto-rows: 34px !important;
  align-content: start;
}

body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel .session-stat-box,
body.tech-surface .tech-winetest-dashboard #sessionStatsPanel .session-stat-box {
  min-height: 34px !important;
  height: 34px;
}

body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel .session-stats-head h3,
body.tech-surface .tech-winetest-dashboard #sessionStatsPanel .session-stats-head h3 {
  font-size: 10.5px;
  line-height: 1.08;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

body.tech-surface .tech-winelab-visit-log .session-visit-table,
body.tech-surface .tech-winetest-dashboard #techAccessPanel .session-access-table {
  height: 273px !important;
  max-height: 273px !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden;
  scrollbar-width: thin;
}

body.tech-surface .tech-winelab-globe .session-globe-canvas-wrap {
  height: 273px;
  min-height: 0;
  overflow: hidden;
}

body.tech-surface .tech-winelab-globe .session-globe-canvas {
  height: 273px !important;
  min-height: 0 !important;
}

@media (max-width: 1120px) {
  body.tech-surface .tech-dashboard-body {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  body.tech-surface .tech-winelab-dashboard #sessionStatsProdPanel,
  body.tech-surface .tech-winetest-dashboard #sessionStatsPanel,
  body.tech-surface .tech-winelab-visit-log,
  body.tech-surface .tech-winelab-globe,
  body.tech-surface .tech-winetest-dashboard #techAccessPanel {
    height: auto !important;
    max-height: none !important;
  }

  body.tech-surface .tech-winelab-visit-log .session-visit-table,
  body.tech-surface .tech-winetest-dashboard #techAccessPanel .session-access-table {
    height: 210px !important;
    max-height: 210px !important;
  }

  body.tech-surface .tech-winelab-globe .session-globe-canvas-wrap,
  body.tech-surface .tech-winelab-globe .session-globe-canvas {
    height: 216px !important;
  }
}

.prod-splash-screen {
  display: none;
}

body.prod-surface .prod-splash-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(72% 48% at 83% -5%, rgba(247, 231, 196, 0.95) 0%, rgba(247, 231, 196, 0) 62%),
    radial-gradient(60% 52% at 8% 98%, rgba(167, 181, 154, 0.35) 0%, rgba(167, 181, 154, 0) 64%),
    linear-gradient(180deg, #f7eedf 0%, #eee2cc 48%, #e5d8bd 100%);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  animation: prodSplashIntro 2.5s ease-out both;
}

body.prod-surface .prod-splash-lockup {
  display: grid;
  justify-items: center;
  width: min(90vw, 780px);
  color: #96631f;
  text-align: center;
}

body.prod-surface .prod-splash-monogram {
  display: block;
  width: min(100%, 760px);
  height: auto;
  max-height: 58vh;
  object-fit: contain;
  filter:
    drop-shadow(0 0 2px rgba(111, 184, 232, 0.72))
    drop-shadow(0 0 6px rgba(111, 184, 232, 0.52))
    drop-shadow(0 0 13px rgba(111, 184, 232, 0.26));
}

body.prod-surface .prod-splash-name {
  margin-top: clamp(-112px, -7.5vw, -48px);
  color: #9b6822;
  font-family: var(--font-serif);
  font-size: clamp(25px, 3.15vw, 43px);
  font-weight: 500 !important;
  letter-spacing: 0.2em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

body.prod-surface .prod-splash-signature {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.4vw, 20px);
  margin-top: clamp(13px, 1.5vw, 22px);
  color: #9b6822;
  font-family: var(--font-serif);
  font-size: clamp(14px, 1.55vw, 22px);
  font-weight: 500 !important;
  letter-spacing: 0.19em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

body.prod-surface .prod-splash-rule {
  position: relative;
  display: block;
  width: clamp(34px, 5vw, 78px);
  height: 1px;
  background: currentColor;
}

body.prod-surface .prod-splash-rule::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  background: currentColor;
  transform: translateY(-50%) rotate(45deg);
}

body.prod-surface .prod-splash-rule:first-child::after { right: -1px; }
body.prod-surface .prod-splash-rule:last-child::after { left: -1px; }

@keyframes prodSplashIntro {
  0%,
  72% {
    opacity: 1;
    visibility: visible;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

@media (max-width: 720px) {
  body.prod-surface .prod-splash-lockup {
    width: 94vw;
  }

  body.prod-surface .prod-splash-monogram {
    width: 94vw;
    max-height: 52vh;
  }

  body.prod-surface .prod-splash-name {
    max-width: 94vw;
    font-size: clamp(19px, 6.1vw, 27px);
    letter-spacing: 0.12em;
  }

  body.prod-surface .prod-splash-signature {
    max-width: 94vw;
    gap: 8px;
    font-size: clamp(11px, 3.6vw, 15px);
    letter-spacing: 0.11em;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.prod-surface .prod-splash-screen {
    animation-duration: 0.3s;
  }
}

/* Production quiz stays focused on the active question until recommendations exist. */
body.prod-surface #prodQuizScreen > .hero.card {
  display: none;
}

body.prod-surface:not(.prod-results-mode) #prodQuizScreen > .results-grid,
body.prod-surface:not(.prod-results-mode) #prodQuizScreen > .alternatives-card {
  display: none !important;
}

/* WineTest controls whether Sensory Profile is visible anywhere in production. */
body.prod-surface:not(.feature-sensory-profile-visible) .sticky-summary > h3:nth-of-type(1),
body.prod-surface:not(.feature-sensory-profile-visible) #tasteBars {
  display: none !important;
}

/* With the profile disabled, the final summary becomes two balanced panels. */
body.prod-surface.prod-results-mode:not(.feature-sensory-profile-visible) .sticky-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-template-rows: auto minmax(330px, 1fr) !important;
  min-height: clamp(420px, 35vw, 520px) !important;
  gap: 0 14px !important;
}

body.prod-surface.prod-results-mode:not(.feature-sensory-profile-visible) .sticky-summary > .profile-radar-block {
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
  min-height: clamp(420px, 35vw, 520px) !important;
}

body.prod-surface.prod-results-mode:not(.feature-sensory-profile-visible) .sticky-summary > h3:nth-of-type(3) {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

body.prod-surface.prod-results-mode:not(.feature-sensory-profile-visible) .sticky-summary > .tag-cloud {
  grid-column: 2 !important;
  grid-row: 2 !important;
  min-height: 330px !important;
}

body.prod-surface.prod-results-mode:not(.feature-sensory-profile-visible) .radar-chart {
  min-height: clamp(330px, 28vw, 410px) !important;
}

body.prod-surface.prod-results-mode:not(.feature-sensory-profile-visible) .radar-chart svg {
  width: min(100%, 400px) !important;
  max-width: 400px !important;
}

@media (max-width: 720px) {
  body.prod-surface.prod-results-mode:not(.feature-sensory-profile-visible) .sticky-summary {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto !important;
    min-height: 0 !important;
    gap: 0 !important;
  }

  body.prod-surface.prod-results-mode:not(.feature-sensory-profile-visible) .sticky-summary > .profile-radar-block {
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-height: 400px !important;
  }

  body.prod-surface.prod-results-mode:not(.feature-sensory-profile-visible) .sticky-summary > h3:nth-of-type(3) {
    grid-column: 1 !important;
    grid-row: 2 !important;
    margin-top: 12px !important;
  }

  body.prod-surface.prod-results-mode:not(.feature-sensory-profile-visible) .sticky-summary > .tag-cloud {
    grid-column: 1 !important;
    grid-row: 3 !important;
    min-height: 180px !important;
  }
}

body.tech-surface .surface-nav-button[data-surface-target="control-panel"] {
  --tab-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 7h10M18 7h2M4 17h2M10 17h10M14 4v6M6 14v6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  flex-grow: 1.02;
}

body.tech-surface .surface-page-control-panel {
  width: 100%;
}

body.tech-surface .prod-control-panel {
  padding: clamp(18px, 2vw, 28px);
  border: 1px solid rgba(47, 134, 199, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 42px rgba(47, 134, 199, 0.1);
}

body.tech-surface .prod-control-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(47, 134, 199, 0.18);
}

body.tech-surface .prod-control-panel-head h2 {
  margin: 3px 0 5px;
  font-size: 24px;
  line-height: 1.1;
}

body.tech-surface .prod-control-panel-head p {
  max-width: 720px;
  margin: 0;
  color: #5d7287;
  font-size: 13px;
  font-weight: 700;
}

body.tech-surface .prod-control-panel-state {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #b8d9ef;
  border-radius: 7px;
  color: #2f6f9e;
  background: #f5fbff;
  font-size: 12px;
  font-weight: 900;
}

body.tech-surface .prod-control-panel-state.is-saving {
  color: #9a6500;
  border-color: #ead4a3;
  background: #fffaf0;
}

body.tech-surface .prod-control-panel-state.is-error {
  color: #8a2432;
  border-color: #e5b8bf;
  background: #fff5f6;
}

body.tech-surface .prod-control-list {
  display: grid;
  gap: 10px;
  padding-top: 16px;
}

body.tech-surface .prod-control-row {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 16px;
  border: 1px solid rgba(47, 134, 199, 0.22);
  border-radius: 8px;
  background: #fbfdff;
  cursor: pointer;
}

body.tech-surface .prod-control-copy {
  display: grid;
  gap: 4px;
}

body.tech-surface .prod-control-copy strong {
  color: #20384f;
  font-size: 15px;
  font-weight: 900;
}

body.tech-surface .prod-control-copy span {
  color: #60788f;
  font-size: 12px;
  font-weight: 700;
}

body.tech-surface .prod-control-switch {
  position: relative;
  width: 48px;
  height: 26px;
  flex: 0 0 48px;
}

body.tech-surface .prod-control-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

body.tech-surface .prod-control-switch span {
  position: absolute;
  inset: 0;
  border: 1px solid #b9cedd;
  border-radius: 13px;
  background: #dfe9f0;
  transition: background 160ms ease, border-color 160ms ease;
}

body.tech-surface .prod-control-switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(32, 56, 79, 0.24);
  transition: transform 160ms ease;
}

body.tech-surface .prod-control-switch input:checked + span {
  border-color: #2186c4;
  background: #2186c4;
}

body.tech-surface .prod-control-switch input:checked + span::after {
  transform: translateX(22px);
}

body.tech-surface .prod-control-switch input:focus-visible + span {
  outline: 3px solid rgba(33, 134, 196, 0.22);
  outline-offset: 3px;
}

body.tech-surface .prod-control-switch input:disabled + span {
  cursor: wait;
  opacity: 0.58;
}

@media (max-width: 720px) {
  body.tech-surface .prod-control-panel-head,
  body.tech-surface .prod-control-row {
    align-items: stretch;
    flex-direction: column;
  }

  body.tech-surface .prod-control-switch {
    align-self: flex-end;
  }
}
