:root {
  color-scheme: light;
  --ink: #0b1220;
  --muted: #566579;
  --line: #d6e0ea;
  --soft: #f5f9fb;
  --accent: #007bff;
  --accent-strong: #00e5d4;
  --accent-lime: #a3ff00;
  --navy: #020617;
  --navy-2: #0f172a;
  --cyan-soft: rgba(0, 229, 212, 0.14);
  --cyan-line: rgba(0, 229, 212, 0.22);
  --gradient-brand: linear-gradient(135deg, #00e5d4, #a3ff00);
  --gradient-blue: linear-gradient(135deg, #00e5d4, #3b82f6);
  --page: #ffffff;
  --shadow-soft: 0 20px 55px rgba(2, 6, 23, 0.12);
  --shadow-image: 0 24px 70px rgba(2, 6, 23, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -8%, rgba(0, 229, 212, 0.16), transparent 34rem),
    linear-gradient(180deg, #f7fbfc 0, #ffffff 34rem);
  line-height: 1.55;
}

.cover {
  position: relative;
  min-height: 46vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 86px clamp(24px, 7vw, 96px) 62px;
  color: white;
  text-align: center;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(0, 122, 128, 0.52)),
    linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.94)),
    url("./assets/screenshots/01-assets-shell.png") center / cover;
}

.cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 84% 24%, rgba(0, 229, 212, 0.34), transparent 18rem),
    radial-gradient(circle at 92% 88%, rgba(163, 255, 0, 0.18), transparent 16rem);
  pointer-events: none;
}

.cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
}

.cover > div {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7df9ff;
}

h1 {
  margin: 0;
  font-family: Ubuntu, Inter, sans-serif;
  font-size: clamp(42px, 8vw, 84px);
  line-height: 0.95;
  letter-spacing: 0;
  text-shadow: 0 16px 40px rgba(0, 0, 0, 0.38);
}

.typed-title {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
}

.typed-text {
  display: inline-block;
  overflow: hidden;
  max-width: 0;
  white-space: nowrap;
  animation: type-title 1.3s steps(10, end) 0.25s forwards;
}

.typing-cursor {
  display: inline-block;
  margin-left: 0.06em;
  color: #7df9ff;
  animation: cursor-blink 0.85s step-end infinite;
}

@keyframes type-title {
  from {
    max-width: 0;
  }
  to {
    max-width: 10ch;
  }
}

@keyframes cursor-blink {
  50% {
    opacity: 0;
  }
}

.lede {
  max-width: 680px;
  margin: 22px auto 0;
  font-size: 19px;
  color: rgba(255, 255, 255, 0.86);
}

main {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.toc {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 42px 0 56px;
  border: 0;
  border-top: 1px solid rgba(0, 229, 212, 0.14);
  border-radius: 0;
  background:
    radial-gradient(circle at 82% 10%, rgba(0, 229, 212, 0.12), transparent 28rem),
    linear-gradient(135deg, #06111f, #103f4a);
  box-shadow: none;
}

.toc h2,
section h2 {
  margin: 0 0 16px;
  font-family: Ubuntu, Inter, sans-serif;
  font-size: 28px;
  line-height: 1.15;
}

.toc h2 {
  width: min(1120px, calc(100% - 48px));
  margin-bottom: 24px;
  margin-right: auto;
  margin-left: auto;
  color: white;
  font-size: 42px;
  line-height: 1.05;
}

.toc-grid {
  width: min(1120px, calc(100% - 48px));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 72px;
  margin: 0 auto;
}

.toc-list {
  margin: 0;
  padding-left: 20px;
  color: rgba(255, 255, 255, 0.62);
}

.toc li {
  margin: 0 0 8px;
}

.toc li > a {
  font-weight: 700;
}

.toc li ol {
  columns: 1;
  margin: 6px 0 14px;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.46);
}

.toc li ol li {
  margin-bottom: 4px;
}

.toc li ol a {
  font-size: 13px;
  font-weight: 500;
  color: #a9d9d9;
}

a {
  color: var(--accent);
  text-decoration: none;
}

.toc a {
  color: #d9fffb;
}

.toc a:hover {
  color: var(--accent-strong);
}

main {
  padding: 36px 0 72px;
}

section {
  padding: 54px 0;
  border-bottom: 1px solid var(--line);
}

section h2 {
  margin-top: 0;
  margin-bottom: 18px;
  font-size: 34px;
  line-height: 1.1;
  color: var(--ink);
}

section h3 {
  font-family: Ubuntu, Inter, sans-serif;
  margin: 34px 0 12px;
  font-size: 24px;
  line-height: 1.2;
  color: var(--ink);
}

section h4 {
  font-family: Ubuntu, Inter, sans-serif;
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.22;
  font-weight: 700;
  color: var(--ink);
}

section h2,
section h3,
section h4 {
  scroll-margin-top: 24px;
}

.section-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 34px;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--cyan-line);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0, 229, 212, 0.1), rgba(163, 255, 0, 0.08));
  color: #006b70;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.06);
}

.back-to-top:hover {
  border-color: rgba(0, 229, 212, 0.45);
  color: var(--ink);
}

section p {
  max-width: 780px;
  margin: 0 0 16px;
  font-size: 16px;
  color: var(--muted);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
  max-width: 920px;
}

.stat-grid article {
  padding: 18px;
  border: 1px solid var(--cyan-line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(245, 249, 251, 0.96));
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.06);
}

.stat-grid strong {
  display: block;
  font-family: Ubuntu, Inter, sans-serif;
  font-size: 28px;
  line-height: 1;
  color: #006b70;
}

.stat-grid span {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.manual-table-wrap {
  max-width: 780px;
  overflow-x: auto;
  margin: 18px 0 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 14px 36px rgba(2, 6, 23, 0.08);
}

.manual-table caption {
  caption-side: top;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-align: left;
}

figure {
  margin: 0 0 22px;
}

figure img {
  display: block;
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 16px;
  background: #f8fbfc;
  box-shadow: var(--shadow-image);
}

figcaption {
  margin-top: 12px;
  padding-left: 12px;
  border-left: 3px solid var(--accent-strong);
  font-size: 13px;
  color: var(--muted);
}

.layout-pair {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(420px, 0.58fr);
  align-items: start;
  gap: 28px;
  margin: 34px 0;
}

.layout-pair h3 {
  margin: 0 0 10px;
  line-height: 1.2;
}

.layout-pair p {
  max-width: none;
}

.caption-copy {
  padding-left: 12px;
  border-left: 3px solid var(--accent-strong);
  font-size: 13px;
  color: var(--muted);
}

.layout-block {
  margin: 34px 0;
}

.layout-block h3 {
  margin: 0 0 10px;
  line-height: 1.2;
}

.layout-block p {
  max-width: 780px;
}

.layout-block figure {
  margin: 18px 0 0;
}

.layout-pair figure {
  margin: 0;
}

.layout-pair--sidebar {
  grid-template-columns: minmax(320px, 0.62fr) minmax(180px, 0.38fr);
}

.region-figure {
  max-width: 100%;
}

.region-figure--sidebar {
  justify-self: start;
  width: min(100%, 260px);
}

.region-figure--sidebar img {
  max-height: 560px;
  object-fit: cover;
  object-position: top;
}

.region-figure--wide {
  align-self: center;
}

.region-figure--wide img {
  max-height: 118px;
  object-fit: contain;
}

.region-figure--full img {
  max-height: 560px;
  object-fit: contain;
}

.overview-figure {
  overflow: visible;
}

.overview-crop {
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #f8fbfc;
  box-shadow: var(--shadow-image);
}

.overview-figure img {
  max-height: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
  transform: none;
}

.overview-figure figcaption {
  margin-top: 18px;
}

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

.asset-detail-grid figure {
  margin: 0;
}

.asset-detail-grid img {
  max-height: 380px;
  object-fit: contain;
}

.asset-detail-row {
  display: grid;
  grid-template-columns: minmax(280px, 0.58fr) minmax(260px, 0.42fr);
  align-items: start;
  gap: 28px;
  margin: 30px 0;
}

.asset-detail-row h4 {
  margin: 0 0 10px;
  line-height: 1.2;
}

.asset-detail-row ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.asset-detail-row li {
  margin-bottom: 7px;
}

.asset-detail-row figure {
  margin: 0;
  justify-self: start;
}

.asset-detail-row img {
  width: auto;
  max-height: 520px;
  max-width: 100%;
  object-fit: contain;
}

.capacity-panel-figure img {
  width: min(100%, 300px);
  max-height: none;
}

.inspector-side-figure img {
  width: min(100%, 300px);
  max-height: none;
}

.capacity-modal-row {
  grid-template-columns: minmax(280px, 0.38fr) minmax(420px, 0.62fr);
}

.capacity-modal-figure img {
  width: min(100%, 560px);
  max-height: none;
}

.curtailment-map-figure img {
  width: min(100%, 820px);
  max-height: none;
}

.market-wide-figure img {
  width: 100%;
  max-height: none;
}

.market-detail-row {
  grid-template-columns: minmax(280px, 0.34fr) minmax(520px, 0.66fr);
}

.market-detail-figure img {
  width: min(100%, 720px);
  max-height: none;
}

.stacked-figures {
  display: grid;
  gap: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0;
  font-size: 14px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #006b70;
  background: rgba(0, 229, 212, 0.08);
}

tr:last-child td {
  border-bottom: 0;
}

kbd {
  display: inline-flex;
  min-width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
  font: 12px ui-monospace, SFMono-Regular, Menlo, monospace;
  box-shadow: 0 1px 0 rgba(2, 6, 23, 0.04);
}

@media (max-width: 720px) {
  .cover {
    min-height: 44vh;
    padding: 52px 24px;
  }

  main {
    width: min(100% - 32px, 1120px);
  }

  .toc h2,
  .toc-grid {
    width: min(100% - 32px, 1120px);
  }

  .toc-grid {
    grid-template-columns: 1fr;
    row-gap: 0;
  }

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

  .layout-pair,
  .layout-pair--sidebar {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .asset-detail-grid,
  .asset-detail-row {
    grid-template-columns: 1fr;
  }

  .region-figure--sidebar {
    width: min(100%, 320px);
  }
}

@media print {
  body {
    background: white;
  }

  .cover {
    min-height: 0;
    padding: 36px 0;
    color: var(--ink);
    background: white;
  }

  .lede {
    color: var(--muted);
  }

  .toc,
  main {
    width: 100%;
  }

  section {
    break-inside: avoid;
    padding: 24px 0;
  }

  .section-actions {
    display: none;
  }

  .layout-pair,
  .layout-pair--sidebar {
    grid-template-columns: 0.44fr 0.56fr;
    gap: 16px;
    margin: 20px 0;
    break-inside: avoid;
  }

  figure img {
    box-shadow: none;
  }
}
