/* =============================================================================
   RENEWABLES MARKETPLACE — Deep Ocean Warm Glow Design System
   Plus Jakarta Sans (headings) + DM Sans (body)
   Palette: #0F2B3C dark, #1A6FA0 primary, #F97316 accent, #F8F6F1 bg
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@600;700;800&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  --color-dark: #0F2B3C;
  --color-dark-lighter: #163A50;
  --color-primary: #1A6FA0;
  --color-primary-hover: #155A82;
  --color-primary-light: #4FC3F7;
  --color-accent: #F97316;
  --color-accent-hover: #EA580C;
  --color-bg: #F8F6F1;
  --color-card-bg: #F8F6F1;
  --color-card-border: #D6D8CE;
  --color-success: #22C55E;
  --color-error: #DC2626;
  --color-text: #0F2B3C;
  --color-text-muted: #6B7A7E;
  --color-border: #DDE0D8;
  --color-border-light: #EBE9E3;
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: #333;
}

/* ===========================
   NAVBAR
   =========================== */
.navbar {
  background: var(--color-dark);
  padding: 0 20px;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
}


.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  height: 100%;
}

.nav-logo-img {
  height: 38px;
  width: auto;
}

.nav-cta {
  background: var(--color-accent);
  color: white;
  padding: 10px 22px;
  border-radius: 8px;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: background 0.2s;
  margin-left: auto;
}

.nav-cta:hover {
  background: #EA6A10;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: 48px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 8px 18px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.nav-link--active {
  color: white;
  background: rgba(255, 255, 255, 0.12);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 110;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===========================
   HERO
   =========================== */
.hero {
  background: var(--color-bg);
  padding: 80px 20px 72px;
  text-align: center;
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-left {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.18;
  color: var(--color-dark);
  margin-bottom: 16px;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
  text-align: center;
  max-width: 600px;
}

.accounts-intro {
  font-weight: 600;
  color: var(--color-dark);
  margin-top: 32px;
  text-align: center;
}

.tick-list {
  list-style: none;
  margin: 12px 0 36px;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tick-list li {
  font-size: 1rem;
  color: var(--color-text-muted);
  padding-left: 36px;
  position: relative;
}

.tick-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: -1px;
  font-weight: 700;
  color: var(--color-accent);
  font-size: 0.75rem;
  width: 24px;
  height: 24px;
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.tick-list li::after {
  display: none;
}

.hero-btn {
  display: inline-block;
  background: var(--color-accent);
  color: white;
  padding: 16px 36px;
  border-radius: 10px;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  margin-top: 8px;
  transition: background 0.2s, transform 0.15s;
}

.hero-btn:hover {
  background: #EA6A10;
  transform: translateY(-1px);
}

/* Energy Graphic (hidden in Tidal redesign — hero is centred) */
.hero-right {
  display: none;
}

/* ===========================
   ENERGY FLOW BANNER
   =========================== */
.energy-flow {
  overflow: hidden;
  background: var(--color-bg);
  padding: 10px 0;
}

.energy-flow__inner {
  display: flex;
  align-items: flex-end;
}

/* Icons: height = viewBox height (135) so strokes render at exactly 5px */
.energy-flow__icon svg {
  display: block;
  height: 135px;
  width: auto;
}

/* Horizontal line segments — extend to edges or fill connector gaps */
.energy-flow__line {
  flex: 1 1 0;
  min-width: 0;
  height: 5px;
  background: var(--color-dark);
  margin-bottom: 36.57px; /* (415-375.93)=39.07 minus 2.5 half-stroke = 36.57 */
}

/* Connectors between icons: line + bolt + line in a row */
.energy-flow__connector {
  flex: 1 1 0;
  min-width: 30px;
  display: flex;
  align-items: flex-end;
}

/* Bolt SVG: fixed size, overlaps adjacent lines for seamless join */
.energy-flow__bolt {
  flex: 0 0 auto;
  width: 36px;
  height: 39px;
  margin-left: -6px;
  margin-right: -6px;
  margin-bottom: 21px; /* line center at 39.07; bolt line at 18.07 from bottom; 39.07-18.07=21 */
}

/* ===========================
   ACCOUNTS FOR SECTION
   =========================== */
.accounts-for {
  background: var(--color-bg);
  text-align: left;
  padding: 24px 20px 40px;
}

.accounts-for-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.accounts-for-inner .tick-list {
  align-self: center;
}

/* ===========================
   TRUST STRIP
   =========================== */
.trust-strip {
  background: white;
  border-bottom: 1px solid #E5E7EB;
  padding: 20px;
  text-align: center;
}

.trust-strip-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.trust-item {
  font-size: 0.88rem;
  color: #666;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.trust-icon {
  display: flex;
  align-items: center;
  color: var(--color-primary);
}

.trust-icon svg {
  width: 20px;
  height: 20px;
}

/* ===========================
   HOW IT WORKS
   =========================== */
.how-it-works {
  padding: 80px 20px;
  text-align: center;
  background: var(--color-bg);
}

.how-it-works h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 50px;
}

.steps {
  display: flex;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.step {
  flex: 1;
  min-width: 220px;
  max-width: 270px;
  background: white;
  border-radius: 16px;
  padding: 32px 24px;
  border: 1px solid var(--color-card-border);
}

.guides-strip {
  padding: 48px 20px;
  text-align: center;
  background: white;
}

.guides-strip h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 20px;
}

.guides-links {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
}

.guides-links a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.guides-links a:hover {
  text-decoration: underline;
}

.step-icon {
  margin-bottom: 14px;
  display: flex;
  justify-content: center;
}

.step-icon svg {
  width: 48px;
  height: 48px;
}

.step h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--color-dark);
  margin-bottom: 8px;
  font-weight: 700;
}

.step p {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.6;
  text-align: center;
}

/* ===========================
   FORM (shared sidebar + general)
   =========================== */
.form-intro {
  color: #888;
  margin-bottom: 20px;
  font-size: 0.92rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 500;
  font-size: 0.95rem;
  color: #444;
}

input, select {
  padding: 12px 14px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  font-size: 16px;
  font-family: var(--font-body);
  width: 100%;
  background: white;
  transition: border-color 0.2s;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26, 111, 160, 0.1);
}

.field-error {
  font-size: 0.78rem;
  color: #DC2626;
  font-weight: 400;
}

.field-hint {
  font-size: 0.78rem;
  color: #888;
  font-weight: 400;
}

button[type="submit"] {
  background-color: var(--color-accent);
  color: white;
  padding: 16px;
  border: none;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.2s;
  min-height: 52px;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}

button[type="submit"]:hover {
  background-color: #EA6A10;
}

/* Battery section spacing */
.battery-section {
  margin-top: 8px;
  margin-bottom: 8px;
  padding: 16px 0;
}

/* Battery row with toggle switch */
.battery-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.battery-row label#battery-label {
  font-weight: 500;
  font-size: 0.95rem;
  color: #444;
  margin: 0;
}

/* On/off toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #D1D5DB;
  border-radius: 24px;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--color-primary);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* Battery group */
#battery-group {
  transition: opacity 0.2s;
}

#battery-group.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Usage toggle (segmented control for energy usage method) */
.usage-toggle-group {
  display: inline-flex;
  background: var(--color-border-light, #E8F0F5);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 20px;
  gap: 2px;
  flex-wrap: wrap;
}

.usage-toggle-btn {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-muted, #5A7A8A);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.usage-toggle-btn.active {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 1px 4px rgba(26, 111, 160, 0.3);
}

.usage-toggle-btn:hover:not(.active) {
  background: rgba(26, 111, 160, 0.1);
  color: var(--color-dark);
}

/* Section toggle (segmented control for orientation, battery, EV) */
.section-toggle-group {
  display: inline-flex;
  background: var(--color-border-light, #E8F0F5);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 16px;
  margin-top: 8px;
  gap: 2px;
  flex-wrap: wrap;
}

.section-toggle-btn {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-muted, #5A7A8A);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.section-toggle-btn.active {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 1px 4px rgba(26, 111, 160, 0.3);
}

.section-toggle-btn:hover:not(.active) {
  background: rgba(26, 111, 160, 0.1);
  color: var(--color-dark);
}

/* Expander sections (Heat Pump, EV) */
.expander {
  margin-top: 2px;
}

.expander-header {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 10px 14px;
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: #555;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.expander-header:hover {
  background: #F9FAFB;
  border-color: var(--color-primary);
}

.expander-header.open {
  border-color: var(--color-primary);
  color: var(--color-dark);
  border-radius: 8px 8px 0 0;
  border-bottom-color: #E5E7EB;
}

.expander-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-border-light, #E8F0F5);
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.expander-body {
  display: none;
  border: 1px solid #E5E7EB;
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 12px 14px;
}

.expander-body.open {
  display: block;
}

.expander-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 8px;
}

.expander-fields {
  transition: opacity 0.2s;
}

.expander-fields.disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ===========================
   SIDEBAR OVERLAY
   =========================== */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ===========================
   SIDEBAR PANEL
   =========================== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 420px;
  background: white;
  z-index: 201;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #E5E7EB;
  flex-shrink: 0;
}

.sidebar-header h2 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--color-dark);
  margin: 0;
}

.sidebar-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #999;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  width: auto;
  min-height: auto;
  transition: color 0.2s;
}

.sidebar-close:hover {
  color: #333;
  background: none;
}

.sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* ===========================
   LOADING OVERLAY
   =========================== */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(19, 78, 74, 0.6);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
}

.loading-card {
  background: white;
  border-radius: 16px;
  padding: 48px 40px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
}

.loading-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #E5E7EB;
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

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

.loading-text {
  font-size: 1.05rem;
  color: #333;
  font-weight: 500;
  transition: opacity 0.3s;
}

/* ===========================
   RESULTS
   =========================== */
#results {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

h2 {
  font-family: var(--font-heading);
  color: var(--color-dark);
  margin-bottom: 10px;
  font-size: 1.3rem;
}

hr {
  border: none;
  border-top: 1px solid #E5E7EB;
  margin: 20px 0;
}

.tariff-card {
  background: white;
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid #E5E7EB;
}

/* Cards as grid children: remove margin, use flex for equal height */
.split-grid > .tariff-card,
.split-grid > .carousel-active-wrap,
.split-grid > .carousel-active-wrap > .tariff-card {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.split-grid > .tariff-card > a:last-child,
.split-grid > .carousel-active-wrap > .tariff-card > a:last-child {
  margin-top: auto;
  align-self: flex-start;
}

.tariff-card h3,
.tariff-card h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-dark);
  margin-bottom: 4px;
}

.tariff-card .supplier {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 10px;
}

.tariff-card p {
  font-size: 0.92rem;
  color: #555;
  line-height: 1.6;
  text-align: left;
}

.tariff-card .export {
  font-size: 0.9rem;
  color: var(--color-primary);
  font-weight: 600;
  margin-top: 10px;
}

.tariff-card a {
  display: inline-block;
  margin-top: 14px;
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 4px 0;
}

.tariff-card a:hover {
  text-decoration: underline;
}

/* Tariff card — best match (badge only, no border — border is reserved for --selected) */
.tariff-card--best {
}

.tariff-badge {
  background: var(--color-primary);
  color: white;
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 8px;
}

.freshness-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  vertical-align: middle;
}

.freshness-live {
  background: #d4edda;
  color: #155724;
}

.freshness-stale {
  background: #fff3cd;
  color: #856404;
}

.tariff-card-body {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin: 10px 0;
}

.tariff-card-main {
  flex: 1;
  min-width: 0;
}

.tariff-card-cost {
  text-align: right;
  flex-shrink: 0;
}

/* Rate display — single flat rate */
.rate-headline-single {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-dark);
  line-height: 1.2;
}

.rate-unit {
  font-size: 0.65em;
  font-weight: 500;
  color: #888;
  margin-left: 2px;
}

/* Rate display — time-of-use bands */
.rate-headline-tou {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rate-band-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-dark);
}

.rate-band-window {
  font-size: 0.78rem;
  font-weight: 400;
  color: #888;
  min-width: 90px;
  font-variant-numeric: tabular-nums;
}

.rate-band-value {
  font-weight: 700;
}

/* Export rate line (bundled cards) */
.tariff-export-line {
  font-size: 0.82rem;
  color: var(--color-primary);
  font-weight: 600;
  margin-top: 6px;
}

/* Annual cost figure */
.annual-cost-figure {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-dark);
  white-space: nowrap;
}

.annual-cost-label {
  font-size: 0.72rem;
  color: #999;
  margin-top: 2px;
}

/* Export-specific colour overrides */
.tariff-rates-headline--export .rate-headline-single {
  color: var(--color-primary);
}

.tariff-rates-headline--export .rate-band-row {
  color: var(--color-primary);
}

.annual-cost-figure--export {
  color: var(--color-primary);
}

/* Extra cost comparison line */
.tariff-extra-cost {
  font-size: 0.78rem;
  color: #DC2626;
  font-weight: 600;
  margin-top: 8px;
}

/* Equipment note */
.tariff-equipment {
  font-size: 0.72rem;
  color: #b07d10;
  margin-top: 4px;
}

/* Cost breakdown tooltip */
.cost-info-wrap {
  position: relative;
  display: inline-block;
  vertical-align: middle;
}

.cost-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  cursor: pointer;
  line-height: 1;
  vertical-align: middle;
  margin-left: 4px;
}

.cost-tooltip {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 280px;
  background: white;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 50;
  text-align: left;
  font-size: 0.82rem;
  color: #333;
  line-height: 1.5;
}

.cost-tooltip strong {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--color-dark);
}

.tooltip-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
}

.tooltip-divider {
  display: block;
  height: 1px;
  background: #E5E7EB;
  margin: 6px 0;
}

.tooltip-total {
  font-weight: 700;
}

.tooltip-note {
  display: block;
  font-size: 0.72rem;
  color: #999;
  margin-top: 8px;
  line-height: 1.4;
}

/* Show tooltip on hover and focus */
.cost-info-icon:hover + .cost-tooltip,
.cost-info-icon:focus + .cost-tooltip,
.cost-info-wrap:focus-within .cost-tooltip {
  display: block;
}

/* ===========================
   VIEW TOGGLE (segmented control)
   =========================== */
.view-toggle-group {
  display: inline-flex;
  background: var(--color-border-light, #E8F0F5);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 16px;
  gap: 2px;
}

.view-toggle-btn {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-muted, #5A7A8A);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.view-toggle-btn.active {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 1px 4px rgba(26, 111, 160, 0.3);
}

.view-toggle-btn:hover:not(.active) {
  background: rgba(26, 111, 160, 0.1);
  color: var(--color-dark);
}

/* ===========================
   TARIFF-ONLY LIST (import/export single views)
   =========================== */
.tariff-only-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--color-dark);
  color: white;
  border-radius: 10px 10px 0 0;
  position: sticky;
  top: 73px;
  z-index: 10;
}
.tariff-only-heading h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  color: white;
}
.tariff-only-heading .combo-flow-icon {
  height: 34px;
  width: auto;
  opacity: 0.7;
  color: white;
  stroke: white;
}
.tariff-only-count {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.7;
  margin-left: auto;
}
.tariff-only-grid {
  border: 2px solid var(--color-border);
  border-top: none;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
}
.tariff-only-card {
  display: grid;
  grid-template-columns: 40px 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border-light);
  position: relative;
}
.tariff-only-card:last-child {
  border-bottom: none;
}
.tariff-only-card--best {
  border-left: 4px solid var(--color-accent);
}
.tariff-only-card--odd {
  background: white;
}
.tariff-only-card--even {
  background: var(--color-bg);
}
.tariff-only-rank {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-align: center;
}
.tariff-only-card--best .tariff-only-rank {
  color: var(--color-accent);
}
.tariff-only-main {
  min-width: 0;
}
.tariff-only-main h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 2px;
  color: var(--color-text);
}
.tariff-only-main .supplier {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}
.tariff-only-cost {
  text-align: right;
  white-space: nowrap;
}
.tariff-only-action {
  text-align: right;
}
.tariff-only-link {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
}
.tariff-only-link:hover {
  text-decoration: underline;
}

/* Companion / requirement note on tariff cards */
.tariff-companion-note {
  display: flex;
  align-items: flex-start;
  gap: 2px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  line-height: 1.4;
  padding: 6px 10px;
  border-radius: 6px;
  margin-top: 6px;
}
.tariff-companion-note--info {
  background: rgba(45, 212, 191, 0.1);
  color: var(--color-dark);
  border: 1px solid rgba(45, 212, 191, 0.25);
}
.tariff-companion-note--required {
  background: rgba(249, 115, 22, 0.08);
  color: var(--color-text);
  border: 1px solid rgba(249, 115, 22, 0.2);
}

/* ===========================
   SUMMARY — CHART LEFT, STATS RIGHT
   =========================== */
.summary-layout {
  display: flex;
  gap: 20px;
  align-items: center;
}
.summary-chart {
  flex: 3;
  min-width: 0;
}
.summary-metrics {
  flex: 1;
  min-width: 120px;
  max-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.summary-stat {
  text-align: center;
  padding: 6px 8px;
  background: white;
  border-radius: 8px;
  border: 1px solid var(--color-border-light);
}
.summary-stat__value {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.summary-stat__label {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  line-height: 1.3;
}

/* ===========================
   STICKY COLUMN HEADINGS
   =========================== */
.split-headings {
  display: grid;
  grid-template-columns: 1fr 1fr 40px;
  gap: 24px;
  position: sticky;
  top: 73px;
  z-index: 10;
  background: var(--color-bg);
  padding: 4px 0 6px;
  margin: 0;
  border-bottom: 1px solid var(--color-border-light);
}
.split-headings--with-panel {
  grid-template-columns: 1fr 1fr 40px 280px;
}
.split-grid-heading {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-dark);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.3;
}
.split-grid-heading--import { color: var(--color-dark); }
.split-grid-heading--export { color: var(--color-primary); }
.split-grid-heading__text {
  display: flex;
  flex-direction: column;
}
.split-grid-heading__count {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--color-text-muted);
  line-height: 1.4;
}
.split-grid-heading-mobile { display: none; }

/* ===========================
   SPLIT GRID LAYOUT
   =========================== */
.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 40px;
  gap: 16px 24px;
  align-items: stretch;
}

.split-grid > .tariff-card,
.split-grid > .carousel-active-wrap,
.split-grid > .carousel-arrows-col,
.split-grid > div:not(.selection-panel):not(.tariff-card):not(.carousel-active-wrap):not(.carousel-arrows-col) {
  min-width: 0;
}

.split-grid > .selection-panel {
  grid-column: 4;
  grid-row: 1 / span 100;
}

.split-grid--with-panel {
  grid-template-columns: 1fr 1fr 40px 280px;
}

/* Export carousel — overlay arrows on card */
.carousel-active-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
}

.carousel-active-wrap .tariff-card {
  flex: 1;
}

.carousel-active-wrap[data-carousel-dir="next"] .tariff-card {
  animation: carousel-slide-down 0.25s ease-out;
}

.carousel-active-wrap[data-carousel-dir="prev"] .tariff-card {
  animation: carousel-slide-up 0.25s ease-out;
}

@keyframes carousel-slide-down {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes carousel-slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Carousel arrows column — between export card and selection panel */
.carousel-arrows-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.carousel-arrow {
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 0.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  transition: opacity 0.2s, background 0.2s, transform 0.1s;
}

.carousel-arrow:hover:not(:disabled) {
  opacity: 1;
  background: var(--color-primary-hover, #155A82);
  transform: scale(1.1);
}

.carousel-arrow:disabled {
  opacity: 0.15;
  cursor: not-allowed;
}

.single-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.single-grid--with-panel {
  grid-template-columns: 1fr 280px;
}

/* Expanded results container when panel is visible */
#results.results-expanded {
  max-width: 1200px;
}

/* ===========================
   TARIFF CARD — SELECTION
   =========================== */
.tariff-card--selectable {
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.1s;
}

.tariff-card--selectable:hover {
  border-color: var(--color-primary-light, #4FC3F7);
  box-shadow: 0 4px 16px rgba(26, 111, 160, 0.08);
}

.tariff-card--selected {
  border: 2px solid var(--color-primary);
  box-shadow: 0 4px 16px rgba(26, 111, 160, 0.12);
}

.tariff-card--selected::after {
  content: "\2713";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tariff-card--selectable {
  position: relative;
}

.tariff-card--locked {
  border: 2px solid var(--color-border, #D4E6EF);
  opacity: 0.7;
  cursor: not-allowed;
}

.tariff-card--locked::after {
  content: "\1F512";
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.85rem;
}

.lock-message {
  font-size: 0.75rem;
  color: var(--color-text-muted, #5A7A8A);
  font-style: italic;
  margin-top: 6px;
  padding: 6px 10px;
  background: var(--color-bg);
  border-radius: 6px;
}

.tariff-card--disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.tariff-card--disabled a {
  opacity: 1;
}

.combo-hint {
  font-size: 0.72rem;
  color: var(--color-text-muted, #5A7A8A);
  margin-top: 4px;
  font-style: italic;
}

/* ===========================
   SELECTION PANEL (third column)
   =========================== */
.selection-panel {
  position: sticky;
  top: 80px;
  align-self: start;
}

.selection-panel-inner {
  background: white;
  border: 2px solid var(--color-primary);
  border-radius: 12px;
  padding: 20px;
}

.selection-panel-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-dark);
  margin: 0 0 16px;
}

.selection-section {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-border, #D4E6EF);
}

.selection-section:last-of-type {
  border-bottom: none;
}

.selection-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted, #5A7A8A);
  margin-bottom: 4px;
}

.selection-tariff-name {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-dark);
}

.selection-tariff-cost {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-top: 2px;
}

.selection-tariff-cost--export {
  color: var(--color-primary);
}

.selection-prompt {
  font-size: 0.82rem;
  color: var(--color-text-muted, #5A7A8A);
  font-style: italic;
}

.selection-net {
  background: var(--color-bg);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 14px;
  text-align: center;
}

.selection-net-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted, #5A7A8A);
  margin-bottom: 4px;
}

.selection-net-value {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-dark);
}

.selection-lock-note {
  font-size: 0.72rem;
  color: var(--color-text-muted, #5A7A8A);
  font-style: italic;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.selection-cta {
  display: block;
  width: 100%;
  background: var(--color-accent);
  color: white;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
  text-align: center;
}

.selection-cta:hover {
  background: var(--color-accent-hover, #EA580C);
}

.rank-badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-align: center;
  margin-bottom: 14px;
  background: var(--color-border-light, #E8F0F5);
  color: var(--color-text-muted, #5A7A8A);
}

.rank-badge--best {
  background: var(--color-primary);
  color: white;
}

.export-tooltip {
  position: fixed;
  z-index: 1000;
  background: var(--color-dark, #0F2B3C);
  color: white;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  max-width: 260px;
  line-height: 1.4;
  white-space: normal;
}

@media (hover: none) {
  .export-tooltip {
    display: none !important;
  }
}

.selection-requirement {
  font-size: 0.72rem;
  color: var(--color-accent);
  font-weight: 600;
  margin-top: 4px;
}

/* ===========================
   COMBO STICKY HEADINGS
   =========================== */
.combo-headings {
  display: grid;
  grid-template-columns: 40px 1fr 1fr 1fr;
  gap: 20px;
  position: sticky;
  top: 73px;
  z-index: 10;
  background: var(--color-bg);
  padding: 8px 20px 6px;
  margin: 0;
  border-bottom: 1px solid var(--color-border-light);
}

.combo-heading-spacer {
  /* Empty spacer to align with row numbers */
}

.combo-heading {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-dark);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.3;
}

.combo-heading--import { color: var(--color-dark); }
.combo-heading--export { color: var(--color-primary); }

.combo-heading--summary {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.combo-flow-icon {
  height: 40px;
  width: auto;
  flex-shrink: 0;
  color: var(--color-text-muted);
  opacity: 0.7;
}

.combo-heading__text {
  display: flex;
  flex-direction: column;
}

.combo-heading__count {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* ===========================
   COMBO GRID (all valid combinations)
   =========================== */
.combo-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.combo-row {
  display: grid;
  grid-template-columns: 40px 1fr 1fr 1fr;
  gap: 20px;
  padding: 20px;
  align-items: stretch;
  border-bottom: 1px solid var(--color-border, #D4E6EF);
}

.combo-row--best {
  border-left: 4px solid var(--color-accent, #F97316);
  background: white;
}

.combo-row--odd:not(.combo-row--best) {
  background: white;
}

.combo-row--even {
  background: var(--color-border-light, #F0F7FB);
}

.combo-rank-num {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-muted, #5A7A8A);
  display: flex;
  align-items: center;
  justify-content: center;
}

.combo-row--best .combo-rank-num {
  color: var(--color-accent, #F97316);
}

.combo-cell {
  display: flex;
  flex-direction: column;
  position: relative;
}

.combo-cell h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-dark, #0F2B3C);
  margin: 0 0 4px;
}

.combo-cell .supplier {
  font-size: 0.78rem;
  color: var(--color-text-muted, #5A7A8A);
  margin-bottom: 12px;
}

.combo-card-cost {
  margin-top: auto;
  margin-bottom: 12px;
}

.combo-card-cost .annual-cost-figure {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-dark, #0F2B3C);
}

.combo-card-cost .annual-cost-figure--export {
  color: var(--color-primary, #1A6FA0);
}

.combo-card-cost .annual-cost-label {
  font-size: 0.72rem;
  color: var(--color-text-muted, #5A7A8A);
}

.combo-cell a {
  font-size: 0.82rem;
  color: var(--color-primary, #1A6FA0);
  text-decoration: none;
  font-weight: 600;
}

.combo-cell a:hover {
  text-decoration: underline;
}

.combo-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  padding: 12px 8px;
}

.combo-net-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted, #5A7A8A);
  margin-bottom: 4px;
}

.combo-net-value {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-dark, #0F2B3C);
  margin-bottom: 4px;
}

.combo-breakdown {
  font-size: 0.75rem;
  color: var(--color-text-muted, #5A7A8A);
  margin-bottom: 16px;
}

.combo-analyse-btn {
  display: inline-block;
  background: var(--color-primary, #1A6FA0);
  color: white;
  border: none;
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  font-family: var(--font-body);
}

.combo-analyse-btn:hover {
  background: var(--color-dark, #0F2B3C);
}

/* ===========================
   COMBO PAGINATION
   =========================== */
.combo-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 20px 0;
  flex-wrap: wrap;
}

.combo-page-btn {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border: 1px solid var(--color-border, #D4E6EF);
  border-radius: 8px;
  background: white;
  color: var(--color-dark, #0F2B3C);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.combo-page-btn:hover:not(.combo-page-btn--disabled):not(.combo-page-btn--active) {
  background: var(--color-border-light, #F0F7FB);
  border-color: var(--color-primary, #1A6FA0);
}

.combo-page-btn--active {
  background: var(--color-primary, #1A6FA0);
  color: white;
  border-color: var(--color-primary, #1A6FA0);
}

.combo-page-btn--disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===========================
   ANALYSIS PAGE
   =========================== */
.analysis-section {
  margin-bottom: 28px;
}

.analysis-section h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-dark, #0F2B3C);
  margin: 0 0 12px;
}

.analysis-note {
  font-size: 0.82rem;
  color: var(--color-text-muted, #5A7A8A);
  line-height: 1.6;
}

.analysis-chart-note {
  font-size: 0.68rem;
  color: var(--color-text-muted, #5A7A8A);
  margin-top: 6px;
  text-align: center;
  opacity: 0.6;
}

/* Side-by-side charts (energy profile + battery SOC) */
.analysis-charts-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.analysis-chart-col {
  flex: 1;
  min-width: 0;
}

.analysis-stacked-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
}

.analysis-chart-title {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-dark, #0F2B3C);
  margin: 0 0 8px;
}

/* Month dropdown */
.analysis-profile-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 12px;
  flex-wrap: wrap;
}

.analysis-profile-header h3 {
  margin: 0;
}

.month-select {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-primary, #1A6FA0);
  background: var(--color-border-light, #F0F7FB);
  border: 1px solid var(--color-border, #D4E6EF);
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
  width: auto;
}

.month-select:hover,
.month-select:focus {
  border-color: var(--color-primary, #1A6FA0);
}

.analysis-net-summary {
  background: white;
  border: 2px solid var(--color-primary, #1A6FA0);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  margin-bottom: 28px;
}

.analysis-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.analysis-detail-card {
  background: white;
  border: 1px solid var(--color-border, #D4E6EF);
  border-radius: 12px;
  padding: 20px;
}

.analysis-detail-card h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-dark, #0F2B3C);
  margin: 0 0 4px;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 12px;
}

.detail-table td {
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border-light, #F0F7FB);
}

.detail-table td:first-child {
  color: var(--color-text-muted, #5A7A8A);
}

.detail-table td:last-child {
  text-align: right;
  font-weight: 600;
  color: var(--color-dark, #0F2B3C);
}

/* ===========================
   FOOTER
   =========================== */
footer {
  background: var(--color-dark);
  color: white;
  text-align: center;
  padding: 36px 20px;
  font-size: 0.88rem;
}

footer p {
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  margin: 0;
}

.footer-legal {
  margin-top: 12px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-legal a:hover {
  color: white;
}

/* ===========================
   LEGAL PAGES
   =========================== */
.legal-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

.legal-container h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--color-dark);
  font-size: 2rem;
  margin-bottom: 0.35rem;
}

.legal-container .last-updated {
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
}

.legal-container h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-primary);
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}

.legal-container p {
  margin-bottom: 1rem;
  color: #444;
  line-height: 1.7;
}

.legal-container a {
  color: var(--color-primary);
}

.legal-callout {
  background: white;
  border-left: 4px solid var(--color-accent);
  padding: 1.2rem 1.4rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.legal-callout p {
  margin-bottom: 0;
  font-weight: 500;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.95rem;
}

.legal-table th,
.legal-table td {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid #E5E7EB;
}

.legal-table th {
  background: var(--color-dark);
  color: white;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.legal-table tr:nth-child(even) td {
  background: rgba(26, 111, 160, 0.04);
}

.back-link {
  display: inline-block;
  margin-top: 2.5rem;
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 2px;
}

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

/* ===========================
   CONTRACT TYPE BADGES
   =========================== */
.contract-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  line-height: 1.4;
  white-space: nowrap;
}

.combo-cell > .contract-badge {
  position: absolute;
  top: 0;
  right: 0;
}

.contract-fixed {
  background: rgba(26, 111, 160, 0.1);
  color: var(--color-primary, #1A6FA0);
  border: 1px solid rgba(26, 111, 160, 0.25);
}

.contract-variable {
  background: rgba(249, 115, 22, 0.08);
  color: #B45309;
  border: 1px solid rgba(249, 115, 22, 0.25);
}

.contract-dynamic {
  background: rgba(168, 85, 247, 0.08);
  color: #7C3AED;
  border: 1px solid rgba(168, 85, 247, 0.25);
}

/* ===========================
   CONTRACT NOTES (below cost)
   =========================== */
.contract-note {
  font-size: 0.75rem;
  line-height: 1.3;
  margin-top: 8px;
}

.contract-note--fixed {
  color: var(--color-primary, #1A6FA0);
}

.contract-note--variable {
  color: #B45309;
}

.contract-note--dynamic {
  color: #7C3AED;
}

/* ===========================
   IMPORTANT INFORMATION SECTION
   =========================== */

.good-to-know {
  background: white;
  border: 1px solid var(--color-border, #D4E6EF);
  border-radius: 12px;
  padding: 20px 24px;
}

.good-to-know__group {
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border-light, #E8F0F5);
}

.good-to-know__group:first-of-type {
  padding-top: 0;
}

.good-to-know__group:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.good-to-know__subheading {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-dark, #0F2B3C);
  margin-bottom: 8px;
}

.good-to-know__list {
  margin: 0;
  padding-left: 20px;
  list-style: disc;
}

.good-to-know__list li {
  font-size: 0.85rem;
  color: var(--color-text, #0F2B3C);
  line-height: 1.6;
  margin-bottom: 4px;
}

.good-to-know__list li:last-child {
  margin-bottom: 0;
}

/* ===========================
   PRICE CAP FORECAST PANEL
   =========================== */
.cap-forecast-panel {
  background: white;
  border: 1px solid var(--color-border, #D4E6EF);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
}

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

.cap-forecast-header h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-dark, #0F2B3C);
  margin: 0;
}

.cap-forecast-rec {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

.cap-rec--fixed {
  background: rgba(26, 111, 160, 0.1);
  color: var(--color-primary, #1A6FA0);
}

.cap-rec--variable {
  background: rgba(249, 115, 22, 0.1);
  color: #B45309;
}

.cap-rec--neutral {
  background: var(--color-border-light, #E8F0F5);
  color: var(--color-text-muted, #5A7A8A);
}

.cap-quarters-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.cap-quarter {
  flex: 1;
  min-width: 100px;
  background: var(--color-border-light, #F0F7FB);
  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
}

.cap-quarter--current {
  border: 2px solid var(--color-primary, #1A6FA0);
}

.cap-quarter__label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-dark, #0F2B3C);
  margin-bottom: 2px;
}

.cap-quarter__value {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-dark, #0F2B3C);
}

.cap-quarter__tag {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-primary, #1A6FA0);
  margin-top: 2px;
}

.cap-quarter__dir {
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 2px;
}

.cap-dir--falling {
  color: var(--color-primary, #1A6FA0);
}

.cap-dir--rising {
  color: #DC2626;
}

.cap-dir--stable {
  color: var(--color-text-muted, #5A7A8A);
}

.cap-forecast-intro {
  font-size: 0.85rem;
  color: var(--color-text-muted, #5A7A8A);
  line-height: 1.6;
  margin: 0 0 16px;
}

.cap-forecast-text {
  font-size: 0.85rem;
  color: var(--color-text, #0F2B3C);
  line-height: 1.6;
  margin: 0 0 12px;
}

.cap-forecast-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.cap-forecast-footer a {
  font-size: 0.78rem;
  color: var(--color-primary, #1A6FA0);
  font-weight: 600;
  text-decoration: none;
}

.cap-forecast-footer a:hover {
  text-decoration: underline;
}

.cap-forecast-updated {
  font-size: 0.72rem;
  color: var(--color-text-muted, #5A7A8A);
}

/* ===========================
   ADVANCED SEARCH PAGE
   =========================== */
.advanced-page {
  min-height: calc(100vh - 64px - 120px);
  padding: 40px 20px 60px;
  background: var(--color-bg);
}

.advanced-container {
  max-width: 640px;
  margin: 0 auto;
}

.advanced-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: 8px;
}

.advanced-intro {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  margin-bottom: 32px;
  line-height: 1.5;
}

.advanced-fieldset {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 24px 20px;
  margin-bottom: 24px;
  background: white;
}

.advanced-fieldset legend {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-dark);
  padding: 0 8px;
}

.fieldset-intro {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-bottom: 16px;
  line-height: 1.4;
}

.conditional-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
}

.or-divider::before,
.or-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.or-divider span {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input.greyed,
input.greyed:focus {
  background: #F5F5F5;
  color: #999;
}

/* Advanced search link in sidebar */
.advanced-search-link {
  display: block;
  text-align: center;
  color: var(--color-primary);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 0;
  margin-top: -4px;
  transition: color 0.2s;
}

.advanced-search-link:hover {
  color: var(--color-dark);
  text-decoration: underline;
}

/* ===========================
   MOBILE — up to 768px
   =========================== */
@media (max-width: 768px) {

  /* Navbar */
  .navbar {
    height: 56px;
  }

  .nav-logo-img {
    height: 32px;
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--color-dark);
    flex-direction: column;
    padding: 16px 20px 24px;
    gap: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 105;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: 8px;
  }

  .nav-links .nav-cta {
    margin-left: 0;
    margin-top: 8px;
    padding: 12px 16px;
    font-size: 0.95rem;
    text-align: center;
  }

  /* Hero */
  .hero {
    padding: 52px 20px 48px;
  }

  .hero h1 {
    font-size: 1.8rem;
    line-height: 1.22;
  }

  .hero-sub {
    font-size: 0.97rem;
  }

  .hero-btn {
    padding: 14px 28px;
    font-size: 1rem;
  }

  /* Energy flow banner — scaled to 100/135 = 0.741 */
  .energy-flow__icon svg {
    height: 100px;
  }

  .energy-flow__line {
    height: 3.7px;
    margin-bottom: 27.1px; /* 36.57 × 0.741 */
  }

  .energy-flow__bolt {
    width: 27px;
    height: 29px;
    margin-bottom: 15.6px; /* 21 × 0.741 */
  }

  .energy-flow__connector {
    min-width: 20px;
  }

  /* Trust strip */
  .trust-strip-inner {
    gap: 20px;
  }

  .trust-item {
    font-size: 0.82rem;
  }

  /* How it works */
  .how-it-works {
    padding: 52px 20px;
  }

  .steps {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .step {
    max-width: 100%;
    min-width: unset;
    width: 100%;
    padding: 24px 20px;
  }

  /* Sidebar — full screen on mobile */
  .sidebar {
    width: 100%;
  }

  /* Advanced search page */
  .advanced-page {
    padding: 24px 16px 40px;
  }

  .advanced-fieldset {
    padding: 20px 16px;
  }

  .advanced-title {
    font-size: 1.5rem;
  }

  /* Results */
  #results {
    padding: 0 16px 60px;
  }

  .tariff-card {
    padding: 18px 16px;
  }

  /* Tariff card — stack on mobile */
  .tariff-card-body {
    flex-direction: column;
    gap: 10px;
  }

  .tariff-card-cost {
    text-align: left;
  }

  /* Tooltip — reposition for mobile */
  .cost-tooltip {
    right: auto;
    left: 0;
    width: min(280px, calc(100vw - 60px));
  }

  /* Toggle — scrollable on mobile */
  .view-toggle-group {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  .view-toggle-btn {
    font-size: 0.78rem;
    padding: 7px 12px;
  }

  /* Tariff-only cards — stack on mobile */
  .tariff-only-card {
    grid-template-columns: 32px 1fr;
    grid-template-rows: auto auto;
    gap: 8px 12px;
  }
  .tariff-only-rank {
    grid-row: 1 / 3;
    align-self: start;
    padding-top: 4px;
  }
  .tariff-only-main {
    grid-column: 2;
  }
  .tariff-only-cost {
    grid-column: 2;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .tariff-only-action {
    grid-column: 2;
  }

  /* Summary — stack on mobile */
  .summary-layout { flex-direction: column; }
  .summary-chart { width: 100%; }
  .summary-metrics { width: 100%; max-width: none; flex-direction: row; flex-wrap: wrap; }
  .summary-stat { flex: 1; min-width: 80px; }

  /* Sticky headings — hide on mobile, show inline mobile headings */
  .split-headings, .split-headings--with-panel { display: none; }
  .split-grid-heading-mobile {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    padding: 12px 0 4px;
  }

  /* Split grid — stack on mobile */
  .split-grid,
  .split-grid--with-panel {
    grid-template-columns: 1fr;
  }

  .split-grid > .selection-panel {
    grid-column: 1;
    grid-row: auto;
  }

  .split-grid > .tariff-card {
    display: block;
  }

  /* On mobile, group import cards first, then export cards */
  .split-grid > .split-grid-heading-mobile:first-of-type { order: 1; }
  .split-grid > .tariff-card[data-column="import"] { order: 2; }
  .split-grid > .split-grid-heading-mobile:last-of-type { order: 3; }
  .split-grid > .tariff-card[data-column="export"],
  .split-grid > .carousel-active-wrap { order: 4; }
  .split-grid > .carousel-arrows-col { order: 4; }

  /* Hide empty placeholder divs on mobile */
  .split-grid > div:empty { display: none; }

  /* Carousel — larger touch targets on mobile */
  .carousel-arrow {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .carousel-arrows-col {
    flex-direction: row;
    justify-content: center;
    gap: 16px;
  }

  .single-grid--with-panel {
    grid-template-columns: 1fr;
  }

  /* Selection panel — fixed bottom on mobile */
  .selection-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    z-index: 50;
    padding: 0 12px 12px;
  }

  .selection-panel-inner {
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
    padding: 16px;
    max-height: 45vh;
    overflow-y: auto;
  }

  /* Add bottom padding to results for fixed panel */
  #results.results-expanded {
    max-width: 900px;
    padding-bottom: 200px;
  }

  /* Forecast panel mobile */
  .cap-forecast-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .cap-quarters-row {
    gap: 8px;
  }

  .cap-quarter {
    min-width: 80px;
    padding: 8px;
  }

  .cap-quarter__value {
    font-size: 0.82rem;
  }

  .cap-forecast-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  /* Combo headings mobile */
  .combo-headings {
    display: none;
  }

  /* Combo grid mobile */
  .combo-row {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }

  .combo-rank-num {
    justify-content: flex-start;
    font-size: 0.9rem;
  }

  .combo-row--best {
    border-left: 3px solid var(--color-accent, #F97316);
  }

  .combo-summary {
    padding: 16px 0 4px;
    border-top: 1px solid var(--color-border, #D4E6EF);
  }

  /* Analysis page mobile */
  .analysis-details-grid {
    grid-template-columns: 1fr;
  }

  /* Charts — stack on mobile */
  .analysis-charts-row {
    flex-direction: column;
  }


  /* Strategy toggle mobile */
  .strategy-toggle {
    flex-direction: column;
    gap: 4px;
  }

  .strategy-pill {
    flex-direction: row;
    justify-content: space-between;
    padding: 10px 14px;
  }

  .strategy-pill__bottom {
    margin-left: auto;
  }
}

/* ===========================
   STRATEGY TOGGLE
   =========================== */
.strategy-toggle-wrap {
  background: white;
  border: 1px solid var(--color-border, #D4E6EF);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 28px;
}

.strategy-toggle {
  display: flex;
  gap: 6px;
  background: var(--color-border-light, #E8F0F5);
  border-radius: 10px;
  padding: 4px;
}

.strategy-pill {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-muted, #5A7A8A);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  position: relative;
}

.strategy-pill--active {
  background: var(--color-primary, #1A6FA0);
  color: white;
  box-shadow: 0 1px 6px rgba(26, 111, 160, 0.3);
}

.strategy-pill:hover:not(.strategy-pill--active) {
  background: rgba(26, 111, 160, 0.1);
  color: var(--color-dark);
}

.strategy-pill__label {
  font-weight: 700;
  font-size: 0.8rem;
}

.strategy-pill__bottom {
  display: flex;
  align-items: center;
  gap: 6px;
}

.strategy-pill__cost {
  font-size: 0.72rem;
  opacity: 0.8;
}

.strategy-best-badge {
  display: inline-block;
  background: var(--color-accent, #F97316);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.strategy-pill--active .strategy-best-badge {
  background: white;
  color: var(--color-accent, #F97316);
}

.strategy-desc {
  font-size: 0.82rem;
  color: var(--color-text-muted, #5A7A8A);
  margin: 12px 0 0;
  text-align: center;
  line-height: 1.5;
}

/* ===========================
   LEARN PAGE
   =========================== */
.learn-page {
  display: flex;
  max-width: 1100px;
  margin: 0 auto;
  min-height: calc(100vh - 64px - 120px);
}

.learn-sidebar {
  width: 260px;
  flex-shrink: 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  padding: 32px 0 32px 20px;
  border-right: 1px solid var(--color-border);
}

.learn-sidebar-nav {
  list-style: none;
  position: relative;
  padding-left: 20px;
  border-left: 2px solid var(--color-border);
}

.learn-sidebar-nav li {
  margin-bottom: 4px;
}

.learn-sidebar-nav a {
  display: block;
  padding: 8px 12px;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  line-height: 1.4;
}

.learn-sidebar-nav a:hover {
  color: var(--color-dark);
  background: var(--color-border-light);
}

.learn-sidebar-nav a.active {
  color: var(--color-primary);
  background: rgba(26, 111, 160, 0.08);
  font-weight: 600;
  position: relative;
}

.learn-sidebar-nav a.active::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 24px;
  background: var(--color-primary);
  border-radius: 2px;
}

.learn-content {
  flex: 1;
  padding: 40px 40px 80px;
  min-width: 0;
}

.learn-content--full {
  max-width: 760px;
  margin: 0 auto;
}

.learn-hero {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--color-border);
}

.learn-hero h1 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: 12px;
  line-height: 1.2;
}

.learn-hero .learn-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 600px;
}

.learn-section {
  margin-bottom: 56px;
  scroll-margin-top: 80px;
}

.learn-section h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 20px;
  line-height: 1.3;
}

.learn-section h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-dark);
  margin: 28px 0 12px;
}

.learn-section p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text);
  margin-bottom: 16px;
}

.learn-section ul,
.learn-section ol {
  margin: 0 0 16px 20px;
  line-height: 1.75;
  color: var(--color-text);
}

.learn-section li {
  margin-bottom: 8px;
}

.learn-callout {
  background: var(--color-card-bg);
  border: 1px solid var(--color-card-border);
  border-left: 4px solid var(--color-primary);
  border-radius: 8px;
  padding: 20px 24px;
  margin: 24px 0;
}

.learn-callout p {
  margin-bottom: 0;
}

.learn-callout strong {
  color: var(--color-dark);
}

.learn-callout--tip {
  border-left-color: var(--color-accent);
}

.learn-cta-box {
  background: var(--color-dark);
  color: white;
  border-radius: 12px;
  padding: 32px;
  margin: 40px 0;
  text-align: center;
}

.learn-cta-box h3 {
  color: white;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin: 0 0 8px;
}

.learn-cta-box p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 20px;
}

.learn-cta-box .hero-btn {
  display: inline-block;
}

.learn-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 48px 0;
}

/* Learn page mobile */
@media (max-width: 768px) {
  .learn-sidebar {
    display: none;
  }

  .learn-content {
    padding: 24px 20px 60px;
  }

  .learn-hero h1 {
    font-size: 1.7rem;
  }

  .learn-section h2 {
    font-size: 1.35rem;
  }
}

/* Learn page — tablet sidebar */
@media (min-width: 769px) and (max-width: 1024px) {
  .learn-sidebar {
    width: 220px;
  }

  .learn-content {
    padding: 32px 28px 80px;
  }
}

/* ===========================
   SMALL PHONES — up to 390px
   =========================== */
@media (max-width: 390px) {

  .hero h1 {
    font-size: 1.5rem;
  }

  /* Energy flow — scaled to 76/135 = 0.563 */
  .energy-flow__icon svg {
    height: 76px;
  }

  .energy-flow__line {
    height: 2.8px;
    margin-bottom: 20.6px; /* 36.57 × 0.563 */
  }

  .energy-flow__bolt {
    width: 20px;
    height: 22px;
    margin-bottom: 11.8px; /* 21 × 0.563 */
  }

  .energy-flow__connector {
    min-width: 14px;
  }
}

/* ==========================================================================
   CSV Upload Zone (Advanced Search — Upload Data panel)
   ========================================================================== */

.csv-upload-zone {
  border: 2px dashed var(--color-border);
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  transition: border-color 0.2s, background-color 0.2s;
  cursor: pointer;
  margin-top: 8px;
}

.csv-upload-zone:hover {
  border-color: var(--color-primary);
}

.csv-upload-zone--dragover {
  border-color: var(--color-primary);
  background: rgba(26, 111, 160, 0.05);
}

.csv-upload-icon {
  color: var(--color-primary);
  margin-bottom: 8px;
}

.csv-upload-text {
  font-size: 0.95rem;
  color: var(--color-text-secondary, #555);
  margin: 0 0 6px;
}

.csv-upload-link {
  color: var(--color-primary);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
}

.csv-upload-success {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #E8F8E8;
  border-radius: 8px;
  border: 1px solid #A8D8A8;
  margin-top: 8px;
}

.csv-success-icon {
  color: #2E7D32;
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
}

.csv-upload-success strong {
  font-size: 0.9rem;
  display: block;
}

.csv-remove-btn {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #999;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  flex-shrink: 0;
}

.csv-remove-btn:hover {
  color: #333;
}

#csv-upload-error .field-error {
  margin-top: 8px;
}
