/* Teyo Player web interface v0.4.1 */
:root {
    color-scheme: dark;
    --background: #07111f;
    --background-soft: #0b1829;
    --panel: #10233a;
    --panel-strong: #142b47;
    --accent: #25d7a9;
    --accent-hover: #52e4be;
    --accent-ink: #041c18;
    --text: #f7f9fc;
    --muted: #a6b4c6;
    --border: #28435f;
    --danger: #ff7d8a;
    --warning: #ffd16d;
    --success: #52e1b8;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 5%, rgba(37, 215, 169, 0.12), transparent 28rem),
        radial-gradient(circle at 90% 25%, rgba(44, 104, 190, 0.12), transparent 30rem),
        var(--background);
}

a {
    color: inherit;
}

.site-header {
    width: min(1180px, calc(100% - 40px));
    min-height: 92px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-size: 17px;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-decoration: none;
    white-space: nowrap;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 13px;
    color: var(--accent-ink);
    background: var(--accent);
    box-shadow: 0 10px 30px rgba(37, 215, 169, 0.18);
    font-size: 15px;
    letter-spacing: 0;
}

.site-header nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.site-header nav a {
    color: var(--muted);
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    transition: color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.site-header nav a:hover {
    color: var(--text);
}

.site-header nav .nav-cta {
    padding: 11px 18px;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 999px;
}

.site-header nav .nav-cta:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.landing-hero {
    width: min(1180px, calc(100% - 40px));
    min-height: 650px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(480px, 1.1fr);
    align-items: center;
    gap: clamp(42px, 7vw, 96px);
    padding: 64px 0 96px;
}

.eyebrow,
.step {
    margin: 0 0 17px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.18em;
}

.hero-content h1,
.portal-copy h1,
.legal-shell h1 {
    margin: 0;
    font-size: clamp(46px, 6.2vw, 78px);
    line-height: 0.99;
    letter-spacing: -0.055em;
}

.hero-content h1 span {
    color: var(--muted);
}

.hero-lead,
.portal-copy > p:not(.eyebrow) {
    max-width: 620px;
    margin: 27px 0 0;
    color: var(--muted);
    font-size: clamp(17px, 1.8vw, 20px);
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
    margin-top: 34px;
}

.primary-button,
.secondary-button {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border: 1px solid transparent;
    border-radius: 13px;
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.primary-button {
    color: var(--accent-ink);
    background: var(--accent);
    box-shadow: 0 14px 35px rgba(37, 215, 169, 0.14);
}

.primary-button:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.secondary-button {
    color: var(--text);
    background: rgba(16, 35, 58, 0.64);
    border-color: var(--border);
}

.secondary-button:hover {
    border-color: #3d668e;
    transform: translateY(-1px);
}

.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 19px;
    margin: 26px 0 0;
    padding: 0;
    color: var(--muted);
    font-size: 12px;
    list-style: none;
}

.trust-row li::before {
    margin-right: 7px;
    color: var(--accent);
    content: "✓";
}

.tv-demo {
    aspect-ratio: 1.45;
    padding: 22px;
    overflow: hidden;
    border: 1px solid #31506f;
    border-radius: 26px;
    background: linear-gradient(145deg, #112640, #091625);
    box-shadow: 0 35px 90px rgba(0, 0, 0, 0.36);
    transform: perspective(1100px) rotateY(-3deg) rotateX(1deg);
}

.tv-topbar {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px 14px;
    border-bottom: 1px solid rgba(166, 180, 198, 0.13);
}

.mini-brand {
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 0.08em;
}

.mini-brand span {
    color: var(--accent);
}

.live-pill {
    padding: 6px 9px;
    color: var(--accent);
    border: 1px solid rgba(37, 215, 169, 0.35);
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
}

.tv-layout {
    height: calc(100% - 48px);
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 19px;
    padding-top: 20px;
}

.tv-sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 16px;
    border-right: 1px solid rgba(166, 180, 198, 0.13);
}

.tv-sidebar span {
    padding: 12px 11px;
    color: var(--muted);
    border-radius: 9px;
    font-size: 10px;
    font-weight: 750;
}

.tv-sidebar .active {
    color: var(--accent);
    background: rgba(37, 215, 169, 0.12);
}

.tv-content {
    min-width: 0;
}

.tv-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tv-heading strong {
    font-size: 19px;
}

.tv-heading span {
    min-width: 112px;
    padding: 9px 11px;
    color: #708096;
    border: 1px solid #29415d;
    border-radius: 8px;
    font-size: 8px;
}

.tv-categories {
    display: flex;
    gap: 7px;
    margin: 18px 0 14px;
}

.tv-categories span {
    padding: 6px 10px;
    color: var(--muted);
    border: 1px solid #294a68;
    border-radius: 7px;
    font-size: 8px;
}

.tv-categories span:first-child {
    color: var(--text);
    border-color: var(--accent);
}

.channel-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
}

.channel-grid div {
    min-height: 82px;
    display: grid;
    grid-template-columns: 39px 1fr;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid #263f5d;
    border-radius: 11px;
    background: rgba(20, 43, 71, 0.74);
}

.channel-grid b {
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    color: var(--accent);
    border-radius: 10px;
    background: #0b4a40;
}

.channel-grid small {
    color: var(--muted);
    font-size: 8px;
}

.benefits {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid rgba(166, 180, 198, 0.15);
    border-bottom: 1px solid rgba(166, 180, 198, 0.15);
}

.benefits article {
    padding: 46px clamp(20px, 3.4vw, 48px);
}

.benefits article + article {
    border-left: 1px solid rgba(166, 180, 198, 0.15);
}

.feature-icon {
    color: var(--accent);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.14em;
}

.benefits h2 {
    margin: 19px 0 10px;
    font-size: 20px;
}

.benefits p,
.steps p,
.price-card p,
footer p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.steps-section {
    width: min(1050px, calc(100% - 40px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 90px;
    padding: 130px 0;
}

.steps-section h2,
.price-card h2 {
    margin: 0;
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.steps {
    margin: 0;
    padding: 0;
    list-style: none;
}

.steps li {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 18px;
    padding: 0 0 26px;
}

.steps li + li {
    padding-top: 26px;
    border-top: 1px solid rgba(166, 180, 198, 0.15);
}

.steps > li > span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: var(--accent);
    border: 1px solid rgba(37, 215, 169, 0.36);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 850;
}

.steps b {
    display: block;
    margin-bottom: 7px;
    font-size: 17px;
}

.price-card {
    width: min(1050px, calc(100% - 40px));
    margin: 0 auto 110px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 42px;
    padding: clamp(34px, 6vw, 66px);
    border: 1px solid rgba(37, 215, 169, 0.28);
    border-radius: 28px;
    background:
        radial-gradient(circle at 85% 25%, rgba(37, 215, 169, 0.17), transparent 23rem),
        var(--panel);
}

.price-card h2 {
    margin-bottom: 12px;
    color: var(--accent);
    font-size: clamp(48px, 7vw, 78px);
}

.price-card h2 small {
    color: var(--text);
    font-size: 18px;
    font-weight: 650;
    letter-spacing: 0;
}

.setup-notice {
    width: min(1050px, calc(100% - 40px));
    margin: -70px auto 70px;
    padding: 14px 18px;
    color: var(--warning);
    border: 1px solid rgba(255, 209, 109, 0.3);
    border-radius: 12px;
    background: rgba(255, 209, 109, 0.07);
    font-size: 13px;
    text-align: center;
}

footer {
    width: min(1180px, calc(100% - 40px));
    min-height: 130px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 40px;
    border-top: 1px solid rgba(166, 180, 198, 0.15);
}

footer > p {
    text-align: center;
}

footer > div {
    display: flex;
    gap: 18px;
}

footer > div a {
    color: var(--muted);
    font-size: 12px;
    text-decoration: none;
}

.compact-brand {
    font-size: 13px;
}

.compact-brand .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 12px;
}

.portal-header {
    border-bottom: 1px solid rgba(166, 180, 198, 0.13);
}

.portal-shell {
    width: min(1040px, calc(100% - 40px));
    min-height: calc(100vh - 205px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
    align-items: center;
    gap: clamp(50px, 8vw, 100px);
    padding: 68px 0 86px;
}

.portal-copy h1 {
    font-size: clamp(42px, 5.2vw, 64px);
}

.price-badge {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
    padding: 16px 19px;
    border: 1px solid rgba(37, 215, 169, 0.25);
    border-radius: 14px;
    background: rgba(37, 215, 169, 0.07);
}

.price-badge strong {
    color: var(--accent);
    font-size: 31px;
}

.price-badge span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.mini-checks {
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.mini-checks li {
    margin: 12px 0;
    color: var(--muted);
    font-size: 14px;
}

.mini-checks li::before {
    margin-right: 9px;
    color: var(--accent);
    content: "✓";
}

.form-card {
    width: 100%;
    padding: clamp(27px, 4.5vw, 44px);
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(16, 35, 58, 0.82);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(12px);
}

.form-card h1,
.form-card h2 {
    margin: 0;
    font-size: clamp(28px, 3.2vw, 38px);
    letter-spacing: -0.035em;
}

.description {
    margin: 12px 0 24px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

form {
    display: grid;
    gap: 17px;
}

label {
    display: grid;
    gap: 8px;
}

label > span,
.form-section-title {
    color: #dbe5f1;
    font-size: 12px;
    font-weight: 750;
}

input {
    width: 100%;
    min-height: 51px;
    padding: 0 15px;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 11px;
    outline: none;
    background: rgba(7, 17, 31, 0.78);
    font: inherit;
    font-size: 15px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

select {
    width: 100%;
    min-height: 51px;
    padding: 0 38px 0 15px;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 11px;
    outline: none;
    background-color: rgba(7, 17, 31, 0.9);
    font: inherit;
    font-size: 14px;
}

select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 215, 169, 0.1);
}

input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 215, 169, 0.1);
}

input::placeholder {
    color: #687990;
}

.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

form .primary-button {
    width: 100%;
    margin-top: 5px;
}

.form-section-title {
    margin: 10px 0 -6px;
    color: var(--accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.alert {
    margin: 0 0 20px;
    padding: 13px 15px;
    border: 1px solid;
    border-radius: 11px;
    font-size: 13px;
    line-height: 1.55;
}

.alert.error {
    color: var(--danger);
    border-color: rgba(255, 125, 138, 0.35);
    background: rgba(255, 125, 138, 0.08);
}

.alert.success {
    color: var(--success);
    border-color: rgba(82, 225, 184, 0.35);
    background: rgba(82, 225, 184, 0.08);
}

.alert.warning {
    color: var(--warning);
    border-color: rgba(255, 209, 109, 0.35);
    background: rgba(255, 209, 109, 0.08);
}

.secure-note,
.legal {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
    text-align: center;
}

.secure-note::before {
    margin-right: 6px;
    color: var(--accent);
    content: "◆";
}

.portal-footer {
    min-height: 90px;
    grid-template-columns: 1fr auto;
}

.portal-footer > p {
    text-align: left;
}

.setup-shell,
.status-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 36px 20px;
}

.setup-card {
    max-width: 650px;
}

.setup-card .brand,
.status-card .brand {
    margin-bottom: 34px;
}

.setup-card h1 {
    margin-bottom: 10px;
}

.code-note {
    overflow-wrap: anywhere;
    padding: 13px 15px;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 11px;
    background: rgba(7, 17, 31, 0.5);
    font-size: 12px;
    line-height: 1.65;
}

.code-note code {
    color: var(--accent);
}

.status-card {
    max-width: 540px;
    text-align: center;
}

.status-card .brand {
    justify-content: center;
}

.status-icon {
    width: 66px;
    height: 66px;
    margin: 0 auto 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 30px;
    font-weight: 850;
}

.success-icon {
    color: var(--accent-ink);
    background: var(--accent);
}

.pending-icon {
    color: var(--warning);
    border: 1px solid rgba(255, 209, 109, 0.35);
    background: rgba(255, 209, 109, 0.08);
}

.status-card .primary-button,
.full-button {
    width: 100%;
}

.legal-shell {
    width: min(760px, calc(100% - 40px));
    margin: 0 auto;
    padding: 78px 0 110px;
}

.legal-shell h1 {
    margin-bottom: 12px;
    font-size: clamp(42px, 6vw, 66px);
}

.legal-date {
    margin-bottom: 48px;
    color: var(--muted);
    font-size: 13px;
}

.legal-shell h2 {
    margin: 34px 0 9px;
    font-size: 20px;
}

.legal-shell > p:not(.eyebrow):not(.legal-date) {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.75;
}

.error-icon {
    color: #2b090e;
    background: var(--danger);
}

.panel-body {
    background: #07111f;
}

.panel-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 238px minmax(0, 1fr);
}

.panel-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 28px 20px 22px;
    border-right: 1px solid rgba(166, 180, 198, 0.14);
    background: #091523;
}

.panel-sidebar nav {
    display: grid;
    gap: 6px;
    margin-top: 44px;
}

.panel-sidebar nav a {
    padding: 12px 14px;
    color: var(--muted);
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.panel-sidebar nav a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.025);
}

.panel-sidebar nav a.active {
    color: var(--accent);
    border-color: rgba(37, 215, 169, 0.18);
    background: rgba(37, 215, 169, 0.08);
}

.panel-user {
    margin-top: auto;
    display: grid;
    gap: 5px;
    padding: 15px 14px 0;
    border-top: 1px solid rgba(166, 180, 198, 0.14);
}

.panel-user span {
    overflow: hidden;
    font-size: 13px;
    font-weight: 750;
    text-overflow: ellipsis;
}

.panel-user a {
    color: var(--muted);
    font-size: 11px;
    text-decoration: none;
}

.panel-main {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 34px clamp(22px, 4vw, 58px) 70px;
}

.panel-topbar {
    min-height: 88px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 28px;
}

.panel-topbar .eyebrow {
    margin-bottom: 8px;
}

.panel-topbar h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 46px);
    letter-spacing: -0.045em;
}

.small-button {
    min-height: 40px;
    padding: 9px 15px;
    border-radius: 10px;
    font-size: 12px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.metric-card,
.panel-card {
    border: 1px solid rgba(166, 180, 198, 0.16);
    border-radius: 17px;
    background: rgba(16, 35, 58, 0.68);
}

.metric-card {
    min-height: 154px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px;
}

.metric-card > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.metric-card strong {
    margin: 8px 0 6px;
    font-size: clamp(28px, 3vw, 40px);
    letter-spacing: -0.04em;
}

.metric-card small {
    color: var(--muted);
    font-size: 11px;
}

.compact-metrics .metric-card {
    min-height: 125px;
}

.panel-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
    gap: 18px;
    margin-bottom: 18px;
}

.panel-card {
    padding: 24px;
}

.card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.card-heading span:not(.status-badge) {
    color: var(--accent);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.16em;
}

.card-heading h2 {
    margin: 5px 0 0;
    font-size: 20px;
}

.card-heading > a {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.bar-chart {
    height: 220px;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    align-items: end;
    gap: clamp(7px, 2vw, 18px);
    padding-top: 14px;
}

.bar-column {
    height: 100%;
    display: grid;
    grid-template-rows: 1fr auto auto;
    justify-items: center;
    gap: 5px;
}

.bar-track {
    width: min(30px, 78%);
    height: 100%;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(166, 180, 198, 0.08);
}

.bar-track span {
    width: 100%;
    min-height: 4%;
    display: block;
    border-radius: 8px;
    background: linear-gradient(180deg, var(--accent), #0b7866);
}

.bar-level-1 { height: 10%; }
.bar-level-2 { height: 20%; }
.bar-level-3 { height: 30%; }
.bar-level-4 { height: 40%; }
.bar-level-5 { height: 50%; }
.bar-level-6 { height: 60%; }
.bar-level-7 { height: 70%; }
.bar-level-8 { height: 80%; }
.bar-level-9 { height: 90%; }
.bar-level-10 { height: 100%; }

.bar-column b {
    font-size: 11px;
}

.bar-column small {
    color: var(--muted);
    font-size: 9px;
}

.health-list {
    margin: 0 0 20px;
}

.health-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(166, 180, 198, 0.11);
}

.health-list dt {
    color: var(--muted);
    font-size: 12px;
}

.health-list dd {
    margin: 0;
    font-size: 12px;
    font-weight: 750;
    text-align: right;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border: 1px solid;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.status-badge.success {
    color: var(--success);
    border-color: rgba(82, 225, 184, 0.3);
    background: rgba(82, 225, 184, 0.07);
}

.status-badge.warning {
    color: var(--warning);
    border-color: rgba(255, 209, 109, 0.3);
    background: rgba(255, 209, 109, 0.07);
}

.status-badge.danger {
    color: var(--danger);
    border-color: rgba(255, 125, 138, 0.3);
    background: rgba(255, 125, 138, 0.07);
}

.table-card {
    margin-bottom: 18px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

th {
    padding: 10px 12px;
    color: var(--muted);
    border-bottom: 1px solid rgba(166, 180, 198, 0.15);
    font-size: 10px;
    font-weight: 800;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

td {
    max-width: 260px;
    padding: 14px 12px;
    border-bottom: 1px solid rgba(166, 180, 198, 0.09);
    font-size: 12px;
}

td code,
.code-note code {
    color: var(--accent);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.empty-cell {
    padding: 36px;
    color: var(--muted);
    text-align: center;
}

.truncate-cell {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-heading {
    align-items: flex-end;
}

.table-actions,
.filter-form {
    display: flex;
    align-items: center;
    gap: 9px;
}

.filter-form {
    min-width: min(100%, 430px);
}

.filter-form select,
.filter-form input {
    min-height: 40px;
}

.row-actions {
    display: flex;
    gap: 6px;
}

.row-actions form {
    display: block;
}

.row-actions button {
    padding: 6px 9px;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 7px;
    background: transparent;
    font: inherit;
    font-size: 10px;
    cursor: pointer;
}

.row-actions .danger-action {
    color: var(--danger);
    border-color: rgba(255, 125, 138, 0.28);
}

.settings-card {
    margin-bottom: 18px;
}

.settings-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 6px 0;
}

.credential-box {
    display: grid;
    gap: 14px;
    padding: 20px;
    border: 1px solid rgba(166, 180, 198, 0.14);
    border-radius: 14px;
    background: rgba(7, 17, 31, 0.42);
}

.credential-box h3 {
    margin: 0;
    font-size: 18px;
}

.credential-box > p {
    margin: -7px 0 2px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

.three-fields {
    grid-template-columns: repeat(3, 1fr);
}

.input-pair {
    display: grid;
    grid-template-columns: 1fr 74px;
    gap: 7px;
}

.panel-login-card {
    max-width: 480px;
}

.panel-login-card .brand {
    margin-bottom: 36px;
}

.panel-privacy-note {
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

@media (max-width: 900px) {
    .landing-hero,
    .portal-shell,
    .steps-section {
        grid-template-columns: 1fr;
    }

    .landing-hero {
        padding-top: 54px;
    }

    .tv-demo {
        width: min(680px, 100%);
        transform: none;
    }

    .benefits {
        grid-template-columns: 1fr;
    }

    .benefits article + article {
        border-top: 1px solid rgba(166, 180, 198, 0.15);
        border-left: 0;
    }

    .steps-section {
        gap: 54px;
        padding: 100px 0;
    }

    .portal-shell {
        max-width: 680px;
        gap: 52px;
        padding-top: 52px;
    }

    .panel-layout {
        grid-template-columns: 1fr;
    }

    .panel-sidebar {
        position: static;
        width: 100%;
        height: auto;
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 24px;
        padding: 16px 20px;
        border-right: 0;
        border-bottom: 1px solid rgba(166, 180, 198, 0.14);
    }

    .panel-sidebar nav {
        display: flex;
        overflow-x: auto;
        margin: 0;
    }

    .panel-sidebar nav a {
        white-space: nowrap;
    }

    .panel-user {
        margin: 0;
        padding: 0 0 0 15px;
        border-top: 0;
        border-left: 1px solid rgba(166, 180, 198, 0.14);
    }

    .metric-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .panel-grid,
    .settings-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .site-header {
        min-height: 78px;
    }

    .site-header nav {
        gap: 12px;
    }

    .site-header nav a {
        display: none;
    }

    .site-header nav .nav-cta,
    .portal-header nav a:last-child {
        display: inline-flex;
    }

    .brand {
        font-size: 14px;
    }

    .brand-mark {
        width: 37px;
        height: 37px;
        border-radius: 11px;
    }

    .landing-hero {
        min-height: 0;
        padding: 55px 0 70px;
    }

    .hero-content h1 {
        font-size: clamp(43px, 13vw, 60px);
    }

    .hero-actions > a {
        width: 100%;
    }

    .tv-demo {
        padding: 14px;
        border-radius: 18px;
    }

    .tv-layout {
        grid-template-columns: 76px 1fr;
        gap: 10px;
    }

    .tv-sidebar {
        padding-right: 8px;
    }

    .tv-sidebar span {
        padding: 8px 6px;
        font-size: 7px;
    }

    .tv-heading span {
        display: none;
    }

    .tv-heading strong {
        font-size: 14px;
    }

    .tv-categories {
        margin: 10px 0;
    }

    .channel-grid div {
        min-height: 58px;
        grid-template-columns: 27px 1fr;
        gap: 7px;
        padding: 6px;
    }

    .channel-grid b {
        width: 27px;
        height: 27px;
        border-radius: 7px;
        font-size: 10px;
    }

    .price-card {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 75px;
    }

    .price-card .primary-button {
        width: 100%;
    }

    footer {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 18px;
        padding: 36px 0;
    }

    footer > p,
    .portal-footer > p {
        text-align: center;
    }

    .portal-footer {
        display: flex;
        flex-direction: column;
    }

    .field-grid {
        grid-template-columns: 1fr;
    }

    .portal-copy h1 {
        font-size: clamp(40px, 12vw, 55px);
    }

    .form-card {
        padding: 25px 20px;
        border-radius: 19px;
    }

    .panel-sidebar {
        grid-template-columns: 1fr auto;
    }

    .panel-sidebar nav {
        grid-column: 1 / -1;
        grid-row: 2;
        order: 3;
    }

    .panel-user {
        justify-self: end;
    }

    .panel-main {
        padding: 24px 14px 50px;
    }

    .panel-topbar .secondary-button {
        display: none;
    }

    .metric-grid,
    .three-fields {
        grid-template-columns: 1fr;
    }

    .metric-card {
        min-height: 120px;
    }

    .panel-card {
        padding: 18px 14px;
    }

    .filter-heading,
    .table-actions,
    .filter-form {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
    }
}
