/* ============================================================================
   Spiralyst.com — site stylesheet
   No build step. Single file. Brand tokens from /art/branding/color palette.
   Dark neon / spectral identity.
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------- */
:root {
  /* Brand palette (supplied) */
  --ink:        #1A1926;   /* page background */
  --magenta:    #D629D9;
  --violet:     #9329D9;
  --indigo:     #4129D9;
  --royal:      #2659BF;

  /* Derived neutrals */
  --ink-2:      #13121C;   /* deeper wells / footer */
  --panel:      #211F30;   /* card surface */
  --panel-2:    #2A2740;   /* card surface, raised */
  --line:       #353150;   /* hairline borders */
  --text:       #F2EEFA;   /* primary text */
  --muted:      #ABA6C4;   /* secondary text */
  --muted-2:    #7E799A;   /* tertiary / captions */

  /* Signature gradient — reads as audio spectrum / fractal glow */
  --spectrum:   linear-gradient(90deg, #D629D9, #9329D9, #4129D9, #2659BF);
  --spectrum-135: linear-gradient(135deg, #D629D9, #9329D9, #4129D9, #2659BF);
  --wordmark:   linear-gradient(95deg, #ff4ecd 0%, #a855f7 48%, #6cf 100%); /* app brand wordmark */

  /* Type */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: var(--font-body);
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  /* Rhythm */
  --maxw: 1120px;
  --gap: 24px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 18px 50px -20px rgba(0,0,0,.7);
  --glow: 0 0 40px -8px rgba(214,41,217,.45);
}

/* ---- Reset / base -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--ink);
  background-image:
    radial-gradient(900px 600px at 85% -10%, rgba(147,41,217,.18), transparent 60%),
    radial-gradient(800px 600px at 0% 0%, rgba(38,89,191,.16), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--royal); text-decoration: none; }
a:hover { color: var(--magenta); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; margin: 0 0 .4em; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin: .25em 0; }
hr { border: 0; height: 1px; background: var(--line); margin: 3rem 0; }
code, kbd { font-family: var(--font-mono); font-size: .9em; background: var(--panel); padding: .12em .4em; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--magenta); outline-offset: 2px; border-radius: 4px; }

/* ---- Layout helpers ------------------------------------------------------ */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section--tight { padding: clamp(32px, 5vw, 56px) 0; }
.center { text-align: center; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }
.center .lead { margin-inline: auto; }
.eyebrow {
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--magenta); margin: 0 0 .8em;
}
.text-gradient {
  background: var(--spectrum); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font: inherit; font-weight: 700; line-height: 1;
  padding: .9em 1.5em; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--spectrum-135); color: #fff; box-shadow: var(--glow); }
.btn--primary:hover { color: #fff; box-shadow: 0 0 56px -6px rgba(214,41,217,.6); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { color: #fff; border-color: var(--magenta); }
.btn--block { display: flex; width: 100%; justify-content: center; }
.btn[aria-disabled="true"], .btn.is-disabled { opacity: .5; pointer-events: none; }

/* ---- Header / nav -------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(19,18,28,.72); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 18px; padding: 14px 22px; max-width: var(--maxw); margin-inline: auto; }
.brand { display: inline-flex; align-items: center; gap: .55em; font-weight: 800; font-size: 1.15rem; color: var(--text); letter-spacing: -.01em; }
.brand:hover { color: var(--text); }
.brand .mark { width: 30px; height: 30px; flex: 0 0 auto; }
.brand img.mark { filter: drop-shadow(0 1px 7px rgba(168,85,247,.5)); }
.hero-logo { display: block; width: 92px; height: 92px; margin: 0 0 16px; filter: drop-shadow(0 0 28px rgba(214,41,217,.42)); }
.brand .lab { color: var(--muted); font-weight: 600; }
/* App-matching wordmark: both words gradient-clipped to text (top-left brand). */
.brand-name {
  background: var(--wordmark); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: #c5a0ff; /* fallback */
  font-weight: 700; letter-spacing: .01em;
}
.nav-links { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav-links a { color: var(--muted); padding: .5em .75em; border-radius: 8px; font-size: .96rem; font-weight: 600; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--panel); }
.nav-links .btn { margin-left: 8px; padding: .6em 1.1em; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: .4em .6em; cursor: pointer; font-size: 1.2rem; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed; inset: 60px 0 auto 0; flex-direction: column; align-items: stretch;
    gap: 2px; padding: 12px 18px 20px; margin: 0;
    background: var(--ink-2); border-bottom: 1px solid var(--line);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .18s ease;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links .btn { margin: 8px 0 0; }
}

/* ---- Hero ---------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 9vw, 120px) 0 clamp(40px, 6vw, 80px); }
.hero__inner { max-width: 56ch; }
/* Two-column hero: text left, big eye logo filling the right. Stacks on mobile. */
.hero__top { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 36px; align-items: center; }
.hero__brand { display: flex; align-items: center; justify-content: center; min-width: 0; }
.hero__brand-img { width: 100%; max-width: 560px; height: auto; filter: drop-shadow(0 0 70px rgba(214,41,217,.40)); }
@media (max-width: 900px) {
  .hero__top { grid-template-columns: 1fr; gap: 6px; }
  .hero__brand { order: -1; }              /* logo above the headline on mobile */
  .hero__brand-img { max-width: 300px; }
}
.hero h1 { margin-bottom: .3em; }
.hero .lead { font-size: clamp(1.1rem, 2.4vw, 1.4rem); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; align-items: center; }
.hero__note { color: var(--muted-2); font-size: .9rem; margin-top: 14px; }
.hero__media { position: relative; margin-top: 44px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--ink-2); }
.hero__media img, .hero__media video { width: 100%; display: block; }
.hero__sound { position: absolute; right: 12px; bottom: 12px; width: 42px; height: 42px; border-radius: 999px; border: 1px solid var(--line); background: rgba(13,12,22,.6); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center; cursor: pointer; font-size: 1.05rem; line-height: 1; padding: 0; transition: background .15s ease, transform .15s ease; }
.hero__sound:hover { background: rgba(13,12,22,.85); transform: translateY(-1px); }
.hero__sound:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

/* Spectrum divider rule */
.rule { height: 3px; border: 0; border-radius: 3px; background: var(--spectrum); opacity: .9; }
.rule--short { width: 72px; margin: 0 0 1.4em; }
.center .rule--short { margin-inline: auto; }

/* ---- Cards / grids ------------------------------------------------------- */
.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 880px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--2, .grid--3 { grid-template-columns: 1fr; } }

.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: transform .15s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--violet); }
.card h3 { margin-bottom: .35em; }
.card p { color: var(--muted); margin-bottom: 0; }
.card__icon {
  width: 44px; height: 44px; border-radius: 12px; margin-bottom: 16px;
  display: grid; place-items: center; font-size: 1.4rem;
  background: rgba(147,41,217,.16); border: 1px solid var(--line);
}
.card__media { border-radius: 10px; overflow: hidden; margin: -4px -4px 16px; border: 1px solid var(--line); }
.card__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }

/* Use-case pills */
.pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.pill { border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: .5em 1em; border-radius: 999px; font-size: .92rem; font-weight: 600; }

/* Trust band */
.trust { display: flex; flex-wrap: wrap; gap: 28px 40px; justify-content: center; color: var(--muted); }
.trust span { display: inline-flex; align-items: center; gap: .5em; font-weight: 600; }

/* ---- Pricing card -------------------------------------------------------- */
.price-card {
  max-width: 460px; margin-inline: auto; text-align: center;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--violet); border-radius: var(--radius-lg);
  padding: 38px 30px; box-shadow: var(--shadow);
}
.price-card .amount { font-size: 3.4rem; font-weight: 800; line-height: 1; }
.price-card .term { color: var(--muted); font-weight: 600; }
.price-card ul { list-style: none; padding: 0; text-align: left; max-width: 320px; margin: 26px auto; }
.price-card li { display: flex; gap: .6em; align-items: flex-start; color: var(--text); }
.price-card li::before { content: "✦"; color: var(--magenta); flex: 0 0 auto; }

/* ---- Tutorials ----------------------------------------------------------- */
.video-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.video-card video, .video-card .poster { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--ink-2); display: block; }
.video-card__body { padding: 18px 20px 22px; }
.video-card__body h3 { font-size: 1.1rem; margin-bottom: .3em; }
.video-card__body p { color: var(--muted); margin: 0; font-size: .96rem; }
a.video-card { color: var(--text); transition: transform .15s ease, border-color .2s ease; }
a.video-card:hover { transform: translateY(-3px); border-color: var(--violet); }

/* ---- Help / tutorial hubs: article-card grid ----------------------------- */
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
@media (max-width: 880px) { .article-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .article-grid { grid-template-columns: 1fr; } }
.article-card {
  display: flex; flex-direction: column; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .15s ease, border-color .2s ease;
}
.article-card:hover { transform: translateY(-3px); border-color: var(--violet); }
.article-card__thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--ink-2); display: block; }
.article-card__body { padding: 16px 18px 20px; }
.article-card__body .badge { margin-bottom: 10px; }
.article-card__body h3 { font-size: 1.05rem; margin: 6px 0 .35em; }
.article-card__body p { color: var(--muted); margin: 0; font-size: .94rem; line-height: 1.5; }

/* ---- Callouts ------------------------------------------------------------ */
.callout { border: 1px solid var(--line); border-left: 3px solid var(--magenta); background: var(--panel); border-radius: 10px; padding: 18px 22px; color: var(--muted); }
.callout strong { color: var(--text); }
.callout--warn { border-left-color: #E0B83A; }

/* ---- Prose (legal / long-form) ------------------------------------------ */
.prose { max-width: 760px; margin-inline: auto; }
.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul { color: var(--text); }
.prose .muted { color: var(--muted); }

/* ---- FAQ ----------------------------------------------------------------- */
details.faq { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 4px 20px; margin-bottom: 12px; }
details.faq > summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; }
details.faq > summary::-webkit-details-marker { display: none; }
details.faq > summary::after { content: "+"; float: right; color: var(--magenta); font-weight: 800; }
details.faq[open] > summary::after { content: "–"; }
details.faq p:last-child { margin-bottom: 16px; }

/* ---- Forms --------------------------------------------------------------- */
.field { display: flex; gap: 10px; flex-wrap: wrap; max-width: 460px; }
.field input[type="email"] {
  flex: 1 1 220px; font: inherit; padding: .85em 1.1em; border-radius: 999px;
  border: 1px solid var(--line); background: var(--ink-2); color: var(--text);
}
.field input::placeholder { color: var(--muted-2); }

/* ---- Footer -------------------------------------------------------------- */
.site-footer { background: var(--ink-2); border-top: 1px solid var(--line); padding: 52px 0 36px; margin-top: 40px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 32px; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted-2); margin-bottom: 1em; }
.site-footer a { color: var(--muted); display: block; padding: .2em 0; }
.site-footer a:hover { color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--muted-2); }

/* ---- Utilities ----------------------------------------------------------- */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: 1rem; }
.badge { display: inline-block; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--royal); border: 1px solid var(--line); border-radius: 999px; padding: .35em .8em; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--magenta); color: #fff; padding: .6em 1em; border-radius: 0 0 8px 0; z-index: 100; }
.skip-link:focus { left: 0; color: #fff; }

/* ---- Art placeholders (until generated art is dropped in) ---------------- */
/* Swap a .ph block for the real <img> named in copy/art-collateral.md. */
.ph {
  display: grid; place-items: center; text-align: center;
  border: 1px dashed var(--line); border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(214,41,217,.16), rgba(65,41,217,.14) 55%, rgba(38,89,191,.16));
  color: var(--muted); font-family: var(--mono); font-size: .76rem; letter-spacing: .08em;
  padding: 18px; min-height: 180px;
}
.ph::before { content: "▦ "; color: var(--magenta); }
.ph--hero { aspect-ratio: 16 / 9; min-height: 280px; }
.ph--wide { aspect-ratio: 16 / 10; }
.ph--feat { aspect-ratio: 4 / 3; min-height: 0; }
.ph--video { aspect-ratio: 16 / 9; min-height: 0; }
.ph--square { aspect-ratio: 1 / 1; }

/* ---- Fractal gallery ----------------------------------------------------- */
.gallery-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.gtile {
  margin: 0; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .15s ease, border-color .2s ease;
}
.gtile:hover { transform: translateY(-3px); border-color: var(--violet); }
.gtile__media {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block;
  background: var(--ink-2); cursor: pointer;
}
.gtile__cap { padding: 14px 16px 16px; }
.gtile__cap h3 { font-size: 1.02rem; margin: 0 0 .3em; }
.gtile__cap p { color: var(--muted); font-size: .9rem; margin: 0 0 .7em; line-height: 1.5; }
.gtile__tag {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--royal);
}
.gallery-sub { color: var(--muted-2); font-size: .9rem; margin-top: 6px; }

/* Gallery tiles are clickable → open the fractal detail lightbox */
.gtile { cursor: pointer; }
.gtile:focus-visible { outline: 3px solid var(--magenta); outline-offset: 2px; }
.gtile__cap h3::after { content: " →"; color: var(--magenta); opacity: 0; transition: opacity .15s ease; }
.gtile:hover .gtile__cap h3::after, .gtile:focus-visible .gtile__cap h3::after { opacity: 1; }

/* ---- Lightbox (always dark) --------------------------------------------- */
.lightbox { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; }
.lightbox[hidden] { display: none; }
.lightbox__backdrop { position: absolute; inset: 0; background: rgba(8,8,15,.86); backdrop-filter: blur(8px); }
.lightbox__frame-wrap {
  position: relative; width: min(1000px, 96vw); height: min(90vh, 1040px);
  border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--shadow); background: var(--ink);
}
.lightbox__frame { width: 100%; height: 100%; border: 0; display: block; background: var(--ink); }
.lightbox__close {
  position: absolute; top: 12px; right: 14px; z-index: 210; width: 40px; height: 40px;
  border-radius: 999px; border: 1px solid var(--line); background: rgba(19,18,28,.85);
  color: var(--text); font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.lightbox__close:hover { border-color: var(--magenta); color: #fff; }
body.lb-open { overflow: hidden; }

/* ---- Fractal detail page ------------------------------------------------- */
.detail-topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px;
  padding: 13px 22px; background: rgba(19,18,28,.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.detail-topbar .back { color: var(--muted); font-weight: 700; }
.detail-topbar .back:hover { color: var(--magenta); }
.detail-topbar .dim-badge { margin-left: auto; }
.dim-badge {
  display: inline-block; font-family: var(--mono); font-size: .7rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--royal); border: 1px solid var(--line);
  border-radius: 999px; padding: .3em .7em;
}
.detail-hero { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: var(--ink-2); }
.detail-hero video, .detail-hero img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.detail h2 { margin-top: 2em; }
.detail h2:first-of-type { margin-top: 1.2em; }
.detail-lead {
  font-size: 1.28rem; line-height: 1.6; color: var(--text); font-weight: 500;
  border-left: 3px solid var(--magenta); padding: 2px 0 2px 18px; margin: 22px 0 6px;
}

.formula {
  font-family: var(--font-mono); font-size: 1.02rem; line-height: 1.75; color: var(--text);
  background: var(--ink-2); border: 1px solid var(--line); border-left: 3px solid var(--magenta);
  border-radius: 10px; padding: 15px 20px; margin: 14px 0; overflow-x: auto;
}
.formula .v { color: var(--magenta); }
.formula .c { color: var(--muted-2); } /* inline comment */

.param-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: .95rem; }
.param-table th, .param-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.param-table th { color: var(--muted-2); font-weight: 600; font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; }
.param-table td.range { font-family: var(--font-mono); color: var(--muted); white-space: nowrap; }

.detail-stills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 32px; }
@media (max-width: 560px) { .detail-stills { grid-template-columns: 1fr 1fr; } }
.detail-stills img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }

.video-ph {
  display: grid; place-items: center; gap: 10px; aspect-ratio: 16 / 9; text-align: center; padding: 20px;
  border: 1px dashed var(--line); border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(214,41,217,.12), rgba(65,41,217,.10) 55%, rgba(38,89,191,.12));
  color: var(--muted);
}
.video-ph .play { width: 62px; height: 62px; border-radius: 999px; display: grid; place-items: center; background: var(--spectrum-135); color: #fff; font-size: 1.5rem; box-shadow: var(--glow); }
.video-ph code { font-size: .8rem; color: var(--muted-2); }
.video-ph--poster { color: #fff; background-image: linear-gradient(rgba(26,25,38,.62), rgba(26,25,38,.62)), var(--poster); background-size: cover; background-position: center; }
.video-ph--poster strong { color: #fff; }

/* Tutorial / help video embeds — relies on the native <video controls poster> overlay for play UI.
   Drop in with `<video class="tutorial-video" controls preload="metadata" playsinline poster=...>` —
   see web/README.md "Tutorial video pattern". */
.tutorial-video { display: block; width: 100%; height: auto; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); margin: 18px 0; }

/* Blog list — cards on /blog/ index */
.post-list { display: grid; gap: 18px; max-width: 760px; margin-inline: auto; }
.post-card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; color: var(--text); transition: transform .15s ease, border-color .2s ease; }
.post-card:hover { transform: translateY(-2px); border-color: var(--violet); }
.post-card__meta { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 6px; }
.post-card__title { font-size: 1.4rem; margin: 0 0 10px; }
.post-card__dek { color: var(--muted); margin: 0 0 12px; }
.post-card__readmore { font-family: var(--mono); font-size: .78rem; color: var(--magenta); margin: 0; }

/* Prev / next between fractal detail pages */
.fractal-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); }
.fnav { display: flex; flex-direction: column; gap: 2px; color: var(--text); min-width: 0; }
.fnav--next { text-align: right; align-items: flex-end; }
.fnav__dir { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); }
.fnav__name { font-weight: 700; }
.fnav:hover .fnav__name { color: var(--magenta); }
.fnav--all { flex-direction: row; align-items: center; font-family: var(--mono); font-size: .78rem; color: var(--muted-2); white-space: nowrap; }
.fnav--all:hover { color: var(--magenta); }
@media (max-width: 560px) { .fnav--all { display: none; } }

/* Help / support step-by-step with screenshots */
.help-steps { padding-left: 1.3em; }
.help-steps > li { margin: 0 0 30px; }
.help-shot { display: block; max-width: 100%; height: auto; margin: 14px 0 4px; border-radius: 10px; border: 1px solid var(--line); }
.help-shot--sm { max-width: 380px; }
.help-shot--mini { max-width: 340px; }   /* actual screenshots — keep small, never upscale */
.shot-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; margin: 14px 0 4px; }
.shot-row .help-shot { margin: 0; }
.help-fig { margin: 14px 0 4px; }
.help-fig .help-shot { margin: 0; }
.help-fig figcaption { margin-top: 6px; font-size: .78rem; line-height: 1.45; color: var(--muted-2); max-width: 380px; }
.shot-row .help-fig { margin: 0; }
.shot-row .help-fig figcaption { max-width: 340px; }

/* Multi-line code blocks (automation / API page) — dark panel, mono, scrolls */
pre {
  margin: 0 0 1.2em;
  padding: 16px 18px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--violet);
  border-radius: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  line-height: 1.55;
}
pre code {
  display: block;
  background: none;
  padding: 0;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--text);
  white-space: pre;
}
.code-label { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); margin: 1.4em 0 .5em; }

/* Alpha / status badge */
.badge {
  display: inline-block; font-family: var(--font-mono); font-size: .7rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: #1A1926;
  background: var(--spectrum-135); padding: .2em .6em; border-radius: 999px; vertical-align: middle;
}

/* Endpoint / API reference table */
.api-table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: .9rem; }
.api-table th, .api-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.api-table th { color: var(--muted-2); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.api-table td:first-child { font-family: var(--font-mono); font-size: .82rem; color: var(--text); white-space: nowrap; }
.api-table td:first-child .m { color: var(--magenta); }
.api-table .scrollx { overflow-x: auto; }
.api-table td .muted { color: var(--muted); }
@media (max-width: 640px) { .api-table { display: block; overflow-x: auto; white-space: nowrap; } }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
