:root {
  --bg: #cfe5e7;
  --sidebar: #d9eff1;
  --panel: #fdfefe;
  --card: #eef7f8;
  --teal: #109fb8;
  --teal-dark: #0c7f95;
  --text: #233745;
  --muted: #6a7c87;
  --orange: #ee5c43;
  --orange-dark: #cf4b34;
  --coral: #ee5c43;
  --green: #3ea768;
  --red: #d04747;
  --shadow: 0 12px 32px rgba(3, 58, 73, 0.12);
  font-family: "Helvetica Neue", "Source Sans Pro", Arial, sans-serif;
}

/* Twemoji cross-platform emoji styling */
img.emoji {
  height: 1em;
  width: 1em;
  margin: 0 0.05em 0 0.1em;
  vertical-align: -0.1em;
  display: inline-block;
}

/* Flag emoji specific sizing */
.step3-flag img.emoji,
.country-flag img.emoji,
.flag img.emoji {
  height: 1.2em;
  width: 1.2em;
  vertical-align: -0.15em;
}

/* Insights icons sizing */
.insights-icon img.emoji {
  height: 1.2em;
  width: 1.2em;
  vertical-align: -0.15em;
}

/* Sidebar help icons */
.help-icon img.emoji {
  height: 1em;
  width: 1em;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--teal);
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 272px 1fr;
}

.sidebar {
  background: var(--sidebar);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.sidebar h1 {
  margin: 0;
  font-size: 26px;
  color: #fff;
  background: var(--teal);
  padding: 14px 18px;
  border-radius: 0;
  letter-spacing: 0.5px;
}

.steps-heading {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text);
}

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

.step {
  position: relative;
}

.step a {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px 12px 42px;
  background: #fff;
  border-radius: 0;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid rgba(16, 159, 184, 0.25);
  font-size: 14px;
  transition: border 0.2s ease, color 0.2s ease;
}

.step::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(16, 159, 184, 0.4);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

.step.is-active a {
  color: var(--teal);
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
  font-weight: 600;
}

.step.is-active::before {
  background: #fff;
  border-color: #fff;
}

.step.is-complete::before {
  background: var(--teal);
  border-color: var(--teal);
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-links a {
  color: var(--teal-dark);
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-links a.beta-link {
  color: #ec4899;
}

.sidebar-links a.beta-link .sidebar-icon,
.sidebar-links a.beta-link .help-icon {
  border-color: #ec4899;
  color: #ec4899;
}

.sidebar-links .help-icon {
  font-size: 16px;
  display: inline-block;
}

.sidebar-icon {
  width: 18px;
  height: 18px;
  border: 2px solid var(--teal);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--teal);
}

.sidebar-logo {
  margin-top: 24px;
  padding: 16px 0 8px;
}

.sidebar-logo img {
  width: 100%;
  height: auto;
  opacity: 0.85;
}

.sidebar-last-updated {
  padding-top: 12px;
  border-top: 1px solid rgba(16, 159, 183, 0.15);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.sidebar-last-updated .last-updated-label {
  display: block;
  font-weight: 500;
  color: rgba(16, 159, 183, 0.6);
  margin-bottom: 2px;
}

.content {
  padding: 56px 72px;
}

.panel {
  background: var(--panel);
  padding: 36px 40px;
  border-radius: 0;
  box-shadow: none;
}

.panel header h2 {
  margin: 6px 0 0;
  font-size: 32px;
  color: var(--teal);
  font-weight: 400;
  font-style: italic;
}

.step-label {
  margin: 0;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.step-intro {
  font-size: 15px;
  color: var(--text);
  line-height: 1.5;
  margin: 0 0 24px;
}

/* Recyclability Step 2 Styles */
.recyclability-step2 .packaging-name-input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid rgba(16, 159, 183, 0.2);
  padding: 12px 16px;
}

.recyclability-step2 .packaging-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  color: var(--teal);
}

.recyclability-step2 .packaging-icon svg {
  width: 100%;
  height: 100%;
}

.recyclability-step2 .packaging-name-input {
  flex: 1;
  border: none;
  font-size: 14px;
  padding: 8px;
  background: transparent;
}

.recyclability-step2 .packaging-name-input:focus {
  outline: none;
}

.recyclability-step2 .section-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 12px;
}

/* Primary Material Card */
.primary-material-card {
  background: #fff;
  border: 1px solid rgba(16, 159, 183, 0.2);
  padding: 20px 24px;
  margin-bottom: 24px;
}

.primary-material-card .card-title {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.recyclability-step2 .primary-material-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.recyclability-step2 .material-field,
.recyclability-step2 .weight-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.recyclability-step2 .material-field label,
.recyclability-step2 .weight-field label {
  font-size: 14px;
  color: var(--text);
}

.recyclability-step2 .weight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.recyclability-step2 .weight-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.recyclability-step2 .weight-label-badge {
  background: var(--teal);
  color: #fff;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
}

.recyclability-step2 input[type="number"] {
  flex: 1;
  padding: 10px;
  border: 1px solid rgba(16, 159, 183, 0.3);
  font-size: 14px;
}

.recyclability-step2 .polymer-question,
.recyclability-step2 .polyolefin-question {
  margin-bottom: 16px;
}

.recyclability-step2 .polymer-question p,
.recyclability-step2 .polyolefin-question p {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text);
}

.recyclability-step2 .features-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(16, 159, 183, 0.15);
}

.recyclability-step2 .features-intro {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 16px;
}

.recyclability-step2 .features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.recyclability-step2 .feature-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(16, 159, 183, 0.03);
  cursor: pointer;
}

.recyclability-step2 .feature-checkbox:hover {
  background: rgba(16, 159, 183, 0.06);
}

.recyclability-step2 .feature-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--orange);
  flex-shrink: 0;
  margin-top: 2px;
}

.recyclability-step2 .features-note {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}

/* Prominent warning for sorting test required */
.recyclability-step2 .features-warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 16px;
  padding: 16px 20px;
  background: rgba(238, 92, 67, 0.08);
  border: 2px solid var(--orange);
}

.recyclability-step2 .features-warning .warning-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.recyclability-step2 .features-warning .warning-content h4 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--orange);
}

.recyclability-step2 .features-warning .warning-content p {
  margin: 0;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

/* Disqualified warning - more prominent red */
.recyclability-step2 .disqualified-warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 12px;
  padding: 16px 20px;
  background: rgba(208, 71, 71, 0.1);
  border: 2px solid var(--red);
}

.recyclability-step2 .disqualified-warning .warning-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.recyclability-step2 .disqualified-warning .warning-content h4 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--red);
}

.recyclability-step2 .disqualified-warning .warning-content p {
  margin: 0;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

/* Small inline warning text */
.recyclability-step2 .warning-text {
  display: none;
}

/* Picture upload area */
.recyclability-step2 .packaging-name-section {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 24px;
  align-items: start;
  margin-bottom: 24px;
}

.recyclability-step2 .packaging-name-area {
  flex: 1;
}

.recyclability-step2 .packaging-image-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recyclability-step2 .packaging-image-area label {
  font-size: 14px;
  color: var(--muted);
}

.recyclability-step2 .image-upload-box {
  width: 100%;
  height: 120px;
  border: 2px dashed rgba(16, 159, 183, 0.4);
  background: rgba(16, 159, 183, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.recyclability-step2 .image-upload-box:hover {
  border-color: var(--teal);
  background: rgba(16, 159, 183, 0.06);
}

.recyclability-step2 .image-upload-box .upload-icon {
  font-size: 28px;
  color: var(--teal);
  opacity: 0.6;
}

.recyclability-step2 .image-upload-box .upload-text {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.recyclability-step2 .image-upload-box input[type="file"] {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.recyclability-step2 .image-upload-box .uploaded-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recyclability-step2 .image-upload-box.has-image .upload-icon,
.recyclability-step2 .image-upload-box.has-image .upload-text {
  display: none;
}

/* Standard weights box */
.recyclability-step2 .standard-weights-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(238, 92, 67, 0.06);
  border: 1px solid rgba(238, 92, 67, 0.3);
  cursor: pointer;
  margin-bottom: 16px;
  transition: all 0.2s ease;
}

.recyclability-step2 .standard-weights-box:hover {
  background: rgba(238, 92, 67, 0.12);
  border-color: var(--orange);
}

.recyclability-step2 .standard-weights-box .icon {
  font-size: 18px;
}

.recyclability-step2 .standard-weights-box span {
  font-size: 14px;
  color: var(--orange);
  font-weight: 500;
}

.recyclability-step2 .step2-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.recyclability-step2 .step2-header-right {
  text-align: center;
}

.recyclability-step2 .interim-label {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 8px;
}

.recyclability-step2 .recyclass-badge-small {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 16px;
  background: var(--teal);
  color: #fff;
}

.recyclability-step2 .recyclass-badge-small.class-a { background: var(--green); }
.recyclability-step2 .recyclass-badge-small.class-b { background: #7cb342; }
.recyclability-step2 .recyclass-badge-small.class-c { background: #fdd835; color: var(--text); }
.recyclability-step2 .recyclass-badge-small.class-d { background: var(--orange); }
.recyclability-step2 .recyclass-badge-small.class-nonrecyclable { background: var(--red); }

.recyclability-step2 .recyclass-letter {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}

.recyclability-step2 .recyclass-label {
  font-size: 10px;
  line-height: 1.2;
  opacity: 0.9;
}

/* Refined interim result section */
.recyclability-step2 .interim-result-section {
  margin: 32px 0;
  text-align: center;
}

.recyclability-step2 .interim-result-card {
  background: #fff;
  border: 1px solid rgba(16, 159, 183, 0.2);
  padding: 32px;
  margin-top: 20px;
  text-align: center;
}

.recyclability-step2 .interim-result-card h4 {
  margin: 0 0 20px;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
}

.recyclability-step2 .recyclass-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 32px;
  background: var(--teal);
  color: #fff;
  margin: 0 auto 24px;
}

.recyclability-step2 .recyclass-badge.class-a { background: var(--green); }
.recyclability-step2 .recyclass-badge.class-b { background: #7cb342; }
.recyclability-step2 .recyclass-badge.class-c { background: #fdd835; color: var(--text); }
.recyclability-step2 .recyclass-badge.class-d { background: var(--orange); }
.recyclability-step2 .recyclass-badge.class-nonrecyclable { background: var(--red); }

.recyclability-step2 .recyclass-badge .recyclass-letter {
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
}

.recyclability-step2 .recyclass-badge .recyclass-label {
  font-size: 12px;
  line-height: 1.3;
  opacity: 0.9;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.recyclability-step2 .recyclable-content-section {
  margin-bottom: 20px;
}

.recyclability-step2 .recyclable-content-label {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--muted);
  text-transform: uppercase;
}

.recyclability-step2 .recyclable-content-value {
  margin: 0;
  font-size: 36px;
  font-weight: 700;
  color: var(--teal);
}

.recyclability-step2 .recyclable-content-desc {
  margin: 20px auto 0;
  max-width: 600px;
  font-size: 13px;
  font-style: italic;
  color: var(--muted);
  line-height: 1.5;
}

/* Components grid matching EPR calculator */
.recyclability-step2 .components-grid-v2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.recyclability-step2 .component-card-v2 {
  background: #fff;
  border: 1px solid rgba(16, 159, 183, 0.25);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recyclability-step2 .component-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.recyclability-step2 .component-name-teal {
  color: var(--teal);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.recyclability-step2 .component-card-v2 .select-teal {
  width: 100%;
}

.recyclability-step2 .weight-input-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.recyclability-step2 .weight-input-group input {
  width: 80px;
  padding: 8px 10px;
  border: 1px solid #ddd;
  font-size: 14px;
  text-align: right;
}

.recyclability-step2 .weight-unit-teal {
  color: var(--teal);
  font-size: 13px;
}

/* Orange accent hover for component cards */
.recyclability-step2 .component-card-v2:hover {
  border-color: var(--orange);
}

.recyclability-step2 .component-card-v2:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(238, 92, 67, 0.15);
}

/* Sticky header for recyclability steps */
.recyclability-step2 .sticky-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--panel);
  margin: -36px -40px 24px;
  padding: 16px 40px;
  border-bottom: 1px solid rgba(16, 159, 183, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.recyclability-step2 .sticky-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.recyclability-step2 .sticky-packaging-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.recyclability-step2 .packaging-icon-small {
  width: 32px;
  height: 32px;
  color: var(--teal);
}

.recyclability-step2 .packaging-icon-small svg {
  width: 100%;
  height: 100%;
}

.recyclability-step2 .packaging-name-display {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.recyclability-step2 .sticky-class-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--teal);
  color: #fff;
}

.recyclability-step2 .sticky-class-badge.class-a { background: var(--green); }
.recyclability-step2 .sticky-class-badge.class-b { background: #7cb342; }
.recyclability-step2 .sticky-class-badge.class-c { background: #fdd835; color: var(--text); }
.recyclability-step2 .sticky-class-badge.class-d { background: var(--orange); }
.recyclability-step2 .sticky-class-badge.class-nonrecyclable { background: var(--red); }

.recyclability-step2 .sticky-class-letter {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.recyclability-step2 .sticky-class-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
}

/* Weight exceeded warning */
.recyclability-step2 .weight-exceed-warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px 20px;
  background: rgba(238, 92, 67, 0.08);
  border: 2px solid var(--orange);
}

.recyclability-step2 .weight-exceed-warning .warning-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.recyclability-step2 .weight-exceed-warning .warning-content h4 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--orange);
}

.recyclability-step2 .weight-exceed-warning .warning-content p {
  margin: 0;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

/* Section divider */
.recyclability-step2 .section-divider {
  border: none;
  border-top: 1px solid rgba(16, 159, 183, 0.2);
  margin: 32px 0;
}

/* Viscosity help text */
.recyclability-step2 .viscosity-help-text {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  margin-top: 8px;
}

/* Viscosity popup */
.viscosity-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(35, 55, 69, 0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.viscosity-popup {
  background: #fff;
  padding: 32px;
  max-width: 480px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
}

.viscosity-popup .popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
}

.viscosity-popup .popup-close:hover {
  color: var(--text);
}

.viscosity-popup .popup-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.viscosity-popup h3 {
  margin: 0 0 16px;
  font-size: 20px;
  color: var(--orange);
}

.viscosity-popup p {
  margin: 0 0 24px;
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
}

/* Add component section styling */
.recyclability-step2 .add-component-section {
  margin: 24px 0;
  text-align: center;
}

.recyclability-step2 .your-packaging-summary h3 {
  font-size: 14px;
  color: var(--muted);
  margin: 16px 0 8px;
}

.recyclability-step2 .packaging-summary-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid rgba(16, 159, 183, 0.2);
  padding: 12px 16px;
}

.recyclability-step2 .packaging-summary-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text);
}

.card {
  background: var(--card);
  border-radius: 0;
  padding: 22px;
  border: 1px solid rgba(16, 159, 183, 0.2);
  margin-bottom: 18px;
}

.card-header h3 {
  margin: 0 0 12px;
}

.category-card {
  background: var(--card);
  border-radius: 0;
  padding: 22px;
  border: 1px solid rgba(16, 159, 183, 0.2);
  margin-bottom: 18px;
}

.category-header h3 {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
}

.format-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.format-icon-btn {
  border: 2px solid transparent;
  background: #fff;
  border-radius: 0;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: border 0.2s ease;
  min-width: 100px;
}

.format-icon-btn .format-icon-large {
  font-size: 32px;
  line-height: 1;
}

.format-icon-btn .format-label-small {
  font-size: 13px;
  color: var(--text);
}

.format-icon-btn.is-selected {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(238, 92, 67, 0.2);
}

.variant-radios {
  display: flex;
  gap: 20px;
  padding: 16px 0 0;
  border-top: 1px solid rgba(16, 159, 183, 0.15);
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}

.radio-option input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--orange);
}

.cta-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.btn {
  border: none;
  border-radius: 0;
  padding: 14px 28px;
  font-size: 15px;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

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

.btn-primary:hover {
  background: var(--orange-dark);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--teal);
  color: var(--teal);
}

.btn-secondary:hover {
  background: var(--teal);
  color: #fff;
}

.btn-grey {
  border-color: transparent;
  background: #4f5d68;
  color: #fff;
}

.format-link {
  color: var(--teal);
  text-decoration: none;
}

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

.cta-row a.btn,
.cta-row button.btn {
  min-width: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}

.field input,
.field select {
  padding: 10px 12px;
  border: 1px solid rgba(16, 159, 183, 0.35);
  border-radius: 0;
  font-size: 16px;
  background: #fff;
  color: var(--text);
}

.select-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.select-icon {
  position: absolute;
  left: 12px;
  font-size: 18px;
  z-index: 1;
  pointer-events: none;
}

.select-with-icon select {
  padding-left: 40px;
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

.select-with-icon select option {
  background: #fff;
  color: var(--text);
}

.weight-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.weight-input-wrapper input {
  flex: 1;
}

.weight-unit {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.production-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}

.components-grid,
.attributes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.component-card {
  background: #fff;
  border-radius: 0;
  border: 1px solid rgba(16, 159, 183, 0.2);
  padding: 16px;
}

.component-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-weight: 600;
}

.attribute {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(16, 159, 183, 0.2);
  border-radius: 0;
  background: #fff;
}

.attribute small {
  color: var(--muted);
}

.attribute-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 12px;
  margin-left: 6px;
  cursor: help;
  vertical-align: middle;
}

.component-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(16, 159, 183, 0.2);
}

.help-link {
  color: var(--teal);
  font-size: 14px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

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

.help-icon-small {
  font-size: 14px;
  display: inline-block;
}

.recyclability {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}

.recyclability-banner {
  border-radius: 0;
  padding: 16px 20px;
  margin-top: 20px;
  color: #fff;
}

.recyclability-banner.recyclability-good {
  background: var(--green);
}

.recyclability-banner.recyclability-mid {
  background: #f29829;
}

.recyclability-banner.recyclability-bad {
  background: var(--red);
}

.recyclability-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.recyclability-content span:first-child {
  color: #fff;
  font-size: 14px;
}

.recyclability-description {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  line-height: 1.5;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  text-transform: uppercase;
  font-weight: 700;
}

.pill.good {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.pill.mid {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.pill.bad {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.summary-card {
  background: #fff;
  border-radius: 0;
  padding: 24px;
  border: 1px solid rgba(16, 159, 183, 0.2);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  border-collapse: separate;
}

.summary-card ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.summary-main {
  flex: 1 1 50%;
}

.summary-production {
  flex: 0 0 160px;
  text-align: right;
  border-left: 1px solid rgba(16, 159, 183, 0.2);
  padding-left: 16px;
}

.summary-production p {
  margin: 0;
  font-size: 14px;
}

.summary-production strong {
  display: block;
  margin: 4px 0;
}

.summary-production p:first-child {
  color: var(--teal);
  font-weight: 600;
}

.summary-actions {
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-left: 1px solid rgba(16, 159, 183, 0.2);
  padding-left: 16px;
}

.btn-block {
  width: 100%;
  text-align: center;
}

.scenario-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin: 24px 0;
}

.scenario-card {
  background: #fff;
  border-radius: 0;
  border: 1px solid rgba(16, 159, 183, 0.25);
  padding: 24px;
  box-shadow: none;
}

.scenario-card header h3 {
  margin: 4px 0 0;
  color: var(--text);
}

.scenario-total {
  font-size: 36px;
  font-weight: 700;
  margin: 12px 0 18px;
}

.scenario-metrics {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 14px;
}

.scenario-metrics strong {
  display: block;
  font-size: 18px;
  color: var(--text);
}

.scenario-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
  font-size: 13px;
  color: var(--muted);
}

.scenario-card.placeholder {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  align-items: flex-start;
}

.scenario-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 12px;
}

.btn-link {
  border: none;
  background: transparent;
  color: var(--teal);
  font-weight: 600;
  cursor: pointer;
  padding: 10px 0;
}

.scenario-controls {
  margin: 8px 0 24px;
  display: flex;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}

.delta-chip {
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.delta-chip.positive {
  background: rgba(62, 167, 104, 0.15);
  color: var(--green);
}

.delta-chip.negative {
  background: rgba(238, 92, 67, 0.15);
  color: var(--orange);
}

.delta-chip.neutral {
  background: rgba(15, 159, 183, 0.15);
  color: var(--teal);
}

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

.country-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 0;
  border: 1px solid rgba(16, 159, 183, 0.15);
  background: #fff;
}

.country-option .flag {
  font-size: 20px;
}

.scenario-editor {
  background: #fff;
}

.editor-toggle {
  border: none;
  width: 100%;
  background: transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
}

.editor-panel {
  margin-top: 12px;
  display: none;
}

.editor-panel.is-open {
  display: block;
}

.editor-toggle .chevron {
  font-size: 16px;
}

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

.result-card {
  background: #fff;
  color: var(--text);
  border-radius: 0;
  box-shadow: none;
  border: 1px solid rgba(16, 159, 183, 0.2);
  overflow: hidden;
}

.result-card.is-best {
  border-color: var(--orange);
}

.result-card .country {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 18px;
  padding: 12px 18px;
  background: var(--orange);
  color: #fff;
}

.result-card.has-threshold-warning {
  border-color: rgba(16, 159, 184, 0.5);
}

.threshold-warning-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(16, 159, 184, 0.08);
  font-size: 10px;
  color: var(--teal-dark);
  cursor: help;
}

.threshold-warning-banner .threshold-icon {
  font-size: 10px;
  flex-shrink: 0;
}

.threshold-warning-banner .threshold-text {
  font-weight: 500;
}

.fee-year-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.3px;
}

/* Section header with toggle */
.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 16px;
}

.section-header-row .section-label {
  margin-bottom: 0;
  flex-shrink: 0;
}

.detail-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #fff;
  border: 1px solid var(--teal);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-toggle-btn:hover {
  background: rgba(16, 159, 183, 0.08);
}

.detail-toggle-btn .toggle-icon {
  font-size: 10px;
}

.detail-toggle-btn.is-detailed {
  background: var(--teal);
  color: #fff;
}

.detail-toggle-btn.is-detailed:hover {
  background: var(--teal-dark);
}

/* Summary mode cards - compact layout */
.results-grid.summary-mode {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.result-card-summary {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 140px;
}

.result-card-summary .country {
  padding: 10px 14px;
  font-size: 15px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.result-card-summary .country small {
  font-size: 11px;
}

/* When there's a threshold warning, use 3-row grid */
.result-card-summary.has-threshold-warning {
  grid-template-rows: auto auto 1fr;
}

.result-summary-fee {
  padding: 14px 14px 18px;
  text-align: center;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

.result-summary-fee .fee-final {
  font-size: 26px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

/* Expandable country cards */
.result-card-summary.is-expandable {
  cursor: pointer;
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.result-card-summary.is-expandable:hover:not(.is-expanded) {
  box-shadow: 0 4px 12px rgba(16, 159, 183, 0.15);
  transform: translateY(-2px);
}

.result-card-summary.is-expandable:focus {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.card-summary-content {
  display: grid;
  grid-template-rows: auto 1fr;
}

/* Expand toggle button positioning */
.result-card-summary.is-expandable .card-expand-toggle {
  position: absolute;
  right: 8px;
  top: 8px;
}

/* Expand toggle button */
.card-expand-toggle {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(16, 159, 183, 0.1);
  color: var(--teal);
  border-radius: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
  pointer-events: none;
  z-index: 1;
}

.result-card-summary.is-expandable:hover .card-expand-toggle,
.result-card-summary.is-expanded .card-expand-toggle {
  opacity: 1;
}

.card-expand-toggle:hover {
  background: rgba(16, 159, 183, 0.2);
}

.expand-icon {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
}

/* Expanded content - smooth CSS transition with max-height */
.card-expanded-content {
  background: #fff;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.25s ease;
}

.card-expanded-content .expanded-breakdown {
  transform: translateY(-10px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-card-summary.is-expanded .card-expanded-content {
  max-height: 250px;
  opacity: 1;
  border-top: 1px solid rgba(16, 159, 183, 0.1);
}

.result-card-summary.is-expanded .card-expanded-content .expanded-breakdown {
  transform: translateY(0);
}

/* Expanded state */
.result-card-summary.is-expanded {
  grid-column: 1 / -1;
}

.result-card-summary.is-expanded .card-expand-toggle {
  opacity: 1;
}

.result-card-summary.is-expanded .expand-icon {
  transform: rotate(90deg);
}

/* Expanded breakdown layout */
.expanded-breakdown {
  display: grid;
  grid-template-columns: 120px 1fr 1fr 120px;
  gap: 20px;
  width: 100%;
  align-items: flex-start;
  padding: 16px 20px;
  min-height: 0;
}

.breakdown-column {
  min-width: 0;
}

.breakdown-column.final-column {
  text-align: right;
}

.breakdown-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.breakdown-item.base-fee .breakdown-label,
.breakdown-item.final-fee .breakdown-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.3px;
}

.breakdown-item.base-fee .breakdown-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.breakdown-item.final-fee .breakdown-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--teal);
}

.breakdown-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.breakdown-section-title {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.breakdown-section-title.bonus-title {
  color: var(--green);
}

.breakdown-section-title.penalty-title {
  color: var(--red);
}

.breakdown-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.breakdown-items .modulation-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
}

.breakdown-items .modulation-label {
  color: var(--text);
}

.breakdown-items .modulation-amount.bonus {
  color: var(--green);
  font-weight: 600;
}

.breakdown-items .modulation-amount.penalty {
  color: var(--red);
  font-weight: 600;
}

.breakdown-items .modulation-none {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}

/* Responsive: on smaller screens, adjust expanded cards */
@media (max-width: 1000px) {
  .result-card-summary.is-expanded {
    grid-column: 1 / -1;
  }
  
  .expanded-breakdown {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  
  .breakdown-column.final-column {
    grid-column: 1 / -1;
    text-align: left;
    padding-top: 12px;
    border-top: 1px solid rgba(16, 159, 183, 0.1);
  }
}

@media (max-width: 600px) {
  .expanded-breakdown {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Detailed mode cards - full breakdown */
.results-grid.detailed-mode {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.result-card-detailed {
  display: flex;
  flex-direction: column;
}

.result-meta {
  font-size: 14px;
  margin-bottom: 8px;
  padding: 4px 18px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.result-meta span:first-child {
  font-weight: 600;
}

.result-meta .fee,
.result-meta .bonus,
.result-meta .penalty {
  margin-left: auto;
}

.result-meta .fee {
  font-size: 18px;
  font-weight: 400;
  margin: 0;
}

.result-meta .fee.fee-final {
  font-size: 24px;
  font-weight: 700;
}

.result-meta .bonus {
  color: var(--green);
}

.result-meta .penalty {
  color: var(--red);
}

.penalty-neutral {
  color: var(--muted);
}

.result-meta.bonus-row {
  background: rgba(46, 166, 90, 0.08);
}

.result-meta.penalty-row {
  background: rgba(214, 59, 59, 0.06);
}

/* Modulation items in result cards */
.result-section {
  padding: 8px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.result-section.has-items {
  padding-bottom: 12px;
}

.result-section-header {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.result-section-header.bonus-header {
  color: var(--green);
}

.result-section-header.penalty-header {
  color: var(--red);
}

.modulation-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modulation-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 3px;
}

.modulation-item.bonus-item {
  background: rgba(62, 167, 104, 0.08);
}

.modulation-item.penalty-item {
  background: rgba(208, 71, 71, 0.08);
}

.modulation-label {
  color: var(--text);
}

.modulation-amount {
  font-weight: 600;
  font-family: monospace;
}

.modulation-amount.bonus {
  color: var(--green);
}

.modulation-amount.penalty {
  color: var(--red);
}

.modulation-none {
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
}

.result-final {
  background: rgba(16, 159, 183, 0.05);
  border-bottom: none;
}

.result-meta.compare p {
  font-weight: 600;
  margin: 2px 0;
}

.result-meta.small {
  font-size: 12px;
}

.comparison-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}

.comparison-card {
  background: #fff;
}

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

.historical-card .comparison-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 12px;
}

.historical-card .comparison-header h3 {
  margin: 0;
  flex: 0 0 auto;
}

.historical-card .comparison-header small {
  flex: 1 1 auto;
  min-width: 200px;
  text-align: right;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.comparison-legend,
.historical-legend {
  display: flex;
  gap: 12px;
}

.legend {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.legend-a {
  background: rgba(238, 92, 67, 0.15);
  color: var(--orange);
}

.legend-b {
  background: rgba(16, 159, 183, 0.15);
  color: var(--teal);
}

.comparison-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comparison-row {
  display: grid;
  grid-template-columns: 160px 1fr 160px;
  gap: 12px;
  align-items: center;
  font-size: 14px;
}

.comparison-bars {
  display: flex;
  gap: 4px;
  height: 8px;
}

.comparison-bars .bar {
  display: block;
  border-radius: 0;
  height: 100%;
}

.comparison-bars .bar-a {
  background: var(--orange);
}

.comparison-bars .bar-b {
  background: var(--teal);
}

.comparison-values {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: var(--muted);
}

.vertical-chart {
  background: #fff;
}

.vertical-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 16px;
  align-items: end;
}

.country-column {
  text-align: center;
}

.bar-group {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  height: 200px;
}

.vertical-columns p {
  margin-top: 8px;
  font-size: 13px;
}

.v-bar {
  width: 26px;
  border-radius: 6px 6px 0 0;
}

.bar-a {
  background: var(--orange);
}

.bar-b {
  background: var(--teal);
}

.eco-card {
  background: #fff;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.eco-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.eco-item {
  border: 1px solid rgba(16, 159, 183, 0.2);
  border-radius: 12px;
  padding: 12px;
}

.eco-item .eco-label {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 8px;
}

.eco-item .eco-bar {
  height: 6px;
  background: rgba(15, 159, 183, 0.15);
  border-radius: 999px;
  overflow: hidden;
}

.eco-item .eco-bar span {
  display: block;
  height: 100%;
}

.eco-item.bonus .eco-bar span {
  background: var(--green);
}

.eco-item.penalty .eco-bar span {
  background: var(--orange);
}

.historical-bars {
  gap: 24px;
}

.field.compact {
  margin-bottom: 0;
}

.field.compact input,
.field.compact select {
  padding: 8px 10px;
  font-size: 14px;
}

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

.muted.small {
  font-size: 12px;
}

.disclaimer {
  margin-top: 28px;
  background: #f4f7f8;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 0;
  padding: 18px;
  font-size: 14px;
  color: #3d5567;
}

.disclaimer-inner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.disclaimer-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.guide {
  background: #fff;
}

.guide-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 12px;
}

.guide-content p {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.guide-content p:last-child {
  margin-bottom: 0;
}

.empty-state {
  text-align: center;
  padding: 32px;
  background: #fff;
  border-radius: 0;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Cost Overview */
.cost-overview {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.cost-hero {
  background: var(--teal);
  color: #fff;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Split cost hero for comparison mode */
.cost-hero-split {
  display: grid;
  grid-template-rows: 1fr 1fr;
}

.cost-hero-split .cost-hero {
  padding: 20px 24px;
}

.cost-hero-split .cost-hero-a {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.cost-hero-split .cost-hero-b {
  background: var(--orange);
}

.cost-hero-split .cost-total {
  font-size: 32px;
}

.cost-hero-split .fee-per-unit-display {
  margin: 10px 0;
  padding: 8px 12px;
}

.cost-hero-split .fee-per-unit-value {
  font-size: 16px;
}

.cost-hero-split .fee-per-unit-alt-value {
  font-size: 13px;
}

.cost-hero-split .cost-hero-comparison {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.cost-hero-split .cost-meta {
  font-size: 12px;
  margin-top: 6px;
}

.cost-hero .step-label {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
}

.cost-total {
  font-size: 42px;
  font-weight: 700;
  margin: 0;
  line-height: 1.1;
  word-break: break-word;
  overflow-wrap: break-word;
}

.cost-meta {
  margin: 12px 0 0;
  font-size: 14px;
  opacity: 0.85;
}

.cost-breakdown {
  background: #fff;
  padding: 24px;
  border: 1px solid rgba(16, 159, 183, 0.15);
}

.cost-breakdown h3 {
  margin: 0 0 20px;
  font-size: 16px;
  font-weight: 600;
}

.cost-sort-label {
  font-weight: 400;
  color: var(--muted);
  font-size: 14px;
}

.cost-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cost-bar-row {
  display: grid;
  grid-template-columns: 100px 1fr 90px;
  align-items: center;
  gap: 12px;
}

.cost-bar-country {
  font-size: 14px;
  font-weight: 500;
}

.cost-bar-track {
  height: 24px;
  background: rgba(16, 159, 183, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.cost-bar-fill {
  height: 100%;
  background: var(--teal);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.cost-bar-value {
  font-size: 14px;
  font-weight: 600;
  text-align: right;
}

.cost-insights {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(16, 159, 183, 0.1);
  flex-wrap: wrap;
}

.cost-insight {
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 4px;
}

.cost-insight.cheapest {
  background: rgba(62, 167, 104, 0.1);
  color: var(--green);
}

.cost-insight.expensive {
  background: rgba(238, 92, 67, 0.1);
  color: var(--orange);
}

/* EU Average Reference Line */
.eu-average-reference {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 0;
  margin-bottom: 8px;
  border-bottom: 1px dashed rgba(0, 51, 153, 0.3);
}

.eu-average-reference .eu-label {
  font-size: 11px;
  color: #003399;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.eu-average-reference .eu-label::before {
  content: "🇪🇺";
  font-size: 12px;
}

.eu-average-reference .eu-value {
  font-size: 13px;
  font-weight: 600;
  color: #003399;
}

/* EU comparison on each country bar */
.cost-bar-eu-diff {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 5px;
  border-radius: 3px;
  white-space: nowrap;
  min-width: 65px;
  text-align: center;
}

.cost-bar-eu-diff.below-eu {
  background: rgba(62, 167, 104, 0.12);
  color: var(--green);
}

.cost-bar-eu-diff.above-eu {
  background: rgba(238, 92, 67, 0.12);
  color: var(--orange);
}

/* Adjust cost-bar-row grid to accommodate EU diff column */
.cost-bar-row:has(.cost-bar-eu-diff) {
  grid-template-columns: 100px 1fr 80px 70px;
}

.section-label {
  margin: 32px 0 16px;
}

/* Scenarios Panel */
.scenarios-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.scenarios-panel.has-comparison {
  grid-template-columns: 1fr 1fr;
}

.scenario-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.scenario-duplicate-btn {
  margin-left: auto;
}

.scenario-config {
  background: #fff;
  padding: 20px;
  border: 1px solid rgba(16, 159, 183, 0.15);
}

.scenario-config.scenario-a {
  border-left: 4px solid var(--teal);
}

.scenario-config.scenario-b {
  border-left: 4px solid var(--orange);
}

.scenario-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.scenario-header .step-label {
  margin: 0;
  flex: 1;
}

.scenario-badge {
  width: 24px;
  height: 24px;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.scenario-badge.badge-b {
  background: var(--orange);
}

.scenario-config h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.scenario-category {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.scenario-components {
  margin: 0 0 12px;
  padding-left: 18px;
  font-size: 13px;
  color: var(--muted);
}

.scenario-components li {
  margin-bottom: 2px;
}

.scenario-production {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

.scenario-format-select {
  margin-bottom: 12px;
}

.scenario-format-select select {
  width: 100%;
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid rgba(16, 159, 183, 0.2);
  border-radius: 4px;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 12px;
}

.btn-remove {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 16px;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.btn-remove:hover {
  opacity: 1;
  color: var(--red);
}

.scenario-empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 200px;
  background: rgba(16, 159, 183, 0.03);
  border-style: dashed;
}

.scenario-empty-text {
  color: var(--muted);
  margin: 0 0 16px;
  font-size: 14px;
}

/* Scenario Editor Inline */
.scenario-editor-inline {
  background: #fff;
  border: 1px solid rgba(238, 92, 67, 0.2);
  border-left: 4px solid var(--orange);
  padding: 20px;
  margin-bottom: 24px;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.editor-header h4 {
  margin: 0;
  font-size: 16px;
}

.btn-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--muted);
  padding: 4px 8px;
}

.btn-close:hover {
  color: var(--text);
}

.components-grid.compact {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.component-inline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border: 1px solid rgba(16, 159, 183, 0.2);
}

.component-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--teal);
}

.component-inline select,
.component-inline input {
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid rgba(16, 159, 183, 0.25);
  width: 100%;
}

.component-inline select {
  background: #fff;
}

.weight-inline {
  display: flex;
  align-items: center;
  gap: 6px;
}

.weight-inline input {
  flex: 1;
  min-width: 60px;
}

.weight-inline span {
  color: var(--muted);
  font-size: 12px;
}

.weight-inline span {
  color: var(--muted);
  font-size: 12px;
}

.attributes-grid.compact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(16, 159, 183, 0.15);
}

/* Compact Production Adjuster (in Insights header) */
.insights-header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.production-adjuster-compact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(16, 159, 183, 0.06);
  border: 1px solid rgba(16, 159, 183, 0.15);
}

.insights-countries-indicator {
  padding: 8px 12px;
}

.compact-field {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.compact-field span {
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.3px;
}

.compact-field input {
  width: 100px;
  padding: 4px 8px;
  font-size: 13px;
  border: 1px solid rgba(16, 159, 183, 0.25);
  background: #fff;
  color: #888;
}

.compact-field input:focus {
  outline: none;
  border-color: var(--teal);
}

/* Scenario A editor specific styles */
.scenario-a-editor {
  border-color: rgba(16, 159, 183, 0.2);
  border-left-color: var(--teal);
}

.field-inline {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  max-width: 180px;
}

.field-inline span {
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  text-transform: uppercase;
}

.field-inline input {
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid rgba(16, 159, 183, 0.25);
  border-radius: 0;
}

.field-inline input:focus {
  outline: none;
  border-color: var(--teal);
}

/* Component name row with delete button */
.component-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.component-name-input-inline {
  flex: 1;
  padding: 6px 8px !important;
  font-size: 13px !important;
  font-weight: 600;
  color: var(--teal);
  border: 1px dashed rgba(16, 159, 183, 0.4) !important;
  background: transparent;
}

.component-name-input-inline:focus {
  border-style: solid !important;
  border-color: var(--teal) !important;
}

.btn-delete-inline {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--muted);
  padding: 2px 6px;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.2s, color 0.2s;
}

.btn-delete-inline:hover {
  opacity: 1;
  color: var(--red);
}

/* Add component button */
.btn-add-component {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: transparent;
  border: 2px dashed rgba(16, 159, 183, 0.3);
  color: var(--teal);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 100px;
}

.btn-add-component:hover {
  border-color: var(--teal);
  background: rgba(16, 159, 183, 0.05);
}

/* Editor footer with back link */
.editor-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(16, 159, 183, 0.15);
}

.editor-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s;
}

.editor-back-link:hover {
  color: var(--teal);
}

.attribute-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  cursor: pointer;
}

.attribute-inline input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--teal);
}

/* Result card comparison mode */
.result-comparison {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  flex-wrap: wrap;
}

.result-scenario {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scenario-label {
  width: 20px;
  height: 20px;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
}

.scenario-label-b {
  background: var(--orange);
}

.result-comparison .fee-final {
  font-size: 20px;
}

.fee-diff {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  margin-left: auto;
}

.fee-diff.better {
  background: rgba(62, 167, 104, 0.12);
  color: var(--green);
}

.fee-diff.worse {
  background: rgba(238, 92, 67, 0.12);
  color: var(--orange);
}

/* Cost overview comparison mode */
.cost-hero-comparison {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.cost-total-b {
  font-size: 18px;
  opacity: 0.8;
}

.cost-diff {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
}

.cost-diff.better {
  background: rgba(62, 167, 104, 0.2);
  color: #fff;
}

.cost-diff.worse {
  background: rgba(238, 92, 67, 0.2);
  color: #fff;
}

/* Single bar mode */
.cost-bar-track {
  position: relative;
}

/* ============================================================
   COMPARISON MODE: Side-by-side grouped bars
   ============================================================ */

.cost-bars.has-comparison .cost-bar-row {
  align-items: flex-start;
}

.cost-bars-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cost-bar-pair {
  display: flex;
  align-items: center;
  height: 16px;
  background: rgba(0, 0, 0, 0.04);
}

.cost-bar-single {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  min-width: 60px;
}

.cost-bar-single.bar-a {
  background: var(--teal);
}

.cost-bar-single.bar-b {
  background: var(--orange);
}

.bar-label-inline {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* When bar is too narrow, move label outside */
.cost-bar-single[style*="width: 0%"] .bar-label-inline,
.cost-bar-single[style*="width: 1%"] .bar-label-inline,
.cost-bar-single[style*="width: 2%"] .bar-label-inline,
.cost-bar-single[style*="width: 3%"] .bar-label-inline,
.cost-bar-single[style*="width: 4%"] .bar-label-inline,
.cost-bar-single[style*="width: 5%"] .bar-label-inline {
  color: var(--text);
  text-shadow: none;
  margin-left: 8px;
}

.comparison-row .cost-bar-country {
  min-width: 110px;
  padding-top: 4px;
}

.cost-legend {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  font-size: 13px;
}

.legend-a {
  color: var(--teal);
}

.legend-b {
  color: var(--orange);
}

.scenario-delta-banner {
  display: flex;
  justify-content: center;
  margin: 24px 0;
}

/* Step 2 V2 Styles */
.step2-top-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.step2-material-card h4,
.step2-production-card h4 {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
}

.field-label-teal {
  color: var(--teal);
  font-size: 13px;
  font-weight: 500;
  display: block;
  margin-bottom: 6px;
}

.select-with-icon {
  display: flex;
  align-items: center;
  gap: 10px;
}

.select-icon-bottle {
  font-size: 24px;
  opacity: 0.6;
}

.select-teal {
  background: var(--teal);
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  flex: 1;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.select-teal:focus {
  outline: 2px solid var(--teal-dark);
  outline-offset: 2px;
}

.production-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.input-readonly {
  background: #f5f5f5;
  color: var(--muted);
}

.components-grid-v2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.component-card-v2 {
  background: #fff;
  border: 1px solid rgba(16, 159, 183, 0.25);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.component-card-v2 .select-teal {
  width: 100%;
}

.component-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.component-name-teal {
  color: var(--teal);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.component-name-input {
  color: var(--teal);
  font-weight: 600;
  font-size: 14px;
  border: 1px dashed var(--teal);
  background: transparent;
  padding: 4px 8px;
  border-radius: 3px;
  width: 120px;
}

.component-name-input:focus {
  outline: none;
  border-style: solid;
  background: #fff;
}

.btn-delete-component {
  background: none;
  border: 1px solid rgba(208, 71, 71, 0.3);
  color: var(--red);
  font-size: 18px;
  cursor: pointer;
  padding: 2px 8px;
  line-height: 1;
  opacity: 0.7;
  transition: all 0.2s;
}

.btn-delete-component:hover {
  opacity: 1;
  background: rgba(208, 71, 71, 0.08);
}

.weight-input-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.weight-input-group input {
  width: 70px;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 0;
  font-size: 14px;
  text-align: right;
}

.weight-unit-teal {
  color: var(--teal);
  font-size: 13px;
}

.component-actions-v2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(16, 159, 183, 0.15);
}

.btn-add-component {
  min-width: 280px;
  padding: 12px 24px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.material-mismatch-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(238, 92, 67, 0.08);
  border: 1px solid rgba(238, 92, 67, 0.3);
  border-radius: 4px;
}

.material-mismatch-warning .warning-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.material-mismatch-warning .warning-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
}

.guide-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(16, 159, 184, 0.06);
  border-left: 3px solid var(--teal);
}

.help-link-v2 {
  color: var(--teal);
  font-size: 14px;
  text-decoration: underline;
  display: flex;
  align-items: center;
  gap: 6px;
}

.help-icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 600;
}

.attributes-grid-v2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.attribute-v2 {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: all 0.15s ease;
}

.attribute-v2:hover {
  border-color: rgba(16, 159, 183, 0.3);
}

.attribute-v2.is-green {
  background: rgba(62, 167, 104, 0.08);
  border-color: rgba(62, 167, 104, 0.3);
}

.attribute-v2.is-red {
  background: rgba(208, 71, 71, 0.08);
  border-color: rgba(208, 71, 71, 0.3);
}

.attribute-v2.is-grey {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.1);
}

.attribute-v2.is-grey .attribute-label-row span:first-child {
  color: var(--muted);
}

.attribute-v2 input[type="checkbox"] {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.attribute-content {
  flex: 1;
}

.attribute-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.attribute-label-row > span:first-child {
  font-weight: 500;
  font-size: 15px;
}

.attribute-v2 small {
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
}

.impact-badge {
  padding: 4px 10px;
  border-radius: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.impact-badge.positive,
.impact-badge.green {
  background: var(--green);
  color: #fff;
}

.impact-badge.negative,
.impact-badge.red {
  background: var(--red);
  color: #fff;
}

.impact-badge.grey {
  background: #9aa;
  color: #fff;
}

.auto-detected-badge {
  padding: 4px 8px;
  border-radius: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
  background: var(--teal);
  color: #fff;
}

.attribute-v2.is-suggested {
  background: rgba(16, 159, 184, 0.06);
  border-color: rgba(16, 159, 184, 0.4);
  border-style: dashed;
}

.attribute-v2.is-suggested .attribute-label-row > span:first-child {
  color: var(--teal-dark);
}

.recyclability-banner-v2 {
  background: var(--teal);
  color: #fff;
  padding: 14px 20px;
  margin-top: 8px;
}

.recyclability-banner-v2.recyclability-good {
  background: var(--green);
}

.recyclability-banner-v2.recyclability-bad {
  background: var(--red);
}

.recyclability-content-v2 {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.recyclability-content-v2 strong {
  font-weight: 600;
}

.recyclability-pill {
  background: #fff;
  color: var(--text);
  padding: 4px 12px;
  border-radius: 0;
  font-weight: 700;
  font-size: 13px;
}

.recyclability-pill-green {
  background: #fff;
  color: var(--green);
}

.recyclability-pill-red {
  background: #fff;
  color: var(--red);
}

.recyclability-pill-yellow {
  background: #fff;
  color: #c90;
}

.recyclability-desc {
  font-size: 14px;
  opacity: 0.9;
}

.cta-row-v2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  position: sticky;
  bottom: 0;
  background: var(--panel);
  padding: 24px 0;
  margin-bottom: -36px;
  z-index: 10;
}

.btn-cta-main {
  min-width: 360px;
  text-align: center;
  padding: 16px 32px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.btn-cta-back {
  min-width: 360px;
  text-align: center;
  padding: 12px 24px;
  background: transparent;
  color: var(--teal);
  border: 1px solid var(--teal);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.btn-cta-back:hover {
  background: rgba(16, 159, 183, 0.08);
}

/* Step 1 V2 Styles */
.step1-categories {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.category-row {
  display: grid;
  gap: 16px;
}

.category-row.single {
  grid-template-columns: 1fr;
}

.category-row.double {
  grid-template-columns: 1fr 1fr;
}

.category-card-v2 {
  background: #fff;
  border: 2px solid var(--teal);
  padding: 0;
}

.category-header-v2 {
  padding: 12px 16px;
  border-bottom: none;
}

.category-header-v2 h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.format-icons-row {
  display: flex;
  gap: 8px;
  padding: 8px 16px 16px;
  flex-wrap: wrap;
}

.format-icon-btn-v2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease;
  min-width: 70px;
}

.format-icon-btn-v2:hover {
  transform: translateY(-2px);
}

.format-icon-btn-v2.is-selected .format-icon-circle {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.format-icon-btn-v2.is-selected .format-icon-label {
  font-weight: 600;
  color: var(--teal);
}

.format-icon-btn-v2.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.format-icon-btn-v2.is-disabled:hover {
  transform: none;
}

.coming-soon-tag {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--muted);
  color: #fff;
  font-size: 8px;
  padding: 2px 5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Recyclability Step 1 Layout */
.recyclability-step1-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.recyclability-row {
  display: grid;
  gap: 20px;
}

.recyclability-row.full-width {
  grid-template-columns: 1fr;
}

.recyclability-row.three-columns {
  grid-template-columns: 1fr 1fr 1fr;
}

.recyclability-row.two-columns {
  grid-template-columns: 1fr 1fr;
}

.recyclability-category-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recyclability-category-title {
  color: var(--teal);
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.recyclability-formats-card {
  background: #fff;
  border: 2px solid var(--teal);
  padding: 16px;
}

.recyclability-formats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recyclability-format-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease;
  min-width: 70px;
}

.recyclability-format-btn:hover:not(.is-disabled) {
  transform: translateY(-2px);
}

.recyclability-format-btn.is-selected .format-icon-circle {
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
}

.recyclability-format-btn.is-selected .format-icon-label {
  font-weight: 600;
  color: var(--orange);
}

.recyclability-format-btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.recyclability-format-btn.is-disabled:hover {
  transform: none;
}

.coming-soon-message {
  padding: 16px 20px;
  background: rgba(238, 92, 67, 0.08);
  border: 1px solid rgba(238, 92, 67, 0.2);
  margin-top: 20px;
}

.coming-soon-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.coming-soon-icon {
  font-size: 24px;
}

.coming-soon-content p {
  margin: 0;
  font-size: 14px;
  color: var(--text);
}

@media (max-width: 900px) {
  .recyclability-row.three-columns {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .recyclability-row.three-columns,
  .recyclability-row.two-columns {
    grid-template-columns: 1fr;
  }
}

.format-icon-circle {
  width: 48px;
  height: 48px;
  border: 2px solid var(--teal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  transition: all 0.15s ease;
}

.format-icon-circle svg {
  width: 28px;
  height: 28px;
}

.format-icon-label {
  font-size: 11px;
  color: var(--text);
  text-align: center;
  line-height: 1.2;
}

.variant-radios-v2 {
  display: flex;
  gap: 24px;
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid rgba(238, 92, 67, 0.3);
  border: 2px solid var(--orange);
  border-top: none;
  margin: 0 -2px -2px -2px;
  flex-wrap: wrap;
}

.radio-option-v2 {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}

.radio-option-v2 input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--orange);
}

.radio-option-v2 input[type="radio"]:checked + span {
  font-weight: 600;
}

.guide-card-v2 {
  background: #fff;
  padding: 24px;
  margin-top: 24px;
}

.guide-card-v2 h3 {
  color: var(--teal);
  font-size: 24px;
  margin: 0 0 16px;
  font-weight: 400;
  font-style: italic;
}

.guide-content-v2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.guide-content-v2 p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

.guide-content-v2 p:last-child {
  margin-bottom: 0;
}

.guide-content-v2 a {
  color: var(--teal);
}

/* Step 3 Styles */
.step3-packaging-summary {
  margin-bottom: 24px;
}

.step3-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 12px;
}

.step3-countries-title {
  margin-top: 24px;
}

.step3-summary-card {
  display: grid;
  grid-template-columns: 60px 1fr 140px 120px;
  gap: 20px;
  align-items: center;
  background: #fff;
  border: 1px solid rgba(16, 159, 183, 0.2);
  padding: 20px;
}

.step3-summary-icon {
  width: 48px;
  height: 48px;
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.step3-summary-icon svg {
  width: 100%;
  height: 100%;
}

.step3-summary-details {
  flex: 1;
}

.step3-format-name {
  color: var(--teal);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
}

.step3-summary-details p {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

.step3-summary-details p strong {
  font-weight: 600;
}

.step3-summary-production {
  text-align: left;
  border-left: 1px solid rgba(16, 159, 183, 0.2);
  padding-left: 20px;
}

.step3-production-label {
  color: var(--teal);
  font-weight: 600;
  font-size: 14px;
  margin: 0 0 8px;
}

.step3-production-value {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--text);
}

.step3-production-value strong {
  font-weight: 600;
}

.step3-summary-actions {
  display: flex;
  justify-content: center;
}

.step3-edit-btn {
  min-width: 100px;
  text-align: center;
}

.step3-countries-card {
  background: #fff;
  border: 1px solid rgba(16, 159, 183, 0.2);
  padding: 24px;
}

.step3-region-title {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 20px;
}

.step3-region-title-world {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.step3-country-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px 16px;
}

.step3-country-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s ease;
  border-radius: 2px;
}

.step3-country-option:hover {
  background: rgba(16, 159, 183, 0.05);
}

.step3-country-option.is-selected {
  background: rgba(16, 159, 183, 0.08);
}

.step3-country-option.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.step3-country-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
  cursor: pointer;
  flex-shrink: 0;
}

.step3-country-option.is-disabled input[type="checkbox"] {
  cursor: not-allowed;
}

.step3-country-option.step3-coming-soon {
  opacity: 0.6;
  pointer-events: none;
}

.step3-country-option.step3-coming-soon .step3-country-name {
  color: var(--text-light);
}

.step3-flag {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.step3-country-name {
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
}

/* Step 3 Tonnage Distribution */
.step3-tonnage-distribution {
  margin-top: 24px;
}

.step3-tonnage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.step3-tonnage-header .step3-section-title {
  margin: 0;
}

.step3-tonnage-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.step3-mode-toggle {
  display: flex;
  border: 1px solid rgba(16, 159, 183, 0.3);
  border-radius: 4px;
  overflow: hidden;
}

.step3-mode-btn {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  background: #fff;
  border: none;
  cursor: pointer;
  color: var(--text);
  transition: all 0.15s ease;
}

.step3-mode-btn:first-child {
  border-right: 1px solid rgba(16, 159, 183, 0.3);
}

.step3-mode-btn:hover:not(.is-active) {
  background: rgba(16, 159, 183, 0.05);
}

.step3-mode-btn.is-active {
  background: var(--teal);
  color: #fff;
}

.step3-tonnage-summary {
  display: flex;
  align-items: center;
  gap: 16px;
}

.step3-tonnage-total {
  font-size: 14px;
  color: var(--text);
}

.step3-tonnage-total strong {
  color: var(--teal);
  font-weight: 600;
}

.step3-tonnage-total-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid rgba(16, 159, 183, 0.3);
  border-radius: 4px;
  padding: 4px 12px;
}

.step3-tonnage-total-label {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.step3-tonnage-total-input {
  width: 100px;
  padding: 4px 8px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--teal);
  text-align: right;
  background: transparent;
}

.step3-tonnage-total-input:focus {
  outline: none;
}

.step3-tonnage-total-unit {
  font-size: 13px;
  color: var(--muted);
}

.step3-distribute-btn {
  font-size: 13px;
  padding: 8px 16px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

/* Warning button style for redistribution */
.btn-warning {
  background: #f59e0b;
  color: #fff;
  border: none;
}

.btn-warning:hover {
  background: #d97706;
}

.step3-tonnage-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #b45309;
}

.step3-tonnage-warning .warning-icon {
  font-size: 16px;
}

.step3-tonnage-empty {
  background: #fff;
  border: 1px dashed rgba(16, 159, 183, 0.3);
  border-radius: 4px;
  padding: 32px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.step3-tonnage-empty p {
  margin: 0;
}

.step3-tonnage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  background: #fff;
  border: 1px solid rgba(16, 159, 183, 0.2);
  padding: 20px;
  border-radius: 4px;
}

.step3-tonnage-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: rgba(16, 159, 183, 0.03);
  border-radius: 4px;
  gap: 12px;
  border: 1px solid transparent;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.step3-tonnage-item.is-edited {
  background: rgba(16, 159, 183, 0.08);
  border-color: rgba(16, 159, 183, 0.3);
}

.step3-tonnage-country {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.step3-tonnage-country .step3-flag {
  font-size: 18px;
}

.step3-tonnage-country .step3-country-name {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step3-tonnage-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step3-edited-badge {
  font-size: 9px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--teal);
  background: rgba(16, 159, 183, 0.15);
  padding: 3px 6px;
  border-radius: 3px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.step3-tonnage-input-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
}

.step3-tonnage-input {
  width: 100px;
  padding: 6px 10px;
  border: 1px solid rgba(16, 159, 183, 0.3);
  border-radius: 4px;
  font-size: 13px;
  text-align: right;
  transition: border-color 0.15s ease;
}

.step3-tonnage-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(16, 159, 183, 0.1);
}

.step3-tonnage-unit {
  font-size: 12px;
  color: var(--muted);
  min-width: 30px;
}

.step3-unlock-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  color: #9ca3af;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.step3-unlock-btn:hover {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

.step3-unlock-btn svg {
  width: 13px;
  height: 13px;
}

/* Tonnage distribution actions bar */
.step3-tonnage-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 4px;
  gap: 16px;
  flex-wrap: wrap;
}

.step3-tonnage-difference {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.step3-tonnage-difference.has-remaining {
  color: #b45309;
}

.step3-tonnage-difference.has-excess {
  color: #dc2626;
}

.step3-tonnage-difference .difference-icon {
  font-size: 16px;
}

.step3-tonnage-balanced {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #059669;
}

.step3-tonnage-balanced .balanced-icon {
  font-size: 16px;
  font-weight: bold;
}

.step3-confirm-btn {
  white-space: nowrap;
}

/* Country tonnage display in Step 4 (read-only) */
.country-tonnage-display {
  font-size: 12px;
  color: var(--muted);
  margin-left: auto;
  font-weight: 500;
}

@media (max-width: 1080px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .content {
    padding: 32px;
  }

  .cost-overview {
    grid-template-columns: 1fr;
  }

  .cost-hero {
    text-align: center;
  }

  .scenarios-panel,
  .scenarios-panel.has-comparison {
    grid-template-columns: 1fr;
  }

  .step2-top-row {
    grid-template-columns: 1fr;
  }

  .components-grid-v2 {
    grid-template-columns: 1fr;
  }

  .attributes-grid-v2 {
    grid-template-columns: 1fr;
  }

  .btn-cta-main,
  .btn-cta-back {
    min-width: 100%;
  }

  .category-row.double {
    grid-template-columns: 1fr;
  }

  .guide-content-v2 {
    grid-template-columns: 1fr;
  }

  .step3-summary-card {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .step3-summary-icon {
    display: none;
  }

  .step3-summary-production {
    border-left: none;
    border-top: 1px solid rgba(16, 159, 183, 0.2);
    padding-left: 0;
    padding-top: 16px;
  }

  .step3-country-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .step3-tonnage-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .step3-tonnage-controls {
    width: 100%;
    justify-content: space-between;
  }

  .step3-tonnage-grid {
    grid-template-columns: 1fr;
  }

  .step3-tonnage-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .step3-tonnage-input-wrapper {
    width: 100%;
  }

  .step3-tonnage-input {
    flex: 1;
  }

  .step3-tonnage-actions {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .step3-tonnage-difference,
  .step3-tonnage-balanced {
    justify-content: center;
  }

  .step3-confirm-btn {
    width: 100%;
  }
}

/* FAQ Page Styles */
.faq-content {
  max-width: 800px;
}

.faq-intro {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(16, 159, 183, 0.2);
}

.faq-section {
  margin-bottom: 32px;
}

.faq-section h3 {
  color: var(--teal);
  font-size: 20px;
  margin: 0 0 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--teal);
}

.faq-item {
  margin-bottom: 12px;
  padding: 16px 20px;
  background: #e8ecee;
  border: none;
}

.faq-item h4 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 16px;
}

.faq-item p,
.faq-item ul,
.faq-item ol {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.faq-item p:last-child,
.faq-item ul:last-child,
.faq-item ol:last-child {
  margin-bottom: 0;
}

.faq-item ul,
.faq-item ol {
  padding-left: 20px;
}

.faq-item li {
  margin-bottom: 4px;
}

.faq-item em {
  color: var(--orange);
  font-style: normal;
  font-weight: 500;
}

.faq-section > p {
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

.sidebar-links a.active {
  color: var(--orange);
  font-weight: 700;
}

@media (max-width: 640px) {
  .steps {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .panel {
    padding: 24px;
  }

  .summary-card {
    flex-direction: column;
  }
}

/* Password Protection Overlay */
.password-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #cfe5e7;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  overflow: hidden;
}

.password-overlay.is-hidden {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}

.password-box {
  background: var(--panel);
  padding: 48px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow);
}

.password-box h2 {
  margin: 0 0 8px;
  font-size: 24px;
  color: var(--teal);
  font-weight: 600;
}

.password-box p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.password-box input[type="email"],
.password-box input[type="password"] {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid rgba(16, 159, 183, 0.3);
  font-size: 16px;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}

.password-box input[type="email"]:focus,
.password-box input[type="password"]:focus {
  outline: none;
  border-color: var(--teal);
}

.password-box input[type="email"].error,
.password-box input[type="password"].error {
  border-color: var(--red);
  animation: shake 0.4s ease;
}

.password-box .btn {
  width: 100%;
}

.password-switch-link {
  margin-top: 16px;
  background: transparent;
  border: 2px solid var(--teal);
  color: var(--teal);
}

.password-switch-link:hover {
  background: var(--teal);
  color: white;
}

.password-error {
  color: var(--red);
  font-size: 13px;
  margin: -8px 0 16px;
  display: none;
}

.password-error.is-visible {
  display: block;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* Material Compatibility Warning Styles */
.material-warning {
  border-color: var(--orange) !important;
  background: rgba(238, 92, 67, 0.05);
}

.material-warning-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--orange);
  padding: 2px 8px;
  background: rgba(238, 92, 67, 0.1);
  border-radius: 12px;
  margin-top: 4px;
}

.component-card-v2 select optgroup {
  font-weight: 600;
  color: var(--text);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.component-card-v2 select optgroup[label="Other materials"] {
  color: var(--muted);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.component-card-v2 select optgroup[label="Other materials"] option {
  color: var(--muted);
  font-style: italic;
}

.component-card-v2 select optgroup[label^="Recommended"] option {
  color: var(--text);
  font-weight: 500;
}

/* ============================================================
   INSIGHTS FEATURES: Quick Wins, Component Attribution, Weight Sensitivity, Fee Per Unit
   ============================================================ */

/* Insights Section */
.insights-section {
  margin: 24px 0;
}

.insights-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.insights-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.insights-countries-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(16, 159, 183, 0.06);
  border: 1px solid rgba(16, 159, 183, 0.15);
}

.insights-countries-text {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.insights-countries-flags {
  display: flex;
  gap: 4px;
}

.insight-country-flag {
  font-size: 16px;
  line-height: 1;
  cursor: default;
}

.insights-countries-label {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.country-flag-mini {
  font-size: 12px;
  line-height: 1;
  cursor: default;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 1200px) {
  .insights-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 800px) {
  .insights-grid {
    grid-template-columns: 1fr;
  }
}

/* Insights Card Base */
.insights-card {
  background: #fff;
  border: 1px solid rgba(16, 159, 183, 0.15);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.insights-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.insights-icon {
  font-size: 20px;
  line-height: 1;
}

.insights-header h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.insights-badge {
  padding: 4px 10px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 600;
}

.savings-badge {
  background: rgba(62, 167, 104, 0.12);
  color: var(--green);
}

.insights-note {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* Quick Wins Card */
.quick-wins-card.all-enabled {
  background: rgba(62, 167, 104, 0.05);
  border-color: rgba(62, 167, 104, 0.2);
}

.quick-wins-card.all-enabled .insights-icon {
  color: var(--green);
}

.quick-wins-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quick-win-item {
  padding: 12px;
  background: rgba(62, 167, 104, 0.05);
  border-left: 3px solid var(--green);
}

.quick-win-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.quick-win-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.quick-win-savings {
  font-weight: 700;
  font-size: 14px;
  color: var(--green);
  white-space: nowrap;
}

.quick-win-tip {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.quick-win-countries {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.country-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  background: rgba(16, 159, 183, 0.08);
  border-radius: 0;
  cursor: default;
}

.country-tag .country-flag {
  font-size: 14px;
  line-height: 1;
}

/* Component Attribution Card */
.component-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.component-bar-row {
  display: grid;
  grid-template-columns: 1fr 100px 80px;
  gap: 12px;
  align-items: center;
}

.component-bar-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.component-bar-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.component-bar-detail {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.component-bar-track {
  height: 8px;
  background: rgba(16, 159, 183, 0.1);
  border-radius: 0;
  overflow: hidden;
}

.component-bar-fill {
  height: 100%;
  background: var(--teal);
  border-radius: 0;
  transition: width 0.3s ease;
}

.component-bar-values {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.component-bar-fee {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}

.component-country-range {
  grid-column: 1 / -1;
  font-size: 11px;
  color: var(--muted);
  padding: 4px 8px;
  background: rgba(16, 159, 183, 0.04);
  margin-top: 4px;
}

.country-range-text {
  display: flex;
  align-items: center;
  gap: 4px;
}

.country-range-text .range-label {
  font-weight: 600;
  color: var(--teal);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.3px;
  margin-right: 2px;
}

.country-range-text .range-arrow {
  color: var(--muted);
  font-size: 10px;
  margin: 0 2px;
}

.component-bar-percent {
  font-size: 11px;
  color: var(--muted);
}

.component-insight {
  margin: 0;
  padding: 10px 12px;
  background: rgba(16, 159, 183, 0.06);
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
}

.component-insight strong {
  color: var(--teal);
}

/* Weight Sensitivity Card */
.sensitivity-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sensitivity-slider {
  width: 100%;
  height: 8px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, var(--teal) 0%, rgba(16, 159, 183, 0.2) 100%);
  border-radius: 0;
  outline: none;
  cursor: pointer;
}

.sensitivity-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--teal);
  border-radius: 0;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease;
}

.sensitivity-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.sensitivity-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--teal);
  border-radius: 0;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.sensitivity-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}

.sensitivity-result {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
  background: rgba(16, 159, 183, 0.04);
  border-radius: 0;
  border: 1px solid rgba(16, 159, 183, 0.1);
}

.sensitivity-current,
.sensitivity-savings,
.sensitivity-new-fee {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}

.sensitivity-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.sensitivity-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.sensitivity-value.savings {
  color: var(--green);
}

.sensitivity-note {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  font-style: italic;
}

/* Fee Per Unit Display */
.fee-per-unit-display {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 12px 0;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 0;
}

.fee-per-unit-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fee-per-unit-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.fee-per-unit-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.fee-per-unit-alt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 20px;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.fee-per-unit-alt-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
}

.fee-per-unit-alt-label {
  font-size: 11px;
  color: var(--muted);
}

/* Responsive adjustments for insights */
@media (max-width: 640px) {
  .sensitivity-result {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .sensitivity-current,
  .sensitivity-savings,
  .sensitivity-new-fee {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
  
  .component-bar-row {
    grid-template-columns: 1fr 60px 60px;
    gap: 8px;
  }
  
  .fee-per-unit-display {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .fee-per-unit-alt {
    padding-left: 0;
    border-left: none;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    width: 100%;
  }
}

/* ============================================================
   FEATURE 8: Circular Economy Dashboard
   ============================================================ */

/* ============================================================
   VIEW TOGGLE: Compact vs Expanded Mode
   ============================================================ */

.view-toggle-section {
  display: flex;
  justify-content: center;
  margin: 24px 0;
  padding: 16px 0;
  border-top: 1px dashed rgba(16, 159, 183, 0.2);
  border-bottom: 1px dashed rgba(16, 159, 183, 0.2);
}

.view-toggle-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: #fff;
  border: 2px solid var(--teal);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  color: var(--teal);
  font-weight: 600;
}

.view-toggle-btn:hover {
  background: rgba(16, 159, 183, 0.05);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 159, 183, 0.15);
}

.view-toggle-btn.is-expanded {
  background: var(--teal);
  color: #fff;
}

.view-toggle-btn.is-expanded:hover {
  background: var(--teal-dark);
}

.toggle-icon {
  font-size: 10px;
  transition: transform 0.2s ease;
}

.view-toggle-btn.is-expanded .toggle-icon {
  transform: rotate(0deg);
}

.toggle-text {
  font-weight: 600;
}

.toggle-hint {
  font-weight: 400;
  font-size: 12px;
  opacity: 0.7;
}

.view-toggle-btn.is-expanded .toggle-hint {
  display: none;
}

/* Expandable section */
.expandable-section {
  overflow: hidden;
}

.expandable-section.is-visible {
  display: block;
}

.expandable-section.is-hidden {
  display: none;
}


.advanced-insights-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 24px 0;
}

@media (max-width: 900px) {
  .advanced-insights-row {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   FEATURE 7: Market Favorability Score
   ============================================================ */

.market-favorability {
  background: #fff;
  border: 1px solid rgba(16, 159, 183, 0.15);
  padding: 24px;
}

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

.favorability-header h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.favorability-subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--text-light);
}

.favorability-summary {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.best-market,
.worst-market {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-radius: 0;
  text-align: center;
}

.best-market {
  background: rgba(62, 167, 104, 0.08);
  border: 1px solid rgba(62, 167, 104, 0.2);
}

.worst-market {
  background: rgba(238, 92, 67, 0.08);
  border: 1px solid rgba(238, 92, 67, 0.2);
}

.market-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.market-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.market-score {
  display: inline-block;
  font-size: 24px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 0;
}

.market-score.score-favorable {
  background: rgba(62, 167, 104, 0.15);
  color: var(--green);
}

.market-score.score-moderate {
  background: rgba(16, 159, 183, 0.15);
  color: var(--teal);
}

.market-score.score-challenging {
  background: rgba(238, 92, 67, 0.15);
  color: var(--orange);
}

.favorability-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.favorability-item {
  display: grid;
  grid-template-columns: 32px 120px 1fr 80px;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  background: #fafafa;
  border-radius: 0;
  border-left: 4px solid transparent;
}

.favorability-item.favorable {
  border-left-color: var(--green);
}

.favorability-item.moderate {
  border-left-color: var(--teal);
}

.favorability-item.challenging {
  border-left-color: var(--orange);
}

.item-rank {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
}

.item-country {
  display: flex;
  align-items: center;
  gap: 8px;
}

.country-flag {
  font-size: 20px;
}

.country-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.item-scores {
  display: flex;
  gap: 16px;
}

.score-bar {
  flex: 1;
  min-width: 60px;
}

.bar-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-light);
  margin-bottom: 4px;
}

.bar-track {
  height: 6px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 0;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--teal);
  border-radius: 0;
  transition: width 0.3s ease;
}

.item-overall {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.overall-score {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.favorable .overall-score { color: var(--green); }
.moderate .overall-score { color: var(--teal); }
.challenging .overall-score { color: var(--orange); }

.overall-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-light);
  margin-top: 2px;
}

.item-insights {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.insight {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 0;
  font-size: 11px;
  font-weight: 500;
}

.insight.good {
  background: rgba(62, 167, 104, 0.1);
  color: var(--green);
}

.insight.warn {
  background: rgba(238, 92, 67, 0.1);
  color: var(--orange);
}

.favorability-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}

.legend-dot.favorable { background: var(--green); }
.legend-dot.moderate { background: var(--teal); }
.legend-dot.challenging { background: var(--orange); }

.legend-item {
  font-size: 12px;
  color: var(--text-light);
}

/* ============================================================
   FEATURE 9: Fee Waterfall Chart
   ============================================================ */

.fee-waterfall {
  background: #fff;
  border: 1px solid rgba(16, 159, 183, 0.15);
  padding: 24px;
}

.fee-waterfall h3 {
  margin: 0 0 20px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.waterfall-subtitle {
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
}

.waterfall-chart {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  height: 180px;
  margin-bottom: 16px;
  padding: 20px 0;
  border-bottom: 2px solid var(--text);
}

.waterfall-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 50px;
}

.waterfall-label {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  max-width: 70px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  order: 3;
}

.waterfall-bar-container {
  position: relative;
  width: 100%;
  height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.waterfall-connector {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--muted);
  opacity: 0.3;
}

.waterfall-bar {
  position: absolute;
  left: 10%;
  width: 80%;
  border-radius: 3px 3px 0 0;
  min-height: 4px;
}

.waterfall-bar.base {
  background: var(--teal);
}

.waterfall-bar.bonus {
  background: var(--green);
}

.waterfall-bar.penalty {
  background: var(--orange);
}

.waterfall-bar.final {
  background: var(--text);
}

.waterfall-value {
  font-size: 11px;
  font-weight: 600;
  order: 1;
}

.waterfall-value.base { color: var(--teal); }
.waterfall-value.bonus { color: var(--green); }
.waterfall-value.penalty { color: var(--orange); }
.waterfall-value.final { color: var(--text); }

.waterfall-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.waterfall-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.waterfall-legend .legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.legend-dot.base { background: var(--teal); }
.legend-dot.bonus { background: var(--green); }
.legend-dot.penalty { background: var(--orange); }
.legend-dot.final { background: var(--text); }

/* ============================================================
   FEATURE 10: Multi-Year Projections
   ============================================================ */

.fee-projections {
  background: #fff;
  border: 1px solid rgba(16, 159, 183, 0.15);
  padding: 24px;
  margin: 24px 0;
}

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

.projections-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.projection-badge {
  background: rgba(238, 92, 67, 0.1);
  color: var(--orange);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
}

.projection-badge strong {
  font-weight: 700;
}

.projections-chart {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.projections-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 0;
  width: 50px;
}

.projections-y-axis .y-tick {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
}

.projections-area {
  flex: 1;
  position: relative;
  height: 200px;
}

.projections-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.projections-grid .grid-line {
  border-top: 1px dashed rgba(0, 0, 0, 0.08);
}

.projections-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100% - 30px);
}

.confidence-band {
  fill: rgba(238, 92, 67, 0.15);
}

.projection-line {
  fill: none;
  stroke: var(--orange);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.data-point {
  fill: #fff;
  stroke: var(--orange);
  stroke-width: 2;
}

.data-point.current {
  fill: var(--teal);
  stroke: var(--teal);
}

.current-marker {
  position: absolute;
  left: 0;
  transform: translateY(50%);
  z-index: 2;
}

.current-label {
  background: var(--teal);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.projections-x-axis {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 10px;
  border-top: 2px solid var(--text);
}

.projections-x-axis .x-label {
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
  flex: 1;
  text-align: center;
}

.projections-x-axis .x-label:first-child {
  text-align: left;
}

.projections-x-axis .x-label:last-child {
  text-align: right;
}

.projections-table {
  margin: 20px 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.projections-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.projections-row:last-child {
  border-bottom: none;
}

.projections-row.header {
  background: rgba(16, 159, 183, 0.06);
  font-weight: 600;
  color: var(--text);
}

.projections-row.current {
  background: rgba(16, 159, 183, 0.04);
}

.projections-row.current span:first-child {
  font-weight: 600;
  color: var(--teal);
}

.projection-low {
  color: var(--green);
}

.projection-base {
  font-weight: 600;
  color: var(--text);
}

.projection-high {
  color: var(--orange);
}

.projections-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 12px;
}

.projections-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.legend-band {
  width: 30px;
  height: 14px;
  background: rgba(238, 92, 67, 0.2);
  border-radius: 2px;
}

.legend-line {
  width: 30px;
  height: 3px;
  background: var(--orange);
  border-radius: 2px;
}

.projections-note {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  line-height: 1.5;
}

/* Responsive for projections */
@media (max-width: 640px) {
  .projections-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  
  .projections-row.header {
    display: none;
  }
  
  .projections-row span {
    display: flex;
    justify-content: space-between;
  }
  
  .projections-row span::before {
    content: attr(data-label);
    font-weight: 500;
    color: var(--muted);
  }
  
  .favorability-item {
    grid-template-columns: 28px 100px 1fr 60px;
    gap: 10px;
    padding: 10px 12px;
  }
  
  .item-scores {
    flex-direction: column;
    gap: 6px;
  }
  
  .favorability-summary {
    flex-direction: column;
  }
  
  .metric-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
}

/* ============================================================
   TOOL SWITCHER
   ============================================================ */

.sidebar h1 {
  cursor: pointer;
  transition: background 0.2s ease;
}

.sidebar h1:hover {
  background: var(--teal-dark);
}

.sidebar h1::after {
  content: "▼";
  font-size: 10px;
  margin-left: 8px;
  opacity: 0.8;
}

.tool-switcher-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(35, 55, 69, 0.6);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.tool-switcher-overlay.is-open {
  display: flex;
}

.tool-switcher-modal {
  background: #fff;
  padding: 32px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
}

.tool-switcher-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.tool-switcher-close:hover {
  color: var(--text);
}

/* ============================================================
   METHODOLOGY TOOLTIPS (RecyClass, CERTIFY, RECY:CHECK)
   ============================================================ */

.methodology-tooltip {
  position: relative;
  cursor: help;
  border-bottom: 1px dotted currentColor;
}

.methodology-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  width: 280px;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 100;
  pointer-events: none;
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.methodology-tooltip::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--text);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 101;
  margin-bottom: -4px;
}

.methodology-tooltip:hover::after,
.methodology-tooltip:hover::before {
  opacity: 1;
  visibility: visible;
}

.tool-switcher-modal h2 {
  margin: 0 0 8px;
  font-size: 22px;
  color: var(--text);
}

.tool-switcher-modal > p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.tool-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tool-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 2px solid rgba(16, 159, 183, 0.2);
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  color: var(--text);
}

.tool-option:hover {
  border-color: var(--teal);
  background: rgba(16, 159, 183, 0.05);
}

.tool-option.is-active {
  border-color: var(--teal);
  background: rgba(16, 159, 183, 0.08);
}

.tool-option-icon {
  width: 48px;
  height: 48px;
  background: var(--teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.tool-option-content h3 {
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--text);
}

.tool-option-content p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

/* ============================================================
   RECYCLABILITY TOOL STYLES
   ============================================================ */

/* Recyclability Step 1 - Format Selection */
.recyclability-format-section {
  margin-bottom: 32px;
}

.recyclability-format-section h3 {
  color: var(--teal);
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 16px;
}

.recyclability-format-card {
  background: #fff;
  border: 2px solid var(--teal);
  padding: 20px;
  margin-bottom: 16px;
}

/* Format grid - kept for backwards compatibility */
.recyclability-format-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Recyclability Step 2 - Composition */
.recyclability-composition-card {
  background: #fff;
  border: 1px solid rgba(16, 159, 183, 0.2);
  padding: 24px;
  margin-bottom: 20px;
}

.recyclability-composition-card h4 {
  margin: 0 0 16px;
  font-size: 15px;
  color: var(--teal);
  font-weight: 600;
}

.recyclability-field-group {
  margin-bottom: 16px;
}

.recyclability-field-group:last-child {
  margin-bottom: 0;
}

.recyclability-field-label {
  display: block;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 6px;
  font-weight: 500;
}

.recyclability-select,
.recyclability-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(16, 159, 183, 0.3);
  font-size: 14px;
  background: #fff;
}

.recyclability-select:focus,
.recyclability-input:focus {
  outline: 2px solid var(--teal);
  border-color: var(--teal);
}

.recyclability-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recyclability-checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: rgba(16, 159, 183, 0.03);
  cursor: pointer;
  transition: background 0.15s ease;
}

.recyclability-checkbox-item:hover {
  background: rgba(16, 159, 183, 0.06);
}

.recyclability-checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--orange);
  flex-shrink: 0;
  margin-top: 2px;
}

.recyclability-checkbox-label {
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
}

/* Component attribute cards */
.recyclability-component-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.recyclability-component-card {
  background: #fff;
  border: 1px solid rgba(16, 159, 183, 0.2);
  padding: 16px;
}

.recyclability-component-card h5 {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--teal);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.recyclability-deduction-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
  padding: 8px;
  background: rgba(16, 159, 183, 0.04);
}

.recyclability-deduction-note.is-warning {
  background: rgba(238, 92, 67, 0.08);
  color: var(--orange);
}

.recyclability-deduction-note.is-disqualified {
  background: rgba(208, 71, 71, 0.1);
  color: var(--red);
  font-weight: 600;
}

/* Recyclability Step 3 - Results */
.recyclability-result-card {
  background: #fff;
  border: 1px solid rgba(16, 159, 183, 0.2);
  padding: 32px;
  text-align: center;
  margin-bottom: 24px;
}

.recyclability-grade-display {
  margin-bottom: 24px;
}

.recyclability-grade-label {
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.recyclability-grade-value {
  font-size: 72px;
  font-weight: 700;
  line-height: 1;
}

.recyclability-grade-value.grade-a {
  color: var(--green);
}

.recyclability-grade-value.grade-b {
  color: #7cb342;
}

.recyclability-grade-value.grade-c {
  color: #fdd835;
}

.recyclability-grade-value.grade-d {
  color: var(--orange);
}

.recyclability-grade-value.grade-f {
  color: var(--red);
}

.recyclability-grade-desc {
  font-size: 16px;
  color: var(--text);
  margin-top: 12px;
}

.recyclability-score-breakdown {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 24px 0;
  border-top: 1px solid rgba(16, 159, 183, 0.15);
  border-bottom: 1px solid rgba(16, 159, 183, 0.15);
  margin: 24px 0;
}

.recyclability-score-item {
  text-align: center;
}

.recyclability-score-item .score-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.recyclability-score-item .score-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.recyclability-summary-section {
  background: #fff;
  border: 1px solid rgba(16, 159, 183, 0.2);
  padding: 24px;
  margin-bottom: 24px;
}

.recyclability-summary-section h4 {
  margin: 0 0 16px;
  font-size: 16px;
  color: var(--teal);
}

.recyclability-summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.recyclability-summary-list li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(16, 159, 183, 0.1);
  font-size: 14px;
}

.recyclability-summary-list li:last-child {
  border-bottom: none;
}

.recyclability-summary-list .item-label {
  color: var(--muted);
}

.recyclability-summary-list .item-value {
  color: var(--text);
  font-weight: 500;
}

.recyclability-summary-list .item-value.deduction {
  color: var(--orange);
}

.recyclability-summary-list .item-value.disqualified {
  color: var(--red);
  font-weight: 700;
}

@media (max-width: 768px) {
  .recyclability-component-grid {
    grid-template-columns: 1fr;
  }
  
  .recyclability-score-breakdown {
    flex-direction: column;
    gap: 16px;
  }
}

/* ============================================================
   RECYCLABILITY STEP 4 - RESULTS PAGE
   ============================================================ */

.recyclability-step4 {
  padding: 0;
}

.recyclability-step4 .step-title {
  color: var(--coral);
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 32px;
}

/* Your packaging section */
.your-packaging-section {
  margin-bottom: 32px;
}

.your-packaging-section h3 {
  color: var(--coral);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 16px;
}

.packaging-result-card {
  display: flex;
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid rgba(16, 159, 183, 0.2);
  padding: 24px;
  gap: 24px;
}

.packaging-result-left {
  display: flex;
  flex-direction: row !important;
  align-items: center;
  gap: 20px;
  flex: 1;
}

.packaging-result-card .packaging-icon {
  width: 64px;
  height: 64px;
  min-width: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 159, 183, 0.1);
  border-radius: 50%;
  color: var(--teal);
}

.packaging-result-card .packaging-icon svg {
  width: 36px;
  height: 36px;
}

.packaging-result-info {
  text-align: left;
}

.packaging-result-info h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--teal);
  margin: 0 0 8px;
}

.packaging-result-info p {
  margin: 4px 0;
  font-size: 14px;
  color: var(--text);
}

.packaging-result-info p strong {
  color: var(--teal);
}

/* Your results section */
.your-results-section {
  margin-bottom: 32px;
}

.your-results-section h3 {
  color: var(--coral);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 16px;
}

.results-card {
  display: flex;
  flex-direction: row !important;
  background: linear-gradient(135deg, #3d5a5a 0%, #4a6e6e 100%);
  padding: 32px;
  gap: 40px;
}

.results-left {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-width: 180px;
  flex-shrink: 0;
}

.results-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

/* Large RecyClass badge for results */
.recyclass-badge-large {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--teal);
  color: #fff;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.recyclass-badge-large::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
}

.recyclass-badge-large.class-a { background: var(--green); }
.recyclass-badge-large.class-b { background: #7cb342; }
.recyclass-badge-large.class-c { background: #fdd835; color: var(--text); }
.recyclass-badge-large.class-d { background: var(--orange); }
.recyclass-badge-large.class-nonrecyclable { background: var(--red); }

.recyclass-badge-large .recyclass-letter {
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
}

.recyclass-badge-large .recyclass-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
  text-align: center;
  margin-top: 4px;
  line-height: 1.3;
}

.recyclable-label {
  color: #fff;
  font-size: 16px;
  text-align: center;
  line-height: 1.4;
}

.recyclable-label strong {
  font-size: 28px;
  font-weight: 700;
  color: var(--coral);
  display: block;
  margin-top: 4px;
}

.thank-you-message {
  color: #fff;
  font-size: 20px;
  font-weight: 500;
  text-align: center;
  margin: 0;
}

.results-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 280px;
}

.results-actions .btn {
  width: 100%;
  text-align: center;
  padding: 14px 24px;
  font-size: 15px;
}

.results-actions .btn-secondary {
  background: var(--teal);
  color: #fff;
  border: none;
}

.results-actions .btn-secondary:hover {
  background: #0d8a9e;
}

/* Deductions section */
.deductions-section {
  margin-top: 32px;
}

.deductions-section h3 {
  color: var(--teal);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px;
}

.deductions-list {
  background: #fff;
  border: 1px solid rgba(16, 159, 183, 0.2);
  overflow: hidden;
}

.deduction-item {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(16, 159, 183, 0.1);
  font-size: 14px;
}

.deduction-item:last-child {
  border-bottom: none;
}

.deduction-item.is-disqualified {
  background: rgba(208, 71, 71, 0.08);
}

.deduction-component {
  flex: 0 0 180px;
  font-weight: 600;
  color: var(--teal);
}

.deduction-reason {
  flex: 1;
  color: var(--text);
}

.deduction-value {
  flex: 0 0 100px;
  text-align: right;
  font-weight: 600;
  color: var(--orange);
}

.deduction-item.is-disqualified .deduction-value {
  color: var(--red);
}

.deduction-total {
  display: flex;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(16, 159, 183, 0.08);
  font-weight: 600;
  font-size: 15px;
  color: var(--teal);
}

/* Responsive for results page */
@media (max-width: 900px) {
  .results-card {
    flex-direction: column;
    align-items: center;
  }
  
  .results-left {
    flex-direction: row;
    min-width: auto;
  }
  
  .packaging-result-card {
    flex-direction: column;
    text-align: center;
  }
  
  .packaging-result-left {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .deduction-item {
    flex-wrap: wrap;
  }
  
  .deduction-component {
    flex: 1 1 100%;
    margin-bottom: 4px;
  }
  
  .deduction-reason {
    flex: 1;
  }
  
  .deduction-value {
    flex: 0 0 auto;
  }
}

/* Country Tonnage Input */
.country-tonnage-input {
  display: flex;
  align-items: center;
  margin-top: 4px;
}

.country-tonnage-input label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.tonnage-input {
  width: 80px;
  padding: 4px 8px;
  border: 1px solid rgba(16, 159, 183, 0.3);
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  text-align: right;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tonnage-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(16, 159, 183, 0.15);
}

.tonnage-input:hover {
  border-color: var(--teal);
}

.tonnage-unit {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

/* Hide spinner buttons on number inputs */
.tonnage-input::-webkit-outer-spin-button,
.tonnage-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.tonnage-input[type=number] {
  -moz-appearance: textfield;
}

/* Feedback Floating Button */
.feedback-button {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #ec4899;
  color: #fff;
  border: none;
  border-radius: 0;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
  z-index: 9998;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.feedback-button:hover {
  background: #db2777;
  box-shadow: none;
  transform: translateY(-2px);
}

.feedback-button:active {
  transform: translateY(0);
}

/* Feedback Modal Overlay */
.feedback-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 58, 73, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.feedback-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.feedback-modal {
  background: var(--panel);
  padding: 40px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.feedback-overlay.is-open .feedback-modal {
  transform: scale(1);
}

.feedback-modal h2 {
  margin: 0 0 8px;
  font-size: 24px;
  color: var(--teal);
  font-weight: 600;
}

.feedback-modal p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.feedback-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feedback-form-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.feedback-form-group input,
.feedback-form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid rgba(16, 159, 183, 0.3);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s;
  background: #fff;
}

.feedback-form-group input:focus,
.feedback-form-group textarea:focus {
  outline: none;
  border-color: var(--teal);
}

.feedback-form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.feedback-form-group .auto-filled {
  background: var(--card);
  color: var(--muted);
  cursor: not-allowed;
}

.feedback-form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

.feedback-form-actions .btn {
  min-width: 100px;
}

.feedback-form-actions .btn-secondary {
  background: transparent;
  border: 2px solid var(--muted);
  color: var(--muted);
}

.feedback-form-actions .btn-secondary:hover {
  background: var(--muted);
  color: #fff;
}

.feedback-success {
  text-align: center;
  padding: 20px 0;
  color: var(--green);
  font-weight: 600;
  display: none;
}

.feedback-success.is-visible {
  display: block;
}

/* Beta Warning Floating Box */
.beta-warning-box {
  position: fixed;
  bottom: 24px;
  right: 180px;
  background: #ec4899;
  color: #fff;
  border: none;
  border-radius: 0;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 500;
  font-style: italic;
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.beta-warning-box:hover {
  background: #db2777;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .beta-warning-box {
    bottom: 70px;
    right: 16px;
    left: 16px;
    white-space: normal;
    font-size: 12px;
    padding: 10px 16px;
  }
  
  .feedback-button {
    bottom: 16px;
    right: 16px;
    padding: 12px 20px;
    font-size: 14px;
  }
  
  .feedback-modal {
    padding: 24px;
    max-height: 95vh;
  }
  
  .feedback-form-actions {
    flex-direction: column;
  }
  
  .feedback-form-actions .btn {
    width: 100%;
  }
}

