/* Per-style pages (site/styles/<slug>/), generated by scripts/seo_pages.py. */

:root {
  color-scheme: dark;
  --bg: #050505;
  --surface: #101010;
  --ink: #f7f4ec;
  --muted: #aaa59b;
  --line: #30302c;
  --accent: #b9ff3d;
  --accent-text: #b9ff3d;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f5f2;
  --surface: #ffffff;
  --ink: #111111;
  --muted: #5f5f58;
  --line: #d9d9d2;
  --accent: #b9ff3d;
  --accent-text: #4f7300;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
}

a {
  color: var(--ink);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
}

.sp-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 20px 56px;
}

.sp-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.sp-crumbs a {
  color: var(--muted);
  text-decoration: none;
}

.sp-crumbs a:hover {
  color: var(--ink);
}

.sp-hero {
  margin: 28px 0 24px;
}

.sp-eyebrow {
  margin: 0 0 8px;
  color: var(--accent-text);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.sp-lede {
  max-width: 760px;
  margin: 14px 0 20px;
  color: var(--muted);
  font-size: 1.1rem;
}

.sp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sp-button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.sp-button:hover {
  border-color: var(--muted);
}

.sp-button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #111111;
}

.sp-previews {
  display: grid;
  grid-template-columns: minmax(0, 3.2fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.sp-previews figure {
  margin: 0;
}

.sp-previews img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.sp-previews .wide img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.sp-previews .tall img {
  aspect-ratio: 9 / 16;
  object-fit: cover;
}

figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.8rem;
}

.sp-cases {
  margin-top: 36px;
}

.sp-cases > p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.sp-case-grid figure {
  margin: 0;
}

.sp-case-grid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sp-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 36px;
  margin-top: 36px;
}

h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.sp-columns section p,
.sp-columns li {
  color: var(--muted);
}

.sp-columns h2:not(:first-child) {
  margin-top: 26px;
}

.sp-anchors,
.sp-steps {
  margin: 0;
  padding-left: 20px;
}

.sp-anchors li,
.sp-steps li {
  margin-bottom: 8px;
}

.sp-vars {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sp-vars code {
  color: var(--accent-text);
}

.sp-vars span {
  color: var(--muted);
  font-size: 0.85rem;
}

.sp-json {
  margin-top: 40px;
}

.sp-json-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.sp-json-head h2 {
  margin: 0;
}

.sp-json pre {
  max-height: 520px;
  margin: 0;
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font: 0.8rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.sp-related {
  margin-top: 44px;
}

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

.related-card {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.related-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.related-card:hover span {
  text-decoration: underline;
}

.sp-related > p a {
  color: var(--accent-text);
}

.sp-footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.sp-footer a {
  color: var(--muted);
}

.sp-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.9rem;
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.sp-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 760px) {
  .sp-previews,
  .sp-columns {
    grid-template-columns: 1fr;
  }

  .sp-previews .tall {
    max-width: 260px;
  }

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