:root {
  --brand-green: #00bfa6;
  --brand-green-dark: #009f8c;
  --brand-dark: #0b2a3b;
  --brand-dark-transparent: rgba(11, 42, 59, 0.85);
  --accent-blue: #1d4a6e;
  --text-primary: #1e2a33;
  --text-secondary: #4c5a65;
  --text-muted: #6c7a84;
  --bg-light: #f5f7f9;
  --bg-lighter: #ffffff;
  --border-color: rgba(15, 45, 65, 0.08);
  --shadow-soft: 0 10px 30px rgba(15, 45, 65, 0.1);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  scroll-behavior: smooth;
}

/*
 * Video section styles
 *
 * The privacy page now includes an optional AI‑generated video showcase. These
 * rules provide responsive spacing and ensure the video scales nicely on
 * different devices. The light background distinguishes the section from
 * surrounding content without clashing with existing colour themes.
 */
.video-section {
  padding: 4rem 1rem;
  background-color: #f8f9fa;
  text-align: center;
}

.video-section .section-intro {
  max-width: 800px;
  margin: 0 auto;
}

.sora-video {
  width: 100%;
  max-width: 800px;
  height: auto;
  margin-top: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Segoe UI", "Trebuchet MS", Arial, sans-serif;
  line-height: 1.65;
  color: var(--text-primary);
  background-color: #ffffff;
}

a {
  color: var(--brand-green);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover, a:focus {
  color: var(--brand-green-dark);
}

img {
  max-width: 100%;
  height: auto;
}

main {
  display: block;
  overflow: hidden;
}

section {
  padding: 80px 10%;
}

.section-intro {
  max-width: 760px;
  margin: 0 auto 48px auto;
  text-align: center;
}

.section-intro h2 {
  margin-bottom: 16px;
  font-size: 2.2rem;
  color: var(--brand-dark);
}

.section-intro p {
  color: var(--text-secondary);
}

/* Buttons */
.btn,
.cta,
button.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background-color: var(--brand-green);
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn:hover,
.cta:hover,
button.cta:hover {
  background-color: var(--brand-green-dark);
  color: #ffffff;
}

.btn.btn--ghost,
button.btn--ghost,
.link-button {
  background-color: transparent;
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--brand-dark);
}

.btn.btn--ghost:hover,
button.btn--ghost:hover,
.link-button:hover {
  border-color: var(--brand-green);
  color: var(--brand-green);
}

.link-button {
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  cursor: pointer;
  color: var(--brand-green);
  text-decoration: underline;
}

/* Navigation */
.navbar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 24px 8%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 20;
  color: #ffffff;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar--scrolled,
body.nav-open .navbar {
  position: fixed;
  background-color: var(--brand-dark-transparent);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(6px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
}

.logo-image {
  width: 64px;
  height: auto;
}

.brand-name {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-links {
  list-style: none;
  display: flex;
  /* Reduce spacing between nav items for a tighter menu */
  gap: 20px;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: inherit;
  font-weight: 500;
  position: relative;
  padding-bottom: 4px;
  /* Prevent line breaks within nav items to avoid multi‑line labels */
  white-space: nowrap;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background-color: var(--brand-green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

/* Dropdown menu */
.nav-links li.has-dropdown { position: relative; }
.nav-links li.has-dropdown > a { cursor: default; }
.nav-links li.has-dropdown > .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: #ffffff;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  padding: 8px 0;
  z-index: 50;
}
.nav-links li.has-dropdown > .dropdown::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: -6px; height: 6px; /* hover bridge to prevent flicker */
}
.nav-links li.has-dropdown:hover > .dropdown { display: block; }
.nav-links li.has-dropdown .dropdown a {
  display: block;
  padding: 10px 14px;
  color: var(--text-primary);
}
.nav-links li.has-dropdown .dropdown a:hover,
.nav-links li.has-dropdown .dropdown a:focus {
  background: var(--bg-light);
  color: var(--brand-dark);
}
.nav-links li.has-dropdown .dropdown-sep {
  height: 1px; margin: 6px 8px; background: var(--border-color);
}

/* Mobile: show dropdown inline when menu is open */
@media (max-width: 900px) {
  .nav-links li.has-dropdown > .dropdown {
    position: static;
    box-shadow: none;
    border: none;
    padding: 0;
    background: transparent;
  }
  .nav-links li.has-dropdown .dropdown a {
    padding: 8px 0;
  }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: inherit;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 3px 0;
  background-color: currentColor;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

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

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

/* Hero */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 160px 10% 120px 10%;
  background-size: cover;
  background-position: center;
  color: #ffffff;
  text-align: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(11, 42, 59, 0.75), rgba(0, 0, 0, 0.55));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.hero-content h1 {
  font-size: clamp(2.4rem, 6vw, 3.2rem);
  margin-bottom: 20px;
  letter-spacing: 0.01em;
}

.hero-content p {
  font-size: clamp(1.1rem, 3vw, 1.3rem);
  margin-bottom: 30px;
  color: #f5f8fb;
}

.hero--compact {
  min-height: 50vh;
  padding-bottom: 80px;
}

/* Cards & grids */
.grid {
  display: grid;
  gap: 32px;
}

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

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

.grid--cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  background-color: var(--bg-lighter);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 32px;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(15, 45, 65, 0.12);
}

.card h3 {
  margin-bottom: 12px;
  color: var(--accent-blue);
  font-size: 1.35rem;
}

.card p,
.card li {
  color: var(--text-secondary);
}

.card ul {
  margin: 16px 0 0 18px;
  padding: 0;
}

.card li + li {
  margin-top: 10px;
}

/* Services */
.services {
  background-color: var(--bg-light);
}

.service-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 16px;
}

/* About */
.about-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 48px;
  align-items: center;
}

.about-text p + p {
  margin-top: 16px;
}

.highlight-box {
  background-color: rgba(0, 191, 166, 0.08);
  border-left: 4px solid var(--brand-green);
  padding: 20px;
  border-radius: var(--radius-sm);
  margin-top: 24px;
}

/* Differentiators */
.why-section {
  background-color: #ffffff;
}

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

.why-card {
  background-color: var(--bg-light);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 24px rgba(15, 45, 65, 0.08);
}

.why-card img {
  width: 60px;
  margin-bottom: 12px;
}

/* Clients */
.clients-section {
  background-color: var(--bg-light);
  text-align: center;
}

.client-logos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  align-items: center;
}

.client-logo {
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.08);
  background-color: #ffffff;
  font-weight: 600;
  color: var(--text-secondary);
}

/* CTA */
.cta-section {
  background: linear-gradient(135deg, var(--brand-dark), #163752);
  color: #ffffff;
  text-align: center;
}

.cta-section h2 {
  color: #ffffff;
  margin-bottom: 12px;
  font-size: 2.1rem;
}

.cta-section p {
  margin-bottom: 22px;
  color: #e6eff5;
}

/* Insights preview */
.insights-preview {
  background-color: #ffffff;
}

.insights-card {
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.insights-card h3 {
  margin: 0;
}

.insights-card time {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Resources */
.resources-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.resource-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  background-color: var(--bg-lighter);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.resource-card footer {
  margin-top: auto;
}

/* Projects */
.project-card h3 {
  font-size: 1.25rem;
}

.project-card ul {
  margin-left: 18px;
}

/* Testimonials */
.testimonial {
  background-color: var(--bg-lighter);
  border-left: 4px solid var(--brand-green);
  padding: 24px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  font-style: italic;
}

.testimonial em {
  display: block;
  margin-top: 12px;
  font-style: normal;
  color: var(--text-secondary);
}

/* Careers */
.careers-section {
  background-color: var(--bg-light);
}

.job-list {
  display: grid;
  gap: 24px;
}

.job-card header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}

.job-meta {
  display: flex;
  gap: 16px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.job-card ul {
  margin-left: 18px;
}

.job-card ul li + li {
  margin-top: 8px;
}

.alert-optin {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.culture-section {
  background-color: #ffffff;
}

.culture-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* Forms */
form {
  display: grid;
  gap: 18px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-weight: 600;
  color: var(--text-primary);
}

.form-group .required {
  color: #e15555;
  margin-left: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.18);
  font-size: 1rem;
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.helper-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.form-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

/* Gray-out storage inputs when excluded in CAPEX form */
.calculator-form.storage-off [data-storage-group] {
  opacity: 0.55;
  filter: grayscale(20%);
}
.calculator-form [data-storage-group][aria-disabled="true"] input,
.calculator-form [data-storage-group][aria-disabled="true"] select {
  background-color: #f2f4f6;
}

.success-message,
.error-message {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.success-message {
  background-color: rgba(0, 191, 166, 0.1);
  border-color: rgba(0, 191, 166, 0.4);
  color: #0f5132;
}

.error-message {
  background-color: rgba(225, 85, 85, 0.1);
  border-color: rgba(225, 85, 85, 0.4);
  color: #842029;
}

/* Contact */
.contact-section {
  background-color: var(--bg-light);
}

.contact-layout {
  display: grid;
  gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: start;
}

.contact-methods {
  display: grid;
  gap: 16px;
  padding: 24px;
  background-color: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-soft);
}

.office-hours {
  margin-top: 12px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.map-embed {
  width: 100%;
  border: 0;
  border-radius: var(--radius-md);
  height: 320px;
  box-shadow: var(--shadow-soft);
}

.schedule-card {
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  box-shadow: var(--shadow-soft);
}

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

/* Insights page */
.insights-hero {
  background-color: var(--bg-light);
}

.insights-list {
  display: grid;
  gap: 28px;
}

.insight-article {
  background-color: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 32px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 18px;
}

.insight-article time {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.insight-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.insight-tag {
  padding: 6px 12px;
  border-radius: 999px;
  background-color: rgba(0, 191, 166, 0.12);
  color: var(--brand-green);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Resources page */
.download-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  box-shadow: var(--shadow-soft);
}

.download-card footer {
  margin-top: auto;
}

/* LCOH calculator */
.lcoh-page {
  background-color: var(--bg-light);
}

.lcoh-calculator {
  padding: 80px 8%;
}

.calculator-container {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.calculator-panel {
  background-color: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-soft);
  padding: 28px;
  display: grid;
  gap: 18px;
}

.calculator-panel h3 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--accent-blue);
}

/* Result summary formatting
   Enhance readability by aligning labels and values, enlarging the headline LCOH value
   and using accent colours for emphasis. */
.calculator-results .result-summary {
  font-size: 0.95rem;
}


/* Layout for summary rows. The first line (LCOH) is treated separately. */
.calculator-results .result-summary p {
  margin: 4px 0;
}

/* Make the first summary line block-level so it can span the full width and stand out */
/* Style the headline LCOH row. Use flex to align the label and the value on the same baseline
   and reduce the bottom margin. */
.calculator-results .result-summary p:first-child {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 8px;
}

/* Align labels and values neatly on subsequent rows */
.calculator-results .result-summary p:not(:first-child) {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

/* Remove default margin and adjust styling on the horizontal rule separating the summary groups */
.calculator-results .result-summary hr {
  margin: 8px 0;
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* The cost breakdown rows include a coloured dot to link to the donut chart. Override the default
   flex behavior so that the dot, label and value align neatly. */
.calculator-results .result-summary .cost-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  /* Do not space between all items; use flex-grow on label to push value to the right */
  margin: 4px 0;
}

/* Small coloured dot preceding each cost item */
.calculator-results .result-summary .color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Label portion of the cost row. Flex grow ensures that long labels push the value to the right */
.calculator-results .result-summary .cost-label {
  flex-grow: 1;
  color: var(--brand-dark);
}

.calculator-results .result-summary strong {
  margin-right: 6px;
  color: var(--accent-blue);
  font-weight: 700;
}

/* Style numeric values within the summary */
.calculator-results .result-summary .value {
  font-weight: 600;
  color: var(--brand-dark);
  /* Add a small left margin to separate the value from the label */
  margin-left: 4px;
  white-space: nowrap;
}

/* Make the primary LCOH figure stand out */
.calculator-results .result-summary p:first-child .value {
  font-size: 1.4rem;
  color: var(--brand-green);
  font-weight: 700;
}

/* Decorative graphic for LCOH calculator results. The image spans the width of
   the results panel and maintains its aspect ratio. A subtle margin below
   separates it from the summary text or chart that follows. */
.lcoh-results-graphic {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.parameter-group {
  display: grid;
  gap: 8px;
}

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

.info-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: rgba(11, 42, 59, 0.1);
  color: var(--brand-dark);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  position: relative;
}

.info-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  background-color: #122433;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  width: 220px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.info-icon:hover::after,
.info-icon:focus::after {
  opacity: 1;
}

.calculator-form input,
.calculator-form select {
  width: 100%;
}

.toggle-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.result-output {
  display: grid;
  gap: 12px;
}

.result-output p {
  margin: 0;
  color: var(--text-secondary);
}

.result-output .value {
  font-weight: 700;
  color: var(--brand-dark);
}

.result-summary {
  display: grid;
  gap: 16px;
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 191, 166, 0.3);
  background-color: rgba(0, 191, 166, 0.08);
}

.chart-container {
  position: relative;
  width: 100%;
  min-height: 320px;
}

.scenario-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.scenario-list {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.scenario-list table {
  width: 100%;
  border-collapse: collapse;
}

.scenario-list th,
.scenario-list td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}

.scenario-list tbody tr:nth-child(odd) {
  background-color: rgba(0, 191, 166, 0.04);
}

.scenario-list button {
  font-size: 0.85rem;
}

/* Captcha */
.captcha-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background-color: rgba(0, 191, 166, 0.08);
}

.captcha-box span {
  font-weight: 600;
}

/* Footer */
footer {
  background-color: var(--brand-dark);
  color: #d9e2ec;
  padding: 60px 8% 40px 8%;
}

.footer-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 32px;
}

footer h4 {
  color: #ffffff;
  margin-bottom: 14px;
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

footer a,
footer button {
  color: #d9e2ec;
  font-size: 0.95rem;
}

footer a:hover,
footer button:hover {
  color: var(--brand-green);
}

.footer-copy {
  margin: 0;
  font-size: 0.9rem;
  text-align: center;
  color: #b7c6d4;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: min(720px, calc(100% - 32px));
  background-color: var(--brand-dark);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: none;
  gap: 18px;
  align-items: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  z-index: 1200;
}

.cookie-banner.is-visible {
  display: flex;
}

.cookie-banner__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cookie-banner .btn--ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.cookie-preferences {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1300;
}

.cookie-preferences.is-visible {
  display: flex;
}

.cookie-modal {
  width: min(620px, 100%);
  background-color: #ffffff;
  border-radius: var(--radius-md);
  padding: 28px;
  display: grid;
  gap: 20px;
  box-shadow: var(--shadow-soft);
}

.cookie-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.cookie-modal__close {
  font-size: 1.6rem;
  background: none;
  border: none;
  line-height: 1;
  cursor: pointer;
  color: var(--text-secondary);
}

.cookie-modal__content {
  display: grid;
  gap: 20px;
}

.cookie-toggle {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-light);
  align-items: center;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.toggle.disabled {
  opacity: 0.6;
}

.toggle input {
  width: 48px;
  height: 24px;
}

.cookie-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Responsive */
@media (max-width: 1080px) {
  section {
    padding: 72px 6%;
  }
  .navbar {
    padding: 20px 6%;
  }
}

@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    inset: 80px 0 0 0;
    background-color: var(--brand-dark);
    flex-direction: column;
    justify-content: flex-start;
    gap: 20px;
    padding: 32px;
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  body.nav-open .nav-links {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-toggle {
    display: inline-flex;
  }
}

@media (max-width: 768px) {
  .tool-card {
    padding: 28px;
  }

  .storage-summary,
  .storage-capex {
    padding: 28px;
  }

  .capex-row {
    padding: 18px 20px;
  }

  .quality-results {
    padding: 24px;
  }

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

@media (max-width: 520px) {
  .input-with-unit {
    flex-direction: column;
    align-items: stretch;
  }

  .input-unit {
    width: 100%;
    justify-content: flex-start;
  }

  .capex-row-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .iso-grid {
    grid-template-columns: 1fr;
  }
}
/* CAPEX Tool */
.capex-page {
  background-color: var(--bg-light);
  padding: 80px 8%;
}

.capex-calculator {
  display: grid;
  gap: 32px;
}

.capex-config {
  margin-top: 24px;
}

.capex-summary-box {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  background-color: #ffffff;
  box-shadow: var(--shadow-soft);
}

.capex-summary-box h4 {
  margin-top: 0;
  margin-bottom: 16px;
  color: var(--accent-blue);
}

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

.capex-summary-box li + li {
  margin-top: 8px;
}

.capex-config .helper-text {
  margin: 0;
}

@media (max-width: 768px) {
  .tool-card {
    padding: 28px;
  }

  .storage-summary,
  .storage-capex {
    padding: 28px;
  }

  .capex-row {
    padding: 18px 20px;
  }

  .quality-results {
    padding: 24px;
  }

  .quality-columns {
    grid-template-columns: 1fr;
  }
}
/* Tools page */
.tools-intro {
  background-color: var(--bg-light);
}

.tools-section {
  background-color: #ffffff;
}

.tools-section--quality {
  background-color: var(--bg-light);
}

.section-intro--left {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

.section-intro--left h2 {
  text-align: left;
}

.section-intro--left p {
  margin-left: 0;
  margin-right: 0;
}

.tools-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tool-card {
  background-color: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 32px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tool-card h3 {
  margin: 0;
  color: var(--accent-blue);
}

.tool-description {
  margin: -4px 0 4px 0;
  color: var(--text-secondary);
}

.tool-form {
  display: grid;
  gap: 16px;
}

.tool-form .form-row {
  display: grid;
  gap: 6px;
}

.tool-form label {
  font-weight: 600;
  color: var(--text-primary);
}

.input-with-unit {
  display: flex;
  align-items: center;
  gap: 12px;
}

.input-with-unit input {
  flex: 1 1 auto;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.18);
  font-size: 1rem;
}

.input-unit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-light);
  color: var(--text-secondary);
  font-size: 0.9rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.input-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: 6px;
}

.quality-layout {
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  align-items: start;
}

.quality-results {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  padding: 28px;
  display: grid;
  gap: 24px;
}

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

.quality-column h3 {
  margin: 0 0 12px 0;
  color: var(--accent-blue);
}

.result-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.result-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.result-list dt {
  font-weight: 600;
  color: var(--text-secondary);
}

.result-list dd {
  margin: 0;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

.tool-footnote {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.tools-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.tools-section--standards {
  background-color: #ffffff;
}

.iso-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.iso-card {
  background-color: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-soft);
  padding: 28px;
  display: grid;
  gap: 12px;
}

.iso-card h3 {
  margin: 0;
  color: var(--accent-blue);
}

.iso-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--text-secondary);
}

.iso-footnote {
  margin-top: 24px;
  padding: 18px 22px;
  border-left: 4px solid var(--brand-green);
  background-color: var(--bg-light);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.tools-section--storage {
  background-color: var(--bg-light);
}

.storage-layout {
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  align-items: start;
}

.storage-results {
  display: grid;
  gap: 24px;
}

.storage-summary,
.storage-capex {
  background-color: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-soft);
  padding: 32px;
  display: grid;
  gap: 18px;
}

.storage-summary .result-list {
  gap: 14px;
}

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

.capex-row {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  background-color: var(--bg-lighter);
  display: grid;
  gap: 8px;
}

.capex-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--accent-blue);
}

.capex-note {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}


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

  .quality-layout {
    grid-template-columns: 1fr;
  }

  .storage-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .tool-card {
    padding: 28px;
  }

  .storage-summary,
  .storage-capex {
    padding: 28px;
  }

  .capex-row {
    padding: 18px 20px;
  }

  .quality-results {
    padding: 24px;
  }

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

@media (max-width: 520px) {
  .input-with-unit {
    flex-direction: column;
    align-items: stretch;
  }

  .input-unit {
    width: 100%;
    justify-content: flex-start;
  }

  .capex-row-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

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





/* Download library enhancements */
.download-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  background-color: var(--bg-lighter);
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 16px 32px rgba(11, 42, 59, 0.04);
  position: relative;
}

.download-card--premium {
  border-top: 4px solid var(--brand-green);
}

.download-card__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.download-card__header h3 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--brand-dark);
}

.purchase-badge,
.purchase-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
}

.purchase-badge {
  background-color: var(--brand-green);
  color: #ffffff;
}

.purchase-tag {
  background-color: rgba(0, 191, 166, 0.12);
  color: var(--brand-green);
}

.download-card__features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-secondary);
}

.download-card__features li {
  position: relative;
  padding-left: 22px;
}

.download-card__features li::before {
  content: '•';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--brand-green);
  font-weight: 700;
}

.download-card footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
}

.download-link[hidden] {
  display: none !important;
}

[data-product-card][data-unlocked="true"] .purchase-button {
  display: none;
}

.purchase-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 2000;
}

.purchase-modal[hidden] {
  display: none !important;
}

.purchase-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 42, 59, 0.75);
  backdrop-filter: blur(4px);
}

.purchase-modal__dialog {
  position: relative;
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 30px 60px rgba(11, 42, 59, 0.22);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.purchase-modal__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.purchase-modal__header h2 {
  margin: 0;
  font-size: 1.6rem;
  color: var(--brand-dark);
}

.purchase-modal__price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brand-green);
}

.purchase-modal__summary {
  margin: 0;
  color: var(--text-secondary);
}

.purchase-modal__list {
  margin: 0;
  padding-left: 20px;
  color: var(--text-secondary);
}

.purchase-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.purchase-modal__unlock {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.purchase-modal__label {
  font-weight: 600;
  color: var(--text-primary);
}

.purchase-modal__input-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.purchase-modal__input-group input {
  flex: 1;
  min-width: 180px;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.purchase-modal__input-group input:focus {
  outline: none;
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(0, 191, 166, 0.15);
}

.purchase-modal__hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.purchase-modal__success {
  margin: 0;
  font-weight: 600;
  color: var(--brand-green);
}

.purchase-modal__success--error {
  color: #c0392b;
}

.purchase-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease;
}

.purchase-modal__close:hover {
  color: var(--brand-green);
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .download-card {
    padding: 20px;
  }

  .purchase-modal__dialog {
    padding: 24px;
  }

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

  .purchase-modal__input-group {
    flex-direction: column;
  }

  .purchase-modal__input-group input {
    width: 100%;
  }
}
