:root {
    --ink: #122019;
    --muted: #65736b;
    --paper: #f6f8f3;
    --surface: #ffffff;
    --line: #dfe7df;
    --green: #1d7148;
    --green-strong: #115b39;
    --lime: #c9f06b;
    --navy: #11251d;
    --orange: #ff8f5a;
    --shadow: 0 24px 70px rgba(22, 51, 38, 0.10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    background:
        radial-gradient(circle at 85% 8%, rgba(201, 240, 107, 0.35), transparent 24rem),
        var(--paper);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

a { color: inherit; }

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

.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 38px;
    margin-right: 7px;
    color: var(--lime);
    background: var(--navy);
    border-radius: 12px 4px 12px 4px;
    font-size: 17px;
    letter-spacing: -0.02em;
}

.brand-name { color: var(--green); }

.header-actions { display: flex; align-items: center; gap: 24px; }

.nav-link {
    color: var(--green-strong);
    font-size: 14px;
    font-weight: 700;
    text-underline-offset: 4px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--muted);
    background: rgba(255,255,255,.72);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #d2a22d;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(210,162,45,.13);
}

.status-badge.is-online .status-dot { background: #39a76a; box-shadow: 0 0 0 4px rgba(57,167,106,.13); }
.status-badge.is-offline .status-dot { background: #dc5d55; box-shadow: 0 0 0 4px rgba(220,93,85,.13); }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.hero {
    min-height: 620px;
    padding: 80px 0 96px;
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    align-items: center;
    gap: 76px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--green);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

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

h1 {
    max-width: 720px;
    margin-bottom: 24px;
    font-size: clamp(48px, 6vw, 78px);
    line-height: .98;
    letter-spacing: -.065em;
}

h1 span { color: var(--green); }

.hero-description {
    max-width: 680px;
    margin-bottom: 34px;
    color: var(--muted);
    font-size: 19px;
}

.hero-links { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 44px; }

.primary-link, .secondary-link {
    min-height: 50px;
    padding: 13px 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    font-weight: 800;
    text-decoration: none;
}

.primary-link { color: white; background: var(--green); box-shadow: 0 14px 32px rgba(29,113,72,.22); }
.primary-link:hover { background: var(--green-strong); transform: translateY(-1px); }
.secondary-link { border: 1px solid #cbd7cd; background: rgba(255,255,255,.55); }

.hero-stats { display: flex; gap: 38px; margin: 0; }
.hero-stats div { display: grid; gap: 2px; }
.hero-stats dt { font-size: 24px; font-weight: 850; }
.hero-stats dd { margin: 0; color: var(--muted); font-size: 12px; }

.route-card {
    overflow: hidden;
    color: #e7f2ea;
    background: var(--navy);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 24px;
    box-shadow: 0 34px 85px rgba(13,38,27,.25);
    transform: rotate(1.25deg);
}

.window-bar {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 7px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.window-bar span { width: 9px; height: 9px; border-radius: 50%; background: #ff7c64; }
.window-bar span:nth-child(2) { background: #ffce62; }
.window-bar span:nth-child(3) { background: #60cf83; }
.window-bar p { margin: 0 0 0 auto; color: #8fa59a; font: 12px ui-monospace, monospace; }

.route-line { padding: 24px 24px 12px; display: flex; align-items: center; gap: 12px; }
.route-line code { font-size: 14px; color: #dce9df; }
.method { padding: 5px 8px; color: var(--navy); background: var(--lime); border-radius: 7px; font-size: 11px; font-weight: 900; }

.route-card pre { margin: 0; padding: 18px 24px 28px; color: #dce9df; font: 14px/1.8 ui-monospace, SFMono-Regular, Consolas, monospace; }
.json-key { color: #8dd5b0; }
.json-value { color: #ffd399; }
.response-line { padding: 17px 24px; display: flex; align-items: center; gap: 10px; color: #9caf9f; background: rgba(0,0,0,.17); font-size: 12px; }
.response-code { color: #08170f; background: #76da99; border-radius: 6px; padding: 3px 7px; font-weight: 900; }
.response-time { margin-left: auto; }

.practice-section, .learn-section { padding: 92px 0; border-top: 1px solid var(--line); }
.section-heading { margin-bottom: 34px; display: flex; align-items: end; justify-content: space-between; gap: 44px; }
.section-heading h2, .profile-card h2 { margin-bottom: 0; font-size: clamp(34px, 4vw, 50px); letter-spacing: -.045em; }
.section-heading > p { max-width: 520px; margin-bottom: 5px; color: var(--muted); }

.practice-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 20px; }
.form-card, .result-card, .profile-card, .scenario-grid article { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.form-card, .result-card { min-height: 510px; border-radius: 22px; }
.form-card { overflow: hidden; }

.tabs { padding: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #eef2ec; }
.tab { padding: 12px 14px; color: var(--muted); background: transparent; border: 0; border-radius: 11px; cursor: pointer; font-weight: 800; }
.tab.is-active { color: var(--ink); background: white; box-shadow: 0 4px 14px rgba(18,32,25,.07); }

.tab-panel { padding: 30px; }
form { display: grid; gap: 18px; }
label { display: grid; gap: 8px; font-size: 13px; font-weight: 800; }
label small { color: var(--muted); font-size: 11px; font-weight: 500; }
input {
    width: 100%;
    padding: 13px 14px;
    color: var(--ink);
    background: #fbfcfa;
    border: 1px solid #cfd9d0;
    border-radius: 11px;
    outline: none;
}
input:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(29,113,72,.1); }

.form-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.submit-button, .example-button, #copy-token, .danger-button {
    min-height: 46px;
    padding: 11px 15px;
    border: 0;
    border-radius: 11px;
    cursor: pointer;
    font-weight: 800;
}
.submit-button { flex: 1; color: white; background: var(--green); }
.submit-button:hover { background: var(--green-strong); }
.submit-button:disabled { opacity: .6; cursor: wait; }
.example-button, #copy-token { color: var(--green-strong); background: #eaf3ec; }

.result-card { overflow: hidden; color: #dfeae3; background: var(--navy); border-color: var(--navy); box-shadow: 0 24px 70px rgba(17,37,29,.18); }
.result-header { padding: 24px 26px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,.08); }
.result-label { margin-bottom: 4px; color: #84998e; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.result-header h3 { margin: 0; font-size: 18px; }
.http-status { padding: 6px 9px; color: #9caf9f; background: rgba(255,255,255,.06); border-radius: 7px; font: 11px ui-monospace, monospace; }
.http-status.is-success { color: #7fe3a1; }
.http-status.is-error { color: #ff9b8f; }
.result-card pre { min-height: 405px; margin: 0; padding: 26px; overflow: auto; color: #cbe5d4; font: 13px/1.75 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }

.profile-card { margin: 10px 0 90px; padding: 34px; border-radius: 22px; }
.profile-card > div:first-child { margin-bottom: 26px; }
.profile-card > div:first-child p:last-child { margin: 10px 0 0; color: var(--muted); }
.profile-data { margin: 0 0 26px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.profile-data div { padding: 16px; background: #f2f5f0; border-radius: 12px; }
.profile-data dt { margin-bottom: 5px; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.profile-data dd { margin: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 800; }
.token-row { display: flex; align-items: center; gap: 10px; }
.token-row code { flex: 1; min-width: 0; overflow: hidden; padding: 12px 14px; color: #b9dfc8; background: var(--navy); border-radius: 10px; text-overflow: ellipsis; white-space: nowrap; }
.danger-button { color: #9c302d; background: #ffebe8; }

.scenario-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.scenario-grid article { padding: 25px; border-radius: 18px; box-shadow: none; }
.scenario-grid span { display: inline-grid; place-items: center; min-width: 46px; height: 31px; margin-bottom: 30px; color: var(--green-strong); background: #e6f1e8; border-radius: 8px; font: 800 12px ui-monospace, monospace; }
.scenario-grid article:nth-child(2) span, .scenario-grid article:nth-child(4) span { color: #9b4931; background: #fff0e8; }
.scenario-grid h3 { margin-bottom: 9px; font-size: 16px; }
.scenario-grid p { margin: 0; color: var(--muted); font-size: 13px; }

footer {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 34px 0 42px;
    display: flex;
    align-items: center;
    gap: 28px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    font-size: 12px;
}
.footer-brand { font-size: 18px; }
.footer-brand .brand-mark { width: 36px; height: 29px; border-radius: 9px 3px 9px 3px; font-size: 13px; }
footer p { margin: 0; }
footer p:last-child { margin-left: auto; }

.toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 10;
    max-width: min(380px, calc(100% - 44px));
    padding: 13px 16px;
    color: white;
    background: var(--navy);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px;
    box-shadow: var(--shadow);
    font-size: 13px;
}

@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; gap: 54px; padding-top: 52px; }
    .route-card { max-width: 640px; transform: none; }
    .practice-grid { grid-template-columns: 1fr; }
    .section-heading { align-items: start; flex-direction: column; gap: 10px; }
    .profile-data, .scenario-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
    .site-header, main, footer { width: min(100% - 24px, 1180px); }
    .site-header { padding-top: 15px; }
    .status-badge { display: none; }
    .header-actions { gap: 12px; }
    .hero { min-height: auto; padding: 54px 0 74px; }
    h1 { font-size: 47px; }
    .hero-description { font-size: 16px; }
    .hero-stats { gap: 22px; }
    .route-card pre { font-size: 12px; }
    .practice-section, .learn-section { padding: 68px 0; }
    .tab-panel { padding: 22px; }
    .profile-card { padding: 24px; }
    .profile-data, .scenario-grid { grid-template-columns: 1fr; }
    .token-row { align-items: stretch; flex-direction: column; }
    footer { align-items: flex-start; flex-direction: column; gap: 10px; }
    footer p:last-child { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}

