@property --kh-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

body.kh-page {
    --kh-bg: #050b14;
    --kh-bg2: #081221;
    --kh-panel: rgba(12, 23, 39, 0.72);
    --kh-panel-solid: #0c1727;
    --kh-line: rgba(120, 190, 255, 0.14);
    --kh-line-strong: rgba(120, 190, 255, 0.28);
    --kh-tx: #e6f1ff;
    --kh-mut: #8aa0b8;
    --kh-g: #3ddc84;
    --kh-c: #22d3ee;
    --kh-warn: #ffb547;
    --kh-bad: #ff5c7a;
    --kh-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
    background: var(--kh-bg);
    color: var(--kh-tx);
}

html:has(body.kh-page) {
    scroll-behavior: smooth;
}

body.kh-page #page {
    overflow-x: clip;
}

body.kh-page #content {
    position: relative;
    background:
        radial-gradient(900px 500px at 85% 8%, rgba(34, 211, 238, 0.10), transparent 60%),
        radial-gradient(800px 600px at 10% 40%, rgba(61, 220, 132, 0.08), transparent 60%),
        linear-gradient(var(--kh-line) 1px, transparent 1px) 0 0 / 44px 44px,
        linear-gradient(90deg, var(--kh-line) 1px, transparent 1px) 0 0 / 44px 44px,
        var(--kh-bg);
    background-attachment: fixed, fixed, fixed, fixed, fixed;
}

body.kh-page #primary {
    margin: 0;
    padding: 0;
}

body.kh-page .entry-content {
    color: var(--kh-tx);
}

body.kh-page .site-footer .site-primary-footer-wrap,
body.kh-page .site-footer .site-below-footer-wrap {
    background: #03070e;
    border-top: 1px solid var(--kh-line);
}

body.kh-page .site-footer .site-primary-footer-wrap {
    background:
        radial-gradient(600px 220px at 50% 0%, rgba(61, 220, 132, 0.08), transparent 70%),
        #03070e;
}

body.kh-page .site-footer h2 {
    color: #fff;
}

body.kh-page .site-footer p,
body.kh-page .site-footer .ast-footer-copyright.site-footer-focus-item {
    color: var(--kh-mut);
}

body.kh-page .site-footer a {
    color: var(--kh-g);
}

body.kh-page .site-footer a:hover,
body.kh-page .site-footer a:focus-visible {
    color: var(--kh-c);
}

body.kh-page .entry-content h2,
body.kh-page .entry-content h3 {
    color: #fff;
}

body.kh-page .entry-content a:not(.khx-btn) {
    color: var(--kh-c);
    text-decoration-color: rgba(34, 211, 238, 0.4);
    text-underline-offset: 3px;
}

body.kh-page .entry-content a:not(.khx-btn):hover {
    color: var(--kh-g);
}

/* ---------- Hero ---------- */

.khx-hero {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    min-height: 560px;
    display: grid;
    place-items: center;
    padding: 6rem 1.5rem 5rem;
    overflow: hidden;
    isolation: isolate;
    border-bottom: 1px solid var(--kh-line);
    background: radial-gradient(1200px 520px at 50% 0%, rgba(34, 211, 238, 0.16), transparent 70%), var(--kh-bg);
}

.khx-floor {
    position: absolute;
    inset: auto -20% -40% -20%;
    height: 75%;
    z-index: -2;
    background:
        linear-gradient(rgba(61, 220, 132, 0.35) 1px, transparent 1px) 0 0 / 60px 60px,
        linear-gradient(90deg, rgba(61, 220, 132, 0.35) 1px, transparent 1px) 0 0 / 60px 60px;
    transform: perspective(520px) rotateX(62deg);
    transform-origin: 50% 0;
    mask-image: linear-gradient(to bottom, transparent 0%, #000 35%, #000 60%, transparent 100%);
    animation: khx-floor 6s linear infinite;
}

body.kh-page .entry-content > .khx-hero {
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: 0;
}

@keyframes khx-floor {
    to {
        background-position: 0 60px, 0 0;
    }
}

.khx-orb {
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    z-index: -3;
    filter: blur(80px);
    opacity: 0.45;
    background: radial-gradient(circle, rgba(61, 220, 132, 0.7), transparent 65%);
    top: -160px;
    left: 8%;
    animation: khx-drift 14s ease-in-out infinite alternate;
}

.khx-orb.is-c {
    background: radial-gradient(circle, rgba(34, 211, 238, 0.7), transparent 65%);
    left: auto;
    right: 4%;
    top: 40px;
    animation-duration: 18s;
    animation-direction: alternate-reverse;
}

@keyframes khx-drift {
    to {
        transform: translate3d(80px, 60px, 0) scale(1.15);
    }
}

.khx-wire {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.khx-wire path {
    fill: none;
    stroke-linecap: round;
}

.khx-wire .is-base {
    stroke: rgba(120, 190, 255, 0.12);
    stroke-width: 2;
}

.khx-wire .is-flow {
    stroke: url(#khx-flow-grad);
    stroke-width: 2.5;
    stroke-dasharray: 90 1400;
    filter: drop-shadow(0 0 6px rgba(61, 220, 132, 0.9));
    animation: khx-flow 5s linear infinite;
}

.khx-wire .is-flow.is-2 {
    animation-duration: 7s;
    animation-delay: -2s;
}

.khx-wire .is-flow.is-3 {
    animation-duration: 6s;
    animation-delay: -4s;
}

@keyframes khx-flow {
    from {
        stroke-dashoffset: 1490;
    }
    to {
        stroke-dashoffset: 0;
    }
}

.khx-scan {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to bottom, transparent, rgba(34, 211, 238, 0.08) 50%, transparent);
    height: 140px;
    animation: khx-scan 7s ease-in-out infinite;
    pointer-events: none;
}

@keyframes khx-scan {
    0% {
        transform: translateY(-160px);
    }
    100% {
        transform: translateY(720px);
    }
}

.khx-hero-inner {
    max-width: 880px;
    text-align: center;
    animation: khx-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes khx-rise {
    from {
        opacity: 0;
        transform: translateY(24px);
        filter: blur(6px);
    }
}

.khx-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 1.4rem;
    padding: 6px 14px;
    border: 1px solid var(--kh-line-strong);
    border-radius: 999px;
    background: rgba(12, 23, 39, 0.6);
    backdrop-filter: blur(8px);
    font: 600 0.72rem/1 var(--kh-mono);
    letter-spacing: 0.18em;
    color: var(--kh-mut);
}

.khx-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--kh-g);
    box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.6);
    animation: khx-pulse 1.8s ease-out infinite;
}

@keyframes khx-pulse {
    70% {
        box-shadow: 0 0 0 10px rgba(61, 220, 132, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(61, 220, 132, 0);
    }
}

body.kh-page .khx-hero h1 {
    margin: 0 0 1rem;
    font-size: clamp(2.3rem, 5.5vw, 4rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: #fff;
}

.khx-grad {
    background: linear-gradient(90deg, var(--kh-g), var(--kh-c), var(--kh-g));
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: khx-shine 6s linear infinite;
}

@keyframes khx-shine {
    to {
        background-position: 200% 0;
    }
}

.khx-lead {
    margin: 0 auto 1.8rem;
    max-width: 680px;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #b9c8da;
}

.khx-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 2.2rem;
}

.khx-chips span {
    padding: 6px 12px;
    border: 1px solid var(--kh-line-strong);
    border-radius: 6px;
    background: rgba(8, 18, 33, 0.7);
    font: 500 0.78rem/1 var(--kh-mono);
    color: var(--kh-c);
    animation: khx-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.khx-chips span:nth-child(2) { animation-delay: 0.08s; }
.khx-chips span:nth-child(3) { animation-delay: 0.16s; }
.khx-chips span:nth-child(4) { animation-delay: 0.24s; }
.khx-chips span:nth-child(5) { animation-delay: 0.32s; }

.khx-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0.95rem 1.7rem;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--kh-g), #1fb86a);
    color: #04140b !important;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: 0 10px 30px -8px rgba(61, 220, 132, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.khx-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.5) 50%, transparent 70%);
    transform: translateX(-120%);
    animation: khx-sweep 3.5s ease-in-out infinite;
}

@keyframes khx-sweep {
    60%, 100% {
        transform: translateX(120%);
    }
}

.khx-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px -8px rgba(61, 220, 132, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.khx-btn.is-ghost {
    background: transparent;
    color: var(--kh-tx) !important;
    border: 1px solid var(--kh-line-strong);
    box-shadow: none;
}

.khx-btn.is-ghost::after {
    display: none;
}

.khx-btn.is-red {
    background: linear-gradient(135deg, #e53935, #b71c1c);
    color: #fff !important;
    box-shadow: 0 10px 30px -8px rgba(229, 57, 53, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* ---------- Sections ---------- */

.khx-section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 4.5rem 1.5rem 0;
}

.khx-kicker {
    margin: 0 0 0.6rem;
    font: 600 0.74rem/1 var(--kh-mono);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--kh-g);
}

body.kh-page .khx-section h2 {
    margin: 0 0 1rem;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 750;
    letter-spacing: -0.02em;
}

.khx-intro {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.khx-intro p {
    margin: 0 0 1rem;
    line-height: 1.8;
    color: #b9c8da;
}

.khx-features {
    display: grid;
    gap: 12px;
}

.khx-feature {
    position: relative;
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid var(--kh-line);
    border-radius: 14px;
    background: var(--kh-panel);
    backdrop-filter: blur(10px);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.khx-feature:hover {
    transform: translateX(6px);
    border-color: rgba(61, 220, 132, 0.45);
    box-shadow: -6px 0 0 -2px var(--kh-g), 0 12px 30px -12px rgba(0, 0, 0, 0.6);
}

.khx-ico {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(61, 220, 132, 0.18), rgba(34, 211, 238, 0.12));
    border: 1px solid rgba(61, 220, 132, 0.3);
    color: var(--kh-g);
    font: 700 0.95rem/1 var(--kh-mono);
}

.khx-feature b {
    display: block;
    margin-bottom: 2px;
    color: #fff;
}

.khx-feature span {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--kh-mut);
}

.khx-tool-head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.khx-tool-head p {
    margin: 0;
    max-width: 520px;
    color: var(--kh-mut);
    line-height: 1.6;
}

/* how-to steps */

.khx-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    counter-reset: khx;
    margin: 0;
    padding: 0;
    list-style: none;
}

.khx-steps li {
    position: relative;
    padding: 22px 18px 18px;
    border: 1px solid var(--kh-line);
    border-radius: 14px;
    background: var(--kh-panel);
    line-height: 1.6;
    color: #b9c8da;
    counter-increment: khx;
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.khx-steps li::before {
    content: "0" counter(khx);
    display: block;
    margin-bottom: 10px;
    font: 700 1.6rem/1 var(--kh-mono);
    color: transparent;
    -webkit-text-stroke: 1px var(--kh-g);
}

.khx-steps li::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, var(--kh-g), var(--kh-c));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.khx-steps li:hover {
    transform: translateY(-4px);
    border-color: var(--kh-line-strong);
}

.khx-steps li:hover::after {
    transform: scaleX(1);
}

.khx-formula {
    margin: 1.4rem 0 0;
    padding: 14px 18px;
    border: 1px dashed var(--kh-line-strong);
    border-radius: 10px;
    background: rgba(8, 18, 33, 0.7);
    font: 500 0.92rem/1.7 var(--kh-mono);
    color: var(--kh-c);
    overflow-x: auto;
}

/* FAQ */

.khx-faq {
    display: grid;
    gap: 10px;
}

.khx-faq details {
    border: 1px solid var(--kh-line);
    border-radius: 12px;
    background: var(--kh-panel);
    transition: border-color 0.25s ease, background 0.25s ease;
    interpolate-size: allow-keywords;
}

.khx-faq details[open] {
    border-color: rgba(61, 220, 132, 0.4);
    background: rgba(12, 28, 34, 0.8);
}

.khx-faq summary {
    position: relative;
    display: block;
    padding: 18px 54px 18px 20px;
    cursor: pointer;
    list-style: none;
}

.khx-faq summary::-webkit-details-marker {
    display: none;
}

body.kh-page .khx-faq summary h3 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 650;
}

.khx-faq summary::after {
    content: "+";
    position: absolute;
    right: 18px;
    top: 50%;
    width: 26px;
    height: 26px;
    margin-top: -13px;
    display: grid;
    place-items: center;
    border: 1px solid var(--kh-line-strong);
    border-radius: 7px;
    font: 500 1rem/1 var(--kh-mono);
    color: var(--kh-g);
    transition: background 0.3s ease;
}

.khx-faq details[open] summary::after {
    content: "−";
    background: rgba(61, 220, 132, 0.12);
}

.khx-faq details::details-content {
    block-size: 0;
    overflow: hidden;
    transition: block-size 0.35s ease, content-visibility 0.35s allow-discrete;
}

.khx-faq details[open]::details-content {
    block-size: auto;
}

.khx-faq details p {
    margin: 0;
    padding: 0 20px 18px;
    line-height: 1.75;
    color: #b9c8da;
}

/* CTA */

.khx-cta {
    position: relative;
    margin: 4.5rem auto 5rem;
    max-width: 1180px;
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid var(--kh-line-strong);
    background: linear-gradient(135deg, rgba(12, 23, 39, 0.95), rgba(8, 30, 30, 0.95));
}

.khx-cta::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: -1;
    background: conic-gradient(from var(--kh-angle), transparent 0 70%, var(--kh-g) 80%, var(--kh-c) 90%, transparent 100%);
    animation: kh-spin 6s linear infinite;
    opacity: 0.55;
}

.khx-cta::after {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: -1;
    border-radius: 19px;
    background: linear-gradient(135deg, #0b1626, #071a1c);
}

body.kh-page .khx-cta h2 {
    margin: 0 0 0.8rem;
}

.khx-cta p {
    margin: 0 auto 1.6rem;
    max-width: 620px;
    color: #b9c8da;
    line-height: 1.7;
}

.khx-cta .khx-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

/* scroll reveal */

@supports (animation-timeline: view()) {
    .khx-reveal {
        animation: khx-reveal linear both;
        animation-timeline: view();
        animation-range: entry 0% cover 28%;
    }

    @keyframes khx-reveal {
        from {
            opacity: 0;
            transform: translateY(40px) scale(0.98);
        }
    }
}

/* ---------- Calculator ---------- */

.kh {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.5rem;
    color: var(--kh-tx);
    font-size: 15px;
    line-height: 1.45;
}

#hesaplayici {
    scroll-margin-top: 20px;
}

.kh *,
.kh *::before,
.kh *::after {
    box-sizing: border-box;
}

.kh-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.kh-inputs {
    display: grid;
    gap: 18px;
}

.kh-card {
    position: relative;
    padding: 20px;
    border: 1px solid var(--kh-line);
    border-radius: 16px;
    background: var(--kh-panel);
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 50px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: border-color 0.3s ease;
}

.kh-card:focus-within {
    border-color: rgba(34, 211, 238, 0.45);
}

.kh-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.kh-step {
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 26px;
    padding: 0 8px;
    border-radius: 6px;
    background: rgba(61, 220, 132, 0.12);
    border: 1px solid rgba(61, 220, 132, 0.35);
    font: 700 0.75rem/1 var(--kh-mono);
    color: var(--kh-g);
}

body.kh-page .kh h3 {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fff;
}

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

.kh-span {
    grid-column: 1 / -1;
}

.kh-field {
    position: relative;
}

.kh label {
    display: block;
    margin-bottom: 6px;
    font: 600 0.7rem/1.2 var(--kh-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--kh-mut);
    transition: color 0.2s ease;
}

.kh-field:focus-within label {
    color: var(--kh-c);
}

body.kh-page .kh input,
body.kh-page .kh select {
    width: 100%;
    height: 44px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid var(--kh-line-strong);
    border-radius: 10px;
    background-color: rgba(4, 10, 20, 0.75);
    color: var(--kh-tx);
    font: 500 0.98rem/1 var(--kh-mono);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

body.kh-page .kh select {
    appearance: none;
    padding-right: 36px;
    font-family: inherit;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2322d3ee' stroke-width='1.8'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

body.kh-page .kh select option {
    background: var(--kh-panel-solid);
    color: var(--kh-tx);
}

body.kh-page .kh input:hover,
body.kh-page .kh select:hover {
    border-color: rgba(34, 211, 238, 0.4);
}

body.kh-page .kh input:focus,
body.kh-page .kh select:focus {
    outline: none;
    border-color: var(--kh-c);
    background-color: rgba(6, 18, 32, 0.95);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15), 0 0 24px -6px rgba(34, 211, 238, 0.5);
}

body.kh-page .kh input[aria-invalid] {
    border-color: var(--kh-bad);
    background-color: rgba(40, 6, 16, 0.6);
    box-shadow: 0 0 0 3px rgba(255, 92, 122, 0.15), 0 0 24px -6px rgba(255, 92, 122, 0.55);
}

.kh-field:has(input[aria-invalid]) label {
    color: var(--kh-bad);
}

.kh-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

body.kh-page .kh-presets button {
    padding: 4px 9px;
    border: 1px solid var(--kh-line-strong);
    border-radius: 999px;
    background: transparent;
    color: var(--kh-mut);
    font: 500 0.7rem/1.2 var(--kh-mono);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

body.kh-page .kh-presets button:hover,
body.kh-page .kh-presets button:focus-visible {
    color: var(--kh-c);
    border-color: var(--kh-c);
    outline: none;
}

body.kh-page .kh-presets button[aria-pressed="true"] {
    color: var(--kh-g);
    border-color: var(--kh-g);
    background: rgba(61, 220, 132, 0.1);
}

.kh-err {
    display: block;
    margin-top: 6px;
    font: 500 0.72rem/1.35 var(--kh-mono);
    color: var(--kh-bad);
    animation: kh-err-in 0.25s ease;
}

.kh-err[hidden] {
    display: none;
}

@keyframes kh-err-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
}

/* console */

.kh-console {
    position: sticky;
    top: 24px;
    border-radius: 18px;
    padding: 1px;
    overflow: hidden;
    isolation: isolate;
}

.kh-console::before {
    content: "";
    position: absolute;
    inset: -40%;
    z-index: -1;
    background: conic-gradient(from var(--kh-angle), transparent 0 60%, var(--kh-g) 75%, var(--kh-c) 88%, transparent 100%);
    animation: kh-spin 5s linear infinite;
}

.kh[data-state="no"] .kh-console::before {
    background: conic-gradient(from var(--kh-angle), transparent 0 60%, var(--kh-bad) 75%, var(--kh-warn) 88%, transparent 100%);
}

@keyframes kh-spin {
    to {
        --kh-angle: 360deg;
    }
}

.kh-console-inner {
    position: relative;
    padding: 20px;
    border-radius: 17px;
    background:
        linear-gradient(rgba(120, 190, 255, 0.05) 1px, transparent 1px) 0 0 / 100% 4px,
        linear-gradient(160deg, #0b1729, #060e1a);
}

.kh-console-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.kh-led {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--kh-g);
    box-shadow: 0 0 10px var(--kh-g);
    animation: kh-blink 1.6s ease-in-out infinite;
}

.kh[data-state="no"] .kh-led {
    background: var(--kh-bad);
    box-shadow: 0 0 10px var(--kh-bad);
}

@keyframes kh-blink {
    50% {
        opacity: 0.35;
    }
}

.kh-tag {
    margin-left: auto;
    padding: 4px 8px;
    border: 1px solid var(--kh-line-strong);
    border-radius: 6px;
    font: 500 0.68rem/1 var(--kh-mono);
    color: var(--kh-mut);
}

.kh-readout {
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid var(--kh-line);
    border-radius: 14px;
    background: radial-gradient(400px 140px at 50% 0%, rgba(61, 220, 132, 0.14), transparent 70%), rgba(2, 8, 16, 0.6);
    text-align: center;
}

.kh[data-state="no"] .kh-readout {
    background: radial-gradient(400px 140px at 50% 0%, rgba(255, 92, 122, 0.14), transparent 70%), rgba(2, 8, 16, 0.6);
}

.kh-readout-label {
    display: block;
    margin-bottom: 4px;
    font: 600 0.7rem/1 var(--kh-mono);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--kh-mut);
}

.kh-readout-value {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
}

.kh-readout-value b {
    display: inline-block;
    font: 800 3.6rem/1 var(--kh-mono);
    letter-spacing: -0.04em;
    color: #fff;
    text-shadow: 0 0 24px rgba(61, 220, 132, 0.55);
}

.kh[data-state="no"] .kh-readout-value b {
    text-shadow: 0 0 24px rgba(255, 92, 122, 0.55);
}

.kh-readout-value small {
    font: 600 1.1rem/1 var(--kh-mono);
    color: var(--kh-g);
}

.kh-meter {
    --kh-fill: 0%;
    --kh-meter-c: var(--kh-g);
    margin-bottom: 14px;
}

.kh-meter[data-level="warn"] {
    --kh-meter-c: var(--kh-warn);
}

.kh-meter[data-level="bad"] {
    --kh-meter-c: var(--kh-bad);
}

.kh-meter-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 7px;
    font-size: 0.8rem;
    color: var(--kh-mut);
}

.kh-meter-row b {
    font: 700 0.85rem/1.2 var(--kh-mono);
    color: var(--kh-meter-c);
    transition: color 0.3s ease;
}

.kh-meter-bar {
    position: relative;
    height: 10px;
    border-radius: 999px;
    background:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 2px, transparent 2px 10%),
        rgba(2, 8, 16, 0.8);
    border: 1px solid var(--kh-line);
    overflow: hidden;
}

.kh-meter-bar::after {
    content: "";
    position: absolute;
    top: -3px;
    bottom: -3px;
    left: 80%;
    width: 1px;
    background: rgba(255, 181, 71, 0.6);
}

.kh-meter-bar i {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--kh-fill);
    border-radius: inherit;
    background:
        repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.18) 0 6px, transparent 6px 12px),
        linear-gradient(90deg, color-mix(in srgb, var(--kh-meter-c) 55%, transparent), var(--kh-meter-c));
    background-size: 24px 100%, 100% 100%;
    box-shadow: 0 0 14px var(--kh-meter-c);
    transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
    animation: kh-stripes 1s linear infinite;
}

@keyframes kh-stripes {
    to {
        background-position: 24px 0, 0 0;
    }
}

.kh-results {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 18px;
}

.kh-k {
    padding: 11px 12px;
    border: 1px solid var(--kh-line);
    border-radius: 10px;
    background: rgba(2, 8, 16, 0.55);
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.kh-k:hover {
    border-color: rgba(34, 211, 238, 0.4);
    transform: translateY(-2px);
}

.kh-k b {
    display: inline-block;
    font: 700 1.15rem/1.2 var(--kh-mono);
    color: #fff;
}

.kh-k span {
    display: block;
    margin-top: 3px;
    font-size: 0.72rem;
    color: var(--kh-mut);
}

.kh-flash {
    animation: kh-flash 0.6s ease;
}

@keyframes kh-flash {
    0% {
        color: var(--kh-c);
        text-shadow: 0 0 14px var(--kh-c);
        transform: translateY(-3px);
    }
}

.kh-st {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.45;
    animation: khx-rise 0.4s ease both;
}

.kh-st-dot {
    flex: none;
    width: 9px;
    height: 9px;
    margin-top: 5px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 10px currentColor;
}

.kh-ok {
    color: var(--kh-g);
    background: rgba(61, 220, 132, 0.1);
    border: 1px solid rgba(61, 220, 132, 0.35);
}

.kh-no {
    color: var(--kh-bad);
    background: rgba(255, 92, 122, 0.1);
    border: 1px solid rgba(255, 92, 122, 0.35);
}

/* table */

.kh-table-card {
    margin-top: 18px;
}

.kh-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--kh-line);
    border-radius: 12px;
}

body.kh-page .kh table {
    width: 100%;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    font: 500 0.85rem/1.3 var(--kh-mono);
    white-space: nowrap;
}

body.kh-page .kh th,
body.kh-page .kh td {
    padding: 10px 14px;
    border: 0;
    border-bottom: 1px solid var(--kh-line);
    text-align: right;
}

body.kh-page .kh th {
    position: sticky;
    top: 0;
    background: #0a1524;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--kh-mut);
}

body.kh-page .kh th:first-child,
body.kh-page .kh td:first-child {
    text-align: left;
}

body.kh-page .kh tbody tr {
    transition: background 0.2s ease;
}

body.kh-page .kh tbody tr:hover {
    background: rgba(34, 211, 238, 0.06);
}

body.kh-page .kh tbody tr:last-child td {
    border-bottom: 0;
}

body.kh-page .kh tr.kh-rec td {
    background: rgba(61, 220, 132, 0.12);
    color: #fff;
    font-weight: 700;
}

body.kh-page .kh tr.kh-rec td:first-child {
    box-shadow: inset 3px 0 0 var(--kh-g);
}

body.kh-page .kh tr.kh-sel:not(.kh-rec) td:first-child {
    box-shadow: inset 3px 0 0 var(--kh-c);
}

.kh .kh-bad {
    color: var(--kh-bad);
}

.kh .kh-good {
    color: var(--kh-g);
}

.kh-note {
    margin: 14px 0 0;
    font-size: 0.78rem;
    line-height: 1.6;
    color: var(--kh-mut);
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
    .kh-layout,
    .khx-intro {
        grid-template-columns: 1fr;
    }

    .kh-console {
        position: relative;
        top: 0;
    }

    .khx-steps {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .khx-hero {
        min-height: 0;
        padding: 4.5rem 1.2rem 3.5rem;
    }

    .khx-section {
        padding-top: 3.2rem;
    }

    .kh-grid,
    .khx-steps {
        grid-template-columns: 1fr;
    }

    .kh-card,
    .kh-console-inner {
        padding: 16px;
    }

    .kh-readout-value b {
        font-size: 3rem;
    }

    .khx-cta {
        margin: 3.2rem 1rem 3.5rem;
        padding: 2.2rem 1.2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kh *,
    .kh *::before,
    .kh *::after,
    [class^="khx-"],
    [class^="khx-"]::before,
    [class^="khx-"]::after,
    .khx-wire path {
        animation: none !important;
        transition: none !important;
    }
}
