:root {
    color-scheme: dark;
    --bg: #111217;
    --bg-deep: #0b0d13;
    --surface: #171920;
    --surface-soft: #1d2029;
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.18);
    --text: #f7f8fb;
    --muted: #999eab;
    --muted-strong: #c4c8d1;
    --accent: #75a7ff;
    --accent-soft: rgba(117, 167, 255, 0.13);
    --safe: #67d8a4;
    --danger: #ff7b8d;
    --wrap: 1180px;
    font-family:
        Pretendard,
        'Pretendard Variable',
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        'Malgun Gothic',
        sans-serif;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    min-width: 320px;
    margin: 0;
    background: var(--bg);
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    font-size: 16px;
    line-height: 1.6;
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(circle at 70% -10%, rgba(72, 102, 170, 0.16), transparent 36rem),
        linear-gradient(180deg, #111217 0%, #0d0f15 50%, #111217 100%);
    content: '';
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    font: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(117, 167, 255, 0.72);
    outline-offset: 3px;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

.wrap {
    width: min(100%, var(--wrap));
    margin-inline: auto;
    padding-inline: 28px;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 14px;
    z-index: 100;
    padding: 10px 14px;
    color: var(--bg);
    font-weight: 800;
    background: var(--text);
    border-radius: 8px;
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(17, 18, 23, 0.86);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(18px) saturate(120%);
}

.header-inner {
    display: flex;
    gap: 24px;
    align-items: center;
    min-height: 74px;
}

.brand {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 10px;
    align-items: center;
    font-size: 19px;
    font-weight: 850;
    letter-spacing: -0.025em;
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    place-items: center;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.site-nav {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-left: auto;
}

.site-nav a {
    padding: 8px 11px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 650;
    border-radius: 7px;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.header-button {
    padding: 8px 14px;
    color: #101218;
    font-size: 14px;
    font-weight: 800;
    background: var(--text);
    border-radius: 7px;
}

.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.55fr);
    gap: clamp(40px, 8vw, 110px);
    align-items: end;
    min-height: 650px;
    padding-top: 124px;
    padding-bottom: 100px;
    overflow: hidden;
}

.hero-pattern {
    position: absolute;
    top: 72px;
    right: -8%;
    width: min(60vw, 720px);
    height: 470px;
    pointer-events: none;
    opacity: 0.52;
    mask-image: radial-gradient(ellipse, black 18%, transparent 70%);
}

.hero-pattern::before,
.hero-pattern::after {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(117, 167, 255, 0.64) 1px, transparent 1.6px);
    background-size: 25px 25px;
    content: '';
    transform: perspective(420px) rotateX(58deg) rotateZ(-11deg) scale(1.18);
}

.hero-pattern::after {
    background-size: 50px 50px;
    opacity: 0.25;
    transform: perspective(420px) rotateX(58deg) rotateZ(17deg) scale(1.3);
}

.hero-pattern span {
    position: absolute;
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 999px;
    box-shadow: 0 0 24px 6px rgba(117, 167, 255, 0.34);
}

.hero-pattern span:nth-child(1) {
    top: 24%;
    left: 42%;
}

.hero-pattern span:nth-child(2) {
    top: 48%;
    left: 69%;
}

.hero-pattern span:nth-child(3) {
    top: 72%;
    left: 34%;
}

.hero-copy,
.runtime-card {
    position: relative;
    z-index: 1;
}

.eyebrow {
    margin-bottom: 17px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.15em;
    line-height: 1.3;
}

h1 {
    max-width: 900px;
    margin-bottom: 30px;
    font-size: clamp(52px, 6.7vw, 90px);
    line-height: 1.01;
    letter-spacing: -0.065em;
    word-break: keep-all;
}

h1 span {
    color: var(--muted-strong);
}

.hero-lede {
    max-width: 690px;
    margin-bottom: 28px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.85;
    word-break: keep-all;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-meta span,
.permanent-badge {
    padding: 5px 9px;
    color: var(--muted-strong);
    font-size: 11px;
    font-weight: 760;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.runtime-card {
    padding: 22px 0 0;
    border-top: 1px solid var(--line-strong);
}

.runtime-line {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 13px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #707582;
    border-radius: 999px;
    box-shadow: 0 0 0 4px rgba(112, 117, 130, 0.13);
}

.status-dot.ready {
    background: var(--safe);
    box-shadow: 0 0 0 4px rgba(103, 216, 164, 0.12);
}

.runtime-card strong {
    display: block;
    margin-bottom: 5px;
    font-size: 20px;
    letter-spacing: -0.02em;
}

.runtime-card small {
    color: var(--muted);
}

.account-section,
.workspace,
.docs {
    padding-top: 110px;
    padding-bottom: 110px;
}

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

.section-heading {
    max-width: 720px;
    margin-bottom: 48px;
}

h2 {
    margin-bottom: 17px;
    font-size: clamp(34px, 4.6vw, 58px);
    line-height: 1.1;
    letter-spacing: -0.055em;
    word-break: keep-all;
}

.section-description,
.tester-copy > p,
.docs-heading + p {
    color: var(--muted);
    font-size: 17px;
}

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

.access-card,
.tester-card,
.issued-key {
    border: 1px solid var(--line);
    background: rgba(23, 25, 32, 0.88);
}

.access-card {
    min-height: 430px;
    padding: clamp(24px, 4vw, 38px);
    border-radius: 16px;
}

.step-heading {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding-bottom: 27px;
    border-bottom: 1px solid var(--line);
}

.step-number {
    color: var(--accent);
    font:
        700 12px/1 ui-monospace,
        SFMono-Regular,
        Consolas,
        monospace;
}

.step-heading h3,
.issued-key h3 {
    margin-bottom: 5px;
    font-size: 22px;
    letter-spacing: -0.035em;
}

.step-heading p,
.account-state p,
.issued-key p,
.reissue-confirmation p,
.contract-grid p {
    margin-bottom: 0;
    color: var(--muted);
}

.account-state {
    padding-top: 28px;
}

.account-state > strong {
    display: block;
    margin-bottom: 7px;
    font-size: 17px;
}

.account-state > p {
    margin-bottom: 22px;
}

.success-state {
    display: flex;
    gap: 15px;
    align-items: center;
}

.success-mark {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    color: #07140e;
    font-weight: 900;
    background: var(--safe);
    border-radius: 50%;
    place-items: center;
}

.success-state strong {
    display: block;
}

.success-state p {
    margin: 2px 0 0;
}

.muted-state {
    color: var(--muted);
}

.turnstile-widget {
    min-height: 67px;
    margin: 22px 0 16px;
}

.inline-message {
    min-height: 24px;
    margin: 12px 0 0 !important;
    color: var(--danger) !important;
    font-size: 13px;
}

.button,
.secret-field button {
    display: inline-flex;
    min-height: 45px;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    color: var(--text);
    font-weight: 800;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    cursor: pointer;
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

.button.primary {
    color: #0c1320;
    background: var(--accent);
    border-color: var(--accent);
}

.button.subtle,
.secret-field button {
    background: rgba(255, 255, 255, 0.045);
}

.button.danger {
    color: #fff;
    background: #a92e42;
    border-color: #c9475c;
}

.button.full {
    width: 100%;
    margin-top: 12px;
}

.key-summary {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
    padding: 18px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: 10px;
}

.key-summary span:first-child {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.key-summary strong {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 15px;
    letter-spacing: 0.05em;
}

.permanent-badge {
    color: var(--accent);
    border-color: rgba(117, 167, 255, 0.28);
}

#key-created-at {
    margin: 12px 0 18px;
    color: var(--muted);
    font-size: 13px;
}

.reissue-confirmation {
    margin-top: 14px;
    padding: 18px;
    background: rgba(169, 46, 66, 0.09);
    border: 1px solid rgba(255, 123, 141, 0.25);
    border-radius: 10px;
}

.reissue-confirmation p {
    margin: 5px 0 15px;
    font-size: 13px;
}

.button-row {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.issued-key {
    display: grid;
    grid-template-columns: minmax(250px, 0.65fr) minmax(320px, 1fr);
    gap: 32px 48px;
    align-items: end;
    margin-top: 16px;
    padding: clamp(24px, 4vw, 38px);
    border-color: rgba(117, 167, 255, 0.32);
    border-radius: 16px;
}

.issued-key label,
.tester-card label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted-strong);
    font-size: 13px;
    font-weight: 760;
}

.secret-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 7px;
}

.secret-field input {
    min-width: 0;
    padding: 0 14px;
    color: var(--text);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    background: var(--bg-deep);
    border: 1px solid var(--line-strong);
    border-radius: 8px;
}

.text-button {
    grid-column: 2;
    width: fit-content;
    padding: 9px 0 0;
    color: var(--muted);
    background: none;
    border: 0;
    cursor: pointer;
}

.workspace {
    display: grid;
    grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
    gap: clamp(40px, 8vw, 110px);
    align-items: start;
    border-top: 1px solid var(--line);
}

.tester-copy {
    position: sticky;
    top: 112px;
}

.tester-copy ul {
    display: grid;
    gap: 8px;
    margin: 28px 0 0;
    padding: 24px 0 0;
    color: var(--muted-strong);
    list-style: none;
    border-top: 1px solid var(--line);
}

.tester-copy li::before {
    margin-right: 10px;
    color: var(--accent);
    content: '—';
}

.tester-card {
    padding: clamp(24px, 4vw, 38px);
    border-radius: 16px;
}

#moderation-text {
    width: 100%;
    min-height: 230px;
    padding: 16px;
    color: var(--text);
    line-height: 1.7;
    resize: vertical;
    background: var(--bg-deep);
    border: 1px solid var(--line-strong);
    border-radius: 9px;
}

#moderation-text:focus {
    border-color: var(--accent);
}

.input-meta,
.result-topline {
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.input-meta {
    margin: 8px 0 20px;
    color: var(--muted);
    font-size: 12px;
}

.tester-card > .button {
    width: 100%;
}

.result {
    margin-top: 18px;
    padding: 20px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: 10px;
}

.verdict {
    color: var(--safe);
    font-size: 18px;
    font-weight: 850;
}

.verdict.violation {
    color: var(--danger);
}

.result p,
.result small,
#result-confidence {
    color: var(--muted);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 12px 0;
}

.chips span {
    padding: 3px 8px;
    color: var(--accent);
    font-size: 12px;
    background: var(--accent-soft);
    border-radius: 999px;
}

.docs {
    border-top: 1px solid var(--line);
}

.docs-heading {
    display: flex;
    gap: 30px;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 40px;
}

.docs-heading h2 {
    margin-bottom: 0;
}

.docs-heading > code {
    color: var(--accent);
    font-size: 13px;
    white-space: nowrap;
}

pre {
    overflow-x: auto;
    margin: 0;
    padding: clamp(20px, 4vw, 32px);
    color: #d8e5ff;
    line-height: 1.75;
    background: #080a0f;
    border: 1px solid var(--line);
    border-radius: 12px;
}

code {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.contract-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 36px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.contract-grid article {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 5px 14px;
    padding: 24px;
    border-right: 1px solid var(--line);
}

.contract-grid article:last-child {
    border-right: 0;
}

.contract-grid article > span {
    grid-row: 1 / 3;
    color: var(--accent);
    font:
        700 11px/1.6 ui-monospace,
        SFMono-Regular,
        Consolas,
        monospace;
}

.contract-grid p {
    font-size: 13px;
}

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

footer {
    display: flex;
    justify-content: space-between;
    padding-top: 34px !important;
    padding-bottom: 46px !important;
    color: var(--muted);
    font-size: 13px;
    border-top: 1px solid var(--line);
}

@media (max-width: 840px) {
    .site-nav a:first-child {
        display: none;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 52px;
        min-height: auto;
        padding-top: 90px;
        padding-bottom: 74px;
    }

    .hero-pattern {
        right: -35%;
        width: 100vw;
    }

    .access-grid,
    .workspace,
    .issued-key {
        grid-template-columns: 1fr;
    }

    .tester-copy {
        position: static;
    }

    .text-button {
        grid-column: auto;
    }
}

@media (max-width: 600px) {
    .wrap {
        padding-inline: 18px;
    }

    .header-inner {
        gap: 12px;
        min-height: 66px;
    }

    .brand > span:last-child,
    .site-nav a:not(.active) {
        display: none;
    }

    .site-nav {
        margin-left: auto;
    }

    .site-nav a,
    .header-button {
        padding: 7px 9px;
        font-size: 12px;
    }

    h1 {
        font-size: clamp(42px, 13vw, 58px);
    }

    .hero-lede {
        font-size: 16px;
    }

    .account-section,
    .workspace,
    .docs {
        padding-top: 76px;
        padding-bottom: 76px;
    }

    .access-card {
        min-height: 0;
    }

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

    .secret-field input {
        grid-column: 1 / -1;
        min-height: 45px;
    }

    .button-row {
        flex-direction: column-reverse;
    }

    .docs-heading {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .contract-grid article {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .contract-grid article:last-child {
        border-bottom: 0;
    }

    footer {
        gap: 4px;
        flex-direction: column;
    }
}

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