/* Shared Podskrift components (DESIGN.md).
   Tokens come from templates/base.html (:root). No new colours or fonts.
   Macros live in templates/components/. Prefer these over hand-rolled CSS. */

/* ---------------------------------------------------------------------------
   Layout helpers used by macros (spacing scale from DESIGN.md)
   --------------------------------------------------------------------------- */
.ds-stack { display: flex; flex-direction: column; }
.ds-stack-1 { gap: var(--space-1); }
.ds-stack-2 { gap: var(--space-2); }
.ds-stack-3 { gap: var(--space-3); }
.ds-stack-4 { gap: var(--space-4); }
.ds-stack-6 { gap: var(--space-6); }
.ds-stack-9 { gap: var(--space-9); }
.ds-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
}
.ds-mt-1 { margin-top: var(--space-1); }
.ds-mt-2 { margin-top: var(--space-2); }
.ds-mt-3 { margin-top: var(--space-3); }
.ds-mt-4 { margin-top: var(--space-4); }
.ds-mt-6 { margin-top: var(--space-6); }
.ds-mt-9 { margin-top: var(--space-9); }
.ds-mb-0 { margin-bottom: 0; }
.ds-w-full { width: 100%; }
.ds-max-ch-28 { max-width: 28rem; }
.ds-max-ch-40 { max-width: 40rem; }

/* ---------------------------------------------------------------------------
   Page header — title + lede
   --------------------------------------------------------------------------- */
.ds-page-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-9);
}
.ds-page-header__title {
    font-size: var(--title-fluid, clamp(1.875rem, 5vw, 2.75rem));
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--ink);
    margin: 0;
}
.ds-page-header__lede {
    margin: 0;
    max-width: 40rem;
    font-size: 1.0625rem;
    line-height: 1.55;
    color: var(--muted);
}

/* ---------------------------------------------------------------------------
   Buttons — variants map onto existing .btn rules; ghost = tertiary text
   --------------------------------------------------------------------------- */
.btn.btn-ghost {
    background: transparent;
    color: var(--accent);
    border-color: transparent;
    padding: 0 1rem;
}
.btn.btn-ghost:hover {
    background: var(--surface);
    color: var(--accent-hover);
    border-color: transparent;
}
.btn.btn-ghost:disabled,
.btn.btn-ghost[disabled] {
    background: var(--surface);
    color: var(--muted);
    border-color: transparent;
}
.ds-link-button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}
.ds-link-button:hover { color: var(--accent-hover); }
/* Quiet secondary BYOK under a purchase CTA — muted, not a peer button. */
.paywall-byok-alt {
    display: block;
    margin: 12px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--muted);
}
.paywall-byok-alt a {
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.paywall-byok-alt a:hover { color: var(--accent); }
/* A link styled as a button cannot take [disabled]; match the disabled look. */
.btn[aria-disabled="true"] {
    background: var(--surface);
    color: var(--muted);
    border-color: transparent;
    cursor: not-allowed;
    pointer-events: none;
}

/* ---------------------------------------------------------------------------
   Card / section
   --------------------------------------------------------------------------- */
.ds-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding: var(--space-6);
    background: var(--surface);
    border-radius: var(--radius-md, var(--radius));
}
.ds-section--bordered {
    background: var(--paper);
    border: 1px solid var(--line);
}
.ds-section--strong {
    background: var(--paper);
    border: 1px solid var(--line-strong);
}
/* Actions keep their own width; a flex column would stretch them edge to edge. */
.ds-section > .btn,
.ds-section > .ds-link-button { align-self: flex-start; }
.ds-section__title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.2;
    color: var(--ink);
}

/* ---------------------------------------------------------------------------
   Tabs (segmented underline control) — builds on .tabs / .tab in base.html
   --------------------------------------------------------------------------- */
.ds-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-6);
    border-bottom: 1px solid var(--line);
    margin: 0 0 var(--space-6);
}
.ds-tab {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--muted);
    font: inherit;
    font-size: 1rem;
    font-weight: 500;
    min-height: 44px;
    padding: 0;
    margin-bottom: -1px;
    cursor: pointer;
    transition: color var(--transition), border-color var(--transition);
}
.ds-tab:hover { color: var(--ink); }
.ds-tab[aria-selected="true"],
.ds-tab[aria-pressed="true"],
.ds-tab.is-active {
    color: var(--ink);
    font-weight: 700;
    border-bottom-color: var(--accent);
}
.ds-tabpanel { margin: 0; }
.ds-tabpanel[hidden] { display: none; }

/* ---------------------------------------------------------------------------
   Checklist row — pending / active / done / error
   --------------------------------------------------------------------------- */
.ds-checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--line);
}
.ds-checklist__row {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--line);
}
.ds-checklist__marker {
    flex: none;
    width: 24px;
    height: 24px;
    margin-top: 2px;
    border-radius: 50%;
    border: 2px solid var(--line-strong);
    background: var(--paper);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--on-accent);
}
.ds-checklist__row.is-done .ds-checklist__marker {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--on-accent);
}
.ds-checklist__row.is-active .ds-checklist__marker {
    border-color: var(--accent);
    background: var(--paper);
}
/* Active differs from pending by shape (inner dot), not by ring colour alone. */
.ds-checklist__row.is-active .ds-checklist__marker::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}
.ds-checklist__row.is-error .ds-checklist__marker {
    border-color: var(--danger);
    background: var(--danger-tint);
    color: var(--danger);
}
.ds-checklist__body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}
.ds-checklist__title {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--ink);
}
.ds-checklist__detail {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--muted);
}
.ds-checklist__row.is-error .ds-checklist__detail { color: var(--danger); }
.ds-checklist__marker svg {
    width: 14px;
    height: 14px;
    display: block;
}

/* ---------------------------------------------------------------------------
   Code / snippet block with copy
   --------------------------------------------------------------------------- */
.ds-snippet {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--surface);
    border-radius: var(--radius-md, var(--radius));
}
.ds-snippet__code {
    flex: 1 1 12rem;
    min-width: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--ink);
    white-space: pre-wrap;
    word-break: break-word;
}
.ds-snippet__actions {
    flex: none;
    display: flex;
    gap: var(--space-2);
}

/* ---------------------------------------------------------------------------
   Secret / key field (shown once) with copy
   --------------------------------------------------------------------------- */
.ds-secret {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.ds-secret__field {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: stretch;
}
.ds-secret__value {
    flex: 1 1 12rem;
    min-width: 0;
    min-height: 48px;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    background: var(--paper);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md, var(--radius));
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.875rem;
    color: var(--ink);
    word-break: break-all;
}
.ds-secret__hint {
    margin: 0;
    font-size: 0.875rem;
    color: var(--muted);
}

/* ---------------------------------------------------------------------------
   Notice / callout — info / success / warning / error (pairs with .alert)
   --------------------------------------------------------------------------- */
.ds-notice {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md, var(--radius));
    font-size: 1.0625rem;
    line-height: 1.45;
}
.ds-notice svg {
    flex: none;
    width: 22px;
    height: 22px;
    margin-top: 1px;
}
.ds-notice a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.ds-notice--info,
.ds-notice--success {
    background: var(--accent-tint);
    color: var(--on-accent-tint);
}
.ds-notice--warning {
    background: var(--warning-tint);
    color: var(--on-warning-tint);
}
.ds-notice--error {
    background: var(--danger-tint);
    color: var(--on-danger-tint);
}
.ds-notice__body { flex: 1 1 auto; min-width: 0; }

/* ---------------------------------------------------------------------------
   Empty state
   --------------------------------------------------------------------------- */
.ds-empty {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-9) var(--space-6);
    background: var(--surface);
    border-radius: var(--radius-md, var(--radius));
}
.ds-empty__title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.2;
    color: var(--ink);
}
.ds-empty__lede {
    margin: 0;
    max-width: 32rem;
    font-size: 1.0625rem;
    line-height: 1.55;
    color: var(--muted);
}
.ds-empty__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-2);
}

/* ---------------------------------------------------------------------------
   Form field — label, help, error (extends .form-* from base)
   --------------------------------------------------------------------------- */
.ds-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
}
.ds-field__label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--ink);
}
.ds-field__opt {
    font-weight: 400;
    color: var(--muted);
}
.ds-field__help {
    font-size: 0.875rem;
    color: var(--muted);
    margin: 0;
}
.ds-field__error {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--danger);
}
.ds-field__error svg {
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

/* ---------------------------------------------------------------------------
   Status chip — radius-md only (no pills). Allowed by DESIGN.md as accent-tint.
   --------------------------------------------------------------------------- */
.ds-chip {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 0.75rem;
    border-radius: var(--radius-md, var(--radius));
    font-size: 0.875rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    background: var(--accent-tint);
    color: var(--on-accent-tint);
    white-space: nowrap;
}
.ds-chip--warning {
    background: var(--warning-tint);
    color: var(--on-warning-tint);
}
.ds-chip--muted {
    background: var(--surface);
    color: var(--muted);
    border: 1px solid var(--line);
}

/* ---------------------------------------------------------------------------
   AI / connector landing layout (shared by /ai, guides, /contact)
   --------------------------------------------------------------------------- */
.ai-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: var(--space-6) 0 var(--space-10);
}
.ai-title {
    font-size: clamp(30px, 5vw, 44px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin: 0 0 var(--space-3);
}
.ai-lead {
    font-size: 1.0625rem;
    line-height: 1.55;
    color: var(--muted);
    margin: 0 0 var(--space-6);
    max-width: 36em;
}
.ai-dev {
    font-size: 0.9375rem;
    color: var(--muted);
    margin: var(--space-7) 0 0;
    line-height: 1.55;
}
.ai-section {
    border-top: 1px solid var(--line);
    padding: var(--space-8) 0;
}
.ai-section--end {
    border-bottom: none;
    padding-bottom: 0;
}
.ai-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.2;
    margin: 0 0 var(--space-6);
}
.guide-app-steps {
    margin: 0;
    padding-left: 1.5rem;
    font-size: 1.0625rem;
    line-height: 1.55;
    color: var(--ink);
}
.guide-app-steps li {
    margin-bottom: var(--space-3);
}
.guide-app-steps li:last-child {
    margin-bottom: 0;
}
.guide-app-steps code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.9375rem;
    background: var(--surface);
    border-radius: var(--radius-sm, var(--radius));
    padding: 2px 6px;
    overflow-wrap: anywhere;
}
@media (max-width: 640px) {
    .ai-wrap { padding-bottom: var(--space-8); }
    .ai-section { padding: var(--space-7) 0; }
}

/* ---------------------------------------------------------------------------
   AI ask prompts — copyable example asks on /ai and the ChatGPT/Claude guide
   --------------------------------------------------------------------------- */
.ai-ask {
    margin: 0;
}
.ai-ask .ai-ask-lead {
    font-size: 1.0625rem;
    line-height: 1.55;
    color: var(--muted);
    margin: 0 0 var(--space-6);
    max-width: 36em;
}
.ai-ask-group {
    margin: 0 0 var(--space-7);
}
.ai-ask-group:last-child {
    margin-bottom: 0;
}
.ai-ask-group-title {
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 var(--space-2);
    color: var(--ink);
}
.ai-ask-group-blurb {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--muted);
    margin: 0 0 var(--space-3);
    max-width: 36em;
}
.ai-ask-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ai-ask-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4) 0;
    border-top: 1px solid var(--line);
}
.ai-ask-list .ai-ask-row:last-child {
    border-bottom: 1px solid var(--line);
}
.ai-ask-prompt {
    flex: 1 1 16rem;
    min-width: 0;
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 500;
    line-height: 1.55;
    color: var(--ink);
}
.ai-ask-row .btn {
    flex: none;
    margin-top: 2px;
}

/* MCP troubleshooting notice on /ai and connector guides */
.ai-mcp-help {
    margin: var(--space-5) 0 0;
}
.ai-mcp-help--bottom {
    margin: var(--space-7) 0 0;
}
.ai-mcp-help .ds-notice a {
    font-weight: 700;
    color: inherit;
}

/* Contact page — email as the hero signal */
.contact-email {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0 0 var(--space-4);
    overflow-wrap: anywhere;
}
.contact-email a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 4px;
}
.contact-email a:hover {
    color: var(--accent);
}

/* ---------------------------------------------------------------------------
   Gallery page chrome (dev-only)
   --------------------------------------------------------------------------- */
.ds-gallery-section {
    padding: var(--space-9) 0;
    border-top: 1px solid var(--line);
}
.ds-gallery-section:first-of-type { border-top: none; }
.ds-gallery-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin: 0 0 var(--space-4);
}
.ds-gallery-note {
    font-size: 0.875rem;
    color: var(--muted);
    margin: var(--space-3) 0 0;
    max-width: 40rem;
}

/* Gallery: room for the signal wave between the hero and its window. */
.ds-gallery-window { margin-top: 10rem; }

/* ---------------------------------------------------------------------------
   Setup guides (/guides/chatgpt, /guides/claude)
   --------------------------------------------------------------------------- */
.ds-guide {
    max-width: var(--width-prose);
    margin: 0 auto;
    padding: var(--space-6) 0 var(--space-24);
}
.ds-guide__intro {
    margin: 0 0 var(--space-9);
}
.ds-guide__intro p {
    margin: 0 0 var(--space-4);
    font-size: 1.0625rem;
    line-height: 1.55;
    color: var(--ink);
    max-width: 40rem;
}
.ds-guide__intro p:last-child { margin-bottom: 0; }
.ds-guide__meta {
    margin: 0 0 var(--space-9);
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--muted);
    max-width: 40rem;
}
.ds-guide__meta a { font-weight: 700; }
.ds-guide__section {
    padding: var(--space-12) 0 0;
    margin: var(--space-12) 0 0;
    border-top: 1px solid var(--line);
}
.ds-guide__section > h2 {
    margin: 0 0 var(--space-4);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.2;
    color: var(--ink);
}
.ds-guide__section > p {
    margin: 0 0 var(--space-4);
    font-size: 1.0625rem;
    line-height: 1.55;
    color: var(--ink);
    max-width: 40rem;
}
.ds-guide__section > p.ds-guide__muted,
.ds-guide__muted {
    color: var(--muted);
}
.ds-guide__steps {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ds-guide__step {
    padding: var(--space-6) 0;
    border-top: 1px solid var(--line);
}
.ds-guide__step:first-child {
    border-top: none;
    padding-top: 0;
}
.ds-guide__step > h3 {
    margin: 0 0 var(--space-2);
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--ink);
}
.ds-guide__step > p {
    margin: 0 0 var(--space-4);
    font-size: 1.0625rem;
    line-height: 1.55;
    color: var(--muted);
    max-width: 40rem;
}
.ds-guide__step > p:last-child { margin-bottom: 0; }
.ds-guide__figure {
    margin: var(--space-4) 0 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-md, var(--radius));
    background: var(--surface);
    overflow: hidden;
}
.ds-guide__figure[hidden] { display: none; }
.ds-guide__figure img {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: middle;
}
.ds-guide__figure figcaption {
    margin: 0;
    padding: var(--space-3) var(--space-4);
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--muted);
    border-top: 1px solid var(--line);
}
.ds-guide__prompts {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}
.ds-guide__cost {
    margin: 0;
    font-size: 1.0625rem;
    line-height: 1.55;
    color: var(--ink);
    max-width: 40rem;
}
.ds-guide__faq details {
    border-top: 1px solid var(--line);
}
.ds-guide__faq details:last-child {
    border-bottom: 1px solid var(--line);
}
.ds-guide__faq summary {
    cursor: pointer;
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: var(--space-1) 0;
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--ink);
}
.ds-guide__faq details p {
    margin: 0 0 var(--space-4);
    font-size: 1.0625rem;
    line-height: 1.55;
    color: var(--muted);
    max-width: 40rem;
}
.ds-guide__cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3) var(--space-6);
    margin-top: var(--space-12);
    padding-top: var(--space-12);
    border-top: 1px solid var(--line);
}
.ds-guide__list {
    margin: 0 0 var(--space-4);
    padding-left: 1.5rem;
    font-size: 1.0625rem;
    line-height: 1.55;
    color: var(--ink);
}
.ds-guide__list li { margin-bottom: var(--space-2); }
.ds-guide__list li:last-child { margin-bottom: 0; }
.ds-guide code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.875rem;
    background: var(--surface);
    border-radius: var(--radius-sm, var(--radius));
    padding: 0.125rem 0.375rem;
    overflow-wrap: anywhere;
}

@media (forced-colors: active) {
    .ds-section,
    .ds-snippet,
    .ds-empty,
    .ds-checklist__marker,
    .ds-tab,
    .ds-guide__figure {
        border: 1px solid CanvasText;
    }
    .ds-tab[aria-selected="true"],
    .ds-tab[aria-pressed="true"] {
        outline: 3px solid Highlight;
    }
}

/* MCP discovery: shared by the home hero, promotion and setup guides. */
.ds-mcp-hero {
  border-top: 1px solid var(--line);
  padding-top: var(--space-4);
  margin: var(--space-6) 0;
}
.ds-mcp-hero h2 { font-size: 1.0625rem; line-height: 1.4; margin-bottom: var(--space-2); }
.ds-mcp-hero p, .ds-mcp-lead { color: var(--muted); max-width: 42em; }
.ds-mcp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.ds-mcp-hero .ds-mcp-actions { margin-top: var(--space-3); }
.ds-mcp-actions > a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; }
.ds-mcp-start { margin: var(--space-6) 0 var(--space-9); }
.ds-mcp-start > p { margin: var(--space-4) 0; color: var(--muted); }
.ds-mcp-start .btn { max-width: 100%; }
.ds-mcp-promotion > p { margin: var(--space-4) 0; }
.ds-mcp-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
  padding: 0;
  list-style-position: inside;
  margin: var(--space-9) 0;
}
.ds-mcp-flow li { border-top: 1px solid var(--line); padding-top: var(--space-4); }
.ds-mcp-flow span { display: block; margin-top: var(--space-2); color: var(--muted); }
.ds-mcp-guides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
.ds-mcp-guide { display: block; color: var(--ink); text-decoration: none; }
.ds-mcp-guide img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.ds-mcp-guide h3 { font-size: 1.5rem; margin: var(--space-4) 0 var(--space-2); }
.ds-mcp-guide p { color: var(--muted); }
.ds-mcp-guide:hover h3 { text-decoration: underline; }
.ds-mcp-example { background: var(--surface); padding: var(--space-6); border-radius: var(--radius); margin: var(--space-9) 0; }
.ds-mcp-example h3 { margin-bottom: var(--space-4); }
.ds-mcp-example > p { color: var(--muted); margin-top: var(--space-4); }
@media (max-width: 640px) {
  .ds-mcp-flow, .ds-mcp-guides { grid-template-columns: minmax(0, 1fr); }
}
.ds-guide__figure--detail { max-width: 22rem; }

.pricing-pack-subline { margin: 0; }

/* Static MCP conversation illustration; real text, no simulated controls.
   Same window language as the hero's transcript window. Its parts rise in
   turn the first time it scrolls into view ([data-ds-reveal], components.js). */
.ds-chat-example { margin: 0; width: 100%; max-width: 47.5rem; }
.ds-chat-example__window {
  background: var(--paper); border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg); overflow: hidden;
}
.ds-chat-example__header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2);
  padding: var(--space-3) var(--space-6); background: var(--surface); border-bottom: 1px solid var(--line);
}
.ds-chat-example__header span, .ds-chat-example__label, .ds-chat-example__episode-text > span,
.ds-chat-example figcaption { color: var(--muted); font-size: 0.875rem; }
.ds-chat-example__status { display: inline-flex; align-items: center; gap: var(--space-2); }
.ds-chat-example__status i { width: 8px; height: 8px; border-radius: 2px; background: var(--accent); animation: ds-pulse 2.4s ease-in-out infinite; }
.ds-chat-example__conversation { display: grid; gap: var(--space-6); padding: var(--space-6); }
.ds-chat-example__episode {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-md);
}
.ds-chat-example__cover { flex: 0 0 auto; width: 3rem; height: 3rem; border-radius: var(--radius); background: var(--accent-tint); }
.ds-chat-example__episode-text { display: grid; gap: 2px; min-width: 0; }
.ds-chat-example__episode-text .ds-chat-example__label { margin: 0; font-size: 0.75rem; }
.ds-chat-example__label { display: block; margin-bottom: var(--space-2); }
.ds-chat-example__user {
  justify-self: end; max-width: min(100%, 26rem); background: var(--surface);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-lg);
}
.ds-chat-example__user p, .ds-chat-example__reply > p { margin: 0; }
.ds-chat-example__reply .ds-chat-example__tool {
  display: inline-flex; gap: var(--space-2); align-items: center;
  padding: var(--space-1) var(--space-3); margin-bottom: var(--space-3);
  border-radius: var(--radius); background: var(--accent-tint); color: var(--on-accent-tint);
  font-size: 0.875rem; font-weight: 700;
}
.ds-chat-example__transcript { margin-top: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.ds-chat-example__transcript p {
  display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: var(--space-3);
  margin: 0; padding: var(--space-3) var(--space-4);
}
.ds-chat-example__transcript p + p { border-top: 1px solid var(--line); }
.ds-chat-example__transcript p:first-child { background: var(--accent-tint); }
.ds-chat-example__transcript p > span:last-child {
  font-size: 1.1875rem; line-height: 1.5;
}
.ds-chat-example__timestamp {
  color: var(--accent); font-size: 0.8125rem; font-weight: 700;
  font-variant-numeric: tabular-nums; padding-top: var(--space-1);
}
.ds-chat-example figcaption { margin-top: var(--space-3); }
.ds-chat-example[data-ds-reveal="waiting"] .ds-chat-example__conversation > * { opacity: 0.001; transform: translateY(12px); }
.ds-chat-example__conversation > * { transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out); }
.ds-chat-example__conversation > :nth-child(2) { transition-delay: 0.35s; }
.ds-chat-example__conversation > :nth-child(3) { transition-delay: 0.9s; }
@media (max-width: 640px) {
  .ds-chat-example__header, .ds-chat-example__conversation { padding: var(--space-4); }
  .ds-chat-example__transcript p { padding: var(--space-3); }
  .ds-chat-example__transcript p > span:last-child { font-size: 1.0625rem; }
}

/* MCP promotion on home: copy and steps beside the chat window. */
.ds-mcp-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: var(--space-12); align-items: start; }
.ds-mcp-copy { display: flex; flex-direction: column; gap: var(--space-6); }
.ds-mcp-copy h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); letter-spacing: -0.03em; line-height: 1.1; }
.ds-mcp-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-4); counter-reset: ds-step; }
.ds-mcp-steps li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: var(--space-3); counter-increment: ds-step; }
.ds-mcp-steps li::before {
  content: counter(ds-step); display: grid; place-items: center; width: 2rem; height: 2rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius); font-weight: 700; font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}
.ds-mcp-steps strong { display: block; }
.ds-mcp-steps span { display: block; color: var(--muted); font-size: 0.9375rem; margin-top: 2px; }
.ds-mcp-try { display: grid; gap: var(--space-2); }
.ds-mcp-try > p { color: var(--muted); font-size: 0.875rem; }
.ds-mcp-fine { color: var(--muted); font-size: 0.875rem; }
@media (max-width: 900px) {
  .ds-mcp-split { grid-template-columns: minmax(0, 1fr); gap: var(--space-9); }
}

/* proof_list: factual reassurance beside a call to action (home hero). */
.ds-proof {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
}
.ds-proof li { display: inline-flex; align-items: flex-start; gap: var(--space-2); }
.ds-proof__icon { flex: none; display: inline-flex; width: 1rem; height: 1rem; margin-top: 0.125rem; color: var(--accent); }
.ds-proof__icon svg { width: 100%; height: 100%; }

/* ---------------------------------------------------------------------------
   Site header — glass bar (DESIGN.md, Components: Site header)
   The blur is on ::before, not on .nav-bar: a backdrop-filter on the bar
   would make it the containing block for the fixed mobile panel inside it.
   One of the two sanctioned effects; see test_design_system.py.
   --------------------------------------------------------------------------- */
.nav-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--header-glass);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
}
body.nav-menu-open .nav-bar::before { background: var(--paper); }
.nav-brand svg g:first-child rect { transform-box: fill-box; transform-origin: center; }
.nav-brand:hover svg g:first-child rect { animation: ds-bar-bounce 0.5s var(--ease-out) both; }
.nav-brand:hover svg g:first-child rect:nth-child(2) { animation-delay: 0.06s; }
.nav-brand:hover svg g:first-child rect:nth-child(3) { animation-delay: 0.12s; }
@keyframes ds-bar-bounce { 50% { transform: scaleY(0.4); } }

/* ---------------------------------------------------------------------------
   Hero — centred column over the signal wave (home)
   --------------------------------------------------------------------------- */
.ds-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-12) 0 0;
}
.ds-hero__inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
}
.ds-hero h1 {
  font-size: clamp(2.5rem, 6.4vw, 4.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.045em;
  max-width: 17ch;
  text-wrap: balance;
}
.ds-hero__soft { color: var(--muted); }
.ds-hero__lede {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.5;
  color: var(--muted);
  max-width: 34rem;
  text-wrap: balance;
}
/* Signed-in start screen: a question and the command bar, no pitch. */
.ds-hero--app { padding-top: var(--space-9); }
.ds-hero--app h1 { font-size: clamp(2rem, 4.4vw, 3rem); letter-spacing: -0.035em; max-width: 20ch; }

/* Hero content that is not centred text: search results, hints. */
.ds-hero__left { text-align: left; }

/* Announcement link above a hero title. */
.ds-announce {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 44px;
  padding: var(--space-1) var(--space-3) var(--space-1) var(--space-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  color: var(--muted);
  font-size: 0.875rem;
  transition: border-color var(--dur-1) ease, color var(--dur-1) ease;
}
.ds-announce:hover { border-color: var(--line-strong); color: var(--ink); }
.ds-announce__badge {
  background: var(--accent-tint);
  color: var(--on-accent-tint);
  font-size: 0.75rem;
  font-weight: 700;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
}
.ds-announce__short { display: none; }
.ds-arrow { display: inline-block; transition: transform var(--dur-1) var(--ease-out); }
.ds-announce:hover .ds-arrow, .ds-cmd__go:hover .ds-arrow { transform: translateX(3px); }

/* ---------------------------------------------------------------------------
   Command bar — one field, a segmented scope switch and the action inside
   --------------------------------------------------------------------------- */
.ds-cmd { width: 100%; max-width: 44rem; display: flex; flex-direction: column; gap: var(--space-3); }
.ds-cmd__box {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 4rem;
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--paper);
}
/* The one sanctioned gradient: a soft accent glow behind the hero search. */
.ds-cmd__box::before {
  content: "";
  position: absolute;
  inset: -2rem -2.5rem;
  z-index: -1;
  background: radial-gradient(closest-side, var(--glow), transparent);
  pointer-events: none;
}
.ds-cmd__box:focus-within { outline: 4px solid var(--accent-tint); outline-offset: 0; }
.ds-cmd__icon { flex: none; display: inline-flex; width: 1.25rem; height: 1.25rem; color: var(--muted); }
.ds-cmd__icon svg { width: 100%; height: 100%; }
.ds-cmd__input {
  flex: 1;
  min-width: 0;
  height: 3rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 500 1.0625rem var(--font-sans);
}
.ds-cmd__input::placeholder { color: var(--muted); }
.ds-cmd__input:focus { outline: none; }
.ds-cmd__go { flex: none; gap: var(--space-2); }

/* Segmented scope switch (two or three options). Buttons keep class .tab so
   page scripts that toggle .active keep working. */
.ds-seg { flex: none; display: flex; padding: 3px; gap: 2px; background: var(--surface); border-radius: var(--radius-md); }
.ds-seg .tab {
  height: 2.25rem;
  min-height: 0;
  padding: 0 var(--space-3);
  margin: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font: 700 0.875rem var(--font-sans);
  cursor: pointer;
}
.ds-seg .tab:hover { color: var(--ink); }
.ds-seg .tab.active, .ds-seg .tab[aria-pressed="true"] { background: var(--paper); color: var(--ink); border: 0; }

/* Inline select: one compact bordered control (label inside, native select
   beside it) that sits under the command bar, left-aligned with it. */
.ds-inline-select {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: var(--space-1);
  max-width: 100%;
  min-height: 2.75rem;
  padding: 0 var(--space-1) 0 var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--paper);
}
.ds-inline-select.hidden { display: none; }
.ds-inline-select:focus-within { outline: 4px solid var(--accent-tint); outline-offset: 0; }
.ds-inline-select__label { flex: none; font-size: 0.875rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.ds-inline-select__field {
  min-width: 0;
  height: 2.5rem;
  padding: 0 var(--space-2);
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 700 1rem var(--font-sans);
  cursor: pointer;
}
.ds-inline-select__field:focus { outline: none; }

.ds-proof--inline { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: var(--space-2) var(--space-6); color: var(--ink); }

/* "Works with" strip: names, not logos; links where a guide exists. */
.ds-works {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: var(--space-2) var(--space-6);
  font-size: 0.875rem;
  color: var(--muted);
}
.ds-works__item { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; color: var(--muted); }
a.ds-works__item:hover { color: var(--ink); }

/* Signal wave canvas: full-bleed across the viewport, the height of its
   [data-ds-signal-root], behind the content. */
.ds-signal { position: absolute; top: 0; bottom: 0; left: calc(50% - 50vw); width: 100vw; height: 100%; z-index: -1; pointer-events: none; }
body:has(.ds-signal) { overflow-x: clip; }

/* ---------------------------------------------------------------------------
   Transcript window — product illustration with a moving playhead
   --------------------------------------------------------------------------- */
.ds-window {
  width: 100%;
  max-width: 58rem;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  overflow: hidden;
  animation: ds-rise var(--dur-2) var(--ease-out) 0.2s both;
}
.ds-window__bar {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.ds-window__cover {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  background: var(--ink);
}
.ds-window__cover svg { width: 1.4rem; height: 1.3rem; }
.ds-window__title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ds-window__title strong { font-size: 0.9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-window__title span { font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.ds-window__tools { display: flex; gap: var(--space-2); }
.ds-window__tools span {
  font-size: 0.8125rem;
  font-weight: 700;
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
}
.ds-window__status { display: inline-flex; align-items: center; gap: var(--space-2); }
.ds-window__status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: ds-pulse 1.6s ease-in-out infinite; }
.ds-window__track { height: 3px; background: var(--line); }
.ds-window__playhead { display: block; height: 100%; width: 20%; background: var(--accent); transition: width 0.5s linear; }
.ds-window__lines { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-4); }
.ds-window__line {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: background var(--dur-2) var(--ease-out);
}
.ds-window__line .timestamp { padding-top: 0.375rem; }
.ds-window__line p {
  /* The text carries .transcript-pane, which sets the transcript face. */
  max-height: none;
  overflow: visible;
  white-space: normal;
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--muted);
  transition: color var(--dur-2) var(--ease-out);
}
.ds-window__line.is-current { background: var(--surface); }
.ds-window__line.is-current p { color: var(--ink); }
.ds-window__caption { padding: 0 var(--space-6) var(--space-4); font-size: 0.75rem; color: var(--muted); }

@keyframes ds-rise { from { opacity: 0.001; transform: translateY(16px); } }
@keyframes ds-pulse { 50% { opacity: 0.35; } }

@media (max-width: 640px) {
  .ds-hero { padding-top: var(--space-9); }
  .ds-hero__inner { gap: var(--space-4); }
  .ds-announce__long { display: none; }
  .ds-announce__short { display: inline; }
  /* Phones get the title, the command bar and one reason. The rest is still in
     the DOM for screen readers and search, and the transcript window below
     shows what the lede says. */
  .ds-hero .ds-announce, .ds-hero__lede, .ds-hero .ds-works,
  .ds-hero .ds-proof--inline li + li { display: none; }
  .ds-cmd__box { flex-wrap: wrap; padding: var(--space-2); }
  .ds-cmd__box::before { inset: -2rem 0; }
  .ds-seg .tab { padding: 0 var(--space-2); }
  .ds-cmd__go { min-width: 0; padding: 0 var(--space-4); }
  .ds-inline-select { align-self: stretch; }
  .ds-inline-select__field { flex: 1; }
  .ds-cmd__icon { display: none; }
  .ds-cmd__input { flex: 1 1 100%; padding: 0 var(--space-2); }
  .ds-cmd__go { flex: 1; justify-content: center; }
  .ds-proof--inline { gap: var(--space-2) var(--space-4); }
  .ds-window__tools, .ds-window__status { display: none; }
  .ds-window__lines { padding: var(--space-2); }
  .ds-window__line { grid-template-columns: 2.75rem 1fr; gap: var(--space-2); padding: var(--space-2); }
  .ds-window__line p { font-size: 1.0625rem; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-brand:hover svg g:first-child rect, .ds-window, .ds-window__status i, .ds-chat-example__status i { animation: none; }
  .ds-arrow, .ds-window__line, .ds-window__line p, .ds-window__playhead, .nav-cta svg, .ds-chat-example__conversation > * { transition: none; }
}

/* Keyword landing pages (templates/landing.html). */
.ds-landing__form { margin: 0 auto var(--space-9); }
.ds-landing__form .ds-guide__muted { margin: var(--space-2) 0 0; }
.ds-landing__form .ds-guide__muted:first-of-type { margin-top: var(--space-3); }
.ds-landing__will-work { max-width: 42rem; }
.ds-landing__cta-note { max-width: 42rem; }

/* ------------------------------------------------------------------------ */
/* volume_slider — launch volume pricing (macro: volume_slider)              */
/* ------------------------------------------------------------------------ */
.ds-volume {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: 100%;
}
.ds-volume__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}
.ds-volume__figure,
.ds-volume__price {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--ink);
}
.ds-volume__range {
  width: 100%;
  min-height: 2.75rem;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.ds-volume__range:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.ds-volume__scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--muted);
}
.ds-volume__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}
.ds-volume__meta [data-volume-save] {
  color: var(--ink);
  font-weight: 700;
}
.ds-volume__meta [data-volume-save]:empty {
  display: none;
}
/* Buy modal (volume mode): the per-episode line and the picker disclosure. */
.ds-volume-episode {
  margin: 0 0 var(--space-3);
  font-size: 0.875rem;
  color: var(--muted);
}
.ds-volume-more {
  margin-top: var(--space-4);
  border-top: 1px solid var(--line);
  padding-top: var(--space-3);
}
.ds-volume-more > summary {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
  color: var(--accent);
}
.ds-volume-more > summary:hover {
  color: var(--accent-hover);
}
.ds-volume-more[open] > summary {
  margin-bottom: var(--space-3);
}
.ds-volume-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  margin-top: var(--space-3);
  width: 100%;
}

.ds-landing__updated { margin: calc(-1 * var(--space-3)) 0 var(--space-6); }
