:root {
  --ink: #172026;
  --muted: #5d6872;
  --paper: #fbfbf8;
  --surface: #ffffff;
  --line: #dfe5e8;
  --teal: #087f8c;
  --teal-dark: #075e67;
  --blue: #2563eb;
  --amber: #f6b443;
  --coral: #d95f4b;
  --shadow: 0 18px 50px rgba(23, 32, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding:
    16px max(24px, calc(env(safe-area-inset-right) + 24px))
    16px max(24px, calc(env(safe-area-inset-left) + 24px));
  border-bottom: 1px solid rgba(223, 229, 232, 0.85);
  background: rgba(251, 251, 248, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 800;
  text-decoration: none;
}

.brand span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--amber);
}

nav {
  display: none;
  grid-column: 1 / -1;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  gap: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  box-shadow: 0 8px 28px rgba(23, 32, 38, 0.08);
  font-weight: 700;
}

nav a {
  padding: 10px 12px;
  border-radius: 6px;
  text-decoration: none;
}

nav a:hover {
  background: #eef7f2;
  color: var(--teal);
}

.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-toggle-label {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  justify-self: end;
  padding: 0 10px;
}

.nav-toggle-label span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
}

.nav-toggle:checked + .nav-toggle-label + nav {
  display: flex;
}

main {
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  gap: 44px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 94px 24px 42px;
}

.hero-copy h1,
.section h2 {
  margin: 0;
  max-width: 850px;
  font-size: 48px;
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 670px;
  color: var(--muted);
  font-size: 18px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 850;
  text-decoration: none;
}

.button.primary {
  background: var(--teal);
  color: var(--surface);
}

.button.primary:hover {
  background: var(--teal-dark);
}

.button.secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.hero-visual,
.screenshot-card,
.terminal-card,
.certificate-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.image-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  text-align: left;
}

.image-trigger:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: -3px;
}

.hero-visual img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top left;
}

figcaption {
  padding: 16px 18px;
  color: var(--muted);
  font-size: 14px;
}

.status-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 52px;
  gap: 12px;
}

.status-band div {
  border-top: 4px solid var(--amber);
  background: var(--surface);
  padding: 18px;
  box-shadow: 0 8px 28px rgba(23, 32, 38, 0.08);
}

.status-band strong,
.status-band span {
  display: block;
}

.status-band span {
  margin-top: 4px;
  color: var(--muted);
}

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 24px;
}

.section h2 {
  font-size: 38px;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 32px;
}

.section-heading p,
.cta-panel p {
  color: var(--muted);
  font-size: 17px;
}

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

.step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  min-height: 172px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.step-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--amber);
  font-weight: 900;
}

.step h3,
.result-grid h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.25;
}

.step p,
.result-grid p {
  margin: 0;
  color: var(--muted);
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-top: 24px;
}

.screenshot-card img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
  border-bottom: 1px solid var(--line);
}

.screenshot-card strong {
  display: block;
  color: var(--ink);
}

.command-section {
  padding-top: 24px;
}

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

.command-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(23, 32, 38, 0.08);
}

.command-card h3 {
  margin: 0 0 14px;
  font-size: 20px;
}

pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  border-radius: 8px;
  background: #101820;
  color: #e6edf3;
  white-space: pre-wrap;
}

code {
  font-family: SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.terminal-section {
  padding-top: 24px;
}

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

.terminal-card img {
  width: 100%;
  aspect-ratio: 16 / 9.3;
  object-fit: cover;
  border-bottom: 1px solid rgba(223, 229, 232, 0.18);
  background: #101820;
}

.terminal-card.wide {
  grid-column: 1 / -1;
}

.terminal-card.wide img {
  aspect-ratio: 16 / 7.4;
  object-position: top left;
}

.terminal-card strong {
  display: block;
  color: var(--ink);
}

.sandbox {
  max-width: none;
  background: #eef7f2;
}

.sandbox > * {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

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

.result-grid article {
  min-height: 178px;
  padding: 22px;
  border-left: 5px solid var(--teal);
  background: var(--surface);
}

.certificate-card {
  max-width: 820px;
  margin-top: 18px;
}

.certificate-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
  border-bottom: 1px solid var(--line);
}

.certificate-card strong {
  display: block;
  color: var(--ink);
}

.certificate-help {
  max-width: 820px;
  margin: 16px auto 0;
  text-align: center;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.certificate-help summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  min-height: 52px;
  padding: 12px 22px 12px 14px;
  border-radius: 999px;
  background: var(--teal);
  color: var(--surface);
  box-shadow: none;
  cursor: pointer;
  font-weight: 900;
  list-style: none;
  text-align: center;
}

.certificate-help summary::-webkit-details-marker {
  display: none;
}

.certificate-help summary::before {
  content: "i";
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-right: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: var(--surface);
  font-weight: 900;
}

.certificate-help div {
  display: none;
  max-width: 760px;
  margin: 0 auto;
}

.certificate-help[open] div {
  display: block;
  margin-top: 14px;
}

.certificate-help div > * {
  overflow: hidden;
}

.certificate-help p {
  margin: 0;
  padding: 16px 18px;
  border: 1px solid rgba(8, 127, 140, 0.25);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  text-align: left;
  box-shadow: 0 8px 28px rgba(23, 32, 38, 0.06);
}

.certificate-help p + p {
  margin-top: 10px;
}

.cta-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  border-bottom: 1px solid var(--line);
}

.cta-panel div {
  max-width: 760px;
}

.faq {
  padding-top: 52px;
}

.guide {
  border-top: 1px solid var(--line);
}

.guide-block {
  margin: 0 0 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(23, 32, 38, 0.06);
}

.guide-block h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.guide-block p {
  margin: 0 0 14px;
  color: var(--muted);
}

.guide-block pre + pre {
  margin-top: 12px;
}

details {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

details:last-child {
  border-bottom: 1px solid var(--line);
}

summary {
  cursor: pointer;
  padding: 20px 18px;
  font-weight: 850;
}

details p {
  margin: 0;
  padding: 0 18px 22px;
  color: var(--muted);
}

details.certificate-help,
details.certificate-help:last-child {
  border: 0;
  background: transparent;
}

details.certificate-help summary {
  box-shadow: none;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 42px;
  color: var(--muted);
}

.site-footer a {
  color: var(--teal-dark);
  font-weight: 800;
}

.modal-open {
  overflow: hidden;
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  padding: 24px;
}

.image-modal[aria-hidden="false"] {
  display: grid;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 32, 0.78);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(1280px, 96vw);
  max-height: 92vh;
  padding: 18px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: auto;
}

.modal-panel img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  background: #f4f6f8;
}

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin: 0 0 10px 10px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--surface);
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
}

#modal-caption {
  clear: both;
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 980px) {
  .hero,
  .timeline,
  .screenshot-grid,
  .command-grid,
  .terminal-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 118px;
  }

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

  .cta-panel {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding:
      14px max(22px, calc(env(safe-area-inset-right) + 18px))
      14px max(22px, calc(env(safe-area-inset-left) + 18px));
  }

  .brand {
    min-width: 0;
  }

  .brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-toggle-label {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    cursor: pointer;
    justify-self: end;
    padding: 0 10px;
  }

  .nav-toggle-label span {
    display: block;
    height: 2px;
    border-radius: 999px;
    background: var(--ink);
  }

  nav {
    display: none;
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 8px 28px rgba(23, 32, 38, 0.08);
    font-size: 15px;
  }

  nav a {
    padding: 10px 12px;
    border-radius: 6px;
  }

  nav a:hover {
    background: #eef7f2;
  }

  .nav-toggle:checked + .nav-toggle-label + nav {
    display: flex;
  }

  .hero-copy h1 {
    font-size: 36px;
  }

  .section h2 {
    font-size: 30px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 96px;
  }

  .hero-visual {
    min-width: 0;
  }

  .terminal-card.wide {
    grid-column: auto;
  }

  .terminal-card.wide img {
    aspect-ratio: 16 / 9.3;
  }

  .status-band {
    grid-template-columns: 1fr;
  }

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

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .image-modal {
    padding: 16px;
    align-items: center;
    justify-items: center;
  }

  .modal-panel {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    max-height: 86vh;
    padding: 14px;
    overflow-x: hidden;
  }

  .modal-panel img {
    max-height: 58vh;
  }

  .modal-close {
    position: relative;
    float: none;
    margin: 0 0 12px auto;
    width: 44px;
    height: 44px;
  }

  #modal-caption {
    font-size: 18px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 1180px) and (max-height: 520px) and (orientation: landscape) {
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 14px;
    padding:
      10px max(58px, calc(env(safe-area-inset-right) + 44px))
      10px max(58px, calc(env(safe-area-inset-left) + 44px));
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand {
    font-size: 15px;
  }

  .nav-toggle-label {
    display: inline-flex;
    width: 38px;
    height: 38px;
  }

  nav {
    display: none;
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    padding: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 8px 28px rgba(23, 32, 38, 0.08);
    max-height: calc(100vh - 72px);
    overflow: auto;
    white-space: nowrap;
    font-size: 14px;
  }

  nav a {
    padding: 8px 10px;
  }

  .nav-toggle:checked + .nav-toggle-label + nav {
    display: flex;
  }

  .hero {
    grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
    gap: 22px;
    padding:
      28px max(58px, calc(env(safe-area-inset-right) + 44px))
      28px max(58px, calc(env(safe-area-inset-left) + 44px));
  }

  .hero-copy h1 {
    font-size: 36px;
    line-height: 1.04;
  }

  .hero-copy p {
    font-size: 14px;
  }

  .hero-actions {
    margin-top: 14px;
  }

  .eyebrow {
    margin-bottom: 8px;
    font-size: 11px;
  }

  .button {
    min-height: 42px;
    padding: 9px 14px;
    font-size: 14px;
  }

  .status-band {
    grid-template-columns: repeat(4, 1fr);
    padding:
      0 max(58px, calc(env(safe-area-inset-right) + 44px))
      28px max(58px, calc(env(safe-area-inset-left) + 44px));
  }

  .status-band div {
    padding: 14px;
  }

  .status-band strong,
  .status-band span {
    font-size: 13px;
  }

  .section {
    padding:
      34px max(58px, calc(env(safe-area-inset-right) + 44px))
      34px max(58px, calc(env(safe-area-inset-left) + 44px));
  }

  .section h2 {
    font-size: 30px;
  }

  .section-heading {
    margin-bottom: 24px;
  }

  .section-heading p,
  .cta-panel p {
    font-size: 14px;
  }

  .step {
    min-height: 140px;
    padding: 18px;
  }

  .step h3,
  .result-grid h3,
  .command-card h3 {
    font-size: 18px;
  }

  .step p,
  .result-grid p,
  figcaption {
    font-size: 13px;
  }

  pre {
    padding: 13px;
  }

  code {
    font-size: 12px;
  }

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

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

  .image-modal {
    padding:
      12px max(58px, calc(env(safe-area-inset-right) + 44px))
      12px max(58px, calc(env(safe-area-inset-left) + 44px));
  }

  .modal-panel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(220px, 0.5fr);
    gap: 14px;
    align-items: start;
    width: 100%;
    max-width: 100%;
    max-height: calc(100vh - 24px);
    padding: 14px;
    overflow: hidden;
  }

  .modal-close {
    grid-column: 1;
    grid-row: 1;
    position: static;
    float: none;
    margin: 0;
    width: 42px;
    height: 42px;
  }

  .modal-panel img {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    height: calc(100vh - 52px);
    max-height: calc(100vh - 52px);
    object-fit: contain;
  }

  #modal-caption {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
  }
}

@media (min-width: 1280px) {
  .site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px max(24px, calc((100vw - 1180px) / 2));
  }

  .brand span:last-child {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .nav-toggle,
  .nav-toggle-label {
    display: none;
  }

  nav {
    display: flex;
    grid-column: auto;
    flex-direction: row;
    align-items: center;
    gap: 22px;
    width: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-size: 16px;
  }

  nav a {
    padding: 0;
  }

  nav a:hover {
    background: transparent;
  }
}
