/* ==========================================================================
   Service-page kit — shared layout for the web development, website support
   and single-service SEO pages. Pages opt in with "kit": "svc" in their meta.
   Sections (all optional, in this order on most pages):
   hero + scene · definition · signals · included · built-to-rank compare ·
   process · stack · scope builder · related · faq · cta
   ========================================================================== */

/* ---------- hero ---------- */
.sv-hero { padding-bottom: clamp(48px, 6vw, 90px); }
.sv-hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.sv-hero .h-display.sv-title { font-size: clamp(36px, 4.3vw, 64px); max-width: 17ch; line-height: 1.03; }
.sv-code { display: inline-grid; place-items: center; min-width: 40px; height: 24px; padding: 0 8px; border-radius: 7px; background: rgba(var(--accent-rgb), 0.18); border: 1px solid rgba(var(--accent-rgb), 0.34); color: #9bb8ff; font-size: 11px; letter-spacing: 0.08em; }
.sv-proof { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; margin: 30px 0 0; font-family: var(--f-mono); font-size: 12.5px; letter-spacing: 0.02em; color: var(--muted); }
.sv-proof li { display: inline-flex; align-items: center; gap: 8px; }
.sv-proof li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: rgba(87, 242, 176, 0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.5 7.2l2.2 2.2 4.8-4.8' fill='none' stroke='%2357f2b0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.sv-hero-viz { position: relative; min-width: 0; }
.sv-hero-viz::before { content: ""; position: absolute; inset: 8% 0 -10% 8%; z-index: -1; background: radial-gradient(closest-side, rgba(var(--accent-rgb), 0.28), transparent); filter: blur(30px); }
.sv-scene { position: relative; height: clamp(330px, 32vw, 430px); overflow: hidden; }
.sv-scene-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; padding: 11px 16px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--dim); letter-spacing: 0.03em; }
.sv-scene-foot b { color: var(--muted); font-weight: 500; }
.sv-scene-note { margin-top: 12px; font-size: 12px; color: var(--dim); }
/* no-JS / failed-scene fallback: a plain list of what the illustration shows */
.sv-scene-fallback { list-style: none; margin: 0; padding: 26px; display: grid; gap: 10px; font-family: var(--f-mono); font-size: 13px; color: var(--muted); }
.sv-scene-fallback li::before { content: "› "; color: var(--accent); }
.sv-scene.is-live .sv-scene-fallback { display: none; }
@media (max-width: 980px) {
  .sv-hero-grid { grid-template-columns: 1fr; }
  .sv-scene { height: 360px; }
}
@media (max-width: 560px) { .sv-scene { height: 330px; } }

/* ---------- definition / answer box ---------- */
.sv-def { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.sv-def-card { position: relative; padding: clamp(26px, 3.4vw, 44px); border-radius: var(--r-lg); background: linear-gradient(160deg, rgba(25, 40, 96, 0.6), rgba(8, 14, 40, 0.6)); border: 1px solid var(--line-2); overflow: hidden; }
.sv-def-card::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad); }
.sv-def-q { margin-bottom: 18px; }
.sv-def-a { font-size: clamp(17px, 1.4vw, 19.5px); line-height: 1.68; color: #d5dcf2; }
.sv-def-a strong { color: #fff; }
.sv-def-a a, .sv-scene-note a, .faq-a a:not(.faq-link) { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.sv-facts { margin: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.sv-facts > div { background: var(--bg); padding: 18px 22px; display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: baseline; }
.sv-facts dt { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.sv-facts dd { margin: 0; color: var(--text); font-size: 15.5px; line-height: 1.5; }
@media (max-width: 900px) { .sv-def { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .sv-facts > div { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- signals: "sound familiar?" self-check ---------- */
.sv-signals-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.sv-signals { display: grid; gap: 10px; }
.sv-signal { display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; padding: 18px 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); font-size: 16.5px; line-height: 1.45; color: var(--muted); transition: border-color 0.3s, background 0.3s, color 0.3s, transform 0.4s var(--ease); }
.sv-signal:hover { border-color: var(--line-2); color: var(--text); transform: translateX(4px); }
.sv-signal[aria-pressed="true"] { border-color: rgba(87, 242, 176, 0.55); background: rgba(87, 242, 176, 0.07); color: var(--text); }
.sv-check { position: relative; flex: none; width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--line-2); transition: background 0.3s, border-color 0.3s; }
.sv-check::after { content: ""; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px; border: solid var(--bg); border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform 0.35s var(--ease); }
.sv-signal[aria-pressed="true"] .sv-check { background: var(--mint); border-color: var(--mint); }
.sv-signal[aria-pressed="true"] .sv-check::after { transform: rotate(45deg) scale(1); }
.sv-signals-out { margin-top: 14px; padding: 18px 20px; border-radius: 16px; border: 1px dashed var(--line-2); display: grid; gap: 12px; }
.sv-signals-bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.sv-signals-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--mint)); transition: width 0.6s var(--ease); }
.sv-signals-msg { font-size: 13px; color: var(--muted); letter-spacing: 0.02em; }
.sv-signals-msg b { color: var(--mint); font-weight: 500; }
.sv-signals-out .btn[hidden] { display: none; }
@media (max-width: 900px) { .sv-signals-grid { grid-template-columns: 1fr; } }

/* ---------- included ---------- */
.sv-inc-card { display: flex; flex-direction: column; gap: 4px; }
.sv-inc-card .code { margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.sv-inc-card .code::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }
.sv-inc-card h3 { font-size: clamp(19px, 1.6vw, 22px); }

/* ---------- built to rank: typical vs Founcy compare ---------- */
.sv-compare { border: 1px solid var(--line-2); border-radius: var(--r-lg); background: linear-gradient(180deg, rgba(14, 24, 64, 0.6), rgba(7, 13, 36, 0.6)); overflow: hidden; }
.sv-cmp-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 18px clamp(18px, 3vw, 30px); border-bottom: 1px solid var(--line); }
.sv-cmp-switch { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(5, 10, 28, 0.6); }
.sv-cmp-switch button { position: relative; z-index: 1; height: 40px; padding: 0 18px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); transition: color 0.3s; white-space: nowrap; }
.sv-cmp-switch button[aria-pressed="true"] { color: var(--bg); }
.sv-cmp-thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--dim); transition: transform 0.55s var(--ease), background 0.4s; }
.sv-compare.is-b .sv-cmp-thumb { transform: translateX(100%); background: var(--mint); box-shadow: 0 0 24px rgba(87, 242, 176, 0.45); }
.sv-cmp-score { font-family: var(--f-mono); font-size: 12.5px; color: var(--dim); }
.sv-cmp-score b { color: var(--text); font-weight: 500; }
.sv-compare.is-b .sv-cmp-score b { color: var(--mint); }
.sv-cmp-row { display: grid; grid-template-columns: minmax(150px, 0.38fr) 1fr; gap: 20px; align-items: center; padding: 18px clamp(18px, 3vw, 30px); border-bottom: 1px solid var(--line); }
.sv-cmp-row:last-child { border-bottom: 0; }
.sv-cmp-k { font-weight: 600; letter-spacing: -0.01em; }
.sv-cmp-v { display: grid; }
.sv-cmp-a, .sv-cmp-b { grid-area: 1 / 1; display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; line-height: 1.5; transition: opacity 0.45s var(--ease), transform 0.55s var(--ease); }
.sv-cmp-a { color: var(--dim); }
.sv-cmp-b { color: var(--text); }
.sv-cmp-a::before, .sv-cmp-b::before { flex: none; font-family: var(--f-mono); font-size: 13px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; margin-top: 1px; }
.sv-cmp-a::before { content: "✕"; color: var(--rose); background: rgba(255, 111, 134, 0.12); }
.sv-cmp-b::before { content: "✓"; color: var(--mint); background: rgba(87, 242, 176, 0.14); }
html.js .sv-compare:not(.is-b) .sv-cmp-b, html.js .sv-compare.is-b .sv-cmp-a { opacity: 0; transform: translateY(8px); pointer-events: none; }
html.js .sv-compare.is-b .sv-cmp-row:nth-child(2) .sv-cmp-b { transition-delay: 0.06s; }
html.js .sv-compare.is-b .sv-cmp-row:nth-child(3) .sv-cmp-b { transition-delay: 0.12s; }
html.js .sv-compare.is-b .sv-cmp-row:nth-child(4) .sv-cmp-b { transition-delay: 0.18s; }
html.js .sv-compare.is-b .sv-cmp-row:nth-child(5) .sv-cmp-b { transition-delay: 0.24s; }
html.js .sv-compare.is-b .sv-cmp-row:nth-child(6) .sv-cmp-b { transition-delay: 0.3s; }
html:not(.js) .sv-cmp-switch, html:not(.js) .sv-cmp-score { display: none; }
html:not(.js) .sv-cmp-v { gap: 8px; }
html:not(.js) .sv-cmp-a, html:not(.js) .sv-cmp-b { grid-area: auto; }
@media (max-width: 640px) {
  .sv-cmp-row { grid-template-columns: 1fr; gap: 8px; }
  .sv-cmp-switch button { padding: 0 12px; font-size: 13px; }
}

/* ---------- process: vertical steps with a scroll-linked spine ---------- */
.sv-proc-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.sv-proc-grid .section-head { position: sticky; top: calc(var(--header-h) + 40px); }
.sv-steps { --p: 0; position: relative; list-style: none; margin: 0; padding: 0 0 0 64px; display: grid; gap: clamp(26px, 3vw, 40px); }
.sv-steps::before, .sv-steps::after { content: ""; position: absolute; left: 21px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--line); }
.sv-steps::after { background: linear-gradient(180deg, var(--accent), var(--mint)); transform-origin: top; transform: scaleY(var(--p)); box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.7); }
.sv-step { position: relative; }
.sv-step-n { position: absolute; left: -64px; top: 0; z-index: 1; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: var(--bg-2); border: 1.5px solid var(--line-2); color: var(--muted); transition: all 0.45s var(--ease); }
.sv-step.is-active .sv-step-n { background: var(--accent); border-color: var(--accent); color: var(--bg); box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0.18); }
.sv-step h3 { font-size: clamp(20px, 1.8vw, 24px); letter-spacing: -0.025em; padding-top: 7px; margin-bottom: 8px; }
.sv-step p { color: var(--muted); font-size: 16px; }
.sv-step-out { display: inline-block; margin-top: 12px; font-size: 12.5px; color: var(--cyan); letter-spacing: 0.02em; }
@media (max-width: 900px) {
  .sv-proc-grid { grid-template-columns: 1fr; }
  .sv-proc-grid .section-head { position: static; }
}

/* ---------- stack ---------- */
.sv-stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(14px, 2vw, 22px); }
.sv-stack-group { padding: 22px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.sv-stack-group .mono-label { margin-bottom: 14px; font-size: 11.5px; }
.sv-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sv-chips .chip { height: 32px; font-size: 13.5px; }

/* ---------- scope builder (cost drivers, no price list) ---------- */
.sv-scope { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(18px, 3vw, 32px); align-items: start; }
.sv-factors { display: grid; gap: 12px; }
.sv-factor { margin: 0; padding: 20px 22px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); min-width: 0; }
.sv-factor legend { float: left; width: 100%; padding: 0; font-weight: 600; font-size: 17px; letter-spacing: -0.015em; margin-bottom: 4px; }
.sv-factor p { clear: both; color: var(--muted); font-size: 14.5px; margin-bottom: 14px; }
.sv-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.sv-seg label { position: relative; }
.sv-seg input { position: absolute; opacity: 0; pointer-events: none; }
.sv-seg span { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14px; color: var(--muted); cursor: pointer; transition: all 0.3s var(--ease); }
.sv-seg label:hover span { color: var(--text); border-color: rgba(var(--accent-rgb), 0.6); }
.sv-seg input:checked + span { background: rgba(var(--accent-rgb), 0.18); border-color: var(--accent); color: var(--text); }
.sv-seg input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }
.sv-scope-out { position: sticky; top: calc(var(--header-h) + 30px); padding: 26px; border-radius: var(--r-lg); border: 1px solid var(--line-2); background: radial-gradient(120% 90% at 50% 0%, rgba(var(--accent-rgb), 0.22), transparent 60%), rgba(8, 14, 40, 0.8); text-align: center; }
.sv-gauge { position: relative; width: 220px; max-width: 100%; margin: 14px auto 6px; }
.sv-gauge svg { width: 100%; overflow: visible; }
.sv-gauge .g-track { fill: none; stroke: var(--line-2); stroke-width: 12; stroke-linecap: round; }
.sv-gauge .g-fill { fill: none; stroke: url(#svGaugeGrad); stroke-width: 12; stroke-linecap: round; stroke-dasharray: 283; stroke-dashoffset: 283; transition: stroke-dashoffset 0.8s var(--ease); filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.6)); }
.sv-gauge b { position: absolute; left: 0; right: 0; bottom: 4px; font-size: 22px; letter-spacing: -0.03em; }
.sv-scope-text { color: var(--muted); font-size: 15px; margin: 8px 0 20px; min-height: 4.5em; }
.sv-scope-out .btn { width: 100%; }
.sv-scope-fine { margin-top: 14px; font-size: 11.5px; color: var(--dim); }
@media (max-width: 900px) {
  .sv-scope { grid-template-columns: 1fr; }
  .sv-scope-out { position: relative; top: 0; }
}

/* ---------- related ---------- */
.sv-rel { display: flex; flex-direction: column; gap: 8px; min-height: 190px; }
.sv-rel .code { margin-bottom: auto; }
.sv-rel h3 { margin: 18px 0 4px; }
.sv-rel .sv-rel-go { font-size: 14px; font-weight: 600; color: var(--cyan); margin-top: 8px; }
.sv-rel .sv-rel-go span { display: inline-block; transition: transform 0.35s var(--ease); }
.sv-rel:hover .sv-rel-go span { transform: translateX(5px); }

/* ---------- faq ---------- */
.sv-faq-grid { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
@media (max-width: 900px) { .sv-faq-grid { grid-template-columns: 1fr; } }

/* ---------- shared scene vocabulary (scenes add their own css) ---------- */
.scn-tag { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid var(--line-2); color: var(--muted); background: rgba(5, 10, 28, 0.7); }
.scn-tag.ok { color: var(--mint); border-color: rgba(87, 242, 176, 0.45); background: rgba(87, 242, 176, 0.08); }
.scn-tag.warn { color: var(--amber); border-color: rgba(255, 190, 92, 0.45); background: rgba(255, 190, 92, 0.08); }
.scn-tag.bad { color: var(--rose); border-color: rgba(255, 111, 134, 0.45); background: rgba(255, 111, 134, 0.08); }

/* ---------- day theme ---------- */
html[data-theme="light"] .sv-code { color: var(--accent); background: rgba(var(--accent-rgb), 0.09); border-color: rgba(var(--accent-rgb), 0.28); }
html[data-theme="light"] .sv-proof li::before { background-color: rgba(11, 149, 102, 0.12); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.5 7.2l2.2 2.2 4.8-4.8' fill='none' stroke='%230b9566' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
html[data-theme="light"] .sv-def-card { background: linear-gradient(160deg, #ffffff, #f2f5ff); box-shadow: 0 18px 44px -26px rgba(20, 40, 110, 0.35); }
html[data-theme="light"] .sv-def-a { color: #26304f; }
html[data-theme="light"] .sv-def-a strong { color: var(--text); }
html[data-theme="light"] .sv-facts > div { background: #fff; }
html[data-theme="light"] .sv-signal { background: #fff; }
html[data-theme="light"] .sv-signal[aria-pressed="true"] { background: rgba(11, 149, 102, 0.07); border-color: rgba(11, 149, 102, 0.5); }
html[data-theme="light"] .sv-check::after { border-color: #fff; }
html[data-theme="light"] .sv-compare { background: #fff; box-shadow: 0 18px 44px -28px rgba(20, 40, 110, 0.35); }
html[data-theme="light"] .sv-cmp-switch { background: var(--bg-2); }
html[data-theme="light"] .sv-cmp-switch button[aria-pressed="true"] { color: #fff; }
html[data-theme="light"] .sv-compare.is-b .sv-cmp-thumb { box-shadow: 0 6px 18px -6px rgba(11, 149, 102, 0.6); }
html[data-theme="light"] .sv-step-n { background: #fff; }
html[data-theme="light"] .sv-step.is-active .sv-step-n { color: #fff; }
html[data-theme="light"] .sv-stack-group, html[data-theme="light"] .sv-factor { background: #fff; }
html[data-theme="light"] .sv-scope-out { background: radial-gradient(120% 90% at 50% 0%, rgba(var(--accent-rgb), 0.12), transparent 60%), #fff; box-shadow: 0 18px 44px -26px rgba(20, 40, 110, 0.35); }
html[data-theme="light"] .scn-tag:not(:where(.window, .cta-band, .exit-card, [data-dark]) *) { background: #fff; }
