:root {
  --brand: #007575;
  --brand-2: #005f5f;
  --bg: #070a0b;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-2: rgba(255, 255, 255, 0.09);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.68);
  --border: rgba(255, 255, 255, 0.14);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --radius-sm: 10px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

* { box-sizing: border-box; }
html, body {
  height: 100%;
  overflow-x: hidden;
}
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(0, 117, 117, 0.45), transparent 65%),
    radial-gradient(1000px 500px at 90% 10%, rgba(0, 160, 160, 0.20), transparent 60%),
    linear-gradient(180deg, #060809 0%, #070a0b 60%, #070a0b 100%);
  /* Avoid mobile scroll glitches (iOS/Android) caused by fixed backgrounds */
  background-attachment: scroll;
}

@media (hover: hover) and (pointer: fine) {
  body { background-attachment: fixed; }
}

a { color: inherit; }
code { font-family: var(--mono); font-size: 0.95em; }

.container {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(7, 10, 11, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
}

.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(0, 117, 117, 0.18);
  border: 1px solid rgba(0, 117, 117, 0.35);
  color: rgba(225, 255, 255, 0.95);
}

.brand__name { font-weight: 650; letter-spacing: 0.2px; }

.nav { display: flex; gap: 14px; align-items: center; }
.nav__link {
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--muted);
}
.nav__link:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

.nav__cta {
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(0, 117, 117, 0.18);
  border: 1px solid rgba(0, 117, 117, 0.40);

  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.nav__cta:hover { background: rgba(0, 117, 117, 0.25); }

.nav__ctaIcon {
  display: inline-grid;
  place-items: center;
  color: rgba(225, 255, 255, 0.95);
}

.nav__ctaStars {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-left: 10px;
  margin-left: 2px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.86);
  font-variant-numeric: tabular-nums;
}

.nav__ctaStars [data-github-stars] {
  min-width: 3ch;
  display: inline-block;
}

.hero { padding: 56px 0 28px; }
.hero__inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
  align-items: start;
}

.eyebrow {
  color: rgba(175, 255, 255, 0.85);
  background: rgba(0, 117, 117, 0.14);
  border: 1px solid rgba(0, 117, 117, 0.35);
  padding: 6px 10px;
  border-radius: 999px;
  display: inline-block;
  font-weight: 600;
  font-size: 0.9rem;
}

h1 {
  margin: 14px 0 10px;
  font-size: clamp(2.1rem, 3.5vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.lead { color: var(--muted); font-size: 1.08rem; line-height: 1.55; }

.hero__actions { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
}

.button--primary {
  background: linear-gradient(180deg, rgba(0, 117, 117, 0.55), rgba(0, 117, 117, 0.20));
  border-color: rgba(0, 117, 117, 0.55);
}
.button--primary:hover { background: linear-gradient(180deg, rgba(0, 117, 117, 0.65), rgba(0, 117, 117, 0.26)); }

.button--ghost:hover { background: rgba(255, 255, 255, 0.09); }

.button--small { padding: 9px 11px; border-radius: 10px; font-weight: 650; }

.hero__badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.badge {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.92rem;
}

.hero__card {
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 16px;
}

.codeblock {
  margin: 0;
  width: 100%;
  min-width: 0;
  border-radius: 12px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.10);
  font-family: var(--mono);
  font-size: 0.95rem;
  line-height: 1.5;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
}
.codeblock code { display: block; }
/* Keep highlight.js background from overriding our code blocks */
.codeblock code.hljs { background: transparent; padding: 0; }


.hero__result { margin-top: 14px; display: grid; gap: 6px; }
.hero__resultLabel { color: var(--muted); font-size: 0.92rem; }
.hero__resultValue {
  font-family: var(--mono);
  font-size: 1.1rem;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 117, 117, 0.14);
  border: 1px solid rgba(0, 117, 117, 0.35);
}

.hero__hint { margin: 12px 0 0; color: var(--muted); font-size: 0.95rem; }

.section { padding: 44px 0; }
.section__header { margin-bottom: 18px; }
h2 { margin: 0 0 6px; font-size: 1.7rem; }
.muted { color: var(--muted); }

.docTitle {
  margin: 0 0 10px;
  font-size: clamp(2.0rem, 3.2vw, 2.6rem);
  letter-spacing: -0.02em;
}

.docLayout {
  display: grid;
  /* Allow the content column to shrink; avoids grid overflow with long code lines */
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.docToc {
  min-width: 0;
  position: sticky;
  top: 74px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 14px;
}

.docToc__title {
  font-weight: 700;
  margin-bottom: 10px;
}

.docToc__link {
  display: block;
  text-decoration: none;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 10px;
}

.docToc__link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.docProse {
  min-width: 0;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 18px;
}

.docProse h2 { margin-top: 22px; }
.docProse h2:first-child { margin-top: 0; }
.docProse h3 { margin: 18px 0 8px; }
.docProse h4 { margin: 14px 0 6px; }
.docProse p { margin: 8px 0 12px; line-height: 1.6; }
.docProse pre { margin: 10px 0 14px; max-width: 100%; }

.docExamples {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  min-width: 0;
}

.docExample {
  min-width: 0;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 14px;
}

.docExample__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 10px;
}

.docExample__title { font-weight: 750; margin-bottom: 2px; }
.docExample__out { margin-top: 12px; }

.playground {
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.playground__toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--border);
}

.select {
  display: grid;
  gap: 6px;
  grid-template-columns: auto auto;
  align-items: center;
}
.select__label { font-size: 0.9rem; color: var(--muted); }
select {
  appearance: none;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 45px 10px 12px;

  /* Dropdown marker (chevron) */
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%),
    linear-gradient(to right, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12));
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%,
    calc(100% - 2.2rem) 50%;
  background-size:
    6px 6px,
    6px 6px,
    1px 1.6em;
  background-repeat: no-repeat;
}

.playground__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 380px;
  border-right: 1px solid var(--border);
}
.panel:last-child { border-right: 0; }

.panel__header {
  padding: 14px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.panel__header h3 { margin: 0; font-size: 1.05rem; }
.panel__header p { margin: 0; font-size: 0.92rem; line-height: 1.35; }

@media (min-width: 981px) {
  /* Keep the three panel headers aligned in the 3-column playground layout */
  .panel__header { min-height: 90px; }
}

.editor {
  width: 100%;
  resize: none;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 0.95rem;
  line-height: 1.45;
  outline: none;
}

.output {
  margin: 0;
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.20);
  font-family: var(--mono);
  font-size: 0.95rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.panel__footer {
  padding: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--muted);
  min-height: 40px;
  display: flex;
  align-items: center;
}

.note {
  margin-top: 16px;
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(0, 117, 117, 0.10);
  border: 1px solid rgba(0, 117, 117, 0.30);
  color: rgba(225, 255, 255, 0.92);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.card {
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}
.card h3 { margin: 0 0 8px; }
.card p { margin: 0; color: var(--muted); line-height: 1.5; }

.callout {
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.list { margin: 0; padding-left: 18px; color: var(--muted); line-height: 1.6; }
.list strong { color: var(--text); }

.footer {
  padding: 28px 0 44px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

.footer__inner { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.footer__brand { font-weight: 700; margin-bottom: 4px; }
.footer__right { display: flex; gap: 14px; color: var(--muted); }
.footer__right a { text-decoration: none; padding: 8px 10px; border-radius: 10px; }
.footer__right a:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.footer__license { color: var(--muted); margin-top: 14px; }
.footer__license a { text-decoration: underline dotted; }
.footer__license a:hover { text-decoration: underline; color: var(--brand) }

@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; }
  .playground__grid { grid-template-columns: 1fr; }
  .panel { border-right: 0; border-bottom: 1px solid var(--border); }
  .panel:last-child { border-bottom: 0; }
  .cards { grid-template-columns: 1fr; }
  .nav { gap: 8px; }
  .nav__link { display: none; }
  .nav__link--always { display: inline-flex; }

  .docLayout { grid-template-columns: 1fr; }
  .docToc { position: relative; top: auto; }
  .docExamples { grid-template-columns: 1fr; }
}
