:root {
  color-scheme: light;
  --sp-bg: #f7f8fa;
  --sp-card: #ffffff;
  --sp-text: #111827;
  --sp-muted: #6b7280;
  --sp-border: #e5e7eb;
  --sp-border-strong: #d7dce4;
  --sp-blue: #2563eb;
  --sp-green: #0f9f63;
  --sp-purple: #7c3aed;
  --sp-shadow: 0 24px 70px rgba(17, 24, 39, 0.08);
  --sp-shadow-soft: 0 12px 32px rgba(17, 24, 39, 0.06);
  --sp-radius: 18px;
  --sp-transition: 160ms ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 12%, rgba(37,99,235,.035), transparent 24%),
    radial-gradient(circle at 88% 30%, rgba(124,58,237,.025), transparent 24%),
    var(--sp-bg);
  color: var(--sp-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, textarea:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(37,99,235,.18);
  outline-offset: 2px;
}
.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; }
.sp-container { width: min(calc(100% - 40px), 1180px); margin-inline: auto; }

.sp-header {
  position: sticky; top: 0; z-index: 30;
  border-bottom: 1px solid rgba(229,231,235,.9);
  background: rgba(255,255,255,.84);
  backdrop-filter: blur(18px);
}
.sp-header__inner { min-height: 64px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.sp-brand { display: inline-flex; align-items: center; gap: 11px; width: max-content; }
.sp-brand__mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: #090b10; }
.sp-brand__mark svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 1.7; }
.sp-brand__name { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.sp-nav { display: flex; align-items: center; justify-content: center; gap: 34px; }
.sp-nav a { color: #374151; font-size: 14px; font-weight: 650; transition: color var(--sp-transition); }
.sp-nav a:hover { color: #000; }
.sp-header__actions { display: flex; justify-content: flex-end; gap: 12px; }
.sp-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; padding: 0 20px; font-size: 14px; font-weight: 750; transition: transform var(--sp-transition), box-shadow var(--sp-transition), background var(--sp-transition); }
.sp-button--ghost { border: 1px solid var(--sp-border); background: #fff; }
.sp-button--dark { border: 1px solid #090b10; background: #090b10; color: #fff; box-shadow: 0 8px 18px rgba(17,24,39,.14); }
.sp-button:hover { transform: translateY(-1px); }

.sp-hero { padding: 28px 0 16px; }
.sp-hero__copy { max-width: 880px; margin: 0 auto 18px; text-align: center; }
.sp-eyebrow { width: max-content; display: inline-flex; align-items: center; gap: 7px; border: 1px solid #dbeafe; border-radius: 999px; background: #eff6ff; color: #1d4ed8; padding: 7px 12px; font-size: 12px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.sp-eyebrow svg { width: 15px; height: 15px; fill: currentColor; }
.sp-hero h1 { margin: 14px 0 8px; font-size: clamp(42px, 5vw, 66px); line-height: 1.02; letter-spacing: -0.048em; font-weight: 850; }
.sp-hero__copy > p { margin: 0; color: #4b5563; font-size: 18px; line-height: 1.55; }

.sp-workspace { border: 1px solid var(--sp-border-strong); border-radius: 20px; background: rgba(255,255,255,.96); box-shadow: var(--sp-shadow); padding: 22px; }
.sp-workspace__toolbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 16px; }
.sp-mode-tabs, .sp-platforms { display: flex; align-items: center; gap: 8px; }
.sp-tab, .sp-platform { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; border-radius: 11px; background: #f5f6f8; color: #1f2937; padding: 0 18px; font-size: 14px; font-weight: 760; transition: all var(--sp-transition); }
.sp-tab svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.sp-tab.is-active { background: #090b10; color: #fff; box-shadow: 0 8px 18px rgba(17,24,39,.16); }
.sp-tab:hover, .sp-platform:hover { transform: translateY(-1px); border-color: var(--sp-border-strong); }
.sp-platform { background: #fff; border-color: var(--sp-border); padding-inline: 14px; }
.sp-platform.is-active { border-color: #cfd5dd; box-shadow: 0 5px 14px rgba(17,24,39,.06); }
.sp-platform__icon { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 5px; color: #fff; font-size: 12px; font-weight: 900; }
.sp-platform__icon--excel { background: #107c41; }
.sp-platform__icon--sheets { background: #0f9d58; }
.sp-chevron { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }

.sp-composer { position: relative; min-height: 210px; border: 1px solid var(--sp-border-strong); border-radius: 13px; background: #fff; overflow: hidden; transition: box-shadow var(--sp-transition), border-color var(--sp-transition); }
.sp-composer:focus-within { border-color: #93c5fd; box-shadow: 0 0 0 4px rgba(37,99,235,.11); }
.sp-composer textarea { width: 100%; min-height: 142px; display: block; resize: none; border: 0; outline: 0; background: transparent; padding: 18px 18px 5px; color: var(--sp-text); font-size: 16px; line-height: 1.65; }
.sp-composer textarea::placeholder { color: #9ca3af; }
.sp-composer__example { margin: 0; padding: 0 18px; color: #9ca3af; font-size: 13px; }
.sp-composer__footer { min-height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; }
.sp-composer__tools { display: flex; gap: 19px; color: #5f6877; font-size: 18px; }
.sp-count { color: #7a8492; font-size: 13px; }
.sp-submit { width: 100%; min-height: 54px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; margin-top: 16px; border: 0; border-radius: 10px; background: #07090d; color: #fff; font-size: 16px; font-weight: 800; transition: transform var(--sp-transition), box-shadow var(--sp-transition), background var(--sp-transition); }
.sp-submit:hover { background: #171a20; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(17,24,39,.17); }
.sp-submit:disabled { opacity: .68; cursor: wait; transform: none; }
.button-loader { display: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: sp-spin .7s linear infinite; }
.sp-submit.is-loading .button-loader { display: inline-block; }
@keyframes sp-spin { to { transform: rotate(360deg); } }

.sp-guide { margin-bottom: 16px; }
.sp-guide__header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.sp-guide__header h2 { margin: 0; color: #111827; font-size: 20px; letter-spacing: -.025em; }
.sp-guide__header p { margin: 0; color: #6b7280; font-size: 13px; font-weight: 650; }
.sp-guide__groups { display: grid; grid-template-columns: 1.25fr 1fr .9fr; gap: 12px; }
.sp-guide__groups--four { grid-template-columns: repeat(4,minmax(0,1fr)); align-items: stretch; }
.sp-guide__message { margin: -2px 0 12px; border: 1px solid #bfdbfe; border-radius: 11px; background: #eff6ff; color: #1d4ed8; padding: 9px 11px; font-size: 13px; font-weight: 750; }
.sp-guide__group { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--sp-border); border-radius: 14px; background: #f8fafc; padding: 12px; }
.sp-guide__group h3 { margin: 0 0 10px; color: #4b5563; font-size: 12px; font-weight: 850; letter-spacing: .05em; text-align: center; text-transform: uppercase; }
.sp-guide__group:nth-child(1) h3 { color: #0f766e; }
.sp-guide__group:nth-child(2) h3 { color: #1d4ed8; }
.sp-guide__group:nth-child(3) h3 { color: #7c2d12; }
.sp-guide__group:nth-child(4) h3 { color: #6d28d9; }
.sp-guide__cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; flex: 1; align-content: start; }
.sp-guide__cards--uploaded { grid-template-columns: repeat(4,minmax(0,1fr)); }
.sp-guide-card { min-width: 0; min-height: 86px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--sp-border); border-radius: 13px; background: #fff; color: #111827; padding: 13px 9px; font-size: 13px; font-weight: 760; line-height: 1.18; text-align: center; transition: transform var(--sp-transition), box-shadow var(--sp-transition), border-color var(--sp-transition), background var(--sp-transition); }
.sp-guide-card span { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 11px; background: #eff6ff; color: #1d4ed8; font-size: 17px; font-weight: 850; line-height: 1; }
.sp-guide-card b { max-width: 100%; display: -webkit-box; overflow: hidden; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.sp-guide-card small { max-width: 100%; display: -webkit-box; overflow: hidden; color: #6b7280; font-size: 11px; font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.sp-template-card { min-height: 122px; }
.sp-guide-card--wide { grid-column: 1 / -1; min-height: 76px; }
.sp-guide-card:hover { border-color: #cbd5e1; box-shadow: 0 8px 18px rgba(17,24,39,.06); transform: translateY(-1px); }
.sp-guide-card.is-recommended, .sp-guide-card.is-selected { border-color: #93c5fd; background: #f8fbff; box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
.sp-template-preview { position: relative; margin-top: 14px; border: 1px solid #d9e2ef; border-radius: 14px; background: #fff; padding: 15px; box-shadow: 0 8px 22px rgba(17,24,39,.035); animation: sp-rise .2s ease-out; }
.sp-template-preview__main { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(280px,.92fr); gap: 18px; align-items: center; }
.sp-template-preview__left, .sp-template-preview__right { min-width: 0; }
.sp-template-preview__close { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--sp-border); border-radius: 999px; background: #fff; color: #6b7280; font-size: 18px; line-height: 1; transition: all var(--sp-transition); }
.sp-template-preview__close:hover { border-color: #cbd5e1; color: #111827; box-shadow: 0 6px 14px rgba(17,24,39,.05); transform: translateY(-1px); }
.sp-template-preview__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-right: 30px; margin-bottom: 11px; }
.sp-template-preview__header strong { display: block; color: #111827; font-size: 16px; line-height: 1.25; }
.sp-template-preview__header p { margin: 4px 0 0; color: #6b7280; font-size: 13px; line-height: 1.45; }
.sp-template-preview__header span { flex: 0 0 auto; border: 1px solid #dbeafe; border-radius: 999px; background: #eff6ff; color: #1d4ed8; padding: 4px 8px; font-size: 11px; font-weight: 850; }
.sp-template-preview__body { display: grid; grid-template-columns: 1fr; gap: 11px; }
.sp-template-preview__body b { display: block; margin-bottom: 7px; color: #4b5563; font-size: 11px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.sp-template-preview ul { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px 10px; margin: 0; padding: 0; list-style: none; }
.sp-template-preview li { min-width: 0; color: #374151; font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.sp-template-preview li::before { content: ""; width: 5px; height: 5px; display: inline-block; margin: 0 6px 2px 0; border-radius: 999px; background: #93c5fd; }
.sp-template-mini { min-width: 0; overflow: hidden; border: 1px solid var(--sp-border); border-radius: 11px; background: #f8fafc; }
.sp-template-mini table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 11px; }
.sp-template-mini th, .sp-template-mini td { min-width: 0; border-bottom: 1px solid #e5e7eb; padding: 8px 9px; color: #374151; text-align: left; overflow-wrap: anywhere; }
.sp-template-mini th { background: #111827; color: #fff; font-weight: 800; }
.sp-template-mini td { background: #fff; color: #6b7280; }
.sp-template-preview__actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 12px; }
.sp-template-preview__actions button { min-height: 38px; border: 1px solid var(--sp-border); border-radius: 999px; background: #fff; color: #1f2937; padding: 8px 12px; font-size: 12px; font-weight: 800; }
.sp-template-preview__actions button:first-child { border-color: #090b10; background: #090b10; color: #fff; }
.sp-template-preview__actions button:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(17,24,39,.06); }
.sp-composer.is-placeholder-shifting { border-color: #bfdbfe; }
.sp-composer__example.is-changing { animation: sp-soft-flash .35s ease-out; }
@keyframes sp-soft-flash { from { opacity: .35; transform: translateY(2px); } to { opacity: 1; transform: translateY(0); } }

.sp-upload { margin-top: 12px; }
.sp-upload__empty, .sp-upload__file { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px dashed #cfd5dd; border-radius: 12px; background: #fff; padding: 13px 14px; color: #5f6877; font-size: 13px; transition: border-color var(--sp-transition), box-shadow var(--sp-transition), background var(--sp-transition); }
.sp-upload__empty { cursor: pointer; }
.sp-upload__empty:hover, .sp-upload__empty.is-dragging { border-color: #93c5fd; background: #f8fbff; box-shadow: 0 0 0 4px rgba(37,99,235,.08); }
.sp-upload__empty strong { display: block; color: #111827; font-size: 14px; }
.sp-upload__empty span { display: block; margin-top: 2px; color: #6b7280; }
.sp-upload__button, .sp-upload__actions button { min-height: 34px; border: 1px solid var(--sp-border); border-radius: 999px; background: #fff; color: #1f2937; padding: 7px 12px; font-size: 12px; font-weight: 750; white-space: nowrap; }
.sp-upload__file { border-style: solid; }
.sp-upload__file-main { min-width: 0; }
.sp-upload__file strong { display: block; color: #111827; font-size: 13px; overflow-wrap: anywhere; }
.sp-upload__file span { display: block; color: #6b7280; font-size: 12px; }
.sp-upload__file em { display: inline-flex; width: max-content; margin-top: 5px; border-radius: 999px; background: #ecfdf3; color: #067647; padding: 4px 8px; font-size: 11px; font-style: normal; font-weight: 800; }
.sp-upload__actions { display: flex; align-items: center; gap: 7px; }
.sp-upload__status { margin: 7px 2px 0; color: #4b5563; font-size: 12px; font-weight: 650; }
.sp-upload__status.is-error { color: #991b1b; }
.sp-upload__context { margin-top: 8px; border: 1px solid var(--sp-border); border-radius: 12px; background: #f8fafc; padding: 12px 14px; color: #4b5563; font-size: 12px; }
.sp-upload__context strong { display: block; color: #111827; font-size: 13px; }
.sp-upload__context span { display: block; margin-top: 3px; overflow-wrap: anywhere; }
.sp-upload__columns { margin-top: 8px; }
.sp-upload__columns ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 7px 0 0; padding: 0; list-style: none; }
.sp-upload__columns li { border: 1px solid #dbe3ef; border-radius: 999px; background: #fff; padding: 4px 8px; color: #1f2937; font-size: 11px; font-weight: 750; overflow-wrap: anywhere; }
.sp-upload__context em { display: block; margin-top: 9px; color: #067647; font-size: 12px; font-style: normal; font-weight: 750; }
.sp-insights { margin-top: 10px; border: 1px solid #d9e2ef; border-radius: 13px; background: #fff; padding: 14px; box-shadow: 0 8px 22px rgba(17,24,39,.035); }
.sp-insights__header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sp-insights__header strong { color: #111827; font-size: 14px; }
.sp-insights__header span { color: #6b7280; font-size: 12px; }
.sp-insights__list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.sp-insights__list li { border: 1px solid var(--sp-border); border-radius: 11px; background: #f8fafc; padding: 10px; min-width: 0; }
.sp-insights__list b { display: block; color: #6b7280; font-size: 11px; font-weight: 850; text-transform: uppercase; }
.sp-insights__list strong { display: block; margin-top: 4px; color: #111827; font-size: 14px; overflow-wrap: anywhere; }
.sp-insights__list span { display: block; margin-top: 3px; color: #6b7280; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.sp-insights__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sp-insights__actions button, .sp-insights__actions a { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--sp-border); border-radius: 999px; background: #fff; color: #1f2937; padding: 7px 12px; font-size: 12px; font-weight: 750; }
.sp-insights__actions button:hover:not(:disabled), .sp-insights__actions a:hover { border-color: #cbd5e1; box-shadow: 0 6px 14px rgba(17,24,39,.05); transform: translateY(-1px); }
.sp-insights__actions button:disabled { color: #9ca3af; cursor: not-allowed; }
.sp-insights__actions span { margin-left: 4px; color: #9ca3af; font-weight: 700; }
.sp-health { margin-top: 10px; border: 1px solid #d9e2ef; border-radius: 13px; background: #fff; padding: 14px; box-shadow: 0 8px 22px rgba(17,24,39,.035); }
.sp-health__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.sp-health__header strong { display: block; color: #111827; font-size: 14px; }
.sp-health__header span { display: block; margin-top: 2px; color: #6b7280; font-size: 12px; }
.sp-health__header em { flex: 0 0 auto; border: 1px solid var(--sp-border); border-radius: 999px; background: #f8fafc; color: #1f2937; padding: 5px 9px; font-size: 12px; font-style: normal; font-weight: 850; white-space: nowrap; }
.sp-health__summary { margin: 0 0 10px; color: #4b5563; font-size: 12px; font-weight: 750; }
.sp-health__list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.sp-health__list:empty { display: none; }
.sp-health__finding { border: 1px solid var(--sp-border); border-radius: 11px; background: #f8fafc; padding: 10px; min-width: 0; }
.sp-health__finding--critical { border-color: #fecaca; background: #fff7f7; }
.sp-health__finding--warning { border-color: #fde68a; background: #fffbeb; }
.sp-health__finding b { display: block; color: #6b7280; font-size: 11px; font-weight: 850; text-transform: uppercase; }
.sp-health__finding strong { display: block; margin-top: 4px; color: #111827; font-size: 14px; overflow-wrap: anywhere; }
.sp-health__finding span { display: block; margin-top: 3px; color: #6b7280; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.sp-health__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sp-health__actions button { min-height: 34px; border: 1px solid var(--sp-border); border-radius: 999px; background: #fff; color: #1f2937; padding: 7px 12px; font-size: 12px; font-weight: 750; }
.sp-health__actions button:hover { border-color: #cbd5e1; box-shadow: 0 6px 14px rgba(17,24,39,.05); transform: translateY(-1px); }

.sp-example-area { margin-top: 20px; }
.sp-example-area > p { margin: 0 0 10px; color: #4b5563; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.sp-example-list { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; }
.sp-example-list button { min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--sp-border); border-radius: 10px; background: #fff; color: #1f2937; padding: 8px 12px; font-size: 13px; font-weight: 650; white-space: nowrap; transition: all var(--sp-transition); }
.sp-example-list button:hover { border-color: #cbd5e1; box-shadow: 0 8px 18px rgba(17,24,39,.06); transform: translateY(-1px); }
.sp-example-list span { color: #344054; font-size: 16px; }

.sp-result-wrap { padding: 32px 0 10px; }
.sp-result-card { border: 1px solid var(--sp-border); border-radius: 20px; background: #fff; box-shadow: var(--sp-shadow-soft); padding: 24px; animation: sp-rise .26s ease-out; }
@keyframes sp-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.sp-result-card__header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.sp-result-label { color: var(--sp-blue); font-size: 12px; font-weight: 850; text-transform: uppercase; }
.sp-result-card h2 { margin: 4px 0 0; font-size: 27px; letter-spacing: -.025em; }
.sp-confidence { border-radius: 999px; background: #ecfdf3; color: #067647; padding: 7px 11px; font-size: 12px; font-weight: 800; }
.sp-result-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 14px; }
.sp-result-block { border: 1px solid var(--sp-border); border-radius: 15px; padding: 17px; background: #fff; }
.sp-result-block--formula { grid-column: 1 / -1; }
.sp-result-block--note { background: #fffbeb; border-color: #fde68a; }
.sp-result-block h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.sp-result-block p { margin: 0; color: #5c6674; line-height: 1.65; }
.sp-result-block pre { margin: 0; border-radius: 11px; background: #0b1020; padding: 16px; overflow-x: auto; }
.sp-result-block code { color: #dbeafe; font: 15px/1.65 SFMono-Regular, Consolas, monospace; }
.sp-result-block__title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sp-result-block__title h3 { margin: 0; }
.sp-copy { border: 1px solid var(--sp-border); border-radius: 999px; background: #fff; padding: 8px 12px; color: #1f2937; font-size: 12px; font-weight: 750; }
.sp-copy--text { margin-top: 14px; }
.sp-copy.is-copied { background: #ccfbf1; border-color: #99f6e4; color: #115e59; }
.sp-deliverables { margin-top: 16px; border: 1px solid var(--sp-border); border-radius: 15px; background: #f8fafc; padding: 16px; }
.sp-deliverables__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sp-deliverables__header strong { color: #111827; font-size: 14px; }
.sp-deliverables__header span { color: #6b7280; font-size: 12px; }
.sp-deliverables__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-deliverables__actions button { min-height: 36px; border: 1px solid var(--sp-border); border-radius: 999px; background: #fff; color: #1f2937; padding: 8px 13px; font-size: 12px; font-weight: 750; }
.sp-deliverables__actions button:hover:not(:disabled) { border-color: #cbd5e1; box-shadow: 0 6px 14px rgba(17,24,39,.05); transform: translateY(-1px); }
.sp-deliverables__actions button:disabled { color: #9ca3af; cursor: not-allowed; }

.sp-features { padding: 22px 0 18px; }
.sp-feature-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.sp-feature-card { display: flex; gap: 16px; align-items: flex-start; border: 1px solid var(--sp-border); border-radius: 15px; background: #fff; padding: 20px; box-shadow: 0 8px 24px rgba(17,24,39,.035); }
.sp-feature-icon { width: 46px; height: 46px; flex: 0 0 46px; display: grid; place-items: center; border-radius: 12px; font-size: 22px; }
.sp-feature-icon--green { background: #dcfce7; color: #0f9f63; }
.sp-feature-icon--blue { background: #dbeafe; color: #2563eb; }
.sp-feature-icon--purple { background: #ede9fe; color: #7c3aed; }
.sp-feature-card h2 { margin: 1px 0 5px; font-size: 18px; }
.sp-feature-card p { margin: 0; color: #596273; font-size: 14px; line-height: 1.55; }

.sp-faq { padding: 0 0 28px; }
.sp-faq h2 { margin: 0 0 14px; text-align: center; font-size: 24px; letter-spacing: -.02em; }
.sp-faq-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 18px; }
.sp-faq details { border: 1px solid var(--sp-border); border-radius: 10px; background: #fff; padding: 0 16px; }
.sp-faq summary { min-height: 43px; display: flex; align-items: center; justify-content: space-between; list-style: none; font-size: 13px; font-weight: 700; cursor: pointer; }
.sp-faq summary::-webkit-details-marker { display: none; }
.sp-faq summary::after { content: "⌄"; color: #596273; }
.sp-faq details[open] summary::after { transform: rotate(180deg); }
.sp-faq details p { margin: 0; padding: 0 0 14px; color: #606a78; font-size: 14px; line-height: 1.6; }

.sp-footer { border-top: 1px solid var(--sp-border); background: rgba(255,255,255,.75); }
.sp-footer__grid { min-height: 112px; display: grid; grid-template-columns: 1.25fr 1.4fr 1fr auto; align-items: center; gap: 24px; }
.sp-footer__brand p { margin: 5px 0 0; color: #5f6877; font-size: 13px; }
.sp-footer__links, .sp-footer__legal { display: flex; gap: 24px; flex-wrap: wrap; }
.sp-footer__links a, .sp-footer__legal a, .sp-footer__copyright { color: #5f6877; font-size: 12px; }
.sp-footer__copyright { margin: 0; text-align: center; }
.sp-doc-page { min-height: calc(100vh - 180px); display: grid; place-items: center; padding: 72px 0; }
.sp-doc-page__inner { max-width: 760px; text-align: center; }
.sp-doc-page h1 { margin: 18px 0 12px; font-size: 52px; letter-spacing: -.04em; }
.sp-doc-page p { margin: 0 auto 24px; color: var(--sp-muted); font-size: 18px; }

@media (max-width: 980px) {
  .sp-header__inner { grid-template-columns: 1fr auto; }
  .sp-nav { display: none; }
  .sp-workspace__toolbar { align-items: stretch; flex-direction: column; }
  .sp-platforms, .sp-mode-tabs { width: 100%; }
  .sp-platform, .sp-tab { flex: 1; }
  .sp-guide__header { align-items: flex-start; flex-direction: column; gap: 4px; }
  .sp-guide__groups, .sp-guide__groups--four { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sp-guide__cards, .sp-guide__cards--uploaded { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sp-template-preview__main { grid-template-columns: 1fr; align-items: stretch; }
  .sp-template-preview__header { padding-right: 30px; }
  .sp-example-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sp-feature-grid, .sp-result-grid { grid-template-columns: 1fr; }
  .sp-result-block--formula { grid-column: auto; }
  .sp-footer__grid { grid-template-columns: 1fr 1fr; padding: 28px 0; }
}

@media (max-width: 680px) {
  .sp-container { width: min(calc(100% - 24px), 1180px); }
  .sp-header__inner { min-height: 58px; }
  .sp-brand__name { font-size: 18px; }
  .sp-header__actions .sp-button--ghost { display: none; }
  .sp-button { min-height: 38px; padding-inline: 14px; }
  .sp-hero { padding-top: 20px; }
  .sp-hero__copy { text-align: left; }
  .sp-hero h1 { font-size: 38px; line-height: 1.04; }
  .sp-hero h1 br { display: none; }
  .sp-hero__copy > p { font-size: 16px; }
  .sp-workspace { padding: 12px; border-radius: 16px; }
  .sp-mode-tabs, .sp-platforms { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
  .sp-platforms { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sp-tab, .sp-platform { min-height: 44px; padding-inline: 8px; font-size: 13px; }
  .sp-tab svg, .sp-chevron { display: none; }
  .sp-guide { margin-bottom: 14px; }
  .sp-guide__header h2 { font-size: 18px; }
  .sp-guide__group { padding: 10px; }
  .sp-guide__groups, .sp-guide__groups--four { grid-template-columns: 1fr; }
  .sp-guide__cards, .sp-guide__cards--uploaded { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; overflow: visible; padding-bottom: 0; }
  .sp-guide-card { min-width: 0; min-height: 82px; padding: 11px 7px; font-size: 12px; }
  .sp-guide-card span { width: 31px; height: 31px; flex-basis: 31px; font-size: 15px; }
  .sp-template-card { min-height: 124px; }
  .sp-template-preview { margin-top: 12px; padding: 12px; }
  .sp-template-preview__main { gap: 12px; }
  .sp-template-preview__header { flex-direction: column; gap: 6px; padding-right: 34px; }
  .sp-template-preview ul { grid-template-columns: 1fr; }
  .sp-template-preview__actions { grid-template-columns: 1fr; }
  .sp-template-preview__actions button { width: 100%; min-height: 42px; }
  .sp-composer { min-height: 270px; }
  .sp-composer textarea { min-height: 194px; padding: 16px 14px 4px; font-size: 16px; }
  .sp-composer__example { padding-inline: 14px; font-size: 12px; }
  .sp-upload__empty, .sp-upload__file { align-items: stretch; flex-direction: column; }
  .sp-upload__button, .sp-upload__actions button { width: 100%; min-height: 42px; }
  .sp-upload__actions { width: 100%; }
  .sp-upload__columns ul { display: grid; grid-template-columns: 1fr; }
  .sp-insights__header { flex-direction: column; }
  .sp-insights__list { grid-template-columns: 1fr; }
  .sp-insights__actions button, .sp-insights__actions a { width: 100%; min-height: 42px; }
  .sp-health__header { flex-direction: column; }
  .sp-health__list { grid-template-columns: 1fr; }
  .sp-health__actions button { width: 100%; min-height: 42px; }
  .sp-deliverables__header { align-items: flex-start; flex-direction: column; }
  .sp-deliverables__actions button { width: 100%; min-height: 42px; }
  .sp-submit { min-height: 54px; }
  .sp-example-list { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; }
  .sp-example-list button { min-width: 174px; justify-content: flex-start; white-space: normal; scroll-snap-align: start; }
  .sp-result-card { padding: 15px; }
  .sp-result-card__header { align-items: flex-start; flex-direction: column; }
  .sp-feature-grid, .sp-faq-grid { grid-template-columns: 1fr; }
  .sp-footer__grid { grid-template-columns: 1fr; text-align: left; }
  .sp-footer__copyright { text-align: left; }
  .sp-footer__links, .sp-footer__legal { gap: 16px; }
}

/* v2.1 complete navigation and content pages */
.sp-static-page { min-height: calc(100vh - 180px); padding: 72px 0 88px; }
.sp-static-page__inner { max-width: 1040px; }
.sp-static-page__inner--narrow { max-width: 760px; }
.sp-static-page__inner--legal { max-width: 820px; }
.sp-static-page h1 { max-width: 820px; margin: 14px 0 16px; font-size: clamp(40px, 6vw, 68px); line-height: 1.02; letter-spacing: -.045em; }
.sp-static-page__lead { max-width: 760px; margin: 0 0 38px; color: var(--sp-muted); font-size: 18px; line-height: 1.7; }
.sp-static-page h2 { margin-top: 32px; font-size: 22px; }
.sp-static-page p, .sp-static-page li { color: #596273; line-height: 1.75; }
.sp-static-page a:not(.sp-button) { color: #1d4ed8; font-weight: 700; }
.sp-example-catalog { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.sp-example-catalog article, .sp-doc-grid article, .sp-info-panel, .sp-contact-card { border: 1px solid var(--sp-border); border-radius: 18px; background: #fff; padding: 24px; box-shadow: 0 12px 30px rgba(17,24,39,.045); }
.sp-example-catalog article > span { color: #2563eb; font-size: 12px; font-weight: 850; text-transform: uppercase; }
.sp-example-catalog h2, .sp-doc-grid h2, .sp-contact-card h2 { margin: 8px 0; font-size: 21px; }
.sp-example-catalog p { min-height: 84px; }
.sp-doc-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; margin-bottom: 22px; }
.sp-doc-grid b { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: #111827; color: #fff; }
.sp-info-panel { margin: 0 0 24px; background: #f8fafc; }
.sp-pricing-card { border: 1px solid #d8dee8; border-radius: 22px; background: #fff; padding: 30px; box-shadow: 0 24px 70px rgba(17,24,39,.09); }
.sp-pricing-card > div { display: grid; gap: 5px; margin-bottom: 22px; }
.sp-pricing-card span { font-weight: 850; }
.sp-pricing-card strong { color: #111827; font-size: 64px; line-height: 1; }
.sp-pricing-card small { color: var(--sp-muted); }
.sp-pricing-card ul { margin-bottom: 26px; padding-left: 20px; }
.sp-contact-card { text-align: left; }
.sp-static-page__inner--legal h1 { font-size: clamp(42px, 6vw, 62px); }
.sp-static-page__inner--legal h2 { margin-top: 34px; }
@media (max-width: 760px) {
  .sp-static-page { padding: 46px 0 64px; }
  .sp-example-catalog, .sp-doc-grid { grid-template-columns: 1fr; }
  .sp-example-catalog p { min-height: 0; }
}

.sp-tool-error {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #fecaca;
  border-radius: 14px;
  background: #fef2f2;
  color: #991b1b;
  font-weight: 700;
}
