/* SpeechToText product page — local rules only.
 * Colors come from sc-extension-theme.css variables; they auto-invert in dark
 * mode via [data-theme="dark"]. Mirrors the asr.softcreator.com class system. */

/* ---------- Header brand ---------- */
.stt-brand {
    display: flex;
    align-items: center;
    height: 64px;
    padding-left: 16px;
    gap: 12px;
}
.stt-brand-logo { height: 36px; width: 36px; flex: 0 0 36px; }
.stt-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.stt-brand-product {
    font-size: 19px;
    font-weight: 700;
    color: var(--accent-success);
    letter-spacing: 0.2px;
}
.stt-brand-owner {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    letter-spacing: 0.3px;
}

/* ---------- Header status / platform pill ---------- */
.stt-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-input);
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
    box-shadow: var(--shadow);
}
.stt-pill-label { font-weight: 600; color: var(--text-primary); }
.stt-pill-meta  { color: var(--text-muted); }
.stt-pill-sep   { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--text-muted); }
.stt-pill .sci  { color: var(--accent-success); font-size: 14px; }

/* ---------- Sidebar ---------- */
.stt-menu-icon {
    display: inline-block;
    width: 24px;
    text-align: center;
    margin-right: 12px;
    color: var(--text-muted);
    font-size: 18px;
    vertical-align: middle;
    transition: color 0.15s ease;
}
.stt-menu-label {
    vertical-align: middle;
    font-size: 14px;
    color: var(--text-primary);
    transition: color 0.15s ease;
}
.stt-sub .stt-menu-label { font-size: 13px; color: var(--text-muted); }
.stt-sub .stt-menu-icon  { font-size: 15px; }
.stt-menu-row.stt-sub { padding-left: 18px; }

.stt-sidebar-list .webix_list_item { position: relative; }
.stt-sidebar-list .webix_list_item::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 6px;
    background: transparent;
    transition: background 0.15s ease;
}
.stt-sidebar-list .webix_list_item:hover::before,
.stt-sidebar-list .webix_list_item.webix_selected::before {
    background: var(--sc-primary);
}
.stt-sidebar-list .webix_list_item:hover .stt-menu-icon,
.stt-sidebar-list .webix_list_item.webix_selected .stt-menu-icon {
    color: var(--sc-primary) !important;
}
.stt-sidebar-list .webix_list_item:hover .stt-menu-label,
.stt-sidebar-list .webix_list_item.webix_selected .stt-menu-label {
    color: var(--accent-success) !important;
    font-weight: 600;
}

/* ---------- Typography ---------- */
.stt-h1 {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    margin: 8px 0 12px 0;
    color: var(--text-primary);
}
.stt-h2 {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    margin: 4px 0 8px 0;
    color: var(--text-primary);
}
.stt-h3 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    margin: 18px 0 6px 0;
    color: var(--text-primary);
}
.stt-lead {
    font-size: 16px;
    line-height: 1.55;
    margin: 0 0 16px 0;
    color: var(--text-primary);
    max-width: 860px;
}
.stt-body {
    font-size: 14px;
    line-height: 1.65;
    margin: 0 0 12px 0;
    color: var(--text-primary);
    max-width: 860px;
}
.stt-body code, .stt-bullets code, .stt-li code {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1px 5px;
    font-family: 'Roboto Mono', Consolas, monospace;
    font-size: 0.88em;
}
.stt-bullets {
    margin: 8px 0 16px 18px;
    padding: 0;
    line-height: 1.75;
    font-size: 14px;
    color: var(--text-primary);
    max-width: 860px;
}
.stt-bullets li { margin: 3px 0; }
.stt-section {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin: 22px 0 10px 0;
}
.stt-kbd {
    display: inline-block;
    padding: 2px 8px;
    font-family: 'Roboto Mono', Consolas, monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-bottom-width: 2px;
    border-radius: 5px;
}

/* ---------- Home metric cards ---------- */
.stt-metric-card {
    padding: 16px 18px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    margin-right: 12px;
}
.stt-metric-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.stt-metric-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--accent-success);
    line-height: 1.1;
    margin-bottom: 6px;
}
.stt-metric-unit {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 4px;
}
.stt-metric-hint {
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-muted);
}

/* ---------- Home CTA cards ---------- */
.stt-cta-prompt {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}
.stt-cta-card {
    cursor: pointer;
    border-radius: 10px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.stt-cta-card .stt-cta-card-inner {
    height: 100%;
    box-sizing: border-box;
    padding: 16px 18px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.stt-cta-card:hover .stt-cta-card-inner {
    border-color: var(--accent-success);
    background: var(--bg-input);
    box-shadow: var(--shadow);
}
.stt-cta-card:hover { transform: translateY(-2px); }
.stt-cta-card:active { transform: translateY(0); }
.stt-cta-line1 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.25;
}
.stt-cta-line1 .sci {
    color: var(--accent-success);
    font-size: 18px;
    margin-right: 6px;
    vertical-align: -2px;
}
.stt-cta-line2 {
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.35;
}

/* ---------- Feature grid ---------- */
.stt-feature {
    margin-bottom: 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-input);
    overflow: hidden;
}
.stt-feature-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}
.stt-feature-head .sci { color: var(--accent-success); font-size: 20px; }
.stt-feature-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.stt-feature-body { padding: 12px 16px 14px 16px; font-size: 13.5px; line-height: 1.6; color: var(--text-primary); }

/* ---------- Screenshot frame (faux window chrome) ---------- */
.stt-shot {
    margin: 14px 0 18px 0;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--bg-secondary);
}
.stt-shot-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}
.stt-shot-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.stt-shot-dot.r { background: #ff5f57; }
.stt-shot-dot.y { background: #febc2e; }
.stt-shot-dot.g { background: #28c840; }
.stt-shot-title { margin-left: 8px; font-size: 12px; color: var(--text-muted); font-weight: 600; }
.stt-shot img { display: block; width: 100%; height: auto; }
.stt-shot-cap { padding: 8px 12px; font-size: 12px; color: var(--text-muted); line-height: 1.45; }

/* ---------- Spec table ---------- */
.stt-table {
    width: 100%;
    max-width: 860px;
    border-collapse: collapse;
    margin: 10px 0 16px 0;
    font-size: 13.5px;
}
.stt-table th, .stt-table td {
    padding: 8px 12px;
    text-align: left;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: top;
}
.stt-table th { background: var(--bg-tertiary); font-weight: 700; }
.stt-table tr:nth-child(even) td { background: var(--bg-secondary); }
.stt-table code { font-family: 'Roboto Mono', Consolas, monospace; font-size: 0.9em; }

/* ---------- Callout ---------- */
.stt-callout {
    margin: 12px 0 16px 0;
    padding: 12px 16px;
    border-left: 4px solid var(--accent-success);
    background: var(--bg-secondary);
    border-radius: 4px;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--text-primary);
    max-width: 860px;
}
.stt-callout.warn { border-left-color: var(--accent-danger); }
.stt-callout-title { font-weight: 700; margin-bottom: 4px; }
.stt-callout-title .sci { margin-right: 6px; color: var(--accent-success); }
.stt-callout.warn .stt-callout-title .sci { color: var(--accent-danger); }

/* ---------- Pipeline diagram (Home / How it works) ---------- */
.stt-pipe {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 6px 0;
}
.stt-pipe-node {
    flex: 1 1 0;
    min-width: 120px;
    padding: 12px 12px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-input);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.stt-pipe-node .sci { font-size: 20px; color: var(--accent-success); }
.stt-pipe-step { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-muted); }
.stt-pipe-name { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.stt-pipe-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.stt-pipe-arrow { align-self: center; color: var(--text-muted); font-size: 18px; }

/* ---------- Steps (install) ---------- */
.stt-step {
    display: flex;
    gap: 14px;
    margin-bottom: 14px;
    align-items: flex-start;
}
.stt-step-num {
    flex: 0 0 30px;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--accent-success);
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    display: flex; align-items: center; justify-content: center;
}
.stt-step-body { font-size: 14px; line-height: 1.6; color: var(--text-primary); }
.stt-step-body b { color: var(--text-primary); }

/* ---------- Tech stack (layered sections) ---------- */
.stt-stack {
    margin-bottom: 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-input);
    overflow: hidden;
}
.stt-stack-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}
.stt-stack-head .sci { color: var(--accent-success); font-size: 19px; }
.stt-stack-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.stt-stack-meta  { margin-left: auto; font-size: 11px; font-weight: 600; text-transform: uppercase;
                   letter-spacing: 0.4px; color: var(--text-muted); }
.stt-stack-list {
    margin: 0;
    padding: 12px 18px 14px 34px;
    line-height: 1.7;
    font-size: 13.5px;
    color: var(--text-primary);
}
.stt-stack-list li { margin: 3px 0; }
.stt-stack-list code, .stt-stack-list b code {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1px 5px;
    font-family: 'Roboto Mono', Consolas, monospace;
    font-size: 0.88em;
}

/* ---------- Mermaid diagram host ---------- */
.stt-graph-wrap {
    margin: 12px 0 18px 0;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
    overflow: hidden;
}
.stt-graph-bar {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 14px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    font-size: 12.5px; font-weight: 700; color: var(--text-primary);
}
.stt-graph-bar .sci { color: var(--accent-success); font-size: 16px; }
/* Host grows to the diagram's natural height — no inner scrollbar. Only the
 * whole Architecture page scrolls (the Webix scrollview around the content). */
.stt-graph {
    width: 100%;
    padding: 16px;
    background: #ffffff;
    box-sizing: border-box;
}
[data-theme="dark"] .stt-graph { background: #f7faf7; }
.stt-graph svg { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.stt-graph-loading { color: var(--text-muted); font-size: 13px; font-style: italic; padding: 8px; }

/* ---------- Footer ---------- */
.stt-foot {
    margin: 28px 0 8px 0;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
}
.stt-foot a { color: var(--accent-success); text-decoration: none; }
.stt-foot a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
    .stt-cta-card { transition: none; }
}
