:root {
    --ink: #191C26;
    --muted: #5A6072;
    --paper: #F4F6F9;
    --surface: #FFFFFF;
    --line: #E3E7EF;
    --accent: #4B54D6;
    --accent-strong: #363FC0;
    --accent-soft: #ECEEFC;
    --good: #1E9E6A;
    --band: #1B1F3B;
    --band-soft: #2A2F55;
    --radius: 14px;
    --maxw: 1120px;
    --font: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --tnyx-sidebar: var(--band);
    --tnyx-sidebar-text: #CDD0EC;
    --tnyx-accent: var(--accent);
    --tnyx-accent-deep: var(--accent-strong);
    --tnyx-bg: var(--paper);
    --tnyx-paper: var(--surface);
    --tnyx-ink: var(--ink);
    --tnyx-muted: var(--muted);
    --tnyx-line: var(--line);
    --tnyx-topbar-h: 68px;
    --tnyx-radius: var(--radius);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.tnyx {
    margin: 0;
    min-height: 100vh;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
img { max-width: 100%; display: block; }

.wrap {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    padding: 14px 22px;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
    color: #fff;
}

.btn-ghost,
.btn-outline-secondary {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}

.btn-ghost:hover,
.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    border-color: var(--accent);
    color: var(--accent);
    background: transparent;
}

.btn-light {
    background: #fff;
    color: var(--band);
}

.btn-light:hover {
    background: #f0f1fb;
    color: var(--band);
}

.btn-sm {
    font-size: 15px;
    padding: 10px 16px;
}

.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ---- Header ---- */
header.site {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(244, 246, 249, 0.85);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--tnyx-topbar-h);
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
    gap: 16px;
}

body.has-sidebar .nav { max-width: none; }

.brand {
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-decoration: none;
}

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

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

.nav-links a.navlink {
    color: var(--muted);
    font-weight: 500;
    font-size: 15px;
}

.nav-links a.navlink:hover,
.nav-links a.navlink.active { color: var(--ink); }

.nav-cta {
    display: flex;
    align-items: center;
    gap: 14px;
}

.workspace-switch select {
    max-width: 220px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 12px;
}

.tnyx-workspace-name {
    margin: 0 12px 12px;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
}

.nav-cta .who,
.nav-cta a.navlink {
    color: var(--muted);
    font-weight: 500;
    font-size: 15px;
}

.nav-cta a.navlink:hover { color: var(--ink); }

/* ---- Shell ---- */
.tnyx-body {
    display: flex;
    min-height: calc(100vh - var(--tnyx-topbar-h));
}

body.is-home .tnyx-body { display: block; }

.tnyx-sidebar {
    width: 228px;
    flex-shrink: 0;
    background: var(--band);
    padding: 22px 12px;
}

.tnyx-nav-label {
    margin: 16px 12px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9AA0D0;
}

.tnyx-nav-label:first-child { margin-top: 0; }

.tnyx-sidebar a {
    display: block;
    color: var(--tnyx-sidebar-text);
    text-decoration: none;
    padding: 9px 12px;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
}

.tnyx-sidebar a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.tnyx-sidebar a.active {
    background: var(--accent);
    color: #fff;
}

.tnyx-main {
    flex: 1;
    padding: 28px 32px 56px;
    max-width: 1120px;
}

body.is-guest .tnyx-main {
    max-width: 480px;
    margin: 48px auto;
    width: 100%;
}

body.is-landing .tnyx-main {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 48px 24px 80px;
}

body.is-home .tnyx-main {
    max-width: none;
    margin: 0;
    padding: 0;
}

/* ---- Page type ---- */
.tnyx-page-head,
.tnyx-hero { margin-bottom: 28px; }

.tnyx-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.tnyx-page-head h1,
.tnyx-hero h1 {
    font-weight: 800;
    letter-spacing: -0.03em;
    font-size: 2.15rem;
    line-height: 1.12;
    margin: 0 0 10px;
}

.tnyx-page-head .text-secondary,
.tnyx-lede {
    color: var(--muted) !important;
}

.tnyx-eyebrow {
    display: block;
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--accent);
}

.tnyx-hero .tnyx-lede {
    font-size: 1.15rem;
    max-width: 48rem;
    margin: 0;
}

.tnyx-card {
    margin-bottom: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.tnyx-card .card-body { padding: 1.25rem 1.35rem; }

.tnyx-card h2.h5 {
    font-weight: 700;
    font-size: 1.15rem;
}

.tnyx-empty {
    text-align: center;
    padding: 40px 24px;
}

.tnyx-empty h2 {
    font-size: 1.45rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.tnyx-empty p {
    color: var(--muted);
    max-width: 28rem;
    margin: 0 auto 18px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stat-grid .card-body { padding: 14px 16px; }
.stat-grid strong { display: block; font-size: 1.15rem; }
.stat-grid span { color: var(--muted); font-size: 0.8rem; }

.tnyx-daybars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 88px;
    margin: 0 0 1.1rem;
    padding: 8px 4px 0;
    border-bottom: 1px solid var(--line);
}

.tnyx-daybar {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: flex-end;
}

.tnyx-daybar span {
    display: block;
    width: 100%;
    min-height: 2px;
    background: var(--accent);
    opacity: 0.85;
    border-radius: 2px 2px 0 0;
}

.qr-preview { text-align: center; }
.qr-preview img {
    width: min(240px, 100%);
    height: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.form-control-color { width: 100%; height: 42px; }

.form-control,
.form-select {
    border-color: var(--line);
    border-radius: 10px;
    padding: 0.55rem 0.75rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem rgba(75, 84, 214, 0.18);
}

.table { --bs-table-bg: transparent; }
.table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    font-weight: 700;
}

.tnyx-auth-switch {
    margin-top: 1rem;
    color: var(--muted);
}

.tnyx-auth-advanced summary {
    cursor: pointer;
    color: var(--muted);
    font-weight: 600;
}

.tnyx-auth-advanced[open] summary { margin-bottom: 0.25rem; }

.tnyx-trust h2 {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 1.4rem 0 0.4rem;
}

.tnyx-trust h2:first-child { margin-top: 0; }
.tnyx-trust p { color: var(--muted); }

.tnyx-dns-steps {
    margin: 0 0 0.85rem;
    padding-left: 1.15rem;
    color: var(--muted);
}

.tnyx-dns-steps li { margin-bottom: 0.35rem; }

.tnyx-dns-live {
    display: inline-block;
    margin-left: 0.35rem;
    font-size: 0.86rem;
}

.tnyx-dns-table {
    --bs-table-bg: transparent;
    font-size: 0.86rem;
}

.tnyx-dns-table th {
    color: var(--muted);
    font-weight: 600;
    border-bottom-color: var(--line);
}

.tnyx-dns-table td {
    vertical-align: middle;
    border-color: var(--line);
}

.tnyx-dns-table code {
    font-size: 0.82rem;
    word-break: break-all;
}

/* ---- Home ---- */
.hero { padding: 76px 0 64px; }
.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
    align-items: center;
}

.eyebrow {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    margin: 0 0 18px;
    letter-spacing: 0.01em;
}

.hero h1 {
    font-size: 56px;
    line-height: 1.04;
    letter-spacing: -0.03em;
    font-weight: 800;
    margin: 0 0 22px;
    max-width: 11ch;
}

.hero p.lede {
    font-size: 20px;
    color: var(--muted);
    margin: 0 0 30px;
    max-width: 52ch;
}

.hero-cta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-note {
    margin: 22px 0 0;
    font-size: 14px;
    color: var(--muted);
}

.ph {
    position: relative;
    background: var(--surface);
    border: 1px dashed #C4CBDA;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #98A0B3;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    padding: 20px;
    background-image: radial-gradient(var(--accent-soft) 1px, transparent 1px);
    background-size: 16px 16px;
}

.ph small {
    display: block;
    font-weight: 500;
    color: #AAB1C2;
    margin-top: 6px;
}

.ph-hero { aspect-ratio: 4 / 3; }

.hero-media {
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--band);
    box-shadow: 0 18px 40px rgba(25, 28, 38, 0.12);
}

.hero-video {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: middle;
}

.how { padding: 20px 0 72px; }

.how h2,
.section h2 {
    font-size: 34px;
    letter-spacing: -0.02em;
    font-weight: 800;
    margin: 0 0 8px;
}

.how .sub,
.section .sub {
    color: var(--muted);
    font-size: 18px;
    margin: 0 0 40px;
    max-width: 56ch;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.step {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
}

.step .num {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 16px;
}

.step h3 { margin: 0 0 8px; font-size: 19px; font-weight: 700; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

.section {
    padding: 66px 0;
    border-top: 1px solid var(--line);
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 8px;
}

.feature-art {
    width: 100%;
    max-height: 260px;
    aspect-ratio: 1;
    margin-bottom: 18px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    overflow: hidden;
}

.feature-art svg {
    display: block;
    width: 100%;
    height: 100%;
    transform: scale(1.15);
}

.feature h3 { margin: 0 0 8px; font-size: 20px; font-weight: 700; }
.feature p { margin: 0; color: var(--muted); font-size: 15.5px; }

.pricing,
#pricing .pricing {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
    gap: 24px;
    margin-top: 8px;
    padding-top: 12px;
}

.plan {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px;
    display: flex;
    flex-direction: column;
}

.plan .tag {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

.plan .plus {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    margin: 0 0 12px;
}

.plan.featured {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.plan .pname {
    font-size: 15px;
    font-weight: 700;
    color: var(--muted);
    margin: 0 0 10px;
}

.plan .price {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
}

.plan .price small {
    font-size: 16px;
    font-weight: 600;
    color: var(--muted);
}

.plan .peryear {
    color: var(--muted);
    font-size: 14px;
    margin: 2px 0 22px;
}

.plan ul {
    list-style: none;
    padding: 0;
    margin: 0 0 26px;
    flex: 1;
}

.plan li,
.agency li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    font-size: 15.5px;
}

.plan li::before,
.agency li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--good);
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>") center / 12px no-repeat;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>") center / 12px no-repeat;
}

.plan .plan-actions,
.agency .plan-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.agency .plan-actions {
    margin: 0 0 8px;
}

.agency .peryear {
    color: var(--muted);
    font-size: 14px;
    margin: 2px 0 6px;
}

.agency {
    margin-top: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 36px 40px;
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 40px;
    align-items: start;
}

.agency h3 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 16px;
}

.agency .price {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
}

.agency .price small {
    font-size: 16px;
    font-weight: 600;
    color: var(--muted);
}

.agency .perclient {
    color: var(--muted);
    font-size: 14px;
    margin: 2px 0 6px;
}

.agency .seatline {
    color: var(--muted);
    font-size: 14px;
    margin: 0 0 22px;
}

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

.agency li:last-child { margin-bottom: 0; }

.band {
    background: var(--band);
    color: #fff;
    border-radius: 20px;
    padding: 56px 48px;
    margin-top: 36px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 44px;
    align-items: center;
}

.band .bigprice {
    font-size: 72px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
}

.band .bigprice small {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #AEB3E0;
    margin-top: 8px;
    letter-spacing: normal;
}

.band h2 {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 12px;
    color: #fff;
}

.band p {
    margin: 0;
    font-size: 17.5px;
    color: #CDD0EC;
    max-width: 56ch;
}

.band .strike { color: #9AA0D0; }
.band-divider {
    width: 1px;
    align-self: stretch;
    background: var(--band-soft);
}

.it {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 36px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
}

.it h3 { margin: 0 0 6px; font-size: 21px; font-weight: 700; }
.it p { margin: 0; color: var(--muted); font-size: 16px; max-width: 60ch; }

.final { text-align: center; padding: 80px 0; }
.final h2 {
    font-size: 40px;
    letter-spacing: -0.025em;
    font-weight: 800;
    margin: 0 0 14px;
}
.final p { color: var(--muted); font-size: 18px; margin: 0 0 28px; }
.final .hero-cta { justify-content: center; }

/* ---- Footer ---- */
footer.site {
    border-top: 1px solid var(--line);
    padding: 38px 0;
    color: var(--muted);
    font-size: 15px;
}

.foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

body.has-sidebar .foot { max-width: none; }

.foot-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--ink); }

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; gap: 36px; }
    .hero h1 { font-size: 44px; }
    .steps,
    .features,
    .pricing,
    #pricing .pricing,
    .agency { grid-template-columns: 1fr; }
    .agency { padding: 28px 24px; gap: 24px; }
    .band {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 40px 30px;
        text-align: left;
    }
    .band-divider { display: none; }
    .band .bigprice { font-size: 60px; }
    body.is-guest .nav-links { display: none; }
}

@media (max-width: 767.98px) {
    .tnyx-sidebar { display: none; }
    .tnyx-main { padding: 18px 16px 40px; }
    body.is-landing .tnyx-main { padding: 28px 16px 56px; }
    .tnyx-page-head h1,
    .tnyx-hero h1 { font-size: 1.7rem; }
}

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