/* Kuptim story: Held Mirror ledger layout. Sea-glass teal accent and warm ochre limits on the dark site surface,
   corner-bracket hero frame, vertical 5-gate timeline, side-by-side phone frames, and 390px-safe responsive tables.
   Chromium 67 safe: no flex gap, no clamp/min/max, no inset, no logical margins/padding, no JS. */
@font-face {
  font-family: 'KP UI';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'KP Display';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/space-grotesk-latin.woff2') format('woff2');
}

body.page-kuptim {
  --bg: #0A0D14;
  --surface: #121726;
  --raised: #1A2033;
  --bar: rgba(10, 13, 20, .94);
  --hair: rgba(255, 255, 255, .08);
  --hair-2: rgba(255, 255, 255, .16);
  --text: #EEF1F7;
  --text-2: #B0B8C9;
  --muted: #848EA4;
  --accent: #4BC8B7;
  --accent-ink: #062E29;
  --accent-soft: rgba(75, 200, 183, .13);
  --kp-ochre: #E7B861;
  --kp-ochre-soft: rgba(231, 184, 97, .11);
  --live: #34D399;
  --head: 'KP Display', 'Segoe UI', Roboto, Arial, sans-serif;
  --body: 'KP UI', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  body.page-kuptim {
    --bg: #0A0D14;
    --surface: #121726;
    --raised: #1A2033;
    --bar: rgba(10, 13, 20, .94);
    --hair: rgba(255, 255, 255, .08);
    --hair-2: rgba(255, 255, 255, .16);
    --text: #EEF1F7;
    --text-2: #B0B8C9;
    --muted: #848EA4;
    --live: #34D399;
  }
}

/* Frame and reading column */
.page-kuptim main { padding-bottom: 52px; }
.page-kuptim main .wrap { max-width: 820px; }
.page-kuptim main > .wrap:first-child { padding-top: 40px; }
.page-kuptim .crumb { margin: 0 0 28px; font-size: 14px; }
.page-kuptim .crumb a { color: var(--muted); text-decoration: none; }
.page-kuptim .crumb a:before { content: "\2190"; margin-right: 8px; }
.page-kuptim .crumb a:hover { color: var(--accent); }
.page-kuptim .story-app { margin-bottom: 36px; }
.page-kuptim main strong { color: var(--text); font-weight: 600; }

/* Inline links */
.page-kuptim main p:not(.crumb) a:not(.btn),
.page-kuptim main li a,
.page-kuptim main figcaption a {
  color: var(--text);
  text-decoration: underline;
  -webkit-text-decoration-color: var(--accent);
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}
.page-kuptim main p:not(.crumb) a:not(.btn):hover,
.page-kuptim main li a:hover {
  color: var(--accent);
}

/* Corner-bracket mirror hero */
.kp-hero {
  position: relative;
  padding: 26px 22px 24px;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 6px;
}
.kp-hero:before,
.kp-hero:after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  pointer-events: none;
}
.kp-hero:before {
  top: -1px;
  left: -1px;
  border-top: 3px solid var(--accent);
  border-left: 3px solid var(--accent);
}
.kp-hero:after {
  right: -1px;
  bottom: -1px;
  border-right: 3px solid var(--accent);
  border-bottom: 3px solid var(--accent);
}
.kp-kicker {
  margin: 0 0 12px;
  font: 600 12px/1.4 var(--head);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.kp-hero h1 {
  margin: 0 0 18px;
  font-size: 32px;
  line-height: 1.15;
}
.kp-lead {
  margin: 0 0 24px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-2);
}
.kp-triad {
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--hair-2);
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 14px;
}
.kp-triad div {
  margin: 0;
  padding-left: 12px;
  border-left: 2px solid var(--hair-2);
}
.kp-triad dt {
  margin: 0 0 4px;
  font: 600 12px/1.3 var(--head);
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--accent);
}
.kp-triad dd {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.48;
  color: var(--text-2);
}

/* Sections */
.kp-section { padding-top: 40px; }
.kp-section h2 {
  margin: 0 0 16px;
  font-size: 24px;
  line-height: 1.24;
}
.kp-section h3 {
  margin: 26px 0 12px;
  font-size: 19px;
  line-height: 1.3;
  color: var(--text);
}
.kp-section p {
  margin: 0 0 18px;
  color: var(--text-2);
}
.kp-section p:last-child { margin-bottom: 0; }

/* Source citations */
.kp-cite {
  margin: 20px 0 24px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
}
.kp-cite p {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.58;
  color: var(--text);
}
.kp-cite cite {
  display: block;
  font-size: 13.5px;
  font-style: normal;
  color: var(--muted);
}

/* Responsive 4-column tables (safe at 390px) */
.kp-table-box {
  margin: 20px 0 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border: 1px solid var(--hair-2);
  border-radius: 6px;
}
.kp-table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.48;
  font-variant-numeric: tabular-nums;
}
.kp-table caption {
  padding: 12px 14px;
  text-align: left;
  font: 600 14px/1.4 var(--head);
  color: var(--text);
  background: var(--raised);
  border-bottom: 2px solid var(--accent);
}
.kp-table th,
.kp-table td {
  padding: 11px 12px;
  text-align: left;
  border-top: 1px solid var(--hair);
  vertical-align: top;
}
.kp-table thead th {
  border-top: 0;
  color: var(--accent);
  font: 600 12px/1.35 var(--head);
  letter-spacing: .05em;
  text-transform: uppercase;
}
.kp-table tbody th {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}
.kp-table td { color: var(--text-2); }
.kp-badge-pass,
.kp-badge-wait {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font: 600 12px/1.35 var(--head);
}
.kp-badge-pass { background: var(--accent-soft); color: var(--accent); }
.kp-badge-wait { background: var(--kp-ochre-soft); color: var(--kp-ochre); }

/* Lists: ordered steps with bracket tabs, bullets with small sea-glass diamonds */
.kp-steps {
  list-style: none;
  counter-reset: kpstep;
  margin: 12px 0 24px;
  padding: 0;
}
.kp-steps li {
  counter-increment: kpstep;
  position: relative;
  margin: 0 0 14px;
  padding: 15px 16px 15px 58px;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 6px;
  color: var(--text-2);
}
.kp-steps li:before {
  content: counter(kpstep);
  position: absolute;
  left: 14px;
  top: 15px;
  width: 30px;
  height: 28px;
  border-radius: 4px;
  background: var(--accent-soft);
  border: 1px solid rgba(75, 200, 183, .38);
  color: var(--accent);
  font: 700 14px/26px var(--head);
  text-align: center;
}
.kp-steps strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--head);
  font-size: 16.5px;
}

.kp-list {
  list-style: none;
  margin: 6px 0 22px;
  padding: 0;
}
.kp-list li {
  position: relative;
  margin: 0 0 13px;
  padding-left: 22px;
  color: var(--text-2);
}
.kp-list li:last-child { margin-bottom: 0; }
.kp-list li:before {
  content: "";
  position: absolute;
  left: 3px;
  top: .65em;
  width: 7px;
  height: 7px;
  background: var(--accent);
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
}

/* Five recognition gates along a left spine */
.kp-gates {
  list-style: none;
  counter-reset: kpgate;
  margin: 14px 0 24px;
  padding: 0 0 0 18px;
  border-left: 2px solid var(--hair-2);
}
.kp-gates li {
  counter-increment: kpgate;
  position: relative;
  margin: 0 0 16px;
  padding: 14px 16px 14px 48px;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 6px;
  color: var(--text-2);
}
.kp-gates li:last-child { margin-bottom: 0; }
.kp-gates li:before {
  content: "0" counter(kpgate);
  position: absolute;
  left: 12px;
  top: 15px;
  font: 700 13px/1.3 var(--head);
  color: var(--accent);
}
.kp-gates strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--head);
  font-size: 16px;
}

/* Phone screenshots: 250-300px wide, paired where side-by-side */
.kp-pair {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 26px;
  margin: 26px auto;
  max-width: 270px;
}
.kp-pair figure,
.kp-solo-shot {
  margin: 0;
  text-align: center;
}
.kp-solo-band {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 24px;
  margin: 24px 0;
  -webkit-align-items: start;
  align-items: start;
}
.kp-solo-shot {
  margin: 0 auto;
  max-width: 270px;
}
.kp-pair img,
.kp-solo-shot img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 16px;
  border: 1px solid var(--hair-2);
}
.kp-pair figcaption,
.kp-solo-shot figcaption {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  text-align: left;
}

/* Verification & What was not checked */
.kp-audit {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 16px;
  margin-top: 16px;
}
.kp-checked,
.kp-unchecked {
  padding: 20px 18px;
  background: var(--surface);
  border: 1px solid var(--hair-2);
  border-radius: 6px;
}
.kp-checked { border-top: 3px solid var(--accent); }
.kp-unchecked {
  border-top: 3px solid var(--kp-ochre);
  background: var(--kp-ochre-soft);
}
.kp-checked h3,
.kp-unchecked h3 {
  margin: 0 0 12px;
  font-size: 19px;
}
.kp-unchecked .kp-list li:before { background: var(--kp-ochre); }

/* Closing CTA */
.kp-end { margin: 40px 0 4px; }
.kp-end .btn { margin: 0 18px 12px 0; vertical-align: middle; }
.page-kuptim .kp-end a:not(.btn) {
  display: inline-block;
  margin-bottom: 12px;
  vertical-align: middle;
}

@media (max-width: 600px) {
  .kp-hero { padding: 20px 16px 18px; }
  .kp-table-box { overflow-x: visible; }
  .kp-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
    font-size: 11.5px;
    line-height: 1.4;
  }
  .kp-table caption { padding: 10px 8px; font-size: 13px; }
  .kp-table th,
  .kp-table td {
    min-width: 0;
    padding: 8px 5px;
    overflow-wrap: break-word;
    word-wrap: break-word;
  }
  .kp-table thead th { font-size: 10px; letter-spacing: .02em; }
  .kp-table thead th:first-child,
  .kp-table tbody th:first-child {
    width: 24%;
    white-space: nowrap;
  }
  .kp-table thead th:nth-child(2),
  .kp-table tbody td:nth-child(2) { width: 24%; }
  .kp-table thead th:nth-child(3),
  .kp-table tbody td:nth-child(3) { width: 22%; }
  .kp-table thead th:nth-child(4),
  .kp-table tbody td:nth-child(4) { width: 30%; }
  .kp-badge-pass,
  .kp-badge-wait { font-size: 10.5px; padding: 2px 5px; }
  .kp-steps li { padding: 14px 14px 14px 52px; }
  .kp-gates { padding-left: 12px; }
  .kp-gates li { padding: 13px 13px 13px 40px; }
}

@media (min-width: 640px) {
  .kp-triad { grid-template-columns: 1fr 1fr 1fr; grid-gap: 16px; }
  .kp-pair {
    grid-template-columns: 270px 270px;
    max-width: 572px;
    grid-gap: 32px;
  }
  .kp-audit { grid-template-columns: 1fr 1fr; grid-gap: 18px; }
}

@media (min-width: 760px) {
  .kp-solo-band {
    grid-template-columns: 265px 1fr;
    grid-gap: 28px;
  }
  .kp-solo-shot {
    width: 265px;
    max-width: none;
    margin: 0;
  }
}

@media (min-width: 900px) {
  .page-kuptim main > .wrap:first-child { padding-top: 64px; }
  .kp-hero { padding: 32px 30px 28px; }
  .kp-hero h1 { font-size: 42px; }
  .kp-lead { font-size: 20px; }
  .kp-section { padding-top: 56px; }
  .kp-section h2 { font-size: 28px; }
}
