:root {
  color: #172033;
  background: #f7f8fb;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", sans-serif;
  font-synthesis: none;
  --ink: #172033;
  --muted: #647085;
  --line: #e0e5ec;
  --red: #c83c35;
  --red-dark: #a92c27;
  --navy: #101828;
  --green: #087f5b;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; min-width: 320px; background: #f7f8fb; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }

.topbar {
  position: sticky; top: 0; z-index: 20; min-height: 70px; padding: 10px max(22px, calc((100vw - 1180px) / 2));
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 36px;
  border-bottom: 1px solid rgba(218, 223, 231, .9); background: rgba(255, 255, 255, .94); backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; white-space: nowrap; }
.brand img { width: 108px; display: block; }
.brand span { padding-left: 14px; border-left: 1px solid #d9dde5; color: #526077; font-size: 13px; font-weight: 750; }
.topnav { display: flex; align-items: center; gap: 25px; }
.topnav a { color: #4b5870; font-size: 13px; font-weight: 700; text-decoration: none; }
.topnav a:hover { color: var(--red); }
.account { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.account-identity { display: flex; align-items: center; gap: 8px; max-width: 190px; }
.account-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.account-avatar, .account-fallback { width: 32px; height: 32px; flex: 0 0 auto; border-radius: 50%; }
.account-avatar { object-fit: cover; }
.account-fallback { display: grid; place-items: center; background: #eceff4; color: #617087; font-size: 12px; font-weight: 800; }
.header-login, .logout-button { min-height: 36px; padding: 0 13px; border: 1px solid #d6dce5; border-radius: 8px; background: #fff; color: #3d4960; font-size: 12px; font-weight: 800; text-decoration: none; }
.header-login { display: grid; place-items: center; border-color: #06c755; color: #05813a; }
.logout-button:hover { border-color: #abb4c2; }

main { max-width: 1180px; margin: 0 auto; padding: 0 22px 90px; }
.hero { min-height: 580px; display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); align-items: center; gap: 70px; padding: 78px 0 84px; }
.hero-copy, .hero-code { min-width: 0; }
.eyebrow { margin: 0 0 10px; color: var(--red); font-size: 11px; font-weight: 900; letter-spacing: .14em; }
.hero h1 { margin: 0; color: var(--ink); font-size: clamp(38px, 4.4vw, 58px); line-height: 1.18; letter-spacing: -.045em; }
.lead { max-width: 570px; margin: 25px 0 0; color: #59677d; font-size: 16px; line-height: 1.95; }
.hero-actions { display: flex; gap: 12px; margin-top: 31px; }
.primary-link, .secondary-link { min-height: 48px; padding: 0 21px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; font-size: 14px; font-weight: 850; text-decoration: none; }
.primary-link { background: var(--red); color: #fff; box-shadow: 0 8px 24px rgba(200, 60, 53, .2); }
.primary-link:hover { background: var(--red-dark); }
.secondary-link { border: 1px solid #d9dee7; background: #fff; color: #354158; }

.hero-code { width: 100%; max-width: 100%; overflow: hidden; border: 1px solid #29344a; border-radius: 15px; background: var(--navy); color: #e8edf5; box-shadow: 0 24px 60px rgba(18, 27, 45, .22); transform: rotate(.5deg); }
.code-title { min-height: 46px; padding: 0 17px; display: flex; align-items: center; gap: 7px; border-bottom: 1px solid #293349; background: #141e31; }
.code-title i { width: 8px; height: 8px; border-radius: 50%; background: #455168; }
.code-title i:first-child { background: #d9625b; }.code-title i:nth-child(2) { background: #d8a344; }.code-title i:nth-child(3) { background: #46ad7b; }
.code-title span { margin-left: auto; color: #8f9bb0; font: 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.hero-code pre { margin: 0; padding: 27px; overflow: auto; font: 12px/1.85 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.code-muted { color: #8490a5; }.code-key { color: #95c9ff; }.code-value { color: #a7e3bd; }
.code-result { min-height: 68px; padding: 13px 20px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid #2c384e; background: #111b2d; }
.code-result span { padding: 4px 7px; border-radius: 5px; background: rgba(55, 181, 121, .15); color: #79d7a7; font: 10px ui-monospace, monospace; }
.code-result strong { font-size: 12px; }

.section { padding: 70px 0; border-top: 1px solid var(--line); }
.section-heading { margin-bottom: 28px; display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
.section-heading h2 { margin: 0; font-size: 31px; letter-spacing: -.03em; }
.section-heading > p { max-width: 520px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; text-align: right; }
.card { border: 1px solid #dfe4ec; border-radius: 13px; background: #fff; box-shadow: 0 7px 24px rgba(31, 43, 65, .045); }
.auth-state { min-height: 122px; padding: 25px 28px; display: flex; align-items: center; gap: 20px; }
.auth-state h3, .key-toolbar h3 { margin: 0; font-size: 17px; }
.auth-state p, .key-toolbar p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.spinner { width: 27px; height: 27px; flex: 0 0 auto; border: 3px solid #e7e9ee; border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.login-mark { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: #f2f5f9; color: var(--red); font: 900 20px Georgia, serif; }
.line-login { min-height: 45px; margin-left: auto; padding: 0 20px; display: grid; place-items: center; border-radius: 8px; background: #06c755; color: #fff; font-size: 13px; font-weight: 850; text-decoration: none; white-space: nowrap; }

.key-toolbar { padding: 26px 28px; display: grid; grid-template-columns: minmax(260px, .9fr) minmax(360px, 1.1fr); align-items: end; gap: 40px; }
#key-form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; }
#key-form label span { display: block; margin: 0 0 7px 2px; color: #59667b; font-size: 11px; font-weight: 800; }
#key-form input { width: 100%; height: 45px; padding: 0 13px; border: 1px solid #cfd6e0; border-radius: 8px; outline: none; }
#key-form input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(200, 60, 53, .1); }
.primary-button { min-height: 45px; padding: 0 18px; border: 0; border-radius: 8px; background: var(--red); color: #fff; font-size: 13px; font-weight: 850; }
.primary-button:hover { background: var(--red-dark); }.primary-button:disabled { opacity: .6; cursor: wait; }
.key-list-heading { margin: 28px 3px 10px; display: flex; justify-content: space-between; align-items: center; }
.key-list-heading h3 { margin: 0; font-size: 14px; }.key-list-heading span { color: #7d8798; font-size: 11px; }
.key-list { overflow: hidden; border: 1px solid #dfe4ec; border-radius: 12px; background: #fff; }
.key-row { min-height: 82px; padding: 15px 18px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 14px; border-bottom: 1px solid #e7eaf0; }
.key-row:last-child { border-bottom: 0; }
.key-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; background: #f0f3f7; color: #546176; font-size: 22px; }
.key-body { min-width: 0; }.key-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.key-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.key-title code { padding: 4px 7px; border-radius: 5px; background: #f3f5f8; color: #68758a; font: 10px ui-monospace, monospace; white-space: nowrap; }
.key-body p { margin: 7px 0 0; color: #8a93a2; font-size: 10px; }
.revoke-button { min-height: 34px; padding: 0 11px; border: 1px solid #e0c5c2; border-radius: 7px; background: #fff; color: #ad3933; font-size: 11px; font-weight: 800; }
.revoke-button:hover { background: #fff7f6; }.revoke-button:disabled { opacity: .5; }
.empty-keys { padding: 36px; text-align: center; }.empty-keys strong { font-size: 14px; }.empty-keys p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps article { min-height: 180px; padding: 25px; border: 1px solid #dfe4ec; border-radius: 12px; background: #fff; }
.steps article > span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; background: #f7e6e4; color: var(--red); font-size: 12px; font-weight: 900; }
.steps h3 { margin: 20px 0 8px; font-size: 16px; }.steps p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }

.docs-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 54px; align-items: start; }
.docs-nav { position: sticky; top: 100px; display: grid; border-left: 1px solid #d9dee6; }
.docs-nav a { padding: 8px 0 8px 16px; color: #6c7789; font-size: 12px; font-weight: 700; text-decoration: none; }
.docs-nav a:hover { color: var(--red); border-left: 2px solid var(--red); margin-left: -1px; }
.docs-content { min-width: 0; }.docs-content article { padding: 0 0 50px; margin: 0 0 50px; border-bottom: 1px solid var(--line); }
.docs-content article:last-child { border-bottom: 0; margin-bottom: 0; }
.docs-content h3 { margin: 0 0 15px; font-size: 22px; letter-spacing: -.02em; }
.docs-content p, .docs-content li { color: #59667a; font-size: 14px; line-height: 1.85; }
.docs-content code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.endpoint-title { margin-bottom: 18px; display: flex; align-items: center; gap: 11px; min-width: 0; }
.endpoint-title .method { padding: 5px 8px; border-radius: 5px; background: #dff4ea; color: #087653; font: 900 10px ui-monospace, monospace; }
.endpoint-title code { overflow-x: auto; color: #28354a; font-size: 13px; white-space: nowrap; }
.note { margin: 22px 0; padding: 17px 20px; border-left: 3px solid #dc984c; border-radius: 0 8px 8px 0; background: #fff9ef; }
.note strong { font-size: 13px; }.note p { margin: 5px 0 0; font-size: 12px; }
.code-block { position: relative; margin: 18px 0; overflow: hidden; border-radius: 10px; background: var(--navy); color: #e8edf5; }
.code-block pre { margin: 0; padding: 22px; overflow: auto; font: 12px/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.copy-code { position: absolute; top: 9px; right: 9px; min-height: 28px; padding: 0 9px; border: 1px solid #3a4559; border-radius: 6px; background: #202b3e; color: #bac3d1; font-size: 10px; font-weight: 800; }
.table-wrap { overflow-x: auto; border: 1px solid #dfe4eb; border-radius: 10px; background: #fff; }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th, td { padding: 12px 14px; border-bottom: 1px solid #e8ebf0; text-align: left; vertical-align: top; font-size: 12px; }
th { background: #f2f4f7; color: #606d80; font-size: 10px; letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; }td { color: #5d687a; }td:first-child { color: #27344a; }
.required { padding: 2px 5px; border-radius: 4px; background: #f8e5e3; color: #b63832; font-size: 9px; }
.rate-note { padding: 12px 15px; border-radius: 7px; background: #eef5ff; color: #426288 !important; font-size: 12px !important; }
.error-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border: 1px solid #e0e4eb; border-radius: 9px; background: #e0e4eb; }
.error-grid div { min-height: 55px; padding: 11px 13px; display: flex; align-items: center; gap: 11px; background: #fff; }
.error-grid strong { color: var(--red); font: 800 12px ui-monospace, monospace; }.error-grid span { color: #637084; font-size: 11px; }
.docs-content ul { padding-left: 21px; }.docs-content li + li { margin-top: 7px; }

footer { min-height: 112px; padding: 30px max(22px, calc((100vw - 1180px) / 2)); display: flex; align-items: center; gap: 14px; border-top: 1px solid #dde2e9; background: #fff; }
footer img { width: 94px; }footer span { padding-left: 14px; border-left: 1px solid #d6dbe3; color: #617087; font-size: 12px; font-weight: 750; }footer small { margin-left: auto; color: #8a94a4; }

dialog { width: min(600px, calc(100vw - 28px)); padding: 30px; border: 0; border-radius: 15px; color: var(--ink); box-shadow: 0 24px 80px rgba(15, 23, 42, .3); }
dialog::backdrop { background: rgba(16, 24, 40, .55); backdrop-filter: blur(3px); }
.dialog-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: #ddf5ea; color: var(--green); font-weight: 900; }
dialog h2 { margin: 17px 0 9px; font-size: 23px; }dialog > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.secret-value { margin: 20px 0 10px; padding: 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; border: 1px solid #cfd6e0; border-radius: 9px; background: #f7f8fa; }
.secret-value code { padding: 0 5px; overflow-x: auto; color: #27344a; font: 12px ui-monospace, monospace; white-space: nowrap; }
.secret-value button { min-height: 34px; padding: 0 11px; border: 1px solid #cfd5df; border-radius: 6px; background: #fff; color: #3d4a60; font-size: 11px; font-weight: 800; }
.secret-warning { color: #b13b35 !important; font-size: 11px !important; }.dialog-close { width: 100%; margin-top: 20px; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 50; max-width: 350px; padding: 12px 16px; border-radius: 8px; background: #222b3c; color: #fff; box-shadow: 0 12px 34px rgba(15, 23, 42, .24); font-size: 12px; }

@media (max-width: 820px) {
  .topbar { grid-template-columns: 1fr auto; gap: 14px; }.topnav { display: none; }
  .hero { width: 100%; max-width: 100%; min-height: 0; grid-template-columns: minmax(0, 1fr); gap: 45px; padding: 58px 0 68px; }.hero-code { transform: none; }
  .key-toolbar { grid-template-columns: 1fr; gap: 22px; }.docs-layout { grid-template-columns: 1fr; gap: 24px; }.docs-nav { position: static; display: flex; gap: 4px; overflow-x: auto; border: 0; }.docs-nav a { padding: 8px 11px; border: 1px solid #dce1e9; border-radius: 7px; background: #fff; white-space: nowrap; }.docs-nav a:hover { margin: 0; border-left: 1px solid #dce1e9; }
}

@media (max-width: 600px) {
  .topbar { min-height: 62px; padding: 9px 14px; }.brand { gap: 9px; }.brand img { width: 91px; }.brand span { padding-left: 9px; font-size: 9px; }.account-identity strong, .logout-button { display: none; }.account-avatar, .account-fallback { width: 30px; height: 30px; }
  main { padding: 0 14px 65px; }.hero { padding-top: 49px; }.hero h1 { font-size: 35px; overflow-wrap: anywhere; }.lead { font-size: 14px; }.hero-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }.hero-actions a { min-width: 0; padding-inline: 10px; }.hero-code pre { max-width: 100%; padding: 20px; font-size: 10px; }.code-result { align-items: flex-start; flex-direction: column; gap: 7px; }
  .section { padding: 52px 0; }.section-heading { align-items: flex-start; flex-direction: column; gap: 10px; }.section-heading h2 { font-size: 26px; }.section-heading > p { text-align: left; }
  .auth-state { padding: 21px; align-items: flex-start; flex-wrap: wrap; }.line-login { width: 100%; margin-left: 0; }.login-mark { width: 41px; height: 41px; }.auth-state > div:nth-child(2) { flex: 1; }
  .key-toolbar { padding: 21px; }#key-form { grid-template-columns: 1fr; }.primary-button { width: 100%; }.key-row { grid-template-columns: 34px minmax(0, 1fr); padding: 14px; }.key-icon { width: 34px; height: 34px; }.revoke-button { grid-column: 2; justify-self: start; }.key-title { align-items: flex-start; flex-direction: column; gap: 6px; }
  .steps { grid-template-columns: 1fr; }.steps article { min-height: 0; }.error-grid { grid-template-columns: 1fr; }.endpoint-title { align-items: flex-start; flex-direction: column; }.docs-content article { margin-bottom: 38px; padding-bottom: 38px; }
  footer { padding: 26px 14px; flex-wrap: wrap; }footer small { width: 100%; margin-left: 0; }.secret-value { grid-template-columns: 1fr; }.secret-value button { justify-self: start; }
  dialog { padding: 23px; }
}

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