@font-face {
  font-family: "Geist";
  src: url("./fonts/Geist.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("./fonts/GeistMono.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f2f0e9;
  --bg-translucent: rgba(242, 240, 233, 0.82);
  --paper: #fbfaf6;
  --paper-strong: #ffffff;
  --ink: #141510;
  --ink-soft: #2d2f27;
  --muted: #66695e;
  --faint: #696c60;
  --line: rgba(20, 21, 16, 0.12);
  --line-strong: rgba(20, 21, 16, 0.22);
  --accent: #c7f45b;
  --accent-strong: #a9dd36;
  --accent-ink: #131707;
  --violet: #8b7cff;
  --terminal: #171824;
  --terminal-top: #1f2030;
  --shadow: 0 32px 80px rgba(25, 26, 20, 0.16);
  --radius: 18px;
  --max: 1180px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0c0d0a;
    --bg-translucent: rgba(12, 13, 10, 0.8);
    --paper: #131510;
    --paper-strong: #181b14;
    --ink: #f2f4e9;
    --ink-soft: #d8dbcd;
    --muted: #a0a496;
    --faint: #8b8f81;
    --line: rgba(242, 244, 233, 0.13);
    --line-strong: rgba(242, 244, 233, 0.24);
    --accent: #c8f560;
    --accent-strong: #b6e84a;
    --accent-ink: #111507;
    --violet: #a89bff;
    --terminal: #171824;
    --terminal-top: #1f2030;
    --shadow: 0 32px 90px rgba(0, 0, 0, 0.55);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background:
    radial-gradient(900px 560px at 82% -2%, rgba(199, 244, 91, 0.2), transparent 62%),
    radial-gradient(720px 460px at 4% 18%, rgba(139, 124, 255, 0.08), transparent 64%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 58%);
  opacity: 0.42;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

a {
  color: inherit;
  text-decoration: none;
}

img,
video {
  max-width: 100%;
}

button {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 650;
  transform: translateY(-200%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.wrap {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid transparent;
  background: var(--bg-translucent);
  backdrop-filter: blur(18px);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 10px 30px rgba(20, 21, 16, 0.04);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.06em;
}

.brand-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-meta small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 520;
  transition: color 160ms ease, background 160ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
  background: var(--paper);
}

.nav-links .nav-cta {
  margin-left: 0.35rem;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.nav-links .nav-cta:hover {
  border-color: var(--ink);
  background: transparent;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  margin: 4px auto;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(3rem, 7vw, 6.5rem) 0 3.5rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.4rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.73rem;
  font-weight: 550;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-strong);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 24%, transparent);
}

.hero h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(3.3rem, 6.4vw, 6.3rem);
  font-weight: 610;
  letter-spacing: -0.065em;
  line-height: 0.93;
  text-wrap: balance;
}

.hero h1 em {
  position: relative;
  color: var(--ink);
  font-style: normal;
  white-space: nowrap;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  left: -0.04em;
  right: -0.04em;
  bottom: 0.06em;
  z-index: -1;
  height: 0.28em;
  border-radius: 0.06em;
  background: var(--accent);
  transform: rotate(-1.5deg);
}

.hero-lede {
  max-width: 38rem;
  margin: 1.8rem 0 0;
  color: var(--muted);
  font-size: clamp(1.03rem, 1.5vw, 1.18rem);
  line-height: 1.65;
}

.hero-lede strong {
  color: var(--ink);
  font-weight: 560;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.65rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--ink);
  color: var(--bg);
}

.button-primary:hover {
  background: var(--ink-soft);
}

.button-ghost {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.button-ghost:hover {
  border-color: var(--ink);
}

.button-small {
  min-height: 38px;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.55rem;
  padding-left: 1px;
}

.install-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.45rem 0.45rem 0.45rem 1rem;
  width: min(100%, 31rem);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.76rem;
  overflow: hidden;
}

.install-pill code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.install-pill .copy {
  flex: none;
  min-height: 32px;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 650;
  cursor: pointer;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.2rem;
  margin: 2.4rem 0 0;
  padding: 1.2rem 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.hero-stats strong {
  display: block;
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.73rem;
  letter-spacing: 0.02em;
}

.hero-shot {
  position: relative;
  margin: 0;
}

.hero-shot::before {
  content: "";
  position: absolute;
  inset: 10% 5% -6% 5%;
  z-index: -1;
  border-radius: 40px;
  background: var(--accent);
  filter: blur(42px);
  opacity: 0.22;
}

.terminal {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: var(--terminal);
  box-shadow: var(--shadow);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  height: 40px;
  padding: 0 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: var(--terminal-top);
  color: rgba(255, 255, 255, 0.56);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.dots {
  display: flex;
  gap: 6px;
}

.dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff6b6b;
}

.dots i:nth-child(2) {
  background: #ffd166;
}

.dots i:nth-child(3) {
  background: #6ee7a8;
}

.terminal-bar span {
  flex: 1;
  text-align: center;
}

.terminal img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-shot figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.85rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}

.hero-shot figcaption span:last-child {
  color: var(--faint);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.tag-row > span {
  margin-right: 0.45rem;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tag {
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 55%, transparent);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.section {
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 3rem;
}

.section-head h2 {
  max-width: 16ch;
  margin: 0;
  font-size: clamp(2.2rem, 4.3vw, 4.2rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1;
  text-wrap: balance;
}

.section-head p {
  max-width: 34rem;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.kicker {
  display: block;
  margin-bottom: 1rem;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.step {
  padding: 1.5rem 1.35rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--paper) 66%, transparent);
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 1.4rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
}

.step h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.step code {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.8em;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--line);
}

.feature {
  min-height: 220px;
  padding: 1.7rem;
  background: var(--paper);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 2.4rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 600;
}

.feature h3 {
  margin: 0 0 0.55rem;
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.62;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.shot {
  grid-column: span 6;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.shot.wide,
.shot.narrow {
  grid-column: span 6;
}

.shot.third {
  grid-column: span 4;
}

.shot-media {
  position: relative;
  padding: 0.6rem;
  background: #0b0d10;
}

.shot-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.shot figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.05rem 1rem;
}

.shot figcaption strong {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.shot figcaption span {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.dark-band {
  position: relative;
  overflow: hidden;
  margin: clamp(3rem, 6vw, 5rem) 0;
  padding: clamp(2.2rem, 5vw, 4.5rem);
  border-radius: 30px;
  background: #0d0e0b;
  color: #f2f4e9;
}

.dark-band::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -160px;
  top: -240px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.12;
  filter: blur(80px);
  pointer-events: none;
}

.dark-band .kicker {
  color: #8d9284;
}

.video-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.video-head h2 {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(2.2rem, 4.4vw, 4.1rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1;
}

.video-head p {
  max-width: 24rem;
  margin: 0 0 0.4rem;
  color: #a7ab9e;
  font-size: 0.92rem;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: var(--terminal);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.45);
}

.video-frame video {
  display: block;
  width: 100%;
  height: auto;
  background: var(--terminal);
}

.video-note {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.8rem;
  color: #7f8478;
  font-family: var(--mono);
  font-size: 0.66rem;
}

.docs-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.docs-nav {
  position: sticky;
  top: 6.5rem;
}

.docs-nav p {
  margin: 0 0 0.8rem;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.docs-nav a {
  display: block;
  padding: 0.3rem 0;
  color: var(--muted);
  font-size: 0.84rem;
  transition: color 160ms ease;
}

.docs-nav a:hover {
  color: var(--ink);
}

.doc-block {
  padding: 2.6rem 0;
  border-top: 1px solid var(--line);
}

.doc-block:first-child {
  padding-top: 0;
  border-top: 0;
}

.doc-block h3 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.45rem, 2.3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.doc-block > p {
  max-width: 48rem;
  margin: 0 0 1.2rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.doc-block a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent-strong);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.code-block {
  position: relative;
  overflow: hidden;
  margin: 1rem 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--terminal);
}

.code-block pre {
  margin: 0;
  padding: 1.1rem 5.2rem 1.1rem 1.15rem;
  overflow-x: auto;
  color: #e7e9dc;
  font-family: var(--mono);
  font-size: 0.79rem;
  line-height: 1.7;
  tab-size: 2;
}

.code-block .copy {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
  color: #daddcf;
  font-family: var(--font);
  font-size: 0.66rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.code-block .copy:hover {
  background: var(--accent);
  color: var(--accent-ink);
}

.code-block .copy.is-copied {
  background: var(--accent);
  color: var(--accent-ink);
}

.code-block .comment {
  color: #898e7c;
}

.code-block .prompt {
  color: var(--accent);
}

.table-wrap {
  overflow-x: auto;
  margin: 1.2rem 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: left;
}

th,
td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

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

th {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.67rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

td code,
p code,
li code {
  padding: 0.1em 0.32em;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: color-mix(in srgb, var(--paper) 55%, transparent);
  font-family: var(--mono);
  font-size: 0.86em;
}

tr.group th {
  padding-top: 1.1rem;
  color: var(--ink);
  background: var(--bg);
  letter-spacing: 0.1em;
}

.key-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 1rem;
}

.key-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
}

kbd {
  min-width: 2.3rem;
  padding: 0.2rem 0.42rem;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.67rem;
  text-align: center;
  white-space: nowrap;
}

.key-item span {
  color: var(--muted);
  font-size: 0.82rem;
}

.callout {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-strong);
  border-radius: 0 12px 12px 0;
  background: color-mix(in srgb, var(--paper) 70%, transparent);
  color: var(--muted);
  font-size: 0.86rem;
}

.cta {
  position: relative;
  overflow: hidden;
  margin: clamp(3rem, 6vw, 5rem) 0 0;
  padding: clamp(2.4rem, 6vw, 5rem);
  border-radius: 30px;
  background: var(--accent);
  color: var(--accent-ink);
}

.cta::after {
  content: "pl";
  position: absolute;
  right: -1rem;
  bottom: -5.5rem;
  color: rgba(19, 23, 7, 0.08);
  font-family: var(--mono);
  font-size: 20rem;
  font-weight: 700;
  letter-spacing: -0.15em;
  line-height: 1;
  pointer-events: none;
}

.cta h2 {
  position: relative;
  z-index: 1;
  max-width: 15ch;
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 0.98;
  text-wrap: balance;
}

.cta p {
  position: relative;
  z-index: 1;
  max-width: 33rem;
  margin: 1.1rem 0 1.6rem;
  color: color-mix(in srgb, var(--accent-ink) 76%, transparent);
  font-size: 0.95rem;
}

.cta-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.cta .button-primary {
  background: var(--accent-ink);
  color: var(--accent);
}

.cta .button-ghost {
  border-color: color-mix(in srgb, var(--accent-ink) 30%, transparent);
  color: var(--accent-ink);
}

.cta .button-ghost:hover {
  border-color: var(--accent-ink);
}

.site-footer {
  padding: 3rem 0 2.5rem;
}

.footer-grid {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.footer-brand p {
  max-width: 25rem;
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.2rem;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.02em;
}

.js .reveal {
  transform: translateY(14px);
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.js .reveal.is-visible {
  transform: none;
}

@media (max-width: 1060px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero h1 {
    max-width: 13ch;
  }

  .hero-shot {
    width: min(100%, 780px);
  }

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

  .feature:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 840px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1.25rem 1rem;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 0.7rem 0.5rem;
  }

  .nav-links .nav-cta {
    margin-left: 0;
    border: 0;
    border-radius: 8px;
  }

  .section-head,
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
  }

  .docs-nav p {
    width: 100%;
    margin-bottom: 0.3rem;
  }

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

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

  .shot,
  .shot.wide,
  .shot.narrow,
  .shot.third {
    grid-column: auto;
  }

  .video-head {
    display: block;
  }

  .video-head p {
    margin-top: 1rem;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }

  .wrap {
    width: min(var(--max), calc(100% - 1.5rem));
  }

  .hero {
    padding-top: 2.5rem;
  }

  .hero h1 {
    font-size: clamp(2.9rem, 14vw, 4.3rem);
  }

  .hero-stats {
    gap: 1.2rem 1.5rem;
  }

  .tag-row {
    gap: 0.4rem;
  }

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

  .feature:last-child {
    grid-column: auto;
  }

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

  .footer-grid,
  .footer-bottom,
  .video-note {
    display: block;
  }

  .footer-links {
    margin-top: 1.5rem;
  }

  .footer-bottom span {
    display: block;
    margin-top: 0.4rem;
  }

  .install-pill {
    font-size: 0.68rem;
  }

  .cta::after {
    font-size: 12rem;
    bottom: -3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    transform: none;
  }
}

.feature-icon svg {
  width: 20px;
  height: 20px;
}

@media (prefers-color-scheme: dark) {
  .brand-mark {
    background: var(--accent);
    color: var(--accent-ink);
  }
}

/* Playground */
[hidden] {
  display: none !important;
}

.playground-section {
  padding-top: clamp(2.5rem, 5vw, 4rem);
}

.playground {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 30px 80px rgba(25, 26, 20, 0.1);
}

.pg-input {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: clamp(1.1rem, 2vw, 1.5rem);
  border-right: 1px solid var(--line);
}

.pg-head,
.pg-out-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.pg-step {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pg-tabs,
.pg-chart-tabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
}

.pg-tabs button,
.pg-chart-tabs button {
  padding: 0.3rem 0.55rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.pg-tabs button.is-active,
.pg-chart-tabs button.is-active {
  background: var(--ink);
  color: var(--bg);
}

.pg-textarea,
.pg-sql textarea {
  display: block;
  width: 100%;
  min-height: 245px;
  padding: 0.9rem;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.6;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.pg-textarea:focus,
.pg-sql textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent);
}

.pg-hint-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.45rem;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.64rem;
}

.pg-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent-strong);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.pg-link:disabled {
  color: var(--faint);
  text-decoration-color: transparent;
  cursor: default;
}

.pg-input > [data-pg-pane] {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.pg-input [data-pg-pane="paste"] .pg-textarea,
.pg-input [data-pg-pane="file"] .dropzone {
  flex: 1;
}

.pg-actions,
.pg-sql-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.pg-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 38px;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.pg-button:hover {
  border-color: var(--ink);
}

.pg-button.is-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.pg-button.is-primary:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.pg-button.is-small {
  min-height: 32px;
  padding: 0.3rem 0.65rem;
  font-size: 0.7rem;
}

.dropzone {
  display: grid;
  place-items: center;
  gap: 0.35rem;
  min-height: 245px;
  padding: 2rem 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background:
    radial-gradient(300px 150px at 50% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
    var(--bg);
  text-align: center;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.dropzone:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent);
}

.dropzone:hover,
.dropzone.is-over {
  border-color: var(--ink);
  background:
    radial-gradient(360px 180px at 50% 0%, color-mix(in srgb, var(--accent) 36%, transparent), transparent 70%),
    var(--bg);
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  font-family: var(--mono);
  font-size: 1.15rem;
}

.dropzone strong {
  font-size: 0.9rem;
  font-weight: 600;
}

.dropzone > span:last-child {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.02em;
}

.pg-file-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-top: 0.6rem;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.66rem;
}

.pg-select {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.pg-select select,
.pg-sql-bar select {
  max-width: 11rem;
  padding: 0.25rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.66rem;
}

.pg-sql {
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.pg-sql-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.45rem;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pg-sql textarea {
  min-height: 92px;
  font-size: 0.68rem;
}

.pg-sql-actions {
  margin-top: 0.45rem;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.pg-status {
  min-height: 1.1em;
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.64rem;
  line-height: 1.45;
}

.pg-status.is-ok {
  color: color-mix(in srgb, #2c7a3f 80%, var(--ink));
}

.pg-status.is-error {
  color: #b33a3a;
}

.pg-output {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-width: 0;
  padding: clamp(1.1rem, 2vw, 1.5rem);
  background: #171824;
  color: #f2f4e9;
}

.pg-output .pg-step {
  color: #8d9284;
}

.pg-out-head > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.pg-out-head strong {
  overflow: hidden;
  max-width: 22rem;
  color: #f2f4e9;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pg-chart-tabs {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.pg-chart-tabs button {
  color: #aeb2a3;
}

.pg-chart-tabs button.is-active {
  background: var(--accent);
  color: var(--accent-ink);
}

.pg-chart {
  position: relative;
  flex: none;
  height: 370px;
}

.pg-chart canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.pg-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.35rem;
  color: #8d9284;
  text-align: center;
}

.pg-empty > span {
  font-size: 2.4rem;
  color: var(--accent);
}

.pg-empty strong {
  color: #f2f4e9;
  font-size: 0.9rem;
  font-weight: 600;
}

.pg-empty p {
  margin: 0;
  font-size: 0.72rem;
}

.pg-preview {
  overflow: auto;
  max-height: 142px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.pg-preview table {
  min-width: 100%;
  color: #c8ccbe;
  font-family: var(--mono);
  font-size: 0.62rem;
}

.pg-preview th,
.pg-preview td {
  padding: 0.3rem 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.pg-preview th {
  position: sticky;
  top: 0;
  background: #1f2030;
  color: #f2f4e9;
  font-size: 0.6rem;
}

.pg-out-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
  color: #8d9284;
  font-family: var(--mono);
  font-size: 0.63rem;
}

.pg-out-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.8rem;
  width: 100%;
}

.pg-output .pg-link {
  color: #f2f4e9;
  font-size: 0.68rem;
}

.pg-output .pg-link:disabled {
  color: #6f7468;
}

.pg-note {
  margin: 0;
  color: #7f8478;
  font-size: 0.68rem;
  line-height: 1.5;
}

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

  .pg-input {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .pg-chart {
    height: 340px;
  }
}

@media (max-width: 620px) {
  .pg-out-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .pg-chart-tabs {
    width: 100%;
  }

  .pg-chart-tabs button {
    flex: 1;
  }

  .pg-textarea,
  .dropzone {
    min-height: 200px;
  }

  .pg-chart {
    height: 280px;
  }

  .pg-out-foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .pg-hint-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }
}

@media (prefers-color-scheme: dark) {
  .pg-tabs {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
  }

  .pg-tabs button {
    color: var(--muted);
  }

  .pg-tabs button.is-active {
    background: var(--accent);
    color: var(--accent-ink);
  }

  .pg-textarea,
  .pg-sql textarea,
  .dropzone {
    background: #171914;
  }
}

.pg-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.pg-control {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #8d9284;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pg-control select {
  max-width: 9rem;
  padding: 0.25rem 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  background: #1f2030;
  color: #f2f4e9;
  font-family: var(--mono);
  font-size: 0.64rem;
}

.pg-series-wrap {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  color: #8d9284;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pg-series {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 0.3rem;
  min-width: 0;
}

.pg-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 9rem;
  padding: 0.22rem 0.45rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: transparent;
  color: #8d9284;
  font-family: var(--font);
  font-size: 0.64rem;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.pg-chip::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--chip-color, #8d9284);
}

.pg-chip.is-active {
  border-color: color-mix(in srgb, var(--chip-color, var(--accent)) 55%, transparent);
  background: color-mix(in srgb, var(--chip-color, var(--accent)) 12%, transparent);
  color: #f2f4e9;
}

.pg-chip.is-active::before {
  background: var(--chip-color, var(--accent));
}

@media (prefers-color-scheme: dark) {
  .step-num {
    background: var(--accent);
    color: var(--accent-ink);
  }
}

/* Playground tools, agent and history */
.pg-out-actions {
  align-items: center;
  justify-content: flex-end;
}

.pg-tool {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 28px;
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: #f2f4e9;
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.pg-tool:hover {
  border-color: var(--accent);
}

.pg-tool:disabled {
  opacity: 0.4;
  cursor: default;
}

.pg-badge {
  display: inline-grid;
  place-items: center;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 700;
}

.pg-vsep {
  display: inline-block;
  width: 1px;
  height: 1.1rem;
  background: rgba(255, 255, 255, 0.12);
}

.pg-menu {
  position: relative;
}

.pg-menu summary {
  list-style: none;
}

.pg-menu summary::-webkit-details-marker {
  display: none;
}

.pg-menu[open] summary {
  border-color: var(--accent);
}

.pg-menu-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.45rem);
  z-index: 10;
  display: grid;
  min-width: 9.5rem;
  padding: 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  background: #1f2030;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.pg-menu-panel button {
  padding: 0.35rem 0.5rem;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #daddcf;
  font-family: var(--font);
  font-size: 0.7rem;
  text-align: left;
  cursor: pointer;
}

.pg-menu-panel button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.pg-agent-status {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.03em;
}

.pg-agent-status strong {
  color: var(--ink);
  font-weight: 600;
}

.pg-agent-status span:last-child {
  margin-left: auto;
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}

.pg-agent-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-strong);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}

.pg-agent-log {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 180px;
  max-height: none;
  padding: 0.7rem;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  font-size: 0.77rem;
  line-height: 1.5;
}

.pg-agent-msg {
  max-width: 94%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink-soft);
  white-space: pre-wrap;
}

.pg-agent-msg.is-user {
  align-self: flex-end;
  border-color: transparent;
  background: var(--ink);
  color: var(--bg);
}

.pg-agent-msg strong {
  color: var(--ink);
  font-weight: 650;
}

.pg-agent-msg.is-user strong {
  color: var(--accent);
}

.pg-agent-msg ul {
  margin: 0.4rem 0 0;
  padding-left: 1rem;
}

.pg-agent-msg li {
  margin: 0.15rem 0;
}

.pg-agent-msg .pg-agent-action {
  margin-top: 0.45rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
}

.pg-agent-msg .pg-agent-action:hover {
  border-color: var(--ink);
  background: var(--accent);
}

.pg-agent-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pg-agent-skills button {
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
}

.pg-agent-skills button:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.pg-agent-form {
  display: flex;
  gap: 0.4rem;
}

.pg-agent-form input {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.75rem;
  outline: none;
}

.pg-agent-form input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 40%, transparent);
}

.pg-agent-form button {
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 650;
  cursor: pointer;
}

.pg-agent-note {
  margin: 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.61rem;
}

.pg-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.pg-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 11, 8, 0.58);
  backdrop-filter: blur(5px);
}

.pg-modal-dialog {
  position: relative;
  width: min(880px, 100%);
  max-height: 88vh;
  padding: clamp(1rem, 3vw, 1.7rem);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.28);
}

.pg-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.pg-modal-head h3 {
  margin: 0.15rem 0 0;
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.04em;
}

.pg-modal-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.pg-modal-actions .pg-link {
  color: var(--muted);
  font-size: 0.7rem;
}

.pg-modal-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.pg-modal-copy {
  max-width: 40rem;
  margin: 0.65rem 0 1.2rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.pg-history-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.pg-history-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}

.pg-history-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
  background: var(--terminal);
}

.pg-history-body {
  padding: 0.7rem;
}

.pg-history-body h4 {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pg-history-body p {
  margin: 0.2rem 0 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.61rem;
}

.pg-history-actions {
  display: flex;
  gap: 0.7rem;
  padding: 0.55rem 0.7rem 0.7rem;
}

.pg-history-actions button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent-strong);
  text-underline-offset: 2px;
  cursor: pointer;
}

.pg-history-actions button.is-danger {
  color: #a23d3d;
  text-decoration-color: transparent;
}

.pg-history-empty {
  display: none;
  margin: 1.2rem 0 0;
  padding: 2.2rem 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.pg-history-empty.is-visible {
  display: block;
}

@media (max-width: 720px) {
  .pg-history-list {
    grid-template-columns: 1fr;
  }

  .pg-out-actions {
    justify-content: flex-start;
  }

}

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