@view-transition { navigation: auto; }

/* Shared design system - identical on both sites. Each site sets --brand / --brand-deep in site.css
   (taken from the plugin's colour scheme on developry.com); neutrals are the Developry zinc scale. */
:root {
  --brand: #4ea3ff;
  --brand-deep: #0f3a5a;
  --accent-mix: 42%;   /* how much brand colour stays in the light-mode text shade (raise contrast per site if needed) */
  --bg: light-dark(#fafafa, #09090b);
  --surface: light-dark(#ffffff, #18181b);
  --surface-2: light-dark(#f4f4f5, #27272a);
  --text: light-dark(#09090b, #fafafa);
  --muted: light-dark(#52525b, #a1a1aa);
  --line: light-dark(#e4e4e7, #3f3f46);
  /* --accent is the text-safe brand colour (darkened in light mode); --brand is the exact fill colour */
  --accent: light-dark(color-mix(in oklab, var(--brand) var(--accent-mix), var(--brand-deep)), var(--brand));
  --accent-2: light-dark(var(--brand-deep), color-mix(in oklab, var(--brand) 55%, #fff));
  --accent-ink: #09090b;
  --accent-soft: color-mix(in oklab, var(--brand) 16%, transparent);
  --ok: light-dark(oklch(52% .15 155), oklch(78% .16 155));
  --warn: light-dark(oklch(58% .16 70), oklch(82% .15 85));
  --bad: light-dark(oklch(52% .2 25), oklch(74% .17 25));
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 0 color-mix(in oklab, white 55%, transparent) inset,
            0 12px 40px -16px color-mix(in oklab, var(--brand) 38%, transparent),
            0 2px 8px -2px rgb(0 0 0 / .08);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --wrap: 1120px;
  color-scheme: light dark;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  display: flex;
  margin: 0;
  min-height: 100dvh;
  flex-direction: column;
  font: 400 1rem/1.6 var(--font);
  color: var(--text);
  background:
    radial-gradient(60rem 38rem at 12% -10%, light-dark(color-mix(in oklab, var(--brand) 20%, transparent), color-mix(in oklab, var(--brand-deep) 80%, transparent)), transparent 60%),
    radial-gradient(50rem 34rem at 95% 0%, light-dark(color-mix(in oklab, var(--brand) 12%, transparent), color-mix(in oklab, var(--brand) 11%, transparent)), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
img, canvas, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: .08em; }
a:hover { text-decoration-thickness: .15em; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -.03em; text-wrap: balance; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 1.2rem + 4.6vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.015em; }
p { margin: 0 0 1em; text-wrap: pretty; }
code, kbd { font-family: var(--mono); font-size: .88em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: color-mix(in oklab, var(--accent) 35%, transparent); }

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); }
.grad { background: linear-gradient(100deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(18px) saturate(1.4); background: color-mix(in oklab, var(--bg) 72%, transparent); border-bottom: 1px solid color-mix(in oklab, var(--line) 70%, transparent); }
.site-header .wrap { display: flex; align-items: center; gap: 1rem; padding-block: .7rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; letter-spacing: -.03em; color: var(--text); text-decoration: none; font-size: 1.1rem; }
.brand svg { width: 30px; height: 30px; }
.brand small { font-weight: 600; letter-spacing: 0; font-size: .7rem; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: .05rem .5rem; }
.nav { display: flex; gap: .25rem; margin-inline: auto 0; overflow-x: auto; scrollbar-width: none; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .92rem; padding: .45rem .85rem; border-radius: 99px; white-space: nowrap; transition: background .2s, color .2s; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); background: var(--accent-soft); box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent) 35%, transparent) inset; }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.icon-btn:hover { border-color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }
@media (max-width: 720px) {
  .nav { order: 3; width: 100%; margin: 0; }
  .icon-btn { margin-left: auto; }
}

/* ---------- hero ---------- */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) 1.5rem; text-align: center; }
.hero p.lede { font-size: clamp(1.05rem, .95rem + .5vw, 1.3rem); color: var(--muted); max-width: 40rem; margin: 0 auto 1.4rem; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: .35rem .8rem; border-radius: 99px; margin-bottom: 1.1rem; }
.eyebrow::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ok) 30%, transparent); }
.hero.compact { padding-block: clamp(2rem, 4vw, 3.2rem) .5rem; text-align: left; }
.hero.compact h1 { font-size: clamp(1.9rem, 1.2rem + 3vw, 3rem); }
.hero.compact p.lede { margin-inline: 0; }

/* ---------- cards & controls ---------- */
.card { background: color-mix(in oklab, var(--surface) 82%, transparent); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1rem, 2.4vw, 1.6rem); }
.card > :last-child { margin-bottom: 0; }
.stack { display: grid; gap: 1rem; }
.row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.row.between { justify-content: space-between; }
.grid { display: grid; gap: 1rem; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }

label, .label { display: block; font-size: .82rem; font-weight: 650; color: var(--muted); margin-bottom: .35rem; }
input[type="text"], input[type="url"], input[type="number"], input[type="search"], select, textarea {
  width: 100%; font: inherit; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .65rem .8rem; transition: border-color .15s, box-shadow .15s, background .15s;
}
textarea { min-height: 12rem; resize: vertical; line-height: 1.55; }
textarea.mono, .mono { font-family: var(--mono); font-size: .86rem; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in oklab, var(--accent) 45%, var(--line)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 22%, transparent); }
input[type="color"] { width: 2.6rem; height: 2.6rem; padding: .2rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; }
input[type="range"] { width: 100%; accent-color: var(--accent); }

.btn { --b: var(--accent); display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: inherit; font-weight: 700; font-size: .92rem; line-height: 1; cursor: pointer; text-decoration: none;
  color: var(--accent-ink); border: 0; border-radius: 99px; padding: .8rem 1.25rem;
  background: linear-gradient(180deg, color-mix(in oklab, var(--brand) 84%, #fff), var(--brand));
  box-shadow: 0 1px 0 rgb(255 255 255 / .4) inset, 0 8px 20px -8px color-mix(in oklab, var(--brand) 75%, transparent);
  transition: transform .15s, filter .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn:active { transform: translateY(0) scale(.98); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn svg { width: 16px; height: 16px; }
.btn.ghost { color: var(--text); background: var(--surface-2); box-shadow: 0 0 0 1px var(--line) inset; }
.btn.ghost:hover { box-shadow: 0 0 0 1px var(--accent) inset; }
.btn.sm { padding: .55rem .9rem; font-size: .82rem; }

.seg { display: inline-flex; padding: .2rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; gap: .15rem; flex-wrap: wrap; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { margin: 0; padding: .45rem .9rem; border-radius: 99px; font-size: .85rem; font-weight: 650; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.seg label:hover { color: var(--text); }
.seg input:checked + label { background: var(--surface); color: var(--text); box-shadow: 0 1px 6px rgb(0 0 0 / .14), 0 0 0 1px color-mix(in oklab, var(--accent) 40%, var(--line)) inset; }
.seg input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

.switch { display: flex; align-items: center; gap: .65rem; margin: 0; font-size: .92rem; font-weight: 550; color: var(--text); cursor: pointer; }
.switch input { position: relative; appearance: none; flex: none; width: 2.3rem; height: 1.35rem; border-radius: 99px; background: var(--line); cursor: pointer; transition: background .2s; margin: 0; }
.switch input::after { position: absolute; content: ""; inset: .15rem auto .15rem .15rem; width: 1.05rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .3); transition: transform .2s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(.95rem); }
.switch small { color: var(--muted); font-weight: 450; }

.chip { display: inline-flex; align-items: center; gap: .35rem; font: inherit; font-size: .8rem; font-weight: 600; padding: .35rem .7rem; border-radius: 99px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); cursor: pointer; transition: all .15s; }
.chip:hover { color: var(--text); border-color: var(--accent); }
.chip[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.tag { font-size: .72rem; font-weight: 700; padding: .15rem .55rem; border-radius: 99px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.tag.ok { color: var(--ok); } .tag.warn { color: var(--warn); } .tag.bad { color: var(--bad); }

.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: .9rem; overflow-x: auto; }
.tabs button { font: inherit; font-weight: 650; font-size: .9rem; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; padding: .55rem .9rem; cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }

.out { position: relative; }
.out pre, .out .preview { margin: 0; padding: 1rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); font-family: var(--mono); font-size: .85rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; min-height: 8rem; max-height: 28rem; overflow: auto; }
.out .preview { font-family: var(--font); font-size: 1rem; white-space: normal; }
.out .copy { position: absolute; top: .55rem; right: .55rem; }

.stat { font-size: .85rem; color: var(--muted); }
.stat b { color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .65rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { position: sticky; top: 0; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
td .cell-url { font-family: var(--mono); font-size: .8rem; overflow-wrap: anywhere; }

/* ---------- bento (tool index) ---------- */
.bento { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); margin-block: 2rem; }
.tile { display: flex; position: relative; flex-direction: column; gap: .4rem; text-decoration: none; color: var(--text); overflow: hidden; transition: transform .2s, border-color .2s; }
.tile:hover { transform: translateY(-3px); border-color: color-mix(in oklab, var(--accent) 60%, var(--line)); }
.tile::after { position: absolute; content: ""; inset: auto -30% -60% auto; width: 60%; aspect-ratio: 1; background: radial-gradient(circle, color-mix(in oklab, var(--accent) 30%, transparent), transparent 70%); pointer-events: none; opacity: .0; transition: opacity .3s; }
.tile:hover::after { opacity: 1; }
.tile .ico { display: grid; width: 2.6rem; height: 2.6rem; border-radius: 14px; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: .4rem; }
.tile .ico svg { width: 1.3rem; height: 1.3rem; }
.tile p { color: var(--muted); font-size: .92rem; margin: 0; }
.tile .go { margin-top: auto; padding-top: .6rem; color: var(--accent); font-weight: 700; font-size: .88rem; }

/* ---------- prose / seo copy ---------- */
.prose { max-width: 46rem; margin-block: 3rem; }
.prose h2 { margin-top: 2.2rem; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); background: color-mix(in oklab, var(--surface) 80%, transparent); padding: .85rem 1.1rem; margin-bottom: .6rem; }
.faq summary { cursor: pointer; font-weight: 650; }
.faq details[open] summary { margin-bottom: .5rem; color: var(--accent); }
.faq p { margin: 0; color: var(--muted); }

.pill-row { display: flex; flex-wrap: wrap; gap: .5rem 1rem; justify-content: center; color: var(--muted); font-size: .88rem; font-weight: 550; margin-top: 1rem; }
.pill-row span { display: inline-flex; align-items: center; gap: .4rem; }
.pill-row svg { width: 16px; height: 16px; color: var(--ok); }

/* ---------- footer & toast ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 4rem; padding-block: 2rem 2.5rem; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translate(-50%, 140%); background: var(--text); color: var(--bg); font-weight: 650; font-size: .9rem; padding: .7rem 1.2rem; border-radius: 99px; box-shadow: 0 10px 30px rgb(0 0 0 / .3); transition: transform .3s cubic-bezier(.2, 1.2, .4, 1); z-index: 100; pointer-events: none; }
.toast.show { transform: translate(-50%, 0); }

@media (scroll-driven-animations) {
  @supports (animation-timeline: view()) {
    @keyframes rise { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: 0 0; } }
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
  }
}
.row.center { justify-content: center; }

/* ---------- accessibility + answer-first blocks ---------- */
.skip { position: absolute; top: -4rem; left: 1rem; z-index: 200; background: var(--brand); color: var(--accent-ink); font-weight: 700; padding: .6rem 1rem; border-radius: 99px; text-decoration: none; transition: top .15s; }
.skip:focus { top: 1rem; }
.answer { border: 1px solid color-mix(in oklab, var(--brand) 45%, var(--line)); border-left-width: 4px; border-radius: var(--radius-sm); background: var(--accent-soft); padding: .9rem 1.1rem; margin: 0 0 1.6rem; font-size: 1.02rem; }
.answer strong:first-child { color: var(--accent); }
.crumbs { font-size: .82rem; color: var(--muted); margin: 0 0 1rem; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
