/* Startklar docs — styled after cyberhouse.at (navy, Space Grotesk, pixels). */

@font-face {
    font-family: "Space Grotesk";
    font-weight: 300;
    font-display: swap;
    src: url("fonts/space-grotesk-300.woff2") format("woff2");
}
@font-face {
    font-family: "Space Grotesk";
    font-weight: 400;
    font-display: swap;
    src: url("fonts/space-grotesk-400.woff2") format("woff2");
}
@font-face {
    font-family: "Space Grotesk";
    font-weight: 700;
    font-display: swap;
    src: url("fonts/space-grotesk-700.woff2") format("woff2");
}
@font-face {
    font-family: "Pixelify Sans";
    font-weight: 400;
    font-display: swap;
    src: url("fonts/pixelify-sans-400.woff2") format("woff2");
}
@font-face {
    font-family: "JetBrains Mono";
    font-weight: 400;
    font-display: swap;
    src: url("fonts/jetbrains-mono-400.woff2") format("woff2");
}

:root {
    --bg: #181d32;
    --bg-deep: #11152a;
    --panel: #1f2642;
    --line: #323e6a;
    --text: #ffffff;
    --soft: #c9cfe6;
    --muted: #8c97c4;
    --accent: #ff5a40;
    --teal: #00758c;
    --teal-light: #68a7b9;
    --light: #f2f5ff;
    --radius: 14px;
    --gutter: clamp(16px, 4vw, 48px);
    --max: 1240px;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font:
        400 18px / 1.6 "Space Grotesk",
        system-ui,
        sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--teal-light);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
a:hover {
    color: var(--accent);
}

code,
pre {
    font-family: "JetBrains Mono", ui-monospace, monospace;
}

:not(pre) > code {
    font-size: 0.86em;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0.1em 0.4em;
    color: var(--light);
    overflow-wrap: anywhere;
}

h1,
h2,
h3 {
    font-weight: 300;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0 0 0.5em;
}

/* --- header / footer --- */

.top {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px var(--gutter);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
    font-size: 20px;
    font-weight: 400;
}
.brand:hover {
    color: var(--text);
}
.mark {
    width: 26px;
    height: 26px;
}

.top nav {
    display: flex;
    gap: clamp(12px, 2.5vw, 32px);
    flex-wrap: wrap;
    justify-content: flex-end;
}
.top nav a {
    color: var(--soft);
    text-decoration: none;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.top nav a:hover {
    color: var(--accent);
}
a.file {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.file-icon {
    width: 1em;
    height: 1em;
    flex: none;
}

.foot {
    border-top: 1px solid var(--line);
    margin-top: 96px;
    padding: 40px var(--gutter);
    color: var(--muted);
    font-size: 15px;
}
.foot-inner {
    max-width: var(--max);
    margin: 0 auto;
}
.foot p {
    margin: 0.3em 0;
}
.foot p.foot-links {
    margin-top: 14px;
}
.foot p.foot-note {
    font-size: 13px;
    max-width: 760px;
    margin-top: 10px;
    opacity: 0.8;
}
.foot strong {
    color: var(--text);
    font-weight: 400;
}

/* --- landing --- */

.hero {
    max-width: var(--max);
    margin: 0 auto;
    padding: clamp(56px, 10vw, 140px) var(--gutter) clamp(48px, 8vw, 110px);
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
}

.hero h1 {
    font-size: clamp(40px, 6.4vw, 80px);
    letter-spacing: -0.02em;
}
.nowrap {
    white-space: nowrap;
}

.lead {
    font-size: clamp(18px, 2vw, 22px);
    color: var(--soft);
    max-width: 640px;
}

.eyebrow {
    color: var(--muted);
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.badge {
    font-family: "Pixelify Sans", "Space Grotesk", sans-serif;
    text-transform: none;
    letter-spacing: 0;
    color: var(--bg);
    background: var(--accent);
    padding: 2px 10px;
    border-radius: 4px;
}

.pixels svg {
    width: 100%;
    max-width: 460px;
    display: block;
    margin-left: auto;
    /* soft edges: the field fades out, no visible square */
    mask-image: radial-gradient(closest-side, #000 45%, transparent 100%);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 20px;
    margin: 36px 0 0;
}

.button {
    display: inline-block;
    padding: 12px 26px;
    border: 1px solid var(--soft);
    border-radius: 999px;
    color: var(--text);
    text-decoration: none;
    font-size: 17px;
    transition:
        background 0.15s,
        border-color 0.15s,
        color 0.15s;
}
.button:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.button.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}
.button.primary:hover {
    background: transparent;
    color: var(--accent);
}

.marquee {
    overflow: hidden;
    border-block: 1px solid var(--line);
    padding: 18px 0;
    font-family: "Pixelify Sans", "Space Grotesk", sans-serif;
    font-size: clamp(26px, 4vw, 44px);
    text-transform: uppercase;
    white-space: nowrap;
}
.marquee-track {
    display: inline-flex;
    align-items: center;
    animation: marquee 40s linear infinite;
}
.marquee span {
    padding: 0 22px;
}
.marquee i {
    width: 14px;
    height: 14px;
    background: var(--teal);
    box-shadow: 18px 0 0 var(--accent);
    margin-right: 18px;
    flex: none;
}
@keyframes marquee {
    to {
        transform: translateX(-50%);
    }
}
@media (prefers-reduced-motion: reduce) {
    .marquee-track {
        animation: none;
    }
    html {
        scroll-behavior: auto;
    }
}

.section {
    max-width: var(--max);
    margin: 0 auto;
    padding: clamp(56px, 8vw, 110px) var(--gutter) 0;
}
.section h2 {
    font-size: clamp(30px, 4vw, 44px);
}
.section.narrow {
    max-width: 760px;
}
.section.narrow h1 {
    font-size: clamp(40px, 6vw, 72px);
}

.label {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 15px;
    margin: 0 0 18px;
}

.steps,
.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}
.cards {
    margin-bottom: 28px;
}

.step,
.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    background: linear-gradient(180deg, var(--panel), transparent);
}
.step h3,
.card h3 {
    font-size: 24px;
}
.step p,
.card p {
    color: var(--soft);
    margin: 0 0 0.6em;
}
.card a {
    font-size: 14px;
    overflow-wrap: anywhere;
}
.num {
    display: block;
    font-family: "Pixelify Sans", "Space Grotesk", sans-serif;
    color: var(--accent);
    font-size: 22px;
    margin-bottom: 14px;
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    gap: 48px;
    align-items: start;
}
.split-text {
    align-self: center;
}
/* --- interactive example editor --- */

.editor {
    margin: 0 0 1.5em;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.editor-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    color: var(--muted);
}
.editor-dots {
    display: flex;
    gap: 6px;
}
.editor-dots i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--line);
}
.editor-dots i:first-child {
    background: var(--accent);
}
.editor-file {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    color: var(--light);
}
.editor-hint {
    margin-left: auto;
    text-align: right;
}
.editor-body {
    margin: 0;
    padding: 16px 0;
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--light);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    counter-reset: line;
}
.editor-body code {
    display: block;
}
.editor-body {
    /* gutter width and width of one indentation space */
    --gw: 58px;
    --iu: 1ch;
}
.editor-body .line {
    display: block;
    position: relative;
    min-height: 1.7em;
    padding: 0 18px 0 var(--gw);
}
.editor-body .line::before {
    counter-increment: line;
    content: counter(line);
    position: absolute;
    left: 0;
    width: 40px;
    text-align: right;
    color: #4a5582;
    user-select: none;
}
.editor-body .line:hover {
    background: rgba(255, 255, 255, 0.03);
}
.editor-body .k {
    color: var(--teal-light);
}
.editor-body .s {
    color: #ffb4a6;
}
.editor-body .c {
    color: var(--muted);
    font-style: italic;
}

.key {
    position: relative;
    cursor: help;
    text-decoration: underline dotted
        color-mix(in srgb, var(--teal-light) 55%, transparent);
    text-underline-offset: 4px;
}
.key:hover,
.key:focus {
    color: var(--accent);
    text-decoration-color: var(--accent);
    outline: none;
}
.key:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 2px;
}
.tip {
    display: none;
    position: absolute;
    text-indent: 0;
    user-select: none;
    z-index: 30;
    left: 0;
    top: calc(100% + 8px);
    width: min(380px, 70vw);
    padding: 14px 16px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-top: 2px solid var(--accent);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    font:
        400 14px / 1.5 "Space Grotesk",
        system-ui,
        sans-serif;
    color: var(--soft);
    white-space: normal;
    cursor: default;
}
.tip::before {
    /* hover bridge between key and tooltip */
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -10px;
    height: 10px;
}
.key:hover > .tip,
.key:focus > .tip,
.key:focus-within > .tip {
    display: block;
}
.tip-path {
    display: block;
    margin-bottom: 6px;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 12px;
    color: var(--teal-light);
}
.tip-text {
    display: block;
    color: var(--text);
}
.tip-values {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--muted);
}
.tip a {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    color: var(--accent);
}
.split p {
    color: var(--soft);
}

/* --- code --- */

.code {
    margin: 0 0 1.5em;
    padding: 20px 22px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.65;
    color: var(--light);
    tab-size: 4;
}
.code .k {
    color: var(--teal-light);
}
.code .s {
    color: #ffb4a6;
}
.code .c {
    color: var(--muted);
    font-style: italic;
}

/* --- docs --- */

.docs {
    max-width: var(--max);
    margin: 0 auto;
    padding: 48px var(--gutter) 0;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 56px;
    align-items: start;
}

.toc {
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    font-size: 15px;
}
.toc-mobile {
    display: none;
}
.toc-title {
    margin-top: 0;
}
.toc-title,
.toc summary {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 10px;
}
.toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 1px solid var(--line);
}
.toc li a {
    display: block;
    padding: 5px 0 5px 16px;
    margin-left: -1px;
    border-left: 2px solid transparent;
    color: var(--soft);
    text-decoration: none;
}
.toc li a:hover {
    color: var(--accent);
    border-left-color: var(--accent);
}
.toc-links {
    color: var(--muted);
    font-size: 14px;
    margin-top: 18px;
}

.prose {
    min-width: 0;
    max-width: 860px;
}
.doc-head {
    padding-bottom: 8px;
}
.doc-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 14px;
    margin: 0 0 20px;
}
.doc-label i {
    width: 8px;
    height: 8px;
    background: var(--teal);
}
.doc-label i:nth-child(2) {
    background: var(--accent);
}
.doc-label i:last-of-type {
    margin-right: 8px;
}
.doc-head h1 {
    font-size: clamp(48px, 7vw, 88px);
    letter-spacing: -0.03em;
    line-height: 1;
    margin: 0 0 18px;
}
.doc-head .dot {
    color: var(--accent);
}
.prose .doc-sub {
    font-size: clamp(19px, 2vw, 23px);
    color: var(--soft);
    margin: 0 0 22px;
}
.doc-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 22px;
    font-size: 15px;
    margin: 0;
}
.doc-meta a {
    color: var(--soft);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
}
.doc-meta a:hover {
    color: var(--accent);
    border-color: var(--accent);
}
.pill {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 13px;
    color: var(--light);
    border: 1px solid var(--teal);
    border-radius: 999px;
    padding: 3px 12px;
}
.prose h2 {
    font-size: clamp(26px, 3vw, 34px);
    margin-top: 2.2em;
    padding-top: 0.6em;
    border-top: 1px solid var(--line);
}
.prose h3 {
    font-size: 22px;
    margin-top: 1.8em;
}
.prose .anchor {
    color: inherit;
    text-decoration: none;
}
.prose .anchor:hover {
    color: var(--accent);
}
.prose p,
.prose li {
    color: var(--soft);
}
.prose a {
    overflow-wrap: anywhere;
}
.prose strong {
    color: var(--text);
    font-weight: 700;
}
.prose blockquote {
    margin: 1.5em 0;
    padding: 14px 20px;
    border-left: 3px solid var(--accent);
    background: var(--panel);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.prose blockquote p {
    margin: 0;
}

.table {
    overflow-x: auto;
    margin: 0 0 1.5em;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}
.table th,
.table td {
    text-align: left;
    vertical-align: top;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
}
.table tr:last-child td {
    border-bottom: 0;
}
.table th {
    color: var(--muted);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 13px;
    background: var(--bg-deep);
}

/* --- playground (editor) --- */

.pg {
    max-width: 1680px;
    margin: 0 auto;
    padding: 40px var(--gutter) 0;
}
.pg-head h1 {
    font-size: clamp(36px, 5vw, 64px);
    letter-spacing: -0.02em;
    margin: 0 0 12px;
}
.pg-file .dot {
    color: var(--accent);
}
.pg-head .doc-sub {
    font-size: clamp(18px, 2vw, 21px);
    color: var(--soft);
    margin: 0 0 32px;
}
.pg-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr);
    gap: 32px;
    align-items: start;
}
.pg-left {
    position: sticky;
    top: 92px;
}
.pg-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.pg-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pg-actions button {
    font: inherit;
    font-size: 14px;
    color: var(--soft);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 14px;
    cursor: pointer;
}
.pg-actions button:hover {
    color: var(--accent);
    border-color: var(--accent);
}
.pg-status {
    font-size: 14px;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
}
.pg-ok {
    color: #7fd9b0;
    border-color: #2f7a5d;
}
.pg-error {
    color: #ffb4a6;
    border-color: var(--accent);
}
.pg-editor-wrap {
    position: relative;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    height: calc(100vh - 300px);
    min-height: 420px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    font:
        13px / 1.65 "JetBrains Mono",
        ui-monospace,
        monospace;
}
.pg-gutter {
    overflow: hidden;
    padding: 14px 10px 14px 0;
    text-align: right;
    color: #4a5582;
    user-select: none;
    border-right: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.pg-gutter span {
    display: block;
    height: 1.65em;
}
.pg-gutter .pg-gutter-error {
    color: var(--accent);
    font-weight: 700;
}
/* Highlighted copy below a transparent textarea, scrolled in sync. */
.pg-code {
    position: relative;
    overflow: hidden;
}
#pg-highlight,
#pg-editor {
    position: absolute;
    inset: 0;
    margin: 0;
    border: 0;
    padding: 14px 16px;
    font: inherit;
    white-space: pre;
    tab-size: 4;
    letter-spacing: normal;
}
#pg-highlight {
    overflow: hidden;
    pointer-events: none;
    color: var(--light);
}
#pg-editor {
    resize: none;
    outline: none;
    background: transparent;
    color: transparent;
    -webkit-text-fill-color: transparent;
    overflow: auto;
    caret-color: var(--accent);
}
#pg-editor::selection {
    background: rgba(104, 167, 185, 0.35);
}
.hl-line {
    display: inline;
}
.hl-error {
    background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.hl-error .hl-text {
    text-decoration: underline wavy var(--accent);
    text-decoration-skip-ink: none;
    text-underline-offset: 4px;
}
.pg-hover {
    display: none;
    position: absolute;
    z-index: 5;
    max-width: 340px;
    padding: 8px 12px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-top: 2px solid var(--accent);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
    font:
        13px / 1.45 "Space Grotesk",
        system-ui,
        sans-serif;
    color: var(--text);
    pointer-events: none;
}
.pg-hover-show {
    display: block;
}
.pg-hover div + div {
    margin-top: 6px;
}
.pg-hover code {
    display: block;
    font-size: 11px;
    color: #ffb4a6;
    background: none;
    border: 0;
    padding: 0;
}
.hl-k {
    color: var(--teal-light);
}
.hl-s {
    color: #ffb4a6;
}
.hl-c {
    color: var(--muted);
    font-style: italic;
}
.hl-n {
    color: #ffd76e;
}
.hl-p {
    /* no bold: glyph widths must match the textarea for the caret */
    color: var(--accent);
}
.hl-d {
    color: var(--muted);
}
.pg-errors {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    max-height: 160px;
    overflow-y: auto;
}
.pg-error-item {
    text-align: left;
    font: inherit;
    font-size: 14px;
    color: var(--soft);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
}
.pg-error-item code {
    color: #ffb4a6;
    margin-right: 6px;
}
.pg-note {
    font-size: 13px;
    color: var(--muted);
}
.pg-output {
    transition: opacity 0.2s;
}
.pg-stale {
    opacity: 0.4;
}

/* diagram */
.pg-diagram {
    position: relative;
}
.pg-lines {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: visible;
}
.pg-bus {
    fill: none;
    stroke: var(--teal);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.7;
    transition:
        stroke 0.15s,
        opacity 0.15s;
}
.pg-more-targets {
    pointer-events: auto;
    cursor: pointer;
}
.pg-more-targets rect,
.pg-more-targets.pg-hl rect {
    fill: transparent;
    stroke: none;
}
.pg-more-targets polygon {
    fill: var(--teal);
    opacity: 0.7;
    transition:
        fill 0.15s,
        opacity 0.15s;
}
.pg-more-targets text {
    fill: var(--teal-light);
    font:
        13px "Space Grotesk",
        system-ui,
        sans-serif;
}
.pg-more-targets.pg-hl polygon,
.pg-more-targets:hover polygon {
    fill: var(--accent);
    opacity: 1;
}
.pg-more-targets.pg-hl text,
.pg-more-targets:hover text {
    fill: var(--accent);
}
.pg-bus-hl {
    display: none;
}
.pg-bus-hl.pg-hl {
    display: inline;
}
.pg-lines circle {
    fill: var(--teal-light);
    transition: fill 0.15s;
}
.pg-lines .pg-hl {
    stroke: var(--accent);
    fill: var(--accent);
    opacity: 1;
}
.pg-lines path.pg-hl {
    fill: none;
}
.pg-shared {
    border: 1px dashed color-mix(in srgb, var(--teal-light) 55%, transparent);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 56px;
    background: color-mix(in srgb, var(--teal) 7%, transparent);
}
.pg-band-title,
.pg-frame-title {
    font-family: "Pixelify Sans", "Space Grotesk", sans-serif;
    font-size: 17px;
    color: var(--text);
}
.pg-band-title {
    margin-bottom: 12px;
}
.pg-shared-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
.pg-frames {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
/* more than three targets: a third each, scroll horizontally */
.pg-frames-scroll {
    grid-auto-columns: calc((100% - 40px) / 3);
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: 10px;
}
.pg-frames-scroll > .pg-frame {
    scroll-snap-align: start;
}
.pg-frame {
    border: 1px solid var(--line);
    border-top: 3px solid var(--teal);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--panel), transparent 70%);
    padding: 14px;
}
.pg-frame-other,
.pg-frame-all {
    border-top-color: var(--muted);
}
.pg-frame-other {
    border-style: dashed;
}
.pg-frame-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 12px;
    margin-bottom: 12px;
}
.pg-frame-path {
    font:
        12px "JetBrains Mono",
        ui-monospace,
        monospace;
    color: var(--muted);
}
.pg-frame-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.pg-refs {
    /* only on small screens, where the lines are hidden */
    display: none;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}
.pg-ref {
    position: relative;
    z-index: 1;
    background: var(--bg);
    font-size: 13px;
    border: 1px dashed var(--teal-light);
    border-radius: 999px;
    padding: 2px 10px;
    cursor: default;
    transition:
        border-color 0.15s,
        color 0.15s;
}
.pg-ref.pg-hl,
.pg-res.pg-hl {
    border-color: var(--accent);
    color: var(--text);
}
.pg-card {
    position: relative;
    z-index: 1;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    transition: border-color 0.15s;
}
.pg-card header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.pg-card header strong {
    font-weight: 400;
    font-size: 16px;
    color: var(--text);
}
.pg-icon {
    display: inline-grid;
    place-items: center;
    min-width: 30px;
    height: 22px;
    padding: 0 5px;
    border-radius: 5px;
    font:
        12px "Pixelify Sans",
        "Space Grotesk",
        sans-serif;
    color: var(--bg);
    background: var(--teal-light);
}
.pg-icon-php {
    background: #8892bf;
}
.pg-icon-node {
    background: #7fd9b0;
}
.pg-icon-python {
    background: #ffd76e;
}
.pg-icon-mysql {
    background: #4f9ac6;
}
.pg-icon-redis {
    background: #c98276;
}
.pg-icon-container {
    background: var(--teal-light);
}
.pg-icon-env {
    background: #c3a5db;
}
/* envFile footer of an app card */
.pg-envfile {
    margin: 12px -14px -12px;
    padding: 10px 14px;
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, #c3a5db 7%, transparent);
    border-radius: 0 0 12px 12px;
}
.pg-envfile summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    list-style: none;
}
.pg-envfile summary::-webkit-details-marker {
    display: none;
}
.pg-envfile summary::after {
    content: "▸";
    margin-left: auto;
    color: var(--muted);
    transition: transform 0.15s;
}
.pg-envfile[open] summary::after {
    transform: rotate(90deg);
}
.pg-envfile summary code {
    font-size: 12px;
    color: var(--light);
    background: none;
    border: 0;
    padding: 0;
    overflow-wrap: anywhere;
}
.pg-envfile .pg-muted {
    font-size: 12px;
}
.pg-icon-smtp {
    background: var(--light);
    /* the pixel font draws "@" tiny */
    font:
        700 17px / 1 "Space Grotesk",
        system-ui,
        sans-serif;
}
.pg-badge {
    font:
        12px "JetBrains Mono",
        ui-monospace,
        monospace;
    color: var(--soft);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1px 7px;
    overflow-wrap: anywhere;
}
.pg-badge-shared {
    color: var(--teal-light);
    border-color: var(--teal-light);
}
.pg-badge-external {
    color: var(--muted);
    border-style: dashed;
}
.pg-badge-secret {
    color: #e2c878;
    border-color: color-mix(in srgb, #e2c878 35%, transparent);
}
.pg-badge-ext {
    color: #b8c0ff;
}
.pg-domains {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}
.pg-domain {
    font:
        12px "JetBrains Mono",
        ui-monospace,
        monospace;
    color: var(--light);
    background: color-mix(in srgb, var(--teal) 30%, transparent);
    border-radius: 6px;
    padding: 2px 8px;
    overflow-wrap: anywhere;
}
.pg-more {
    display: contents;
}
.pg-more summary {
    font-size: 12px;
    color: var(--teal-light);
    cursor: pointer;
    padding: 2px 6px;
}
.pg-more[open] summary {
    display: none;
}
.pg-rows {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2px 12px;
    margin: 10px 0 0;
    font-size: 13px;
}
.pg-rows dt {
    color: var(--muted);
}
.pg-rows dd {
    margin: 0;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 12px;
    color: var(--light);
    overflow-wrap: anywhere;
}
.pg-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}
.pg-env,
.pg-envlist {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 10px;
    font:
        12px "JetBrains Mono",
        ui-monospace,
        monospace;
    color: var(--muted);
    overflow-wrap: anywhere;
}
.pg-env b,
.pg-envlist b {
    color: var(--teal-light);
    font-weight: 400;
}
.pg-placeholder {
    color: #ffb4a6;
}
.pg-section-title {
    margin-top: 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}
.pg-cron {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
}
.pg-cron code {
    font-size: 12px;
    color: #ffb4a6;
}
.pg-cron strong {
    font-weight: 400;
    color: var(--text);
}
.pg-muted {
    color: var(--muted);
}
.pg-empty {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}
.pg-project {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 24px;
}
.pg-block {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
}
.pg-block h3 {
    font-size: 16px;
    margin: 0 0 10px;
}
.pg-redirects {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
}
.pg-redirects code {
    font-size: 12px;
    color: var(--light);
    overflow-wrap: anywhere;
}
.pg-arrow {
    color: var(--accent);
}

/* --- responsive --- */

@media (max-width: 900px) {
    .hero,
    .split,
    .docs {
        grid-template-columns: minmax(0, 1fr);
    }
    .pixels {
        display: none;
    }
    .split-text {
        position: static;
    }
    .pg-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    .pg-left {
        position: static;
    }
    .pg-editor-wrap {
        height: 55vh;
        min-height: 320px;
    }
    /* stacked layout: lines would cross the cards, the refs show the link */
    .pg-lines {
        display: none;
    }
    .pg-refs {
        display: flex;
    }
    .pg-frames,
    .pg-frames-scroll {
        grid-auto-flow: row;
        grid-auto-columns: auto;
        grid-template-columns: minmax(0, 1fr);
        overflow-x: visible;
    }
    .pg-shared {
        margin-bottom: 24px;
    }
    .steps,
    .cards {
        grid-template-columns: minmax(0, 1fr);
    }
    .toc {
        position: static;
        max-height: none;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        padding: 14px 18px;
    }
    .toc-desktop {
        display: none;
    }
    .toc-mobile {
        display: block;
    }
    .toc summary {
        margin: 0;
    }
    .toc details[open] summary {
        margin-bottom: 10px;
    }
    .docs {
        gap: 24px;
    }
}

@media (max-width: 560px) {
    .top nav a:nth-child(n + 4) {
        display: none;
    }
    .editor-hint {
        display: none;
    }
    .editor-body {
        font-size: 12px;
    }
    .editor-body {
        --gw: 40px;
        --iu: 0.5ch;
    }
    .editor-body .line {
        padding-right: 12px;
    }
    /* half-width indentation keeps the structure on narrow screens */
    .editor-body .ind {
        font-size: 0.5em;
    }
    .editor-body .line::before {
        width: 28px;
    }
}

@media (max-width: 700px) {
    /* Explanations as a bottom sheet on small screens */
    .tip {
        position: fixed;
        left: 12px;
        right: 12px;
        top: auto;
        bottom: 12px;
        width: auto;
    }
    .tip::before {
        display: none;
    }
}

.editor-body .line.i0{padding-left:calc(var(--gw) + 0 * var(--iu));text-indent:calc(0 * var(--iu) * -1)}
.editor-body .line.i1{padding-left:calc(var(--gw) + 1 * var(--iu));text-indent:calc(1 * var(--iu) * -1)}
.editor-body .line.i2{padding-left:calc(var(--gw) + 2 * var(--iu));text-indent:calc(2 * var(--iu) * -1)}
.editor-body .line.i3{padding-left:calc(var(--gw) + 3 * var(--iu));text-indent:calc(3 * var(--iu) * -1)}
.editor-body .line.i4{padding-left:calc(var(--gw) + 4 * var(--iu));text-indent:calc(4 * var(--iu) * -1)}
.editor-body .line.i5{padding-left:calc(var(--gw) + 5 * var(--iu));text-indent:calc(5 * var(--iu) * -1)}
.editor-body .line.i6{padding-left:calc(var(--gw) + 6 * var(--iu));text-indent:calc(6 * var(--iu) * -1)}
.editor-body .line.i7{padding-left:calc(var(--gw) + 7 * var(--iu));text-indent:calc(7 * var(--iu) * -1)}
.editor-body .line.i8{padding-left:calc(var(--gw) + 8 * var(--iu));text-indent:calc(8 * var(--iu) * -1)}
.editor-body .line.i9{padding-left:calc(var(--gw) + 9 * var(--iu));text-indent:calc(9 * var(--iu) * -1)}
.editor-body .line.i10{padding-left:calc(var(--gw) + 10 * var(--iu));text-indent:calc(10 * var(--iu) * -1)}
.editor-body .line.i11{padding-left:calc(var(--gw) + 11 * var(--iu));text-indent:calc(11 * var(--iu) * -1)}
.editor-body .line.i12{padding-left:calc(var(--gw) + 12 * var(--iu));text-indent:calc(12 * var(--iu) * -1)}
.editor-body .line.i13{padding-left:calc(var(--gw) + 13 * var(--iu));text-indent:calc(13 * var(--iu) * -1)}
.editor-body .line.i14{padding-left:calc(var(--gw) + 14 * var(--iu));text-indent:calc(14 * var(--iu) * -1)}
.editor-body .line.i15{padding-left:calc(var(--gw) + 15 * var(--iu));text-indent:calc(15 * var(--iu) * -1)}
.editor-body .line.i16{padding-left:calc(var(--gw) + 16 * var(--iu));text-indent:calc(16 * var(--iu) * -1)}
.editor-body .line.i17{padding-left:calc(var(--gw) + 17 * var(--iu));text-indent:calc(17 * var(--iu) * -1)}
.editor-body .line.i18{padding-left:calc(var(--gw) + 18 * var(--iu));text-indent:calc(18 * var(--iu) * -1)}
.editor-body .line.i19{padding-left:calc(var(--gw) + 19 * var(--iu));text-indent:calc(19 * var(--iu) * -1)}
.editor-body .line.i20{padding-left:calc(var(--gw) + 20 * var(--iu));text-indent:calc(20 * var(--iu) * -1)}
.editor-body .line.i21{padding-left:calc(var(--gw) + 21 * var(--iu));text-indent:calc(21 * var(--iu) * -1)}
.editor-body .line.i22{padding-left:calc(var(--gw) + 22 * var(--iu));text-indent:calc(22 * var(--iu) * -1)}
.editor-body .line.i23{padding-left:calc(var(--gw) + 23 * var(--iu));text-indent:calc(23 * var(--iu) * -1)}
.editor-body .line.i24{padding-left:calc(var(--gw) + 24 * var(--iu));text-indent:calc(24 * var(--iu) * -1)}
.editor-body .line.i25{padding-left:calc(var(--gw) + 25 * var(--iu));text-indent:calc(25 * var(--iu) * -1)}
.editor-body .line.i26{padding-left:calc(var(--gw) + 26 * var(--iu));text-indent:calc(26 * var(--iu) * -1)}
.editor-body .line.i27{padding-left:calc(var(--gw) + 27 * var(--iu));text-indent:calc(27 * var(--iu) * -1)}
.editor-body .line.i28{padding-left:calc(var(--gw) + 28 * var(--iu));text-indent:calc(28 * var(--iu) * -1)}
.editor-body .line.i29{padding-left:calc(var(--gw) + 29 * var(--iu));text-indent:calc(29 * var(--iu) * -1)}
.editor-body .line.i30{padding-left:calc(var(--gw) + 30 * var(--iu));text-indent:calc(30 * var(--iu) * -1)}
.editor-body .line.i31{padding-left:calc(var(--gw) + 31 * var(--iu));text-indent:calc(31 * var(--iu) * -1)}
.editor-body .line.i32{padding-left:calc(var(--gw) + 32 * var(--iu));text-indent:calc(32 * var(--iu) * -1)}
.editor-body .line.i33{padding-left:calc(var(--gw) + 33 * var(--iu));text-indent:calc(33 * var(--iu) * -1)}
.editor-body .line.i34{padding-left:calc(var(--gw) + 34 * var(--iu));text-indent:calc(34 * var(--iu) * -1)}
.editor-body .line.i35{padding-left:calc(var(--gw) + 35 * var(--iu));text-indent:calc(35 * var(--iu) * -1)}
.editor-body .line.i36{padding-left:calc(var(--gw) + 36 * var(--iu));text-indent:calc(36 * var(--iu) * -1)}
.editor-body .line.i37{padding-left:calc(var(--gw) + 37 * var(--iu));text-indent:calc(37 * var(--iu) * -1)}
.editor-body .line.i38{padding-left:calc(var(--gw) + 38 * var(--iu));text-indent:calc(38 * var(--iu) * -1)}
.editor-body .line.i39{padding-left:calc(var(--gw) + 39 * var(--iu));text-indent:calc(39 * var(--iu) * -1)}
.editor-body .line.i40{padding-left:calc(var(--gw) + 40 * var(--iu));text-indent:calc(40 * var(--iu) * -1)}
