/* Ksty.ch public pages: landing, docs, status. Local asset — no CDN (framework rule). */
:root {
  --bg: #f8fafc; --panel: #ffffff; --line: #e2e8f0; --ink: #0f172a; --muted: #64748b;
  --brand: #0369a1; --brand-dark: #075985; --brand-ink: #ffffff;
  --ok: #15803d; --warn: #b45309; --bad: #b91c1c; --code-bg: #0f172a; --code-ink: #e2e8f0;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; background: var(--bg); color: var(--ink); line-height: 1.55; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: #eef2f7; padding: .15rem .35rem; border-radius: 4px; font-size: .9em; }
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 1.25rem; }

/* header / footer */
.site-header { background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; height: 60px; }
.logo { font-size: 1.25rem; font-weight: 700; color: var(--ink); }
.logo span { color: var(--brand); }
.site-nav { display: flex; gap: 1.1rem; margin-left: auto; align-items: center; }
.site-nav a { color: var(--ink); font-size: .95rem; }
.btn { display: inline-block; padding: .55rem 1.1rem; border-radius: 8px; font-weight: 600; font-size: .95rem; border: 0; cursor: pointer; }
.btn.primary { background: var(--brand); color: var(--brand-ink) !important; }
.btn.primary:hover { background: var(--brand-dark); text-decoration: none; }
.btn.ghost { border: 1px solid var(--line); color: var(--ink) !important; background: var(--panel); }
.btn.ghost:hover { border-color: var(--brand); text-decoration: none; }
.site-footer { border-top: 1px solid var(--line); margin-top: 4rem; padding: 2rem 0; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; gap: 2rem; flex-wrap: wrap; justify-content: space-between; }

/* landing */
.hero { padding: 5rem 0 3.5rem; text-align: center; }
.hero h1 { font-size: 2.6rem; line-height: 1.15; margin: 0 0 1rem; letter-spacing: -.02em; }
.hero h1 em { color: var(--brand); font-style: normal; }
.hero p { color: var(--muted); font-size: 1.15rem; max-width: 620px; margin: 0 auto 2rem; }
.hero .cta { display: flex; gap: .8rem; justify-content: center; }
.hero-code { max-width: 640px; margin: 3rem auto 0; text-align: left; }
pre.code { background: var(--code-bg); color: var(--code-ink); border-radius: 12px; padding: 1.1rem 1.3rem; overflow-x: auto; font-size: .86rem; line-height: 1.5; margin: 0; }
pre.code .c { color: #64748b; } pre.code .g { color: #4ade80; } pre.code .b { color: #7dd3fc; }

.section { padding: 3rem 0 1rem; }
.section h2 { font-size: 1.6rem; margin: 0 0 .4rem; text-align: center; }
.section .sub { text-align: center; color: var(--muted); margin: 0 0 2rem; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.25rem; }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1.4rem; }
.feature .ico { font-size: 1.5rem; }
.feature h3 { margin: .6rem 0 .35rem; font-size: 1.05rem; }
.feature p { margin: 0; color: var(--muted); font-size: .92rem; }

.price { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1.5rem; text-align: center; }
.price .amount { font-size: 2rem; font-weight: 700; }
.price .name { color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; font-weight: 700; }
.price .bonus { color: var(--ok); font-size: .85rem; font-weight: 600; }

/* docs */
.docs-main { padding: 2.2rem 0; }
.docs-main h1 { font-size: 1.7rem; margin: 0 0 1rem; }
.doc-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem 1.4rem; margin-bottom: 1rem; }
.doc-card h3 { margin: 0 0 .25rem; }
.doc-card .meta { float: right; color: var(--muted); font-size: .85rem; }
.doc-card p { margin: .3rem 0 0; color: var(--muted); font-size: .93rem; }
.cat-h { color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; font-weight: 700; margin: 1.8rem 0 .7rem; }
.prose { max-width: 760px; }
.prose h1 { font-size: 1.7rem; } .prose h2 { font-size: 1.25rem; margin-top: 2rem; }
.prose pre { background: var(--code-bg); color: var(--code-ink); border-radius: 10px; padding: 1rem 1.2rem; overflow-x: auto; font-size: .86rem; }
.prose pre code { background: none; color: inherit; padding: 0; }
.endpoint { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem 1.4rem; margin-bottom: 1.25rem; }
.endpoint .sig { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.endpoint .sig .cost { margin-left: auto; color: var(--muted); font-size: .85rem; }
.method { display: inline-block; padding: .1rem .5rem; border-radius: 6px; font-size: .75rem; font-weight: 700; background: #eff6ff; color: var(--brand); }
.params { width: 100%; border-collapse: collapse; font-size: .9rem; margin-top: .8rem; }
.params th { text-align: left; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; padding: .4rem .5rem; border-bottom: 1px solid var(--line); }
.params td { padding: .45rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }

/* code sample tabs */
.tabs { margin-top: 1rem; }
.tabs .tab-btns { display: flex; gap: .3rem; }
.tabs .tab-btns button { border: 1px solid var(--line); border-bottom: 0; background: var(--bg); padding: .35rem .8rem; border-radius: 8px 8px 0 0; font-size: .82rem; cursor: pointer; color: var(--muted); }
.tabs .tab-btns button.active { background: var(--code-bg); color: var(--code-ink); border-color: var(--code-bg); }
.tabs pre.code { border-radius: 0 10px 10px 10px; display: none; }
.tabs pre.code.active { display: block; }

/* status */
.status-row { display: flex; align-items: center; gap: 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1.2rem; margin-bottom: .6rem; }
.status-row .name { font-weight: 600; }
.status-row .m { color: var(--muted); font-size: .85rem; margin-left: auto; }
.dot { width: 10px; height: 10px; border-radius: 99px; display: inline-block; }
.dot.operational { background: #22c55e; } .dot.degraded { background: #f59e0b; } .dot.down { background: #ef4444; } .dot.idle { background: #cbd5e1; }

/* console */
.console-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
.console-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem; }
.console-panel label { display: block; font-size: .82rem; font-weight: 600; margin: .8rem 0 .3rem; }
.console-panel input, .console-panel select, .console-panel textarea { width: 100%; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 8px; font-size: .92rem; font-family: inherit; }
.console-panel textarea { font-family: ui-monospace, monospace; min-height: 140px; }
.console-out { background: var(--code-bg); color: var(--code-ink); border-radius: 10px; padding: 1rem; font-family: ui-monospace, monospace; font-size: .84rem; white-space: pre-wrap; word-break: break-word; min-height: 200px; }
.console-meta { color: var(--muted); font-size: .85rem; margin-top: .6rem; }

@media (max-width: 800px) {
  .hero h1 { font-size: 1.9rem; }
  .console-grid { grid-template-columns: 1fr; }
  .site-nav { gap: .7rem; }
}
