/* Site layer on top of tokens.css. Every color, radius and shadow here is a token variable. */

html { scroll-behavior: smooth; }
body { font-feature-settings: "ss01"; -webkit-font-smoothing: antialiased; }
:where(.wp-site-blocks) *:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.screen-reader-text:focus { clip: auto; width: auto; height: auto; padding: 8px 12px; background: var(--surface); z-index: 100; }

/* ---------- header */
.sm-header { position: sticky; top: 0; z-index: 50; background: var(--canvas); border-block-end: 1px solid var(--border); }
.sm-header__row { min-height: 72px; }
.sm-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -0.01em; }
.sm-brand:hover { color: var(--text); }
.sm-brand svg { flex: none; }
.sm-header .wp-block-navigation { font-size: 15px; font-weight: 500; gap: 28px; }
.sm-header .wp-block-navigation a { color: var(--text); text-decoration: none; }
.sm-header .wp-block-navigation .current-menu-item > a,
.sm-header .wp-block-navigation a[aria-current="page"] { color: var(--primary); font-weight: 700; }
.sm-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--canvas); color: var(--text); }
.sm-theme-toggle { inline-size: 44px; block-size: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-control); border: 1px solid var(--border-strong); background: transparent; color: var(--text); cursor: pointer; }
.sm-theme-toggle:hover { background: var(--surface-muted); }
.sm-theme-toggle .sm-i-sun { display: none; }
[data-theme="dark"] .sm-theme-toggle .sm-i-sun { display: block; }
[data-theme="dark"] .sm-theme-toggle .sm-i-moon { display: none; }

/* ---------- buttons (block styles registered in functions.php) */
.wp-block-button__link { min-block-size: 44px; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; text-decoration: none; border: 1px solid transparent; }
.wp-block-button.is-style-accent .wp-block-button__link { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2); }
.wp-block-button.is-style-accent .wp-block-button__link:hover { background: var(--accent-hover); color: var(--on-accent); }
.wp-block-button.is-style-ghost .wp-block-button__link { background: transparent; color: var(--text); border-color: var(--border-strong); }
.wp-block-button.is-style-ghost .wp-block-button__link:hover { background: var(--surface-muted); color: var(--text); }
.wp-block-button.is-style-on-navy .wp-block-button__link { background: transparent; color: var(--on-navy); border-color: rgba(255, 255, 255, 0.24); }
.wp-block-button.is-style-on-navy .wp-block-button__link:hover { background: rgba(255, 255, 255, 0.06); }
.sm-btn-lg .wp-block-button__link { min-block-size: 48px; padding-inline: 24px; font-size: 16px; }

/* ---------- surfaces */
.is-style-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 22px; }
.is-style-card-flat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 22px; }
.is-style-placeholder { border: 1px dashed var(--border-strong); border-radius: var(--radius-card); padding: 24px; min-block-size: 200px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 14px; text-align: center; }
.is-style-navy { background: var(--navy); color: var(--on-navy); border: 1px solid var(--navy-border); border-radius: var(--radius-card); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); padding: clamp(24px, 4vw, 48px); }
.is-style-navy :where(h1, h2, h3, h4) { color: var(--on-navy); }
.is-style-navy :where(p) { color: var(--on-navy-muted); }
.is-style-navy a:not(.wp-block-button__link) { color: var(--on-navy-muted); }

/* ---------- text helpers */
.sm-eyebrow { color: var(--primary); font-size: 13px; line-height: 20px; font-weight: 600; margin: 0; }
.sm-muted, .sm-muted p { color: var(--text-muted); }
.sm-lead { font-size: 18px; line-height: 32px; color: var(--text-muted); }
.sm-section { padding-block: var(--wp--preset--spacing--section); }
.sm-section-head { max-inline-size: 720px; margin-block-end: 32px; }
.sm-num { color: var(--primary); font-weight: 700; font-size: 13px; margin: 0; }
.sm-stat strong { display: block; font-size: 24px; line-height: 36px; font-weight: 800; color: var(--text); }
.sm-stat span { font-size: 13px; line-height: 22px; color: var(--text-muted); }

/* ---------- badges (status colors from tokens) */
.sm-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 9999px; padding: 4px 10px; font-size: 11px; line-height: 16px; font-weight: 600; border: 1px solid; inline-size: fit-content; }
.sm-badge::before { content: ""; inline-size: 6px; block-size: 6px; border-radius: 9999px; background: currentColor; }
.sm-badge--ok { background: var(--st-approved-bg); color: var(--st-approved-fg); border-color: var(--st-approved-border); }
.sm-badge--ok::before { background: var(--st-approved-dot); }
.sm-badge--ip { background: var(--st-in-progress-bg); color: var(--st-in-progress-fg); border-color: var(--st-in-progress-border); }
.sm-badge--ip::before { background: var(--st-in-progress-dot); }
.sm-badge--sb { background: var(--st-submitted-bg); color: var(--st-submitted-fg); border-color: var(--st-submitted-border); }
.sm-badge--sb::before { background: var(--st-submitted-dot); }
.sm-badge--ns { background: var(--st-not-started-bg); color: var(--st-not-started-fg); border-color: var(--st-not-started-border); }
.sm-badge--ns::before { background: var(--st-not-started-dot); }
.sm-badge--plain::before { display: none; }

/* ---------- product mock (hero) */
.sm-mock { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.sm-mock li { display: flex; align-items: center; gap: 12px; min-block-size: 46px; padding-inline: 8px; font-size: 14px; line-height: 22px; }
.sm-mock .sm-mock__n { inline-size: 28px; block-size: 28px; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: var(--surface-muted); color: var(--text-muted); flex: none; }
.sm-mock .sm-mock__t { flex: 1; }
.sm-mock__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block-end: 14px; margin-block-end: 6px; border-block-end: 1px solid var(--surface-muted); }

/* ---------- stations list (software page) */
.sm-stations { margin: 0; padding: 0 28px; list-style: none; }
.sm-stations li { display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; padding-block: 22px; border-block-end: 1px solid var(--surface-muted); }
.sm-stations li:last-child { border-block-end: 0; }
.sm-stations .sm-st__n { inline-size: 44px; block-size: 44px; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; background: var(--st-submitted-bg); color: var(--st-submitted-fg); border: 1px solid var(--st-submitted-border); }
.sm-stations h3 { font-size: 18px; margin: 0 0 4px; }
.sm-stations p { margin: 0; font-size: 14px; line-height: 24px; color: var(--text-muted); }
.sm-stations .sm-st__out small { display: block; font-size: 12px; font-weight: 600; color: var(--text-soft); }
@media (max-width: 1023px) { .sm-stations li { grid-template-columns: 52px minmax(0, 1fr); } .sm-stations .sm-st__out { grid-column: 2; } }

/* ---------- tool rows on navy */
.sm-tool-row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; border-radius: var(--radius-control); border: 1px solid var(--navy-border); background: rgba(255, 255, 255, 0.03); color: var(--on-navy); }
.sm-tool-row span:last-child { color: var(--on-navy-muted); font-size: 14px; }

/* ---------- FAQ (core/details) */
.wp-block-details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 18px 22px; }
.wp-block-details summary { cursor: pointer; font-weight: 600; list-style: none; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; float: inline-end; color: var(--text-muted); font-weight: 400; }
.wp-block-details[open] summary::after { content: "−"; }
.wp-block-details p { color: var(--text-muted); margin-block: 12px 0; font-size: 15px; line-height: 26px; }

/* ---------- plans */
.sm-plan { display: flex; flex-direction: column; gap: 16px; block-size: 100%; }
.sm-plan--featured { border: 2px solid var(--primary) !important; }
.sm-plan .sm-price { font-size: 28px; font-weight: 800; line-height: 40px; margin: 0; }
.sm-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 24px; }
.sm-checks li { display: flex; gap: 10px; align-items: flex-start; }
.sm-checks li::before { content: ""; flex: none; inline-size: 18px; block-size: 18px; margin-block-start: 3px; background: var(--st-approved-dot); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / contain no-repeat; }
.is-style-navy .sm-checks li { color: var(--on-navy); }
.is-style-navy .sm-checks li::before { background: var(--code-var); }
.sm-push-end { margin-block-start: auto !important; }

/* ---------- waitlist form */
.sm-form { display: flex; flex-direction: column; gap: 16px; }
.sm-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.sm-form input { block-size: 44px; border-radius: var(--radius-control); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); padding-inline: 14px; font: inherit; font-size: 15px; }
.sm-form input::placeholder { color: var(--text-soft); }
.sm-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }
.sm-form input[dir="ltr"] { text-align: end; }
.sm-form .sm-hp { position: absolute; inset-inline-start: -9999px; inline-size: 1px; block-size: 1px; overflow: hidden; }
.sm-form button { min-block-size: 48px; border: 0; border-radius: var(--radius-control); background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 600; font-size: 16px; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2); }
.sm-form button:hover { background: var(--accent-hover); }
.sm-form button[disabled] { opacity: 0.6; cursor: progress; }
.sm-form__msg { font-size: 14px; line-height: 24px; margin: 0; }
.sm-form__msg[data-state="error"] { color: var(--danger); }
.sm-form__done { display: none; flex-direction: column; gap: 12px; align-items: flex-start; }
.sm-waitlist.is-done .sm-form { display: none; }
.sm-waitlist.is-done .sm-form__done { display: flex; }

/* ---------- mentor card */
.sm-avatar { inline-size: 72px; block-size: 72px; border-radius: 9999px; object-fit: cover; background: var(--surface-muted); flex: none; }
.sm-avatar--empty { border: 1px dashed var(--border-strong); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; color: var(--text-muted); }

/* ---------- footer */
.sm-footer { background: var(--surface); border-block-start: 1px solid var(--border); }
.sm-footer a { color: var(--text-muted); text-decoration: none; }
.sm-footer a:hover { color: var(--text); }
.sm-footer .wp-block-navigation { font-size: 14px; line-height: 30px; }

/* ---------- breadcrumb + posts */
.sm-breadcrumb { font-size: 13px; color: var(--text-muted); }
.sm-breadcrumb a { color: var(--text-muted); text-decoration: none; }
.sm-breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sm-breadcrumb li + li::before { content: "/"; margin-inline-end: 6px; color: var(--text-soft); }
.wp-block-post-content :where(p, li) { font-size: 17px; line-height: 32px; }
.wp-block-post-content :where(h2) { margin-block: 2.2em 0.6em; }
.wp-block-post-content :where(h3) { margin-block: 1.8em 0.5em; }
.wp-block-post-content code { font-family: var(--font-mono); background: var(--surface-muted); padding: 2px 6px; border-radius: 6px; font-size: 0.9em; }
.wp-block-post-content pre { background: var(--code-bg); color: var(--code-text); border-radius: var(--radius-control); padding: 16px; overflow-x: auto; direction: ltr; }
.wp-block-post-content table { display: block; overflow-x: auto; }

@media (max-width: 781px) {
  .sm-hide-sm { display: none !important; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
