/* =========================================================
   Keel — rptxsoftware.com/keel/, on the site's own tokens
   ========================================================= */

.k-hero {
  padding: clamp(120px, 14vw, 180px) var(--gutter) clamp(48px, 7vw, 96px);
  max-width: var(--max-w);
  margin: 0 auto;
}
.k-hero h1 {
  font-size: clamp(40px, 6.4vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 960px;
  margin-top: 18px;
}
.k-hero h1 em { font-style: normal; color: var(--blue); }

/* the accent word, underlined by hand */
.k-swash { position: relative; white-space: nowrap; color: var(--green-deep) !important; }
.k-swash svg { position: absolute; left: 0; bottom: -0.12em; width: 100%; height: 0.22em; overflow: visible; }
.k-swash path { fill: none; stroke: var(--green); stroke-width: 6; stroke-linecap: round; }

/* the hero: words on the left, keel's own window on the right */
.k-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 4vw, 64px); align-items: center; }
/* each phrase on its own line, sized so the line fits beside the drawing */
.k-hero-grid h1 { font-size: clamp(34px, 3.9vw, 60px); }
.k-line { display: block; white-space: nowrap; }
@media (max-width: 860px) {
  .k-hero-grid h1 { font-size: clamp(34px, 8.6vw, 60px); }
  .k-line { white-space: normal; }
}
.k-hero-art { margin: 0; position: relative; }
.k-hero-art::before {
  content: ""; position: absolute; inset: 8% 6% -4%; z-index: -1;
  background: radial-gradient(closest-side, rgba(47, 182, 121, 0.45), rgba(59, 91, 255, 0.18) 60%, transparent);
  filter: blur(36px);
}
.k-hero-art svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 30px 50px rgba(12, 13, 18, 0.35)); }
.k-hero-art figcaption { margin-top: 14px; font-size: 13px; color: var(--ink-3); text-align: center; }
.k-hero-art figcaption a { color: var(--blue-deep); text-decoration: underline; text-underline-offset: 3px; }
.k-hero-art code { font-family: var(--mono); font-size: 0.92em; }
.k-flip {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 5px 12px; margin-right: 6px;
}
.k-flip:hover { border-color: var(--ink); }
.k-flip:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* the receipt: paper, a little crooked, torn at the bottom */
.k-proof { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.k-steps { margin-top: 28px; display: grid; gap: 18px; max-width: 560px; }
.k-steps li { display: flex; gap: 14px; }
.k-steps li > span {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--green-soft); color: var(--green-deep); font-weight: 700; font-size: 14px;
}
.k-steps p { font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.k-steps b { color: var(--ink); }
.k-receipt-wrap { padding: 12px 0 18px; }
.k-receipt {
  position: relative; max-width: 420px; margin: 0 auto;
  transform: rotate(1.5deg);
  background: #f5f1e8; color: #1d1b26;
  border-radius: 6px 6px 0 0;
  padding: 26px 26px 30px;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.6;
  box-shadow: 0 30px 60px -20px rgba(12, 13, 18, 0.45);
}
.k-receipt-head { text-align: center; }
.k-receipt-head b { display: block; font-family: Inter, system-ui, sans-serif; font-size: 16px; font-weight: 800; letter-spacing: 0.06em; }
.k-receipt-head span { font-size: 11px; color: #6b6577; }
.k-receipt hr { margin: 14px 0; border: 0; border-top: 1px dashed #bdb6a6; }
.k-receipt dl { display: grid; gap: 4px; }
.k-receipt dl div { display: flex; justify-content: space-between; gap: 12px; }
.k-receipt dd { margin: 0; text-align: right; }
.k-receipt table { width: 100%; border-collapse: collapse; }
.k-receipt th { font-weight: 400; color: #6b6577; text-align: right; }
.k-receipt td { padding: 2px 0; text-align: right; white-space: nowrap; }
.k-receipt td:first-child { text-align: left; white-space: normal; padding-right: 10px; }
.k-receipt-total { display: flex; justify-content: space-between; font-size: 15px; }
.k-receipt-total b { font-weight: 800; color: var(--green-deep); }
.k-receipt-total.cost b { color: #b4501c; }
.k-receipt-total + .k-receipt-total { margin-top: 4px; }
.k-tear { position: absolute; left: 0; bottom: -6px; width: 100%; height: 6px; fill: #f5f1e8; }


.k-lead {
  margin-top: 24px;
  max-width: 680px;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.6;
  color: var(--ink-2);
}
.k-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.k-note { margin-top: 14px; font-size: 14px; color: var(--ink-3); }
.k-note a, .k-link { color: var(--blue-deep); text-decoration: underline; text-underline-offset: 3px; }

/* the headline numbers */
.k-stats {
  margin-top: 56px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.k-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.k-stat b { display: block; font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.03em; font-weight: 600; }
.k-stat b s { color: var(--ink-4); font-weight: 500; font-size: 0.6em; text-decoration-thickness: 2px; }
.k-stat span { display: block; margin-top: 6px; font-size: 14px; line-height: 1.5; color: var(--ink-3); }

.k-section {
  padding: clamp(56px, 8vw, 112px) var(--gutter);
  max-width: var(--max-w);
  margin: 0 auto;
  border-top: 1px solid var(--border);
}
.k-section h2 {
  margin-top: 16px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 820px;
}
.k-section > p, .k-prose p {
  margin-top: 18px;
  max-width: 720px;
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink-2);
}
.k-prose code, .k-section code, .k-faq code, .k-lead code {
  font-family: var(--mono); font-size: 0.9em;
  background: var(--paper-2); border: 1px solid var(--border);
  border-radius: 6px; padding: 1px 6px;
}

/* lanes and measurements */
.k-table-wrap { margin-top: 32px; overflow-x: auto; }
.k-table {
  width: 100%; min-width: 560px;
  border-collapse: separate; border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
}
.k-table th, .k-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.k-table tr:last-child td { border-bottom: 0; }
.k-table th { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.k-table td:first-child { font-weight: 600; color: var(--ink); }
.k-table td { color: var(--ink-2); line-height: 1.5; }
.k-table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.k-good { color: var(--green-deep); font-weight: 600; }
.k-cap { margin-top: 12px; font-size: 13.5px; line-height: 1.6; color: var(--ink-3); max-width: 760px; }

.k-cards { margin-top: 36px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.k-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px;
}
.k-card h3 { font-size: 17px; letter-spacing: -0.015em; }
.k-card p { margin-top: 8px; font-size: 15px; line-height: 1.6; color: var(--ink-2); }

.k-term {
  margin-top: 32px;
  background: var(--ink); color: #e6e7ee;
  border-radius: var(--radius);
  padding: 22px 24px;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.75;
  overflow-x: auto; white-space: pre;
}
.k-term b { color: #9fb1ff; font-weight: 500; }
.k-term i { color: #8b8d99; font-style: normal; }

/* pricing */
.k-plans { margin-top: 36px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 920px; }
.k-plan {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  display: flex; flex-direction: column;
}
.k-plan.pro { border: 2px solid var(--blue); box-shadow: var(--shadow-md); }
.k-plan h3 { font-size: 20px; }
.k-price { margin-top: 10px; font-size: 15px; color: var(--ink-3); }
.k-price b { font-size: 40px; letter-spacing: -0.03em; color: var(--ink); font-weight: 600; margin-right: 4px; }
.k-plan ul { margin: 20px 0 24px; display: grid; gap: 10px; }
.k-plan li { position: relative; padding-left: 26px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.k-plan li::before {
  content: ""; position: absolute; left: 2px; top: 0.35em;
  width: 12px; height: 7px;
  border-left: 2px solid var(--green-deep); border-bottom: 2px solid var(--green-deep);
  transform: rotate(-45deg);
}
.k-plan li.no::before { border: 0; width: 12px; height: 2px; top: 0.7em; background: var(--ink-4); transform: none; }
.k-plan .btn { margin-top: auto; justify-content: center; }
.k-plan small { margin-top: 12px; font-size: 13px; color: var(--ink-3); text-align: center; }

.k-faq { margin-top: 32px; display: flex; flex-direction: column; gap: 10px; max-width: 860px; }

/* =========================================================
   /keel/pro/: the plans, Paddle's checkout, the licence
   ========================================================= */

.k-pick-row { margin-top: 32px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 920px; }
.k-pick {
  font: inherit; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); padding: 24px;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}
.k-pick:hover:not(:disabled) { border-color: var(--ink); box-shadow: var(--shadow-md); }
.k-pick:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.k-pick:disabled { cursor: not-allowed; opacity: 0.55; }
.k-pick.best { border: 2px solid var(--blue); }
.k-pick b { font-size: 17px; }
.k-pick .k-price b { font-size: 34px; }
.k-pick small { font-size: 13.5px; color: var(--ink-3); line-height: 1.5; }
.k-pick em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--blue-deep); background: var(--blue-soft); border-radius: 999px; padding: 2px 8px; margin-left: 6px; }
.k-pick .go { margin-top: 10px; font-weight: 600; font-size: 14.5px; color: var(--ink); }

.k-pay { margin-top: 32px; display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 24px; max-width: 980px; align-items: start; }
.k-pay[hidden], .k-pick-row[hidden], .k-lines[hidden], .k-closed[hidden] { display: none; }
.k-pay-sum { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.k-back { font: inherit; font-size: 14px; color: var(--ink-3); background: none; border: 0; padding: 0; cursor: pointer; }
.k-back:hover { color: var(--ink); }
.k-pay-sum .what { margin-top: 16px; font-size: 14px; color: var(--ink-3); }
.k-pay-sum .total { margin-top: 4px; font-size: 34px; font-weight: 600; letter-spacing: -0.03em; }
.k-pay-sum .total small { font-size: 13px; font-weight: 400; color: var(--ink-3); letter-spacing: 0; }
.k-lines { margin-top: 14px; display: grid; gap: 6px; font-size: 14px; }
.k-lines div { display: flex; justify-content: space-between; color: var(--ink-2); }
.k-lines .due { border-top: 1px solid var(--border); padding-top: 8px; font-weight: 600; color: var(--ink); }
.k-lines dd { margin: 0; font-variant-numeric: tabular-nums; }
.k-fine { margin-top: 16px; font-size: 13.5px; line-height: 1.6; color: var(--ink-3); }
.k-frame { min-height: 450px; }

.k-box {
  margin-top: 28px; max-width: 760px;
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--green); border-radius: var(--radius);
  padding: 22px 24px;
}
.k-box[hidden] { display: none; }
.k-box.bad { border-left-color: var(--coral); }
.k-box p { font-size: 15.5px; line-height: 1.65; color: var(--ink-2); }
.k-box p + p, .k-box p + .k-key, .k-key + p { margin-top: 12px; }
.k-box b { color: var(--ink); }
.k-key { display: flex; gap: 8px; align-items: stretch; }
.k-key code {
  flex: 1; min-width: 0;
  font-family: var(--mono); font-size: 13px;
  background: var(--paper-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px;
  overflow-wrap: anywhere; line-height: 1.5;
}
.k-key button, .k-form button {
  font: inherit; font-size: 14px; font-weight: 500;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: 8px 16px; cursor: pointer; white-space: nowrap;
}
.k-key button:hover, .k-form button:hover { border-color: var(--ink); }
.k-form { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.k-form input {
  flex: 1 1 260px; min-width: 0;
  font: inherit; font-family: var(--mono); font-size: 14px;
  border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 9px 16px; background: var(--surface); color: var(--ink);
}
.k-form input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.k-msg { margin-top: 10px; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); min-height: 1.6em; }
.k-msg.good { color: var(--green-deep); }
.k-msg.bad { color: var(--coral-deep); }
.k-closed { margin-top: 20px; font-size: 15px; color: var(--ink-2); }

@media (max-width: 860px) {
  .k-stats, .k-plans, .k-pick-row, .k-pay, .k-hero-grid, .k-proof { grid-template-columns: minmax(0, 1fr); }
}

/* the steps, in the app's own colours, explained before the table uses them */
.k-legend { margin-top: 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 20px; max-width: 980px; }
.k-legend div { display: flex; align-items: baseline; gap: 10px; }
.k-legend dd { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-3); }
.k-step {
  display: inline-block; font-style: normal; font-size: 12.5px; font-weight: 600;
  border-radius: 999px; padding: 2px 10px; white-space: nowrap;
}
.k-step.normal { background: var(--paper-2); color: var(--ink-3); border: 1px solid var(--border); }
.k-step.lowered { background: var(--blue-soft); color: var(--blue-deep); }
.k-step.quiet { background: var(--violet-soft); color: var(--violet-deep); }
.k-step.fenced { background: var(--amber-soft); color: var(--amber-deep); }

/* the promises, each with its picture */
.k-card-icon {
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px;
  border-radius: 12px; background: var(--green-soft); color: var(--green-deep);
}
.k-card-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* a button for what isn't on sale yet: shaped like one, does nothing */
.k-soon { opacity: 0.55; cursor: default; pointer-events: none; }
.k-soon[hidden], .k-plan .btn[hidden], .k-flip[hidden] { display: none; }
.k-hero-art noscript img { display: block; width: 100%; height: auto; border-radius: 18px; }

/* short commands never break at their hyphens; long ones still wrap on a phone */
code.k-word { white-space: nowrap; }
