.haas-page {
  --haas-max: 1320px;
  --haas-panel: #07101d;
  --haas-panel-strong: #030914;
  --haas-line: rgba(148, 163, 184, 0.22);
  --haas-blue: #38bdf8;
  --haas-orange: #fb923c;
  --haas-green: #4ade80;
  --haas-violet: #a78bfa;
  background:
    radial-gradient(circle at 78% 9%, rgba(14, 116, 144, 0.12), transparent 23rem),
    #020617;
}

.haas-page .section-inner {
  max-width: var(--haas-max);
}

.haas-page section {
  padding-block: clamp(3.4rem, 7vw, 6.8rem);
}

.haas-page section + section {
  border-top: 1px solid rgba(148, 163, 184, 0.09);
}

.haas-hero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(3.2rem, 7vw, 6rem) !important;
  padding-bottom: clamp(3.8rem, 8vw, 7rem) !important;
}

.haas-hero::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.15), transparent 54%),
    linear-gradient(180deg, transparent 70%, #020617);
  content: "";
  pointer-events: none;
}

.haas-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(19rem, 0.75fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
}

.haas-hero-copy h1 {
  max-width: 15ch;
  margin: 0.75rem 0 1rem;
  font-size: clamp(2.5rem, 6.5vw, 5.9rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.haas-hero-copy > p {
  max-width: 47rem;
  margin: 0;
  color: #cbd5e1;
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.7;
}

.haas-hero-actions,
.haas-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.haas-hero-actions a,
.haas-cta-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.haas-language-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.68rem;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 0.78rem;
}

.haas-language-link:hover {
  border-color: var(--accent);
  color: var(--text);
}

.haas-boundary-note {
  margin-top: 1.6rem;
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 0.8rem 0.8rem 0;
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
  font-size: 0.88rem;
  line-height: 1.65;
}

.haas-boundary-note strong {
  color: var(--text);
}

.haas-hero-panel {
  padding: 1.2rem;
  border: 1px solid rgba(56, 189, 248, 0.34);
  border-radius: 1.25rem;
  background: rgba(3, 9, 20, 0.9);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

.haas-hero-panel h2 {
  margin: 0.5rem 0 0.9rem;
  font-size: 1.16rem;
}

.haas-capability-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.haas-capability-list div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.8rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--haas-line);
}

.haas-capability-list dt {
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.haas-capability-list dd {
  margin: 0;
  color: #e2e8f0;
  font-size: 0.84rem;
  line-height: 1.5;
}

.haas-kicker {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.haas-section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(18rem, 0.55fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 1.8rem;
}

.haas-section-heading h2 {
  max-width: 20ch;
  margin: 0.45rem 0 0;
  font-size: clamp(1.8rem, 4vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.haas-section-heading p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.haas-principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.haas-principle,
.haas-content-card {
  border: 1px solid var(--haas-line);
  border-radius: 1rem;
  background: var(--haas-panel);
}

.haas-principle {
  padding: 1.2rem;
}

.haas-principle span {
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.haas-principle h3,
.haas-content-card h3 {
  margin: 0.35rem 0 0.55rem;
  font-size: 1.06rem;
}

.haas-principle p,
.haas-content-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.haas-system-section {
  background: #01050d;
}

.haas-figure {
  margin: 0;
}

.haas-diagram-shell {
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 1.15rem;
  background: #091019;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
}

.haas-diagram-stage {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1672 / 941;
  background: #091017;
}

.haas-diagram-stage picture,
.haas-diagram-image,
.haas-overlay,
.haas-overlay > svg {
  display: block;
  width: 100%;
  height: 100%;
}

.haas-diagram-image {
  object-fit: contain;
}

.haas-overlay {
  position: absolute;
  z-index: 2;
  inset: 0;
}

.haas-overlay-status {
  position: absolute;
  z-index: 3;
  right: 0.75rem;
  bottom: 0.75rem;
  max-width: calc(100% - 1.5rem);
  padding: 0.35rem 0.55rem;
  border-radius: 0.5rem;
  background: rgba(2, 6, 23, 0.88);
  color: #fca5a5;
  font-size: 0.72rem;
}

.haas-hotspot {
  fill: rgba(250, 204, 21, 0.001) !important;
  stroke: transparent !important;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
  pointer-events: fill;
  cursor: pointer;
  transition: fill 150ms ease, stroke 150ms ease, filter 150ms ease;
}

.haas-hotspot:hover,
.haas-hotspot:focus-visible,
.haas-hotspot.is-active {
  fill: rgba(250, 204, 21, 0.2) !important;
  stroke: #67e8f9 !important;
  filter: drop-shadow(0 0 7px rgba(250, 204, 21, 0.65));
  outline: none;
}

.haas-diagram-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-top: 1px solid var(--haas-line);
  background: #07101d;
}

.haas-diagram-instruction {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.84rem;
}

.haas-instruction-mobile {
  display: none;
}

.haas-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.haas-legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.haas-legend-dot {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: var(--haas-blue);
}

.haas-legend-dot--steam { background: var(--haas-orange); }
.haas-legend-dot--water { background: var(--haas-green); }
.haas-legend-dot--controls { background: var(--haas-violet); }
.haas-legend-dot--backup { background: #f59e0b; }
.haas-legend-dot--process { background: #94a3b8; }

.haas-figure figcaption {
  margin-top: 0.8rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.haas-component-browser {
  margin-top: 2rem;
}

.haas-component-browser h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.haas-component-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
}

.haas-component-button {
  min-height: 4.15rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--haas-line);
  border-left: 3px solid var(--haas-blue);
  border-radius: 0.65rem;
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.haas-component-button:hover {
  border-color: rgba(250, 204, 21, 0.58);
  background: #0f172a;
}

.haas-component-button[data-category="steam"] { border-left-color: var(--haas-orange); }
.haas-component-button[data-category="water"] { border-left-color: var(--haas-green); }
.haas-component-button[data-category="controls"] { border-left-color: var(--haas-violet); }
.haas-component-button[data-category="backup"] { border-left-color: #f59e0b; }
.haas-component-button[data-category="process"] { border-left-color: #94a3b8; }

.haas-component-button strong,
.haas-component-button span {
  display: block;
}

.haas-component-button strong {
  font-size: 0.78rem;
  line-height: 1.35;
}

.haas-component-button span {
  margin-top: 0.16rem;
  color: var(--text-muted);
  font-size: 0.66rem;
  line-height: 1.35;
}

.haas-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  counter-reset: haas-step;
}

.haas-step {
  position: relative;
  padding: 1.25rem 1.15rem 1.15rem;
  border-top: 1px solid var(--haas-line);
  counter-increment: haas-step;
}

.haas-step + .haas-step {
  border-left: 1px solid var(--haas-line);
}

.haas-step::before {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  margin-bottom: 0.75rem;
  place-items: center;
  border: 1px solid rgba(250, 204, 21, 0.55);
  border-radius: 50%;
  color: var(--accent);
  content: counter(haas-step, decimal-leading-zero);
  font-size: 0.7rem;
}

.haas-step h3 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
}

.haas-step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.haas-content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.haas-content-card {
  padding: 1.25rem;
}

.haas-content-card--accent {
  border-color: rgba(250, 204, 21, 0.38);
}

.haas-content-card ul,
.haas-checklist {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  color: #cbd5e1;
  font-size: 0.86rem;
}

.haas-content-card li,
.haas-checklist li {
  margin-bottom: 0.48rem;
}

.haas-review-note {
  margin-top: 0.8rem !important;
  color: #fcd34d !important;
  font-size: 0.76rem !important;
}

.haas-cta-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  padding: clamp(1.4rem, 4vw, 2.5rem);
  border: 1px solid rgba(250, 204, 21, 0.38);
  border-radius: 1.2rem;
  background: #07101d;
}

.haas-cta-panel h2 {
  margin: 0.4rem 0 0.6rem;
  font-size: clamp(1.5rem, 3vw, 2.35rem);
}

.haas-cta-panel p {
  max-width: 48rem;
  margin: 0;
  color: var(--text-muted);
}

.haas-modal {
  width: min(58rem, calc(100% - 2rem));
  max-width: none;
  max-height: min(48rem, calc(100dvh - 2rem));
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(56, 189, 248, 0.32);
  border-radius: 1.1rem;
  background: #060e1a;
  color: var(--text);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.62);
}

.haas-modal::backdrop {
  background: rgba(1, 5, 13, 0.8);
  backdrop-filter: blur(4px);
}

.haas-modal[open] {
  animation: haas-modal-in 170ms ease-out;
}

@keyframes haas-modal-in {
  from { opacity: 0; transform: translateY(0.75rem); }
  to { opacity: 1; transform: translateY(0); }
}

.haas-modal-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(18rem, 0.78fr) minmax(0, 1.22fr);
  min-height: 32rem;
}

.haas-modal-media {
  display: grid;
  min-height: 100%;
  padding: 1.25rem;
  place-items: center;
  background: #f4f4f2;
}

.haas-modal-media img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.haas-modal-content {
  display: flex;
  min-width: 0;
  padding: 2rem 2rem 1.2rem;
  flex-direction: column;
}

.haas-modal-close {
  position: absolute;
  z-index: 2;
  top: 0.75rem;
  right: 0.75rem;
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 50%;
  background: rgba(2, 6, 23, 0.92);
  color: #fff;
  font-size: 1.35rem;
  cursor: pointer;
}

.haas-modal-category {
  margin: 0 2.6rem 0.6rem 0;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.haas-modal h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1.12;
}

.haas-modal-title-alt {
  margin: 0.35rem 0 1.1rem;
  color: #bae6fd;
  font-size: 1rem;
  font-weight: 500;
}

.haas-modal-summary,
.haas-modal-summary-alt {
  margin: 0;
  line-height: 1.65;
}

.haas-modal-summary {
  color: #e2e8f0;
  font-size: 0.93rem;
}

.haas-modal-summary-alt {
  margin-top: 0.45rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.haas-modal-detail {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.65rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--haas-line);
}

.haas-modal-detail dt {
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.haas-modal-detail dd {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.82rem;
}

.haas-modal-navigation {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1.4rem;
}

.haas-modal-navigation button {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--haas-line);
  border-radius: 999px;
  background: #0f172a;
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

body.haas-modal-open {
  overflow: hidden;
}

@media (max-width: 1040px) {
  .haas-component-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .haas-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .haas-step:nth-child(3) { border-left: 0; }
}

@media (max-width: 860px) {
  .haas-hero-grid,
  .haas-section-heading,
  .haas-cta-panel {
    grid-template-columns: 1fr;
  }

  .haas-hero-panel { max-width: 38rem; }
  .haas-principles { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .haas-page section { padding-block: 3.2rem; }
  .haas-hero-copy h1 { font-size: clamp(2.45rem, 13vw, 4.2rem); }
  .haas-content-grid { grid-template-columns: 1fr; }
  .haas-component-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .haas-instruction-desktop { display: none; }
  .haas-instruction-mobile { display: inline; }

  .haas-modal {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 92dvh;
    margin: 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 1.1rem 1.1rem 0 0;
  }

  .haas-modal-inner {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .haas-modal-media {
    min-height: 0;
    max-height: 35dvh;
    padding: 0.8rem;
  }

  .haas-modal-media img {
    width: auto;
    max-height: calc(35dvh - 1.6rem);
  }

  .haas-modal-content { padding: 1.25rem 1rem 1rem; }
  .haas-modal-close { top: 0.65rem; right: 0.65rem; }
}

@media (max-width: 520px) {
  .haas-capability-list div { grid-template-columns: 1fr; gap: 0.2rem; }
  .haas-component-list { grid-template-columns: 1fr; }
  .haas-steps { grid-template-columns: 1fr; }
  .haas-step + .haas-step { border-left: 0; }
  .haas-diagram-toolbar { display: block; }
  .haas-legend { margin-top: 0.7rem; }
  .haas-modal-detail { grid-template-columns: 1fr; gap: 0.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .haas-modal[open] { animation: none; }
}
