/* KCStudioApps — static site styles. No external fonts, no inline styles (works under a strict CSP). */
:root {
  --bg: #f6faf7;
  --surface: #ffffff;
  --surface-2: #edf5ef;
  --text: #18231c;
  --muted: #526359;
  --primary: #006b38;
  --primary-strong: #00552d;
  --on-primary: #ffffff;
  --mint: #cff5da;
  --border: #d3e3d8;
  --header-a: #008b46;
  --header-b: #006b38;
  --on-header: #ffffff;
  --gold: #ffd94f;
  --shadow: 0 1px 2px rgba(16, 37, 28, .06), 0 8px 24px rgba(16, 37, 28, .06);
  --radius: 20px;
  --radius-sm: 12px;
  --maxw: 1080px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101a15;
    --surface: #17251e;
    --surface-2: #1d2e25;
    --text: #e6f2e9;
    --muted: #b2c6b9;
    --primary: #67df91;
    --primary-strong: #8ae9ac;
    --on-primary: #00391c;
    --mint: #0c5731;
    --border: #2a4234;
    --header-a: #0c5731;
    --header-b: #0a4727;
    --on-header: #e6f2e9;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-strong); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.skip {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: 10px;
  text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }

/* ---------- header ---------- */
.site-header {
  background: var(--header-a);
  color: var(--on-header);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--on-header); text-decoration: none; font-weight: 700; font-size: 1.15rem; letter-spacing: .2px; }
.brand:hover { color: var(--on-header); }
.mark {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28);
  font-weight: 800; font-size: .95rem;
}
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: var(--on-header); text-decoration: none; padding: 10px 14px; border-radius: 999px; font-weight: 500;
  min-height: 44px; display: inline-flex; align-items: center;
}
.nav a:hover { background: rgba(255, 255, 255, .14); color: var(--on-header); }
.nav a[aria-current="page"] { background: rgba(255, 255, 255, .22); }
.nav a.lang { border: 1px solid rgba(255, 255, 255, .4); margin-left: 6px; }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--header-a), var(--header-b));
  color: var(--on-header);
  padding: 32px 0 72px;
  border-radius: 0 0 36px 36px;
}
.hero .wrap { display: grid; gap: 32px; align-items: center; }
.kicker { text-transform: uppercase; letter-spacing: 1.4px; font-weight: 700; font-size: .78rem; opacity: .85; margin: 0 0 12px; }
.hero h1 { font-size: clamp(2rem, 5.2vw, 3.2rem); line-height: 1.12; margin: 0 0 16px; letter-spacing: -.5px; }
.hero p.lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); max-width: 40ch; margin: 0 0 24px; opacity: .95; }
.hero .art { max-width: 360px; margin: 0 auto; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .25)); }
@media (min-width: 860px) {
  .hero .wrap { grid-template-columns: 1.15fr .85fr; }
}

/* ---------- buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 22px; border-radius: 14px; font-weight: 700; text-decoration: none;
  border: 2px solid transparent; font-size: 1rem; cursor: pointer;
}
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-strong); color: var(--on-primary); }
.hero .btn-primary { background: #ffffff; color: #006b38; }
.hero .btn-primary:hover { background: #e9fff1; color: #00552d; }
.btn-ghost { border-color: currentColor; background: transparent; color: inherit; }
.hero .btn-ghost { color: var(--on-header); border-color: rgba(255, 255, 255, .6); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .14); color: var(--on-header); }
.btn[aria-disabled="true"] { opacity: .8; cursor: default; }

/* ---------- sections ---------- */
section { padding: 56px 0 0; }
section h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); line-height: 1.2; margin: 0 0 12px; letter-spacing: -.3px; }
section > .wrap > .sub { color: var(--muted); max-width: 62ch; margin: 0 0 28px; }
.pull-up { margin-top: -40px; padding-top: 0; position: relative; }

.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: 1fr; }
@media (min-width: 700px) { .cols-2 { grid-template-columns: repeat(2, 1fr); } }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 8px; font-size: 1.15rem; line-height: 1.3; }
.card p { margin: 0 0 12px; color: var(--muted); }
.card p:last-child { margin-bottom: 0; }
.card .ico {
  width: 44px; height: 44px; border-radius: 14px; background: var(--mint); color: var(--primary);
  display: grid; place-items: center; margin-bottom: 14px; font-weight: 800;
}
.card .ico svg { width: 24px; height: 24px; }

.app-card { display: grid; gap: 20px; grid-template-columns: 96px 1fr; align-items: start; }
.app-card img.app-icon { width: 96px; height: 96px; border-radius: 24px; box-shadow: var(--shadow); }
.app-card h3 { font-size: 1.4rem; margin: 0 0 4px; }
.app-card .tagline { color: var(--muted); margin: 0 0 14px; }
@media (max-width: 520px) { .app-card { grid-template-columns: 1fr; } }

.chips { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; font-size: .88rem; font-weight: 600; color: var(--text); }

.split { display: grid; gap: 28px; align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; } .split.flip > :first-child { order: 2; } }
.split img { max-width: 320px; margin: 0 auto; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 20px 20px 72px; position: relative; box-shadow: var(--shadow); }
.steps li::before {
  content: counter(step); position: absolute; left: 20px; top: 20px; width: 36px; height: 36px; border-radius: 12px;
  background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-weight: 800;
}
.steps li strong { display: block; margin-bottom: 2px; }
.steps li span { color: var(--muted); }

.notice { background: var(--surface-2); border: 1px solid var(--border); border-left: 6px solid var(--primary); border-radius: var(--radius-sm); padding: 16px 18px; margin: 20px 0; }
.notice p { margin: 0; }

table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); font-size: .9rem; }
tr:last-child td { border-bottom: 0; }
code { font: .92em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; word-break: break-word; }
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }

details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 18px; margin: 0 0 10px; }
summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style-position: outside; min-height: 44px; }
details[open] summary { margin-bottom: 4px; }
details p { margin: 0 0 14px; color: var(--muted); }

/* ---------- prose (policy pages) ---------- */
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); line-height: 1.15; margin: 0 0 8px; letter-spacing: -.4px; }
.prose h2 { font-size: 1.35rem; margin: 36px 0 8px; }
.prose p, .prose li { color: var(--text); }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 4px 0; }
.meta { color: var(--muted); font-size: .95rem; margin: 0 0 24px; }
.page-head { padding: 40px 0 8px; }
.draft-banner { background: #fff4cc; color: #4a3a00; border: 1px solid #e6cf72; border-radius: var(--radius-sm); padding: 12px 16px; margin: 0 0 20px; }
@media (prefers-color-scheme: dark) { .draft-banner { background: #3a3000; color: #ffe9a0; border-color: #6b5a10; } }

/* ---------- footer ---------- */
.site-footer { margin-top: 72px; border-top: 1px solid var(--border); padding: 28px 0 40px; color: var(--muted); }
.foot { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; }
.foot p { margin: 0; }
.foot-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links a { color: var(--muted); display: inline-block; padding: 8px 0; }
.foot-links a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
@media print { .site-header, .site-footer, .skip { display: none; } .hero { background: none; color: #000; } body { background: #fff; color: #000; } }
