/*
 * Eventin Transcribe — juhiabi.ee design language, single light scheme.
 * Token-driven (--tev-*). Shell: topbar + left sidebar (jebi-layout pattern).
 * Layout/behaviour contract with dashboard.js is unchanged — every
 * [data-tev-*] hook keeps working.
 */

/* Space Grotesk — self-hosted (juhiabi.ee disainikeel). */
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('fonts/space-grotesk-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('fonts/space-grotesk-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* juhiabi.ee design tokens — indigo primary, slate neutrals (single scheme) */
    --tev-bg: #f8fafc;
    --tev-surface: #ffffff;
    --tev-surface-2: #f1f5f9;
    --tev-inset: #f8fafc;
    --tev-line: #e2e8f0;
    --tev-line-strong: #cbd5e1;
    --tev-text: #1e293b;
    --tev-muted: #64748b;
    --tev-accent: #3b4fe4;
    --tev-accent-strong: #2e3ec2;
    --tev-accent-ink: #ffffff;
    --tev-accent-soft: #eef0fe;
    --tev-live: #ef4444;
    --tev-live-soft: rgba(239, 68, 68, 0.10);
    --tev-warn-bg: #fffbeb;
    --tev-warn-line: rgba(245, 158, 11, 0.35);
    --tev-warn-text: #b45309;
    --tev-ok: #22c55e;
    --tev-danger: #ef4444;
    --tev-ring: rgba(59, 79, 228, 0.28);
    --tev-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --tev-radius: 12px;
    --tev-radius-sm: 8px;
    --tev-font: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ---------------------------------------------------------------- shell */

body.tev-app-body {
    margin: 0;
    min-height: 100vh;
    background: var(--tev-bg);
    color: var(--tev-text);
    font-family: var(--tev-font);
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
}

.tev-layout {
    display: grid;
    grid-template-columns: var(--tev-sw, 260px) minmax(0, 1fr);
    grid-template-rows: 64px minmax(0, 1fr);
    min-height: 100vh;
}
.tev-layout--bare { grid-template-columns: minmax(0, 1fr); }

.tev-topbar {
    grid-column: 1 / -1;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 24px;
    background: var(--tev-surface);
    border-bottom: 1px solid var(--tev-line);
    position: sticky;
    top: 0;
    z-index: 100;
}

.tev-topbar__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--tev-accent);
    text-decoration: none;
}
.tev-topbar__brand svg { width: 28px; height: 28px; }

.tev-topbar__actions { display: inline-flex; align-items: center; gap: 10px; }

.tev-topbar__user { position: relative; }
.tev-topbar__avatar {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--tev-accent-soft);
    color: var(--tev-accent);
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}
.tev-topbar__menu {
    display: none;
    position: absolute;
    right: 0;
    top: 44px;
    min-width: 180px;
    background: var(--tev-surface);
    border: 1px solid var(--tev-line);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 6px;
    z-index: 120;
}
.tev-topbar__user.open .tev-topbar__menu { display: block; }
.tev-topbar__menu-name {
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--tev-muted);
    border-bottom: 1px solid var(--tev-line);
    margin-bottom: 4px;
    white-space: nowrap;
}
.tev-topbar__menu a {
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--tev-text);
    font-size: 14px;
    text-decoration: none;
}
.tev-topbar__menu a:hover { background: var(--tev-surface-2); }

.tev-sidebar {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    background: var(--tev-surface);
    border-right: 1px solid var(--tev-line);
    padding: 16px 0;
    overflow-y: auto;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
}

.tev-sidebar__section { padding: 0 12px; margin-bottom: 8px; }
.tev-sidebar__section--bottom { margin-top: auto; margin-bottom: 0; padding-top: 16px; border-top: 1px solid var(--tev-line); }

.tev-sidebar__label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tev-muted);
    padding: 8px 12px 4px;
}

.tev-sidebar__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    transition: all 0.15s;
    cursor: pointer;
}
.tev-sidebar__link:hover { background: var(--tev-surface-2); color: var(--tev-text); }
.tev-sidebar__link.active { background: var(--tev-accent-soft); color: var(--tev-accent); font-weight: 600; }
.tev-sidebar__link svg { width: 20px; height: 20px; flex-shrink: 0; opacity: 0.7; }
.tev-sidebar__link.active svg { opacity: 1; }

.tev-sb-toggle {
    margin: 8px 12px 0;
    min-height: 32px;
    border: 1px solid var(--tev-line);
    border-radius: 8px;
    background: transparent;
    color: var(--tev-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tev-sb-toggle:hover { background: var(--tev-surface-2); color: var(--tev-text); }
.tev-sb-toggle svg { width: 16px; height: 16px; transition: transform 0.15s; }

html.tev-sb-collapsed .tev-sidebar__label { display: none; }
html.tev-sb-collapsed .tev-sidebar__section { padding: 0 8px; }
html.tev-sb-collapsed .tev-sidebar__link {
    font-size: 0; /* hides the bare text node, svg keeps its px size */
    gap: 0;
    justify-content: center;
    padding: 9px 0;
}
html.tev-sb-collapsed .tev-sb-toggle svg { transform: rotate(180deg); }

.tev-main {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    overflow-y: auto;
}
.tev-layout--bare .tev-main { grid-column: 1; }

.tev-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
}
.tev-page-header h1 {
    display: inline-flex;
    align-items: center;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--tev-text);
}

.tev-bottomnav {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--tev-surface);
    border-top: 1px solid var(--tev-line);
    z-index: 110;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tev-bottomnav__link {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 4px 2px;
    font-size: 11px;
    font-weight: 600;
    color: var(--tev-muted);
    text-decoration: none;
    border-radius: 8px;
}
.tev-bottomnav__link svg { width: 20px; height: 20px; }
.tev-bottomnav__link.active { color: var(--tev-accent); }

@media (max-width: 1024px) {
    .tev-layout { grid-template-columns: minmax(0, 1fr); }
    .tev-sidebar { display: none; }
    .tev-main { grid-column: 1; padding-bottom: 72px; }
    .tev-bottomnav { display: flex; }
}

/* #14: WP toolbar visible for admins — shift sticky chrome below it */
body.admin-bar .tev-topbar { top: 32px; }
body.admin-bar .tev-sidebar { top: 96px; height: calc(100vh - 96px); }
@media (max-width: 782px) {
    body.admin-bar .tev-topbar { top: 46px; }
    body.admin-bar .tev-sidebar { top: 110px; height: calc(100vh - 110px); }
}

.tev-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.tev-brand {
    color: var(--tev-text);
    text-decoration: none;
}

.tev-brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--tev-accent), var(--tev-accent-strong));
    color: var(--tev-accent-ink);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.tev-brand-kicker,
.tev-brand-title {
    display: block;
}

.tev-brand-kicker {
    color: var(--tev-muted);
    font-size: 11px;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tev-brand-title {
    color: var(--tev-text);
    font-size: 18px;
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.tev-auth-button {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--tev-line-strong);
    border-radius: var(--tev-radius-sm);
    background: transparent;
    color: var(--tev-text);
    padding: 0 13px;
    text-decoration: none;
    font-size: 14px;
    font-family: var(--tev-font);
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.tev-auth-button:hover {
    border-color: var(--tev-accent);
    background: var(--tev-accent-soft);
}

/* ----------------------------------------------------------------- auth */

.tev-auth-panel {
    min-height: calc(100vh - 65px);
    display: grid;
    place-items: center;
    padding: 24px;
    text-align: center;
}

.tev-auth-card {
    width: min(400px, 100%);
    border: 1px solid var(--tev-line);
    border-radius: var(--tev-radius);
    background: var(--tev-surface);
    box-shadow: var(--tev-shadow);
    padding: 34px 30px;
    text-align: center;
}

.tev-auth-card .tev-brand-mark {
    width: 52px;
    height: 52px;
    font-size: 16px;
    border-radius: 14px;
}

.tev-auth-card h1,
.tev-auth-panel h1 {
    margin: 16px 0 6px;
    font-size: 26px;
    line-height: 1.18;
    letter-spacing: -0.02em;
}

.tev-auth-card p,
.tev-auth-panel p {
    margin: 0 0 20px;
    color: var(--tev-muted);
}

.tev-auth-card form {
    text-align: left;
    display: grid;
    gap: 4px;
}

.tev-auth-card form p {
    margin: 0 0 10px;
}

.tev-auth-card label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--tev-muted);
    margin-bottom: 4px;
}

.tev-auth-card input[type='text'],
.tev-auth-card input[type='password'] {
    width: 100%;
    box-sizing: border-box;
    min-height: 42px;
    border: 1px solid var(--tev-line-strong);
    border-radius: var(--tev-radius-sm);
    background: var(--tev-inset);
    color: var(--tev-text);
    padding: 0 12px;
    font: inherit;
}

.tev-auth-card input[type='text']:focus,
.tev-auth-card input[type='password']:focus {
    outline: none;
    border-color: var(--tev-accent);
    box-shadow: 0 0 0 3px var(--tev-ring);
}

.tev-auth-card .login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tev-auth-card .login-remember label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-weight: 400;
}

.tev-auth-card .login-remember input {
    width: 16px;
    height: 16px;
    accent-color: var(--tev-accent);
}

.tev-auth-button,
.tev-auth-card .login-submit input[type='submit'] {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: var(--tev-radius-sm);
    background: var(--tev-accent);
    color: var(--tev-accent-ink);
    font-size: 15px;
    font-weight: 700;
    font-family: var(--tev-font);
    cursor: pointer;
    transition: filter 0.15s;
}

.tev-auth-button:hover,
.tev-auth-card .login-submit input[type='submit']:hover {
    filter: brightness(1.08);
    background: var(--tev-accent);
}

.tev-auth-links {
    margin-top: 14px;
    font-size: 13px;
}

.tev-auth-links a {
    color: var(--tev-accent);
    text-decoration: none;
}

.tev-auth-links a:hover {
    text-decoration: underline;
}

/* -------------------------------------------------------------- console */

.tev-transcribe {
    color: var(--tev-text);
    background: var(--tev-bg);
    font-family: var(--tev-font);
    letter-spacing: 0;
}

.tev-transcribe * {
    box-sizing: border-box;
}

.tev-transcribe [hidden] {
    display: none !important;
}

.tev-transcribe button,
.tev-transcribe input,
.tev-transcribe select {
    font: inherit;
}

.tev-transcribe button,
.tev-transcribe a[data-tev-open-overlay] {
    min-height: 38px;
    border: 1px solid var(--tev-line-strong);
    border-radius: var(--tev-radius-sm);
    background: var(--tev-surface-2);
    color: var(--tev-text);
    padding: 0 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    transition: border-color 0.15s, background 0.15s;
}

.tev-transcribe button:hover,
.tev-transcribe a[data-tev-open-overlay]:hover {
    border-color: var(--tev-accent);
}

.tev-transcribe button:disabled,
.tev-transcribe a.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.tev-transcribe input,
.tev-transcribe select {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--tev-line-strong);
    border-radius: var(--tev-radius-sm);
    background: var(--tev-inset);
    color: var(--tev-text);
    padding: 0 12px;
}

.tev-transcribe select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--tev-muted) 50%),
        linear-gradient(135deg, var(--tev-muted) 50%, transparent 50%);
    background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%;
    background-size: 5px 5px;
    background-repeat: no-repeat;
    padding-right: 30px;
}

.tev-transcribe input:focus-visible,
.tev-transcribe select:focus-visible,
.tev-transcribe button:focus-visible,
.tev-transcribe a:focus-visible {
    outline: none;
    border-color: var(--tev-accent);
    box-shadow: 0 0 0 3px var(--tev-ring);
}

/* ------------------------------------------------------------ statusbar */

.tev-statusbar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 14px 22px;
    border-bottom: 1px solid var(--tev-line);
    background: var(--tev-surface);
}

.tev-statusbar h2 {
    margin: 0 6px 0 0;
    font-size: 17px;
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.tev-state-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    border: 1px solid var(--tev-line);
    border-radius: 999px;
    background: var(--tev-surface-2);
    padding: 0 14px 0 10px;
    font-size: 13px;
    font-weight: 600;
}

.tev-state-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--tev-muted);
    flex-shrink: 0;
}

.tev-live .tev-state-chip {
    border-color: var(--tev-live);
    background: var(--tev-live-soft);
}

.tev-live .tev-state-dot {
    background: var(--tev-live);
    animation: tev-pulse 1.4s ease-in-out infinite;
}

@keyframes tev-pulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--tev-live-soft); opacity: 1; }
    50% { box-shadow: 0 0 0 5px var(--tev-live-soft); opacity: 0.7; }
}

.tev-state-chip p {
    margin: 0;
    color: var(--tev-text);
}

.tev-state-chip p.tev-error {
    color: var(--tev-danger) !important;
}

.tev-timer,
.tev-cost {
    font-variant-numeric: tabular-nums;
    font-size: 14px;
    font-weight: 700;
    color: var(--tev-muted);
}

.tev-cost {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    border: 1px solid var(--tev-line);
    border-radius: 999px;
    background: var(--tev-surface-2);
    padding: 0 12px;
}

.tev-live .tev-timer,
.tev-live .tev-cost {
    color: var(--tev-live);
}

.tev-live .tev-cost {
    border-color: var(--tev-live);
    background: var(--tev-live-soft);
}

.tev-statusbar-meter {
    flex: 1 1 140px;
    max-width: 260px;
    min-width: 120px;
}

.tev-session-meta {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.tev-session-pill {
    border: 1px solid var(--tev-line);
    border-radius: 999px;
    padding: 6px 14px;
    color: var(--tev-muted);
    text-align: center;
    font-size: 12.5px;
    background: var(--tev-surface-2);
    font-variant-numeric: tabular-nums;
}

.tev-alert {
    margin: 14px 22px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--tev-warn-line);
    border-radius: var(--tev-radius-sm);
    background: var(--tev-warn-bg);
    color: var(--tev-warn-text);
    padding: 10px 14px;
    font-size: 14px;
}

.tev-alert a {
    color: inherit;
    font-weight: 700;
}

/* ---------------------------------------------------------------- shell */

.tev-shell {
    display: grid;
    grid-template-columns: 316px minmax(0, 1fr);
    gap: 18px;
    padding: 18px 22px 24px;
}

.tev-controls,
.tev-panel {
    border: 1px solid var(--tev-line);
    border-radius: var(--tev-radius);
    background: var(--tev-surface);
    box-shadow: var(--tev-shadow);
}

.tev-controls {
    align-self: start;
    display: grid;
    gap: 16px;
    padding: 16px;
    position: sticky;
    top: 14px;
}

.admin-bar .tev-controls {
    top: 46px;
}

.tev-control-group {
    display: grid;
    gap: 10px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--tev-line);
}

.tev-control-group:last-of-type {
    border-bottom: 0;
    padding-bottom: 0;
}

.tev-cost-result {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--tev-radius-sm);
    background: var(--tev-accent-soft);
    font-size: 13px;
    font-weight: 600;
}

.tev-cost-result strong {
    font-size: 19px;
    font-variant-numeric: tabular-nums;
    color: var(--tev-accent);
}

.tev-cost-note {
    margin: 0;
    font-size: 11px;
    color: var(--tev-muted);
    font-variant-numeric: tabular-nums;
}

.tev-control-group h3,
.tev-panel h3,
.tev-advanced summary {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.25;
    color: var(--tev-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 750;
}

.tev-controls label,
.tev-overlay-options label {
    display: grid;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
}

.tev-controls label > span,
.tev-overlay-options label > span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tev-controls label strong,
.tev-overlay-options label strong {
    color: var(--tev-muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.tev-check {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 400 !important;
}

.tev-check input {
    width: 16px;
    min-height: 16px;
    padding: 0;
    accent-color: var(--tev-accent);
}

/* range sliders */

.tev-transcribe input[type='range'] {
    -webkit-appearance: none;
    appearance: none;
    min-height: 26px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.tev-transcribe input[type='range']::-webkit-slider-runnable-track {
    height: 5px;
    border-radius: 999px;
    background: var(--tev-line-strong);
}

.tev-transcribe input[type='range']::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    margin-top: -5.5px;
    border-radius: 50%;
    border: 2px solid var(--tev-bg);
    background: var(--tev-accent);
}

.tev-transcribe input[type='range']::-moz-range-track {
    height: 5px;
    border-radius: 999px;
    background: var(--tev-line-strong);
}

.tev-transcribe input[type='range']::-moz-range-thumb {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 2px solid var(--tev-bg);
    background: var(--tev-accent);
}

.tev-transcribe input[type='range']:focus-visible {
    box-shadow: none;
    outline: none;
}

.tev-transcribe input[type='range']:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px var(--tev-ring);
}

.tev-segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--tev-line-strong);
    border-radius: var(--tev-radius-sm);
    overflow: hidden;
}

.tev-segmented button {
    border: 0;
    border-radius: 0;
    min-height: 36px;
    background: transparent;
}

.tev-segmented button.active {
    background: var(--tev-accent);
    color: var(--tev-accent-ink);
    font-weight: 700;
}

.tev-meter {
    height: 8px;
    border-radius: 999px;
    background: var(--tev-inset);
    border: 1px solid var(--tev-line);
    overflow: hidden;
}

.tev-meter span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--tev-ok), var(--tev-accent));
    transition: width 80ms linear;
}

/* start / stop */

.tev-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.tev-actions button {
    min-height: 46px;
    font-weight: 750;
    font-size: 15px;
}

.tev-transcribe button.primary {
    border-color: transparent;
    background: var(--tev-accent);
    color: var(--tev-accent-ink);
}

.tev-transcribe button.primary:hover {
    filter: brightness(1.08);
}

.tev-actions [data-tev-stop] {
    border-color: var(--tev-live);
    color: var(--tev-live);
    background: transparent;
}

.tev-live .tev-actions [data-tev-stop] {
    background: var(--tev-live);
    border-color: var(--tev-live);
    color: #fff;
}

.tev-live .tev-actions [data-tev-stop]:hover {
    filter: brightness(1.08);
}

/* Prepare "armed" — session is prepared, waiting for the operator to go live */
.tev-actions [data-tev-prepare].is-armed {
    border-color: #f59e0b;
    background: #fde68a;
    color: #92400e;
}

.tev-actions [data-tev-prepare].is-armed:hover {
    border-color: #f59e0b;
    filter: brightness(1.03);
}

/* Start pulses hard while armed — an unmistakable "press me" cue:
   the fill flashes to a lighter indigo, a halo ring expands and fades,
   and the button gives a subtle heartbeat scale. */
.tev-actions [data-tev-start].is-blinking {
    animation: tev-btn-blink 0.9s ease-in-out infinite;
}

@keyframes tev-btn-blink {
    0%, 100% {
        background: var(--tev-accent);
        box-shadow: 0 0 0 0 rgba(59, 79, 228, 0.55);
        transform: scale(1);
    }
    50% {
        background: #7c8cff;
        box-shadow: 0 0 0 12px rgba(59, 79, 228, 0);
        transform: scale(1.05);
    }
}

/* Start turns red once the session is live (stays vivid even while disabled) */
.tev-transcribe button.primary[data-tev-start].is-live {
    background: var(--tev-live);
    border-color: var(--tev-live);
    color: #fff;
    opacity: 1;
    animation: none;
}

/* ------------------------------------------------------------ workspace */

.tev-workspace {
    min-width: 0;
    display: grid;
    gap: 18px;
}

.tev-panel {
    padding: 16px;
}

.tev-overlay-panel {
    display: grid;
    gap: 14px;
}

.tev-overlay-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
}

.tev-overlay-row input {
    font-size: 13px;
    color: var(--tev-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.tev-advanced {
    border: 1px solid var(--tev-line);
    border-radius: var(--tev-radius-sm);
    background: var(--tev-surface-2);
}

.tev-advanced summary {
    padding: 12px 14px;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.tev-advanced summary::-webkit-details-marker {
    display: none;
}

.tev-advanced summary::before {
    content: '';
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--tev-muted);
    border-bottom: 2px solid var(--tev-muted);
    transform: rotate(-45deg);
    transition: transform 0.15s;
    flex-shrink: 0;
}

.tev-advanced[open] summary::before {
    transform: rotate(45deg);
}

.tev-advanced-body {
    padding: 4px 14px 16px;
}

.tev-overlay-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    gap: 16px;
}

.tev-ov-col {
    display: grid;
    gap: 12px;
    align-content: start;
}

.tev-ov-col-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 20px;
    color: var(--tev-accent);
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--tev-line);
}

.tev-ov-col-title .tev-check {
    text-transform: none;
    letter-spacing: 0;
    color: var(--tev-muted);
}

.tev-overlay-options input[type='color'] {
    min-height: 38px;
    padding: 4px;
    cursor: pointer;
}

.tev-side-group {
    display: grid;
    gap: 8px;
}

.tev-side-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tev-side-group-title {
    color: var(--tev-muted);
    font-size: 11.5px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tev-side-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

.tev-side-grid label > span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tev-side-grid strong {
    color: var(--tev-muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

/* preview — real 16:9 stage like the vMix output */

.tev-overlay-preview {
    border: 1px solid var(--tev-line);
    border-radius: var(--tev-radius-sm);
    background:
        linear-gradient(45deg, rgba(127, 140, 160, 0.16) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(127, 140, 160, 0.16) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(127, 140, 160, 0.16) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(127, 140, 160, 0.16) 75%),
        #10151d;
    background-position: 0 0, 0 12px, 12px -12px, -12px 0;
    background-size: 24px 24px;
    overflow: hidden;
}

.tev-overlay-preview-stage {
    aspect-ratio: 16 / 9;
    max-height: 420px;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding:
        var(--tev-preview-margin-top, 5%)
        var(--tev-preview-margin-right, 5%)
        var(--tev-preview-margin-bottom, 5%)
        var(--tev-preview-margin-left, 5%);
}

.tev-overlay-preview-stage[data-position='top'] {
    align-items: flex-start;
}

.tev-overlay-preview-stage[data-position='middle'] {
    align-items: center;
}

.tev-overlay-preview-stage[data-align='left'] {
    justify-content: flex-start;
}

.tev-overlay-preview-stage[data-align='right'] {
    justify-content: flex-end;
}

.tev-overlay-preview-subtitle {
    max-width: var(--tev-preview-box-width, 94%);
    box-sizing: border-box;
    font-family: var(--tev-preview-font-family, Arial, Helvetica, sans-serif);
    color: var(--tev-preview-text-color, #fff);
    font-size: var(--tev-preview-font-size, 52px);
    font-weight: 800;
    line-height: 1.18;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 2px rgba(0, 0, 0, 0.95);
    overflow: hidden;
    max-height: calc(
        (var(--tev-preview-font-size, 52px) * 1.18 * var(--tev-preview-lines, 2))
        + var(--tev-preview-padding-top, 0em)
        + var(--tev-preview-padding-bottom, 0em)
    );
    overflow-wrap: anywhere;
}

.tev-overlay-preview-subtitle.box {
    padding:
        var(--tev-preview-padding-top, 0.42em)
        var(--tev-preview-padding-right, 0.42em)
        var(--tev-preview-padding-bottom, 0.42em)
        var(--tev-preview-padding-left, 0.42em);
    border-radius: 8px;
    background: var(--tev-preview-box-background, rgba(0, 0, 0, 0.62));
}

/* ----------------------------------------------------------- transcripts */

.tev-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.tev-transcript-panel {
    min-height: 440px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
}

.tev-transcript {
    min-height: 360px;
    border: 1px solid var(--tev-line);
    border-radius: var(--tev-radius-sm);
    padding: 14px 16px;
    overflow: auto;
    white-space: pre-wrap;
    line-height: 1.55;
    font-size: 15px;
    color: var(--tev-muted);
    background: var(--tev-inset);
}

.tev-transcript:empty::before {
    content: attr(data-tev-placeholder);
    color: var(--tev-muted);
    opacity: 0.55;
    font-size: 14px;
}

.tev-translation {
    font-size: 21px;
    line-height: 1.45;
    color: var(--tev-text);
}

.tev-live .tev-translation {
    border-color: var(--tev-accent);
}

.tev-error {
    color: var(--tev-danger) !important;
}

/* scrollbars (webkit) */

.tev-transcript::-webkit-scrollbar {
    width: 10px;
}

.tev-transcript::-webkit-scrollbar-thumb {
    background: var(--tev-line-strong);
    border-radius: 999px;
    border: 2px solid var(--tev-inset);
}

/* shortcode embed on a themed page (not the standalone app template) */

body:not(.tev-app-body) .tev-transcribe {
    border: 1px solid var(--tev-line);
    border-radius: var(--tev-radius);
    overflow: hidden;
}

body:not(.tev-app-body) .tev-statusbar {
    padding: 14px 18px;
}

body:not(.tev-app-body) .tev-shell {
    padding: 18px;
}

/* ------------------------------------------------------------ responsive */

@media (min-width: 783px) {
    .admin-bar .tev-controls {
        top: 46px;
    }
}

@media (max-width: 980px) {
    .tev-shell,
    .tev-grid {
        grid-template-columns: 1fr;
    }

    .tev-controls {
        position: static;
    }
}

@media (max-width: 640px) {
    .tev-statusbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .tev-session-meta {
        margin-left: 0;
    }

    .tev-statusbar-meter {
        max-width: none;
        width: 100%;
    }

    .tev-app-nav {
        width: 100%;
        flex-wrap: wrap;
    }

    .tev-shell {
        padding: 12px;
    }

    .tev-alert {
        margin: 12px 12px 0;
        align-items: flex-start;
        flex-direction: column;
    }

    .tev-overlay-row,
    .tev-overlay-options,
    .tev-actions {
        grid-template-columns: 1fr;
    }

    .tev-side-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tev-auth-card {
        padding: 24px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tev-live .tev-state-dot {
        animation: none;
    }
}


/* ===================== Admin console (juhiabi-style) ===================== */
.tev-admin {
    max-width: 1040px;
    margin: 0 auto;
    padding: 24px 28px 40px;
    font-family: var(--tev-font);
}

.tev-admin-notice {
    margin-bottom: 16px;
    padding: 10px 14px;
    border-radius: var(--tev-radius-sm);
    background: var(--tev-accent-soft);
    color: var(--tev-accent);
    font-size: 13px;
    font-weight: 600;
}

.tev-card {
    background: var(--tev-surface);
    border: 1px solid var(--tev-line);
    border-radius: var(--tev-radius);
    padding: 20px;
    box-shadow: var(--tev-shadow);
}
.tev-card--table { padding: 0; overflow: hidden; }

.tev-admin-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.tev-admin-form { display: grid; gap: 18px; max-width: 460px; }

.tev-field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.tev-field > span { color: var(--tev-text); }
.tev-field em { color: var(--tev-muted); font-weight: 400; font-size: 12px; font-style: normal; }

.tev-admin input[type='text'],
.tev-admin input[type='number'],
.tev-admin select {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--tev-line-strong);
    border-radius: var(--tev-radius-sm);
    background: var(--tev-inset);
    color: var(--tev-text);
    padding: 0 12px;
    font: inherit;
}
.tev-admin input:focus,
.tev-admin select:focus {
    outline: none;
    border-color: var(--tev-accent);
    box-shadow: 0 0 0 3px var(--tev-ring);
}

.tev-admin-btn {
    min-height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: var(--tev-radius-sm);
    background: var(--tev-accent);
    color: var(--tev-accent-ink);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.tev-admin-btn:hover { background: var(--tev-accent-strong); }
.tev-admin-btn--sm { min-height: 32px; padding: 0 12px; font-size: 13px; }

.tev-stat-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--tev-muted);
}
.tev-stat-value {
    margin: 8px 0 2px;
    font-size: 30px;
    font-weight: 700;
    color: var(--tev-text);
    font-variant-numeric: tabular-nums;
}
.tev-stat-value span { font-size: 15px; font-weight: 600; color: var(--tev-muted); }
.tev-stat-sub { font-size: 13px; color: var(--tev-muted); }

.tev-admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tev-admin-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--tev-muted);
    background: var(--tev-surface-2);
    border-bottom: 1px solid var(--tev-line);
}
.tev-admin-table td {
    padding: 12px 16px;
    color: var(--tev-text);
    border-bottom: 1px solid var(--tev-line);
}
.tev-admin-table tr:last-child td { border-bottom: 0; }
.tev-admin-empty { text-align: center; color: var(--tev-muted); padding: 24px; }
.tev-admin-muted { color: var(--tev-muted); font-style: normal; }

.tev-admin-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: var(--tev-surface-2);
    color: var(--tev-muted);
}
.tev-admin-pill--ok { background: var(--tev-accent-soft); color: var(--tev-accent); }

@media (max-width: 860px) {
    .tev-admin { padding: 16px; }
}


/* vMix Data Source row + help bubble */
.tev-vmix-row { margin-top: 8px; }
.tev-vmix-help {
    min-width: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--tev-line-strong);
    border-radius: var(--tev-radius-sm);
    color: var(--tev-muted);
    text-decoration: none;
    font-weight: 700;
}
.tev-vmix-help:hover { border-color: var(--tev-accent); color: var(--tev-accent); }

/* Sessions guide */
.tev-guide { margin-top: 24px; }
.tev-guide h2 { margin: 0 0 10px; font-size: 1.1rem; font-weight: 700; color: var(--tev-text); }
.tev-guide h3 { margin: 18px 0 6px; font-size: 0.95rem; font-weight: 700; color: var(--tev-text); }
.tev-guide p, .tev-guide li { font-size: 13.5px; line-height: 1.55; color: var(--tev-text); }
.tev-guide ol, .tev-guide ul { margin: 6px 0 6px 20px; padding: 0; }
.tev-guide code {
    background: var(--tev-surface-2);
    border: 1px solid var(--tev-line);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 12px;
}
.tev-guide .tev-admin-muted { font-size: 12.5px; }


/* Always-visible vMix how-to on the console */
.tev-vmix-guide {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid var(--tev-line);
    border-radius: var(--tev-radius-sm);
    background: var(--tev-surface-2);
    display: grid;
    gap: 5px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--tev-text);
}
.tev-vmix-guide b { color: var(--tev-accent); }
.tev-vmix-guide code { background: var(--tev-surface); border: 1px solid var(--tev-line); border-radius: 4px; padding: 0 4px; font-size: 11.5px; }


/* Guide modal (#16) — jebi-modal pattern */
.tev-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.tev-modal-overlay.open { display: flex; }
.tev-modal {
    width: 760px;
    max-width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    background: var(--tev-surface);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}
.tev-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--tev-line);
}
.tev-modal__header h2 { margin: 0; font-size: 1.1rem; font-weight: 700; color: var(--tev-text); }
.tev-modal__close {
    border: 0;
    background: transparent;
    color: var(--tev-muted);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}
.tev-modal__close:hover { color: var(--tev-text); }
.tev-modal__body { padding: 4px 20px 20px; overflow-y: auto; }
.tev-modal__body .tev-card { box-shadow: none; border: 0; padding: 0; }


/* Users admin (#11) */
.tev-user-add {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}
.tev-user-add .tev-check { align-self: center; margin-top: 18px; }
.tev-user-add > div { grid-column: 1 / -1; }
@media (max-width: 860px) { .tev-user-add { grid-template-columns: 1fr; } .tev-user-add .tev-check { margin-top: 0; } }
.tev-role-form { display: flex; gap: 6px; align-items: center; }
.tev-role-form select { min-height: 32px; width: auto; }
.tev-admin-notice--error { background: #fef2f2; color: #b42318; }


/* Quote calculator comparison (#18) */
.tev-calc-cmp { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 4px; }
.tev-calc-cmp th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--tev-muted); padding: 6px 8px; border-bottom: 1px solid var(--tev-line); }
.tev-calc-cmp td { padding: 6px 8px; border-bottom: 1px solid var(--tev-line); }
.tev-calc-cmp tr:last-child td { border-bottom: 0; }
.tev-calc-cmp tr.best td { background: var(--tev-accent-soft); font-weight: 600; }
.tev-calc-cmp em { color: var(--tev-muted); font-style: normal; font-size: 11px; }


/* ============================= Landing (#2) ============================= */
.tev-topbar__link {
    color: var(--tev-text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
}
.tev-topbar__link:hover { background: var(--tev-surface-2); }
.tev-topbar__cta {
    background: var(--tev-accent);
    color: var(--tev-accent-ink);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    padding: 9px 16px;
    border-radius: 8px;
}
.tev-topbar__cta:hover { background: var(--tev-accent-strong); }

.tev-landing { font-family: var(--tev-font); color: var(--tev-text); }

.tev-land-hero {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 48px;
    align-items: center;
    max-width: 1140px;
    margin: 0 auto;
    padding: 72px 28px 56px;
}
.tev-land-eyebrow {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #06b6d4;
    margin-bottom: 14px;
}
.tev-land-hero__text h1 {
    margin: 0 0 16px;
    font-size: clamp(32px, 4.2vw, 52px);
    line-height: 1.06;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.tev-land-hero__text p { margin: 0 0 24px; font-size: 16.5px; line-height: 1.6; color: var(--tev-muted); max-width: 46ch; }
.tev-land-ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.tev-land-btn {
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 10px;
    border: 1px solid var(--tev-line-strong);
    color: var(--tev-text);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}
.tev-land-btn:hover { border-color: var(--tev-accent); background: var(--tev-accent-soft); }
.tev-land-btn--primary { background: var(--tev-accent); border-color: var(--tev-accent); color: var(--tev-accent-ink); }
.tev-land-btn--primary:hover { background: var(--tev-accent-strong); border-color: var(--tev-accent-strong); color: #fff; }
.tev-land-btn--light { background: #fff; border-color: #fff; color: var(--tev-accent); }
.tev-land-note { margin-top: 14px; font-size: 13px; color: var(--tev-muted); }

/* Signature: live broadcast stage with self-playing subtitles */
.tev-land-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    background:
        radial-gradient(120% 90% at 20% 0%, rgba(59, 79, 228, 0.35), transparent 55%),
        radial-gradient(120% 90% at 90% 100%, rgba(6, 182, 212, 0.25), transparent 55%),
        #0e1116;
    box-shadow: 0 24px 60px rgba(30, 41, 59, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px 18px;
}
.tev-land-stage__top {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e8ecf3;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.tev-land-rec { width: 9px; height: 9px; border-radius: 50%; background: #ef4444; animation: tev-land-blink 1.4s ease-in-out infinite; }
.tev-land-chips { margin-left: auto; display: flex; gap: 6px; }
.tev-land-chips span {
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(232, 236, 243, 0.12);
    color: #e8ecf3;
    font-size: 11px;
    font-weight: 600;
}
.tev-land-stage__wave { display: flex; align-items: flex-end; gap: 4px; height: 34px; opacity: 0.55; margin: auto 0 0; }
.tev-land-stage__wave i { width: 4px; border-radius: 2px; background: #06b6d4; height: 30%; animation: tev-land-wave 1.2s ease-in-out infinite; }
.tev-land-stage__wave i:nth-child(2n) { animation-delay: 0.15s; height: 65%; }
.tev-land-stage__wave i:nth-child(3n) { animation-delay: 0.3s; height: 45%; }
.tev-land-stage__wave i:nth-child(4n) { animation-delay: 0.45s; height: 85%; }
.tev-land-stage__subs { position: relative; height: 76px; margin-top: 12px; }
.tev-land-cap {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    max-width: 92%;
    padding: 9px 16px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.62);
    color: #fff;
    font-size: clamp(13px, 1.6vw, 19px);
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    white-space: nowrap;
    opacity: 0;
    animation: tev-land-cap 12s infinite;
}
@keyframes tev-land-cap {
    0% { opacity: 0; transform: translate(-50%, 8px); }
    4%, 30% { opacity: 1; transform: translate(-50%, 0); }
    34%, 100% { opacity: 0; transform: translate(-50%, 0); }
}
@keyframes tev-land-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes tev-land-wave { 0%, 100% { transform: scaleY(0.5); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) {
    .tev-land-cap { animation: none; opacity: 0; }
    .tev-land-cap:first-child { opacity: 1; }
    .tev-land-rec, .tev-land-stage__wave i { animation: none; }
}

.tev-land-section { max-width: 1140px; margin: 0 auto; padding: 40px 28px; }
.tev-land-section h2 { margin: 0 0 22px; font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
.tev-land-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tev-land-card {
    background: var(--tev-surface);
    border: 1px solid var(--tev-line);
    border-radius: 14px;
    padding: 22px;
}
.tev-land-card svg { width: 26px; height: 26px; color: var(--tev-accent); }
.tev-land-card h3 { margin: 12px 0 6px; font-size: 16.5px; font-weight: 700; }
.tev-land-card p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--tev-muted); }

.tev-land-steps { list-style: none; counter-reset: tev-step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tev-land-steps li { counter-increment: tev-step; background: var(--tev-surface); border: 1px solid var(--tev-line); border-radius: 14px; padding: 22px; }
.tev-land-steps li::before {
    content: counter(tev-step);
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--tev-accent-soft);
    color: var(--tev-accent);
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 10px;
}
.tev-land-steps strong { display: block; font-size: 15.5px; margin-bottom: 4px; }
.tev-land-steps span { font-size: 14px; line-height: 1.55; color: var(--tev-muted); }

.tev-land-grid--pricing { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.tev-land-price { display: flex; flex-direction: column; }
.tev-land-price__num { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; margin: 4px 0 10px; }
.tev-land-price__num span { font-size: 14px; font-weight: 600; color: var(--tev-muted); }
.tev-land-price ul { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 7px; font-size: 13.5px; color: var(--tev-muted); }
.tev-land-price ul li::before { content: '✓'; color: #06b6d4; font-weight: 700; margin-right: 7px; }
.tev-land-price .tev-land-btn { margin-top: auto; justify-content: center; }

.tev-land-band {
    max-width: 1140px;
    margin: 24px auto 0;
    padding: 44px 28px;
    border-radius: 18px;
    background: linear-gradient(120deg, var(--tev-accent), #2e3ec2 60%, #06b6d4 130%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}
.tev-land-band h2 { margin: 0; font-size: 24px; font-weight: 700; }
.tev-land-footer { max-width: 1140px; margin: 0 auto; padding: 28px; font-size: 13px; color: var(--tev-muted); }
.tev-land-footer a { color: var(--tev-accent); text-decoration: none; }

@media (max-width: 900px) {
    .tev-land-hero { grid-template-columns: 1fr; padding-top: 40px; gap: 28px; }
    .tev-land-grid, .tev-land-steps { grid-template-columns: 1fr; }
}

/* Register */
.tev-reg-hp { position: absolute !important; left: -9999px; }
.tev-reg-error {
    margin-bottom: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #fef2f2;
    color: #b42318;
    font-size: 13.5px;
    text-align: left;
}
.tev-auth-card input[type='text'] { width: 100%; box-sizing: border-box; }
.tev-reg-submit { width: 100%; justify-content: center; }


/* #24 email module + auth screens */
.tev-admin input[type='password'],
.tev-admin textarea {
    width: 100%;
    border: 1px solid var(--tev-line-strong);
    border-radius: var(--tev-radius-sm);
    background: var(--tev-inset);
    color: var(--tev-text);
    padding: 10px 12px;
    font: inherit;
    box-sizing: border-box;
}
.tev-admin input[type='password'] { min-height: 40px; padding: 0 12px; }
.tev-admin textarea {
    min-height: 220px;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.5;
}
.tev-admin input[type='password']:focus,
.tev-admin textarea:focus {
    outline: none;
    border-color: var(--tev-accent);
    box-shadow: 0 0 0 3px var(--tev-ring);
}

.tev-email-editor__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.tev-email-editor code { background: var(--tev-surface-2); padding: 1px 6px; border-radius: 4px; font-size: 12px; }
.tev-email-preview__frame {
    width: 100%;
    height: 440px;
    border: 1px solid var(--tev-line);
    border-radius: var(--tev-radius-sm);
    background: #fff;
}
@media (max-width: 860px) { .tev-email-editor__grid { grid-template-columns: 1fr; } }

.tev-auth-card input[type='password'] { width: 100%; box-sizing: border-box; }
.tev-reg-success {
    margin-bottom: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #ecfdf5;
    color: #166534;
    font-size: 13.5px;
    text-align: left;
}


/* #27 cancel prepared session */
.tev-actions [data-tev-cancel] {
    border-color: var(--tev-line-strong);
    color: var(--tev-muted);
    background: transparent;
}
.tev-actions [data-tev-cancel]:hover {
    border-color: var(--tev-live);
    color: var(--tev-live);
}
