:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #687386;
  --line: #dce2ea;
  --paper: #f4f6f8;
  --white: #fff;
  --accent: #ff5a36;
  --accent-dark: #d93e20;
  --green: #15956b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

.brand { color: inherit; text-decoration: none; display: flex; gap: 12px; align-items: center; font-weight: 750; }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  color: white; background: var(--ink); border-radius: 9px; font-family: Georgia, serif;
}
.status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px #15956b1a; }

main { max-width: 1200px; margin: 0 auto; padding: 48px 28px 80px; }
.hero { padding: 54px 0 70px; border-top: 1px solid var(--line); position: relative; }
.hero::after {
  content: ""; position: absolute; right: 3%; top: 22px; width: 260px; height: 260px;
  border: 1px solid #cfd6df; border-radius: 50%; box-shadow: inset 0 0 0 45px var(--paper), inset 0 0 0 46px #d9dee6;
  opacity: .75;
}
.eyebrow, .label { margin: 0 0 14px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .15em; }
h1 { max-width: 820px; margin: 0; font-size: clamp(48px, 8vw, 94px); letter-spacing: -.065em; line-height: .92; position: relative; z-index: 1; }
h1 span { color: var(--accent); }
.lead { max-width: 650px; margin: 30px 0 24px; color: var(--muted); font-size: 18px; line-height: 1.75; position: relative; z-index: 1; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; position: relative; z-index: 1; }
.hero-meta span { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: #ffffff80; color: #485365; font-size: 13px; }

.grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(330px, .7fr); gap: 20px; align-items: start; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: 0 18px 50px #24334d0a; }
.panel-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
h2 { margin: 0 0 24px; font-size: 27px; letter-spacing: -.035em; }
.auth-box { border: 1px dashed #b8c2cf; background: #fafbfc; padding: 20px; border-radius: 14px; }
.auth-box label, .field label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 750; }
.auth-box p, .api-card p { color: var(--muted); line-height: 1.65; font-size: 14px; }
.key-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }

input, textarea, select {
  width: 100%; color: var(--ink); background: white; border: 1px solid #cbd3de;
  border-radius: 11px; outline: none; padding: 12px 13px; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 160px; line-height: 1.65; }
input:focus, textarea:focus, select:focus { border-color: var(--ink); box-shadow: 0 0 0 3px #11182710; }
button { border: 0; border-radius: 10px; padding: 11px 16px; color: white; background: var(--ink); font-weight: 750; }
button:hover { transform: translateY(-1px); }
.ghost { color: var(--ink); background: #edf0f4; }
.primary { width: 100%; margin-top: 4px; padding: 14px 18px; background: var(--accent); }
.primary:hover { background: var(--accent-dark); }
.field { margin-top: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field small { display: block; text-align: right; margin-top: 6px; color: var(--muted); }
.result { min-height: 22px; margin: 12px 0 0; font-size: 14px; }
.result.ok { color: var(--green); }
.result.error { color: #c12f2f; }

.api-card { background: var(--ink); color: white; }
.api-card .label { color: #ff9b83; }
.api-card h2 { color: white; }
.api-card p { color: #aeb8c7; }
.endpoint { display: flex; gap: 10px; align-items: center; margin: 22px 0 12px; padding: 11px 12px; border: 1px solid #384255; border-radius: 10px; }
.endpoint span { color: #ff9b83; font-size: 11px; font-weight: 850; }
.endpoint code { overflow-wrap: anywhere; }
pre { overflow: auto; margin: 0; padding: 16px; border-radius: 12px; background: #090e17; color: #cbd6e5; font-size: 12px; line-height: 1.65; }
.audiences { display: grid; gap: 8px; margin-top: 20px; color: #aeb8c7; font-size: 13px; }
.audiences strong { color: white; margin-bottom: 4px; }
.audiences b { display: inline-block; min-width: 64px; color: #ff9b83; }

.history { margin-top: 20px; }
.history-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.history-item { display: grid; grid-template-columns: 110px minmax(0, 1fr) 150px; gap: 16px; padding: 16px; background: white; align-items: center; }
.history-item strong { display: block; margin-bottom: 5px; }
.history-item p { margin: 0; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { width: fit-content; padding: 5px 9px; border-radius: 999px; color: var(--green); background: #e8f7f1; font-size: 12px; font-weight: 750; }
.badge.failed { color: #b42318; background: #feeceb; }
.time { color: var(--muted); font-size: 12px; text-align: right; }
.empty { padding: 30px; color: var(--muted); text-align: center; background: white; }
.hidden { display: none !important; }
footer { padding: 24px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 12px; }

.site-nav { display: flex; align-items: center; gap: 20px; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 650; }
.nav-button { padding: 8px 14px; border-radius: 999px; font-size: 13px; }
.blog-hero {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  align-items: end; gap: 50px; padding: 70px 0 84px; border-top: 1px solid var(--line);
}
.blog-hero h1 { font-size: clamp(52px, 7vw, 88px); }
.blog-hero .lead { margin: 0 0 5px; }
.blog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.section-title { display: flex; justify-content: space-between; align-items: end; margin-bottom: 18px; }
.section-title h2 { margin-bottom: 0; }
.count { color: var(--muted); font-size: 13px; padding-bottom: 5px; }
.feed { display: grid; gap: 18px; }
.post-card {
  background: var(--white); border: 1px solid var(--line); border-radius: 22px;
  padding: clamp(22px, 4vw, 38px); box-shadow: 0 18px 50px #24334d08;
}
.post-card h2 { margin: 18px 0 22px; font-size: clamp(27px, 4vw, 38px); line-height: 1.15; }
.post-meta { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 12px; }
.post-meta span { color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.post-foot { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.markdown-body { color: #344054; font-size: 16px; line-height: 1.78; overflow-wrap: anywhere; }
.markdown-body > :first-child { margin-top: 0; }
.markdown-body > :last-child { margin-bottom: 0; }
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 {
  margin: 1.35em 0 .55em; color: var(--ink); letter-spacing: -.025em; line-height: 1.25;
}
.markdown-body h1 { font-size: 27px; }
.markdown-body h2 { font-size: 23px; }
.markdown-body h3 { font-size: 19px; }
.markdown-body pre {
  padding: 18px; border-radius: 13px; background: #111827; color: #d8e0ec;
  overflow: auto; line-height: 1.65; font-size: 13px;
}
.markdown-body code { padding: 2px 6px; border-radius: 5px; background: #eef1f5; color: #d23f22; font-size: .9em; }
.markdown-body pre code { padding: 0; background: transparent; color: inherit; }
.markdown-body blockquote { margin: 20px 0; padding: 2px 0 2px 18px; border-left: 3px solid var(--accent); color: #596579; }
.markdown-body a { color: #d94829; text-underline-offset: 3px; }
.markdown-body table { width: 100%; border-collapse: collapse; font-size: 14px; }
.markdown-body th, .markdown-body td { padding: 9px 10px; border: 1px solid var(--line); text-align: left; }
.blog-sidebar { position: sticky; top: 20px; display: grid; gap: 16px; }
.side-card { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); }
.side-card.dark { background: var(--ink); color: white; border-color: var(--ink); }
.side-card h3 { margin: 0 0 12px; font-size: 21px; }
.side-card p:not(.label) { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.side-card.dark p:not(.label) { color: #b3bdcb; }
.mini-status { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); color: var(--green); font-size: 12px; font-weight: 750; }
.mini-status i { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--green); }
.skeleton { height: 260px; background: linear-gradient(100deg, #fff 20%, #f0f2f5 50%, #fff 80%); background-size: 240% 100%; animation: shine 1.3s infinite; }
@keyframes shine { to { background-position-x: -240%; } }
.feed-empty { padding: 60px 24px; border: 1px dashed #bec7d2; border-radius: 18px; color: var(--muted); text-align: center; }
.pagination {
  display: flex; justify-content: center; align-items: center; flex-wrap: wrap;
  gap: 8px; margin-top: 24px;
}
.page-button {
  min-width: 39px; height: 39px; padding: 0 12px; color: var(--ink);
  background: white; border: 1px solid var(--line); border-radius: 10px;
}
.page-button.current { color: white; background: var(--ink); border-color: var(--ink); }
.page-button:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.pagination span { color: var(--muted); padding: 0 3px; }
.console-panel { margin-top: 64px; scroll-margin-top: 24px; }
.history-block { margin-top: 34px; padding-top: 28px; border-top: 1px solid var(--line); }
.section-title.compact { align-items: center; }
.section-title.compact h3 { margin: 0; }
.checks { display: grid; align-content: center; gap: 12px; }
.checks label { display: flex; align-items: center; gap: 9px; margin: 0; font-weight: 650; }
.checks input { width: 17px; height: 17px; padding: 0; accent-color: var(--accent); }
.api-strip {
  display: grid; grid-template-columns: 1fr minmax(350px, .8fr); gap: 30px;
  margin-top: 64px; padding: 34px; border: 1px solid var(--line); border-radius: 22px; background: #fff;
}
.api-strip h2 { margin-bottom: 13px; }
.api-strip p:not(.label) { margin: 0; color: var(--muted); line-height: 1.7; }
.api-strip pre { margin: 0; }

@media (max-width: 820px) {
  .topbar { height: 62px; padding: 0 18px; }
  .status { font-size: 0; }
  main { padding: 26px 16px 60px; }
  .hero { padding: 40px 0 50px; }
  .hero::after { width: 140px; height: 140px; opacity: .35; }
  h1 { font-size: clamp(48px, 15vw, 68px); }
  .lead { font-size: 16px; }
  .grid { grid-template-columns: 1fr; }
  .panel { padding: 20px; border-radius: 17px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .key-row { grid-template-columns: 1fr; }
  .history-item { grid-template-columns: 90px 1fr; }
  .history-item .time { display: none; }
  .site-nav a { display: none; }
  .blog-hero { grid-template-columns: 1fr; gap: 26px; padding: 46px 0 54px; }
  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar { position: static; grid-template-columns: 1fr; }
  .post-card { border-radius: 17px; }
  .post-meta { display: grid; gap: 5px; }
  .api-strip { grid-template-columns: 1fr; padding: 22px; margin-top: 42px; }
}
