/* keyhatch.app. System fonts only, nothing loaded from elsewhere. One width limit: .wrap (house rule). */
:root {
  --bg: #0f1115;
  --bg2: #161922;
  --card: #1c202b;
  --line: #2a2f3d;
  --text: #e8eaf0;
  --muted: #9aa1b2;
  --accent: #f5b942;
  --accent-ink: #1a1405;
  --ok: #5fd38a;
  --warn: #f0a742;
  --radius: 14px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #fafaf7; --bg2: #f1f0ea; --card: #ffffff; --line: #e2e0d6; --text: #16181d; --muted: #5d6270;
    --accent: #c98a0b; --accent-ink: #ffffff; --ok: #1f8a4c; --warn: #b26a00; color-scheme: light;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}
a { color: var(--accent); }
img { max-width: 100%; height: auto; }
.wrap { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* Header and footer */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; gap: 24px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 18px; }
.brand img { border-radius: 7px; }
.top__nav { display: flex; gap: 20px; margin-left: auto; }
.top__nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.top__nav a:hover { color: var(--text); }
@media (max-width: 720px) { .top__nav { display: none; } .top .btn { margin-left: auto; } }
.foot { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
.foot__nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot__nav a { color: var(--muted); }

/* Buttons */
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: 12px 20px; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.06); }
.btn--ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn--small { padding: 7px 14px; font-size: 15px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Typography */
h1 { font-size: clamp(32px, 4.2vw, 54px); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 18px; }
h2 { font-size: clamp(26px, 3.2vw, 36px); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 18px; scroll-margin-top: 80px; }
.page h2, .prose h3 { font-size: 22px; margin-top: 36px; }
.prose h4, .prose h5 { font-size: 18px; margin-top: 24px; }
h3 { font-size: 19px; margin: 0 0 8px; }
.lead { font-size: 19px; color: var(--text); }
.kicker { color: var(--accent); font-weight: 650; text-transform: uppercase; letter-spacing: 0.08em; font-size: 13px; margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.strong { font-weight: 650; }
.mono, code, pre { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.88em; }
.hash { overflow-wrap: anywhere; }
pre { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; overflow-x: auto; }
.ok { color: var(--ok); }

/* Sections */
.block { padding: clamp(56px, 8vw, 96px) 0; }
.block--alt { background: var(--bg2); border-block: 1px solid var(--line); }
.page { padding-top: 48px; }
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; padding: clamp(40px, 7vw, 88px) 0; }
@media (max-width: 1000px) { .hero { grid-template-columns: 1fr; } }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card p:last-child { margin-bottom: 0; }
.split { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.checks { list-style: none; padding: 0; margin: 0 0 24px; }
.checks li { padding: 6px 0 6px 30px; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 4px; color: var(--ok); font-weight: 700; }
.notice { background: color-mix(in srgb, var(--accent) 14%, var(--card)); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: 10px; padding: 14px 18px; }
.nojs { color: var(--muted); }
.js .nojs { display: none; }

/* Approval dialog, drawn after the real one (App/Agent/LocalApprover.swift) */
.dialog { margin: 0; }
.dialog__win { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 30px 80px rgb(0 0 0 / 0.35); overflow: hidden; }
.dialog__bar { display: flex; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.dialog__bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.dialog__body { padding: 22px 24px 24px; }
.dialog__body p { margin: 0 0 4px; }
.dialog__body hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.dialog__icon { border-radius: 9px; margin-bottom: 10px; }
.dialog__title { font-size: 20px; font-weight: 700; }
.dialog .label { color: var(--muted); font-size: 13px; }
.tiles { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 18px; }
.tile { border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; font-size: 14px; }
.tile--on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.dialog__buttons { display: flex; justify-content: flex-end; gap: 10px; }
.b { border-radius: 8px; padding: 7px 16px; box-shadow: inset 0 0 0 1px var(--line); font-size: 15px; }
.b--primary { background: var(--accent); color: var(--accent-ink); box-shadow: none; font-weight: 650; }
.dialog figcaption { color: var(--muted); font-size: 14px; margin-top: 12px; text-align: center; }

/* iPhone notification */
.phone { background: linear-gradient(160deg, #2b3550, #151a26); border-radius: 36px; padding: 36px 18px 120px; border: 1px solid var(--line); }
.phone__note { display: flex; gap: 12px; background: rgb(255 255 255 / 0.9); color: #111; border-radius: 18px; padding: 12px 14px; }
.phone__note p { margin: 0; font-size: 14px; line-height: 1.35; }
.phone__note .muted { color: #555; }
.phone__note img { border-radius: 6px; flex: none; }

/* Table */
.table { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child > * { border-bottom: 0; }
thead th { color: var(--muted); font-weight: 600; }
.us { background: color-mix(in srgb, var(--accent) 9%, transparent); font-weight: 650; }

/* Price */
.price__big { font-size: 48px; font-weight: 750; margin: 0; letter-spacing: -0.02em; }

/* FAQ */
.faq { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 650; }
.faq p { color: var(--muted); }

/* Forms */
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.form input { font: inherit; padding: 11px 13px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); color: var(--text); width: 100%; }
.form .btn { justify-self: start; }
