/* Onflow Studio: the public pages (/studio and its guides; onflow/studio/site.py).

   Built on the site's tokens (static/styles.css). Every class is prefixed
   sp-. No picture files: an icon is a few strokes of inline SVG and an
   illustration of the workspace is plain markup, so there is nothing to wait
   for and nothing shifts once a page has painted. One column on a phone;
   nothing is pinned to the screen; every colour is a token of the site. */

.sp-wrap { max-width: 1180px; padding-block: var(--space-6) var(--space-16); }
.sp-wrap h1, .sp-wrap h2, .sp-wrap h3 { letter-spacing: var(--tracking-snug); overflow-wrap: anywhere; }
/* a translation: the tight tracking of the Latin headings does not suit other scripts */
.sp-wrap[dir] h1, .sp-wrap[dir] h2 { letter-spacing: normal; }
/* a guide is one column for reading */
.sp-wrap--read { max-width: 900px; }

/* --- the way here, and Studio's own menu --------------------------------- */
.sp-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 var(--space-5); padding: 0; list-style: none; color: var(--text-faint); font-size: .84rem; }
/* The trail's arrow (owner, 21 Nov 2026: "professional looking arrows not the simple ones used often in
   platforms"): a flow streak, its tail fading in and its head carrying the light, as the home page's hero
   draws them; in the trail's own colour, mirrored right to left. The same arrow in every trail of the site
   (tests/test_breadcrumb_arrow.py). */
.sp-crumbs li + li::before { content: ""; display: inline-block; flex: none; width: 1.5em; height: .8em; vertical-align: middle; background: currentColor; opacity: .68; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cdefs%3E%3ClinearGradient id='t' gradientUnits='userSpaceOnUse' x1='0' y1='0' x2='18' y2='0'%3E%3Cstop offset='0' stop-opacity='0'/%3E%3Cstop offset='.55' stop-opacity='.35'/%3E%3Cstop offset='1'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M1 6H20' fill='none' stroke='url(%23t)' stroke-width='1.7' stroke-linecap='round'/%3E%3Cpath d='M15.2 1.6 20.2 6l-5 4.4' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cdefs%3E%3ClinearGradient id='t' gradientUnits='userSpaceOnUse' x1='0' y1='0' x2='18' y2='0'%3E%3Cstop offset='0' stop-opacity='0'/%3E%3Cstop offset='.55' stop-opacity='.35'/%3E%3Cstop offset='1'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M1 6H20' fill='none' stroke='url(%23t)' stroke-width='1.7' stroke-linecap='round'/%3E%3Cpath d='M15.2 1.6 20.2 6l-5 4.4' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; forced-color-adjust: none; margin-inline-end: 6px; }
[dir="rtl"] .sp-crumbs li + li::before { transform: scaleX(-1); }
.sp-crumbs a { color: var(--text-dim); text-decoration: none; }
.sp-crumbs a:hover { color: var(--text); text-decoration: underline; }
.sp-crumbs [aria-current] { color: var(--text); }

.sp-nav { display: flex; gap: 4px; width: fit-content; max-width: 100%; margin: 0 0 var(--space-12); padding: 4px; overflow-x: auto; scrollbar-width: none; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface); }
.sp-nav::-webkit-scrollbar { display: none; }
.sp-nav-item { display: inline-flex; align-items: center; flex: none; min-height: 40px; padding: 0 16px; border-radius: var(--radius-pill); color: var(--text-dim); font-size: .9rem; font-weight: 500; text-decoration: none; white-space: nowrap; transition: color var(--dur-fast) ease, background var(--dur-fast) ease; }
.sp-nav-item:hover { color: var(--text); background: var(--surface-2); }
.sp-nav-item:focus-visible { outline: none; box-shadow: var(--ring); }
.sp-nav-item[aria-current] { color: var(--text); background: var(--surface-3); }

/* --- the opening ----------------------------------------------------------- */
.sp-hero { display: grid; gap: var(--space-10); align-items: center; margin-bottom: var(--space-12); }
.sp-hero-text { max-width: 680px; min-width: 0; }
.sp-hero-art { min-width: 0; }
.sp-hero h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); line-height: 1.1; margin: 0 0 var(--space-5); letter-spacing: var(--tracking-tight); }
.sp-lead { font-size: clamp(1.05rem, 1.5vw, 1.2rem); line-height: 1.65; color: var(--text-dim); margin: 0 0 var(--space-6); max-width: 60ch; }
.sp-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.sp-cta .btn { min-height: 48px; }
.sp-note { margin: var(--space-3) 0 0; color: var(--text-faint); font-size: .86rem; }

.sp-trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 12px; margin: 0 0 var(--space-16); padding: 0; list-style: none; }
.sp-trust li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text-dim); font-size: .93rem; line-height: 1.4; }

.sp-ico { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--red); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* --- sections -------------------------------------------------------------- */
.sp-sec { margin: 0 0 var(--space-16); scroll-margin-top: calc(var(--nav-h, 74px) + 24px); }
.sp-sec > h2 { font-size: clamp(1.45rem, 2.6vw, 1.95rem); line-height: 1.2; margin: 0 0 var(--space-4); }
.sp-sub { color: var(--text-dim); line-height: 1.65; margin: 0 0 var(--space-5); max-width: 68ch; }
.sp-sub a, .sp-prose a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

.sp-points { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); margin: 0; padding: 0; list-style: none; }
.sp-point { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: var(--space-6); transition: border-color var(--dur) ease, background var(--dur) ease; }
.sp-point:hover { border-color: var(--border-strong); background: var(--surface-2); }
.sp-point .sp-ico { display: block; width: 42px; height: 42px; margin-bottom: var(--space-4); padding: 9px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--red) 32%, transparent); background: color-mix(in srgb, var(--red) 11%, transparent); }
.sp-point h2 { margin: 0 0 8px; font-size: 1.08rem; line-height: 1.3; font-weight: 600; }
.sp-point p { margin: 0; color: var(--text-dim); line-height: 1.6; font-size: .96rem; }

.sp-steps { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr)); margin: 0; padding: 0; list-style: none; counter-reset: sp; }
.sp-steps li { counter-increment: sp; display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: var(--space-4); align-items: start; padding: var(--space-5); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.sp-steps li::before { content: counter(sp); grid-row: 1 / span 2; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); border: 1px solid color-mix(in srgb, var(--red) 55%, transparent); background: color-mix(in srgb, var(--red) 10%, transparent); }
.sp-steps b { font-size: 1.05rem; line-height: 1.35; }
.sp-steps p { margin: 4px 0 0; color: var(--text-dim); line-height: 1.6; }

.sp-prose-body { max-width: 720px; min-width: 0; }
.sp-prose p { margin: 0 0 var(--space-4); color: var(--text-dim); line-height: 1.75; font-size: 1.02rem; }
.sp-prose-body > :last-child { margin-bottom: 0; }
.sp-prose--read .sp-prose-body { max-width: none; }
.sp-prose--read > h2 { padding-top: var(--space-2); }
.sp-list { margin: 0 0 var(--space-4); padding-inline-start: 22px; color: var(--text-dim); line-height: 1.75; list-style: disc outside; }
.sp-list--num { list-style: decimal outside; }
.sp-list li { display: list-item; margin: 4px 0; padding-inline-start: 4px; }
.sp-list li::marker { color: var(--red); font-weight: 600; }

.sp-links { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.sp-link { display: block; padding: var(--space-5); border-radius: 16px; border: 1px solid var(--border); background: var(--surface); color: inherit; text-decoration: none; transition: border-color var(--dur) ease, background var(--dur) ease, transform var(--dur) var(--ease); }
.sp-link:hover { border-color: color-mix(in srgb, var(--red) 45%, var(--border)); background: var(--surface-2); transform: translateY(-2px); }
.sp-link:focus-visible { outline: none; box-shadow: var(--ring); }
.sp-link b { display: block; margin-bottom: 6px; font-size: 1.02rem; }
.sp-link span { display: block; color: var(--text-dim); font-size: .9rem; line-height: 1.55; }

.sp-faq { max-width: 860px; }
.sp-faq details { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); margin-bottom: 10px; }
.sp-faq details[open] { border-color: var(--border-strong); }
.sp-faq summary { cursor: pointer; padding: 16px 18px; font-weight: 600; line-height: 1.4; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 52px; }
.sp-faq summary::-webkit-details-marker { display: none; }
.sp-faq summary::after { content: ''; width: 9px; height: 9px; flex: none; border-inline-end: 2px solid var(--text-faint); border-bottom: 2px solid var(--text-faint); transform: rotate(45deg) translateY(-3px); transition: transform var(--dur) var(--ease); }
.sp-faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.sp-faq summary:focus-visible { box-shadow: var(--ring); border-radius: 14px; outline: none; }
.sp-faq details p { margin: 0; padding: 0 18px 18px; color: var(--text-dim); line-height: 1.7; }

.sp-tablewrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.sp-table { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 640px; }
.sp-table--2 { min-width: 0; }
.sp-table th, .sp-table td { padding: 13px 16px; text-align: start; border-bottom: 1px solid var(--border-faint); }
.sp-table thead th { color: var(--text-faint); font-size: .74rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.sp-table tbody th { font-weight: 500; color: var(--text-dim); }
.sp-table td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sp-table tbody tr:last-child th, .sp-table tbody tr:last-child td { border-bottom: 0; }
.sp-table tbody tr:hover th, .sp-table tbody tr:hover td { background: var(--surface); }

.sp-end { text-align: center; padding: var(--space-12) var(--space-6); border-radius: 24px; border: 1px solid color-mix(in srgb, var(--red) 35%, var(--border)); background: var(--grad-soft); margin-bottom: 0; }
.sp-end h2 { margin-bottom: var(--space-3); }
.sp-end p { color: var(--text-dim); max-width: 56ch; margin: 0 auto var(--space-6); line-height: 1.65; }
.sp-end .sp-cta { justify-content: center; }

/* --- a guide ----------------------------------------------------------------- */
.sp-guide-meta { margin: 0 0 var(--space-12); }
.sp-guide-meta > p { margin: 0 0 var(--space-5); color: var(--text-faint); font-size: .88rem; }
.sp-toc { padding: var(--space-5); border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.sp-toc ol { margin: 0; padding-inline-start: 20px; display: grid; gap: 8px; color: var(--text-faint); }
.sp-toc a { color: var(--text-dim); text-decoration: none; }
.sp-toc a:hover { color: var(--text); text-decoration: underline; }

/* --- the rest of a page's own group, under "Keep reading" --------------------- */
/* a compact row of the page's neighbours, not a directory: the site's own
   footer is the only footer on these pages */
.sp-more-h { margin: 0 0 12px; color: var(--text-faint); font-size: .74rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.sp-also { margin: calc(-1 * var(--space-8)) 0 var(--space-16); padding: var(--space-5) var(--space-6); border: 1px solid var(--border); border-radius: 18px; background: var(--sp-card, var(--surface)); box-shadow: var(--sp-hi, none); }
.sp-also-h { margin: 0 0 12px; color: var(--text-faint); font-size: .74rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.sp-also ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.sp-also-link { display: inline-flex; align-items: center; min-height: 34px; padding: 0 13px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface); color: var(--text-dim); font-size: .85rem; line-height: 1.2; text-decoration: none; transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease; }
.sp-also-link:hover { border-color: color-mix(in srgb, var(--red) 45%, var(--border)); color: var(--text); }
.sp-also-link:focus-visible, .sp-also-all:focus-visible { outline: none; box-shadow: var(--ring); }
.sp-also-all { display: inline-flex; margin-top: 14px; color: var(--text-dim); font-size: .86rem; font-weight: 600; text-decoration: none; }
.sp-also-all span { margin-inline-start: 6px; }
.sp-also-all:hover { color: var(--text); text-decoration: underline; }

/* --- the hub in other languages -------------------------------------------------- */
.sp-langs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 var(--space-10); }
.sp-lang { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface); color: var(--text-dim); font-size: .86rem; text-decoration: none; transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease; }
.sp-lang:hover { border-color: var(--border-strong); color: var(--text); }
.sp-lang:focus-visible { outline: none; box-shadow: var(--ring); }
.sp-lang[aria-current] { border-color: color-mix(in srgb, var(--red) 45%, var(--border)); color: var(--text); }
.sp-end + .sp-langs { margin: var(--space-12) 0 0; }

/* --- the illustrations --------------------------------------------------------- */
.sp-vis { overflow: hidden; border: 1px solid var(--border-strong); border-radius: 20px; background: linear-gradient(180deg, var(--bg-3), var(--bg-2)); box-shadow: var(--shadow); color: var(--text-dim); font-size: .82rem; line-height: 1.45; }
.sp-vis small { color: var(--text-faint); font-size: .72rem; }
.sp-vis p { margin: 0; }
.sp-vis-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
.sp-vis-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-3); }
.sp-vis-bar b { margin-inline-start: 8px; color: var(--text); font-size: .78rem; font-weight: 600; }
.sp-vis-bar em { margin-inline-start: auto; padding: 2px 9px; border: 1px solid var(--border); border-radius: var(--radius-pill); color: var(--text-faint); font-size: .66rem; font-style: normal; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.sp-vis-body { display: grid; gap: 12px; padding: 16px; }
.sp-vis--app .sp-vis-body { grid-template-columns: 116px minmax(0, 1fr); gap: 0; padding: 0; }
.sp-vis-rail { display: grid; align-content: start; gap: 2px; padding: 12px 8px; border-inline-end: 1px solid var(--border); }
.sp-vis-nav { padding: 7px 10px; border-radius: 9px; font-size: .78rem; }
.sp-vis-nav--on { color: var(--text); background: var(--surface-3); box-shadow: inset 2px 0 0 var(--red); }
.sp-vis-main { display: grid; gap: 12px; min-width: 0; padding: 14px; }
.sp-vis-week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.sp-vis-day { display: grid; align-content: start; gap: 5px; min-width: 0; min-height: 64px; padding: 6px; border: 1px solid var(--border-faint); border-radius: 10px; }
.sp-vis-card { display: grid; gap: 9px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.sp-vis-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.sp-vis-row b { min-width: 0; color: var(--text); font-size: .88rem; font-weight: 600; overflow-wrap: anywhere; }
.sp-vis-row > span { min-width: 0; }
.sp-vis-field { display: grid; gap: 3px; }
.sp-vis-flag { padding: 7px 10px; border: 1px solid var(--warn-border); border-radius: 9px; background: var(--warn-bg); color: var(--warn); font-size: .74rem; }
.sp-vis-btn { flex: none; padding: 6px 12px; border-radius: 9px; background: var(--grad-bright); color: var(--text-on-grad); font-size: .74rem; font-weight: 600; white-space: nowrap; }
.sp-vis-btn--ghost { border: 1px solid var(--border-strong); background: transparent; color: var(--text-dim); }
.sp-vis-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.sp-vis-cell { display: grid; place-items: center; aspect-ratio: 5 / 4; border: 1px solid var(--border-faint); border-radius: 7px; }
.sp-vis-tabs { display: flex; gap: 6px; }
.sp-vis-tab { padding: 4px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: .72rem; }
.sp-vis-tab--on { border-color: var(--border-strong); background: var(--surface-3); color: var(--text); }
.sp-vis-tags { color: var(--text-faint); }
.sp-vis-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.sp-vis-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sp-vis-tile { aspect-ratio: 4 / 5; border: 1px solid var(--border); border-radius: 10px; }
.sp-vis-tile--1 { background: linear-gradient(160deg, color-mix(in srgb, var(--warn) 55%, transparent), color-mix(in srgb, var(--red) 40%, transparent)); }
.sp-vis-tile--2 { background: linear-gradient(200deg, color-mix(in srgb, var(--success) 40%, transparent), color-mix(in srgb, var(--warn) 30%, transparent)); }
.sp-vis-tile--3 { background: linear-gradient(140deg, color-mix(in srgb, var(--red) 55%, transparent), color-mix(in srgb, var(--text) 12%, transparent)); }
.sp-vis-tile--4 { background: linear-gradient(20deg, color-mix(in srgb, var(--text) 18%, transparent), color-mix(in srgb, var(--success) 30%, transparent)); }
.sp-vis-tick { display: flex; align-items: center; gap: 8px; font-size: .78rem; }
.sp-vis-box { width: 14px; height: 14px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface-2); }
.sp-vis-trail { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: .74rem; }
.sp-vis-trail li { display: flex; align-items: center; gap: 8px; }
.sp-vis-list { display: grid; gap: 6px; }
.sp-vis-list .sp-vis-row { padding: 8px 10px; border: 1px solid var(--border-faint); border-radius: 10px; }
.sp-vis-shots { display: grid; gap: 6px; }
.sp-vis-shot { display: grid; grid-template-columns: 14px minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 10px; border: 1px solid var(--border-faint); border-radius: 10px; }
.sp-vis-shot:first-child { padding-block: 0; border-color: transparent; }
.sp-vis-shot > span:last-child { color: var(--text); }
.sp-vis-meter { display: grid; gap: 5px; padding: 8px 10px; border: 1px solid var(--border-faint); border-radius: 10px; }
/* a brand's own profiles: logos as round pictures, a banner with what a profile covers, a text beside its limit */
.sp-vis-logos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sp-vis-logo { display: grid; place-items: center; aspect-ratio: 1; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.sp-vis-logo i { display: grid; place-items: center; width: 70%; aspect-ratio: 1; border-radius: 50%; background: var(--grad-bright); color: var(--text-on-grad); font-size: .8rem; font-style: normal; font-weight: 700; letter-spacing: .02em; }
.sp-vis-logo--2 { background: var(--bg); }
.sp-vis-logo--2 i { border: 2px solid var(--red); background: transparent; color: var(--text); }
.sp-vis-logo--3 { background: color-mix(in srgb, var(--red) 30%, var(--surface)); }
.sp-vis-logo--3 i { background: var(--text); color: var(--bg); }
.sp-vis-logo--4 { background: var(--surface-3); }
.sp-vis-logo--4 i { border-radius: 30%; background: var(--bg); color: var(--text); box-shadow: inset 0 0 0 2px var(--border-strong); }
.sp-vis-ava { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--grad-bright); color: var(--text-on-grad); font-size: .74rem; font-style: normal; font-weight: 700; }
.sp-vis-who { display: grid; gap: 1px; flex: 1 1 auto; min-width: 0; }
.sp-vis-cover { position: relative; aspect-ratio: 3 / 1; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: linear-gradient(115deg, color-mix(in srgb, var(--red) 55%, transparent), color-mix(in srgb, var(--warn) 38%, transparent) 55%, color-mix(in srgb, var(--success) 30%, transparent)); }
.sp-vis-cover--facebook { aspect-ratio: 205 / 78; }
.sp-vis-cover--linkedin { aspect-ratio: 4 / 1; }
.sp-vis-cover--youtube, .sp-vis-cover--general { aspect-ratio: 16 / 9; }
.sp-vis-cover .sp-vis-ava { position: absolute; inset-inline-start: 5%; bottom: 10%; box-shadow: 0 0 0 3px var(--bg-2); }
.sp-vis-safe { position: absolute; inset: 35.3% 19.8%; border: 1px dashed var(--text); border-radius: 4px; background: color-mix(in srgb, var(--text) 12%, transparent); }
.sp-vis-len { display: flex; align-items: center; gap: 10px; }
.sp-vis-track { flex: 1 1 auto; height: 6px; overflow: hidden; border-radius: 3px; background: var(--surface-3); }
.sp-bar { display: block; height: 6px; border-radius: 3px; background: var(--success); }
.sp-bar--alt { background: var(--warn); }
.sp-bar--1 { width: 20%; }
.sp-bar--2 { width: 40%; }
.sp-bar--3 { width: 60%; }
.sp-bar--4 { width: 80%; }
.sp-bar--5 { width: 100%; }
.sp-chip { display: inline-block; max-width: 100%; padding: 3px 8px; overflow: hidden; border: 1px solid var(--border); border-inline-start: 2px solid var(--text-faint); border-radius: 7px; background: var(--surface-2); color: var(--text-dim); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.sp-chip--ok { border-inline-start-color: var(--success); }
.sp-chip--wait { border-inline-start-color: var(--warn); }
.sp-chip--on { border-color: var(--border-strong); background: var(--surface-3); color: var(--text); }
.sp-pill { flex: none; padding: 2px 9px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface-2); color: var(--text-dim); font-size: .68rem; font-weight: 600; white-space: nowrap; }
.sp-pill--ok { border-color: var(--success-border); background: var(--success-bg); color: var(--success); }
.sp-pill--wait { border-color: var(--warn-border); background: var(--warn-bg); color: var(--warn); }
.sp-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); }
.sp-dot--ok { background: var(--success); }
.sp-dot--wait { background: var(--warn); }

/* --- the workspace's own look, on its public pages ------------------------------
   The same glass as the app (static/studio/assets/studio.css): a hairline edge, a lit
   top line, Onflow Red only where something is chosen or asked for. Words, order and
   markup are the pages' own (onflow/studio/site.py); this only dresses them, and every
   colour is still one of the site's tokens. */
.sp-wrap {
  --sp-card: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface) 45%, transparent));
  --sp-card-hover: linear-gradient(180deg, var(--surface-2), var(--surface));
  --sp-hi: inset 0 1px 0 var(--border-faint);
}
.sp-nav { background: var(--surface); box-shadow: var(--sp-hi); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.sp-nav-item[aria-current] { box-shadow: var(--sp-hi), 0 2px 10px -3px color-mix(in srgb, var(--bg) 70%, transparent); }
.sp-hero h1 { letter-spacing: -.035em; }
.sp-hero-art { position: relative; isolation: isolate; }
.sp-hero-art::before { content: ""; position: absolute; inset: -14% -10%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--red) 26%, transparent), transparent); filter: blur(28px); pointer-events: none; }

/* the drawings of the workspace: the app's own panel */
.sp-vis { position: relative; border-radius: 22px; background: linear-gradient(180deg, color-mix(in srgb, var(--bg-3) 94%, var(--text)), var(--bg-2)); box-shadow: inset 0 1px 0 var(--surface-2), var(--shadow-lg); }
.sp-vis::before { content: ""; position: absolute; inset-inline: 20%; top: 0; z-index: 1; height: 1px; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--red) 85%, transparent), transparent); pointer-events: none; }
.sp-vis-nav--on { background: linear-gradient(90deg, color-mix(in srgb, var(--red) 20%, transparent), color-mix(in srgb, var(--red) 4%, transparent)); color: var(--text); }
.sp-vis-card { background: var(--sp-card); box-shadow: var(--sp-hi); }
.sp-vis-btn { background: var(--red-deep); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 22%, transparent), 0 8px 18px -8px color-mix(in srgb, var(--red) 85%, transparent); }

/* the points, the steps, the trust strip: glass cards */
.sp-trust li { background: var(--sp-card); box-shadow: var(--sp-hi); }
.sp-point { position: relative; overflow: hidden; border-radius: 20px; background: var(--sp-card); box-shadow: var(--sp-hi); transition: border-color var(--dur) ease, background var(--dur) ease, transform var(--dur) var(--ease); }
.sp-point::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(70% 60% at 0% 0%, color-mix(in srgb, var(--red) 12%, transparent), transparent 70%); opacity: 0; transition: opacity var(--dur) ease; pointer-events: none; }
.sp-point:hover { background: var(--sp-card-hover); transform: translateY(-2px); }
.sp-point:hover::after { opacity: 1; }
.sp-point .sp-ico { border-radius: 13px; border-color: color-mix(in srgb, var(--red) 28%, transparent); background: linear-gradient(145deg, color-mix(in srgb, var(--red) 20%, transparent), color-mix(in srgb, var(--red) 6%, transparent)); }
.sp-steps li { border-radius: 18px; background: var(--sp-card); box-shadow: var(--sp-hi); }
.sp-steps li::before { border: 0; background: linear-gradient(145deg, var(--red-deep), color-mix(in srgb, var(--red-deep) 62%, var(--bg))); color: var(--text-on-grad); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 28%, transparent), 0 10px 22px -10px color-mix(in srgb, var(--red) 90%, transparent); }
.sp-link { border-radius: 18px; background: var(--sp-card); box-shadow: var(--sp-hi); }
.sp-link:hover { background: var(--sp-card-hover); }
.sp-toc { border-radius: 18px; background: var(--sp-card); box-shadow: var(--sp-hi); }
.sp-faq details { border-radius: 16px; background: var(--sp-card); box-shadow: var(--sp-hi); transition: border-color var(--dur) ease; }
.sp-tablewrap { border-radius: 18px; background: var(--sp-card); box-shadow: var(--sp-hi); }
.sp-table thead th { background: var(--surface); }

/* the last word of a page: the app's welcome, a glow over a fine grid */
.sp-end { position: relative; overflow: hidden; isolation: isolate; background: radial-gradient(70% 120% at 50% 0%, color-mix(in srgb, var(--red) 22%, transparent), transparent 60%), linear-gradient(180deg, var(--surface-2), color-mix(in srgb, var(--surface) 40%, transparent)); box-shadow: var(--sp-hi), 0 40px 90px -40px color-mix(in srgb, var(--red) 45%, transparent); }
.sp-end::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .55;
  background-image: linear-gradient(var(--border-faint) 1px, transparent 1px), linear-gradient(90deg, var(--border-faint) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(60% 80% at 50% 0%, var(--bg), transparent 75%); mask-image: radial-gradient(60% 80% at 50% 0%, var(--bg), transparent 75%);
}

/* --- wide screens: the drawing beside the words, a heading beside its text ----- */
@media (min-width: 1000px) {
  .sp-hero--art { grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); gap: var(--space-12); }
  .sp-prose { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); column-gap: var(--space-12); align-items: start; }
  .sp-prose > h2 { margin: 0; }
  .sp-prose--read { display: block; }
  .sp-prose--read > h2 { margin: 0 0 var(--space-4); }
}

@media (max-width: 640px) {
  .sp-wrap { padding-inline: var(--space-4); }
  .sp-nav { margin-bottom: var(--space-8); }
  .sp-hero { gap: var(--space-8); margin-bottom: var(--space-10); }
  .sp-sec { margin-bottom: var(--space-12); }
  .sp-trust { margin-bottom: var(--space-12); }
  .sp-cta .btn { flex: 1 1 100%; }
  .sp-point, .sp-link { padding: var(--space-5); }
  .sp-steps li { grid-template-columns: 36px minmax(0, 1fr); padding: var(--space-4); }
  .sp-steps li::before { width: 36px; height: 36px; font-size: .9rem; }
  .sp-end { padding: var(--space-10) var(--space-4); }
  .sp-vis--app .sp-vis-body { grid-template-columns: minmax(0, 1fr); }
  .sp-vis-rail { display: none; }
  .sp-also { margin-top: calc(-1 * var(--space-6)); margin-bottom: var(--space-12); padding: var(--space-4); }
}
@media (prefers-reduced-motion: reduce) {
  .sp-link:hover, .sp-point:hover { transform: none; }
  .sp-faq summary::after, .sp-nav-item, .sp-point, .sp-link, .sp-lang, .sp-also-link { transition: none; }
}
