/* KennelStack redesign v3 - business-tool landing structure */
:root {
  --ink: #1c1917;
  --body: #44403c;
  --muted: #78716c;
  --line: #e7e5e4;
  --bg: #fafaf9;
  --card: #ffffff;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --teal-tint: #f0fdfa;
  --teal-line: #99d5cf;
  --radius: 14px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--body);
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- header + nav ---------- */
.ks-brandbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 13px 28px;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.ks-brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 19px; font-weight: 800; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.ks-brand:hover { text-decoration: none; }
.ks-logo { width: 26px; height: 26px; display: block; }
.ks-tagline { display: none; }
.ks-nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.ks-nav a {
  font-size: 14px; font-weight: 600; color: var(--body);
  padding: 7px 12px; border-radius: 8px; text-decoration: none;
}
.ks-nav a:hover { background: var(--teal-tint); color: var(--teal-dark); text-decoration: none; }

/* ---------- layout ---------- */
.file-card { display: block; max-width: 46rem; margin: 0 auto; padding: 40px 24px 8px; background: transparent; border: none; }
.file-card.ks-home { max-width: 64rem; }
section[id] { scroll-margin-top: 84px; }

/* ---------- hero ---------- */
.file-header { margin: 16px 0 0; }
.ks-home .file-header { max-width: 44rem; }
.file-title {
  margin: 0 0 14px;
  font-size: 42px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1;
  color: var(--ink);
}
.file-fact {
  display: inline-block; margin: 0 0 14px; padding: 4px 12px;
  font-size: 12.5px; font-weight: 600;
  color: var(--teal-dark); background: var(--teal-tint);
  border: 1px solid var(--teal-line); border-radius: 999px;
}
.file-intro { margin: 0; font-size: 18px; line-height: 1.55; max-width: 40rem; }

/* hero entry cards */
.ks-entry-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin: 30px 0 8px;
}
.ks-entry {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 18px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.ks-entry:hover { border-color: var(--teal); box-shadow: 0 4px 14px rgba(15,118,110,.10); transform: translateY(-2px); text-decoration: none; }
.ks-entry-label { font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--teal); }
.ks-entry-title { font-size: 16.5px; font-weight: 750; color: var(--ink); letter-spacing: -0.01em; }
.ks-entry-desc { font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.ks-entry-go { margin-top: auto; font-size: 13px; font-weight: 700; color: var(--teal-dark); padding-top: 8px; }

/* hide cartoon hero if present */
.file-photos, .file-header + .file-caption { display: none !important; }

/* ---------- sections ---------- */
.file-group { margin: 0; padding: 34px 0 10px; border-top: 1px solid var(--line); }
.ks-home .file-group:first-of-type { border-top: none; padding-top: 26px; }
.file-group-head { margin: 0 0 18px; }
.file-group-label {
  margin: 0 0 6px;
  font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--teal);
}
.file-group-heading { margin: 0; font-size: 25px; font-weight: 750; letter-spacing: -0.02em; color: var(--ink); }
.file-text { font-size: 16px; }
.file-p { margin: 0 0 12px; }
.file-bullets { margin: 0; padding-left: 20px; }
.file-bullets li { margin: 0 0 10px; }
.file-caption { margin: 12px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- data rows ---------- */
.file-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: row; }
.ks-home .file-rows { grid-template-columns: 1fr 1fr; gap: 12px; }
.file-row {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 17px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.file-row:hover { border-color: var(--teal-line); box-shadow: 0 1px 3px rgba(28,25,23,.06); }
.file-row-slot.is-number.is-counted { counter-increment: row; }
.file-row-slot.is-number.is-counted::before {
  content: counter(row);
  display: grid; place-items: center;
  width: 30px; height: 30px;
  font-size: 13.5px; font-weight: 700;
  color: var(--teal-dark); background: var(--teal-tint);
  border: 1px solid var(--teal-line); border-radius: 50%;
}
.file-row-body { flex: 1; min-width: 0; }
.file-row-body { display: flex; align-items: center; gap: 14px; }
.file-row-body .file-row-main { flex: 1; min-width: 0; }
a.file-row-cta { flex-shrink: 0; text-decoration: none; }
@media (max-width:640px){ .file-row-body { flex-wrap: wrap; } .file-row-body .file-row-main { flex: 1 1 100%; order: 1; } .file-row-body .file-row-value { order: 2; } a.file-row-cta { order: 3; margin-left: auto; } }
.file-row-main { display: flex; flex-direction: column; gap: 2px; }
.file-strong { font-weight: 700; color: var(--ink); font-size: 15.5px; }
.file-row-detail { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.file-row-value.file-known {
  flex: none; align-self: flex-start;
  font-size: 14px; font-weight: 750; color: var(--teal-dark);
  background: var(--teal-tint); border: 1px solid var(--teal-line);
  padding: 5px 12px; border-radius: 999px; white-space: nowrap;
}

/* ---------- steps ---------- */
.file-steps { list-style: none; margin: 0; padding: 0; max-width: 46rem; }
.file-steps li { position: relative; padding: 0 0 20px 44px; }
.file-steps li::before { content: ""; position: absolute; left: 14px; top: 34px; bottom: 2px; width: 2px; background: var(--line); }
.file-steps li:last-child::before { display: none; }
.file-step-n {
  position: absolute; left: 0; top: 0;
  display: grid; place-items: center; width: 30px; height: 30px;
  font-size: 13.5px; font-weight: 700; color: #fff; background: var(--teal); border-radius: 50%;
}

/* ---------- callouts ---------- */
.file-callout.file-bar {
  display: block; margin: 18px 0; padding: 14px 18px;
  background: var(--teal-tint); border: 1px solid var(--teal-line); border-left: 4px solid var(--teal);
  border-radius: 10px; font-size: 14.5px; line-height: 1.55;
}
.file-callout .file-strong { display: block; margin-bottom: 4px; color: var(--teal-dark); }

/* ---------- links & buttons ---------- */
.file-link { font-weight: 600; color: var(--teal); }
.file-link:hover { text-decoration: underline; }
/* source links become cards */
.file-text p:has(> a.file-link:only-child) { margin: 0; }
.file-text:has(> p > a.file-link:only-child) { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.file-text p:has(> a.file-link:only-child) a.file-link {
  display: block; padding: 12px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; font-weight: 600;
  transition: border-color .15s ease;
}
.file-text p:has(> a.file-link:only-child) a.file-link:hover { border-color: var(--teal); text-decoration: none; }
.file-button {
  display: inline-block;
  font-size: 14.5px; font-weight: 650;
  padding: 10px 18px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--teal); background: var(--teal); color: #fff; text-decoration: none;
}
.file-button:hover { background: var(--teal-dark); text-decoration: none; }
.file-button[data-variant="secondary"] { background: var(--card); color: var(--body); border: 1px solid var(--line); }
.file-button[data-variant="secondary"]:hover { border-color: var(--teal-line); color: var(--ink); }
.file-button[data-variant="secondary"][aria-pressed="true"] { background: var(--teal-tint); color: var(--teal-dark); border-color: var(--teal); font-weight: 700; }
.file-button.is-compact { padding: 8px 14px; font-size: 13.5px; }

/* ---------- calculator controls ---------- */
.file-control { margin: 18px 0; max-width: 40rem; }
.file-control-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 14px; }
.file-control-label { font-weight: 650; color: var(--ink); font-size: 14px; }
.file-control-head span { color: var(--teal-dark); font-weight: 700; }
.file-choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.file-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; border-radius: 999px;
  background: linear-gradient(to right, var(--teal) var(--file-slider-fill, 50%), var(--line) var(--file-slider-fill, 50%));
  outline: none; margin: 10px 0;
}
.file-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 3px solid var(--teal);
  box-shadow: 0 1px 3px rgba(0,0,0,.18); cursor: pointer;
}
.file-slider::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--teal); cursor: pointer; }

/* ---------- footer ---------- */
.file-closing { margin: 26px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.ks-footer { max-width: 64rem; margin: 0 auto; padding: 22px 24px 44px; font-size: 13px; color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .ks-entry-grid { grid-template-columns: 1fr 1fr; }
  .ks-home .file-rows { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ks-brandbar { padding: 12px 16px; }
  .ks-nav a { padding: 6px 8px; font-size: 13px; }
  .file-card { padding: 26px 18px 8px; }
  .file-title { font-size: 30px; }
  .file-intro { font-size: 16.5px; }
  .file-group-heading { font-size: 21px; }
  .ks-entry-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ks-entry { padding: 14px; }
  .file-text:has(> p > a.file-link:only-child) { grid-template-columns: 1fr; }
}

/* mobile nav fit: nav wraps onto its own row, no clipped scroll strip */
@media (max-width: 640px) {
  .ks-brandbar { padding: 10px 14px; gap: 6px; flex-wrap: wrap; }
  .ks-brand { font-size: 17px; }
  .ks-logo { width: 22px; height: 22px; }
  .ks-nav { margin-left: 0; flex-basis: 100%; gap: 4px; flex-wrap: wrap; overflow-x: visible; }
  .ks-nav a { padding: 6px 9px; font-size: 13px; white-space: normal; }
}

/* tabbed homepage */
.ks-tabs { display:flex; gap:8px; flex-wrap:wrap; margin:28px 0 4px; }
.ks-tab {
  padding:10px 18px; border-radius:999px;
  border:1px solid var(--line); background:var(--card);
  font-size:14.5px; font-weight:650; color:var(--body);
  cursor:pointer; text-decoration:none;
}
.ks-tab:hover { border-color:var(--teal); text-decoration:none; }
.ks-tab.ks-active { background:var(--teal); border-color:var(--teal); color:#fff; }
body.ks-tabbed .ks-home section.tabbed-section { display:none; border-top:none; padding-top:22px; }
body.ks-tabbed .ks-home section.tabbed-section.ks-active { display:block; }
@media (max-width:640px){ .ks-tab{ padding:8px 14px; font-size:13.5px; } }
