/* Chec identity v2 ("Kept"), Nov 2026. Shared tokens and components for index.html, dashboard.html, brand.html.
   v1 (cobalt, Inter Tight) is kept in site/v1/. */
:root {
  --ink: #17140f;
  --ink-2: #3a342b;
  --gray: #a0988a;
  --muted: #6a6257;
  --paper: #faf8f3;
  --card: #ffffff;
  --line: rgba(23, 20, 15, .08);
  --line-strong: rgba(23, 20, 15, .22);
  --kept: #0b6b4f;
  --kept-deep: #063d2e;
  --kept-bright: #3ccb92;
  --kept-bg: #dcefe4;
  --ember: #e8512e;
  --mango: #f59a3c;
  --clay: #b5301c;
  --lilac: #e9e0f1;
  --teal: #0e5a63;
  --ochre: #d99a1e;
  --tape: #ffd43b;
  --ok: var(--kept);  --ok-bg: var(--kept-bg);
  --warn: #8a5a00;    --warn-bg: #fae9c2;
  --bad: #c2361a;     --bad-bg: #fbe0d6;
  --info-bg: var(--kept-bg);
  --r-card: 22px;
  --r-tile: 12px;
  --shadow: 0 1px 2px rgba(23, 20, 15, .03), 0 20px 44px -30px rgba(23, 20, 15, .22);
  --shadow-pop: 0 24px 60px -18px rgba(23, 20, 15, .42);
  --font: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --display: "Bricolage Grotesque", "Instrument Sans", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --hand: "Caveat", "Bradley Hand", cursive;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--kept); outline-offset: 3px; border-radius: 8px; }

/* Type */
.h-display { font-family: var(--display); font-size: clamp(2.3rem, 7.6vw, 4.6rem); line-height: 1; letter-spacing: -.035em; font-weight: 500; }
.h-section { font-family: var(--display); font-size: clamp(1.9rem, 5.2vw, 3.1rem); line-height: 1.05; letter-spacing: -.03em; font-weight: 500; }
.h-card { font-family: var(--display); font-size: 1.2rem; line-height: 1.2; letter-spacing: -.015em; font-weight: 600; }
.tone { color: var(--gray); }
.eyebrow { font-family: var(--hand); font-size: 1.5rem; line-height: 1; color: var(--kept); letter-spacing: .01em; }
.lede { font-size: clamp(1.02rem, 2.4vw, 1.2rem); color: var(--muted); max-width: 34em; }
.label { font-family: var(--mono); font-size: .72rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* Logo: hand-drawn wordmark, the tick stands in for the silent k */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo svg { height: 26px; width: auto; }
.logo small { font-weight: 500; font-size: .74rem; color: var(--gray); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 600; font-size: 1rem; text-decoration: none; white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-dark { background: var(--ink); color: var(--paper); box-shadow: 0 3px 0 rgba(23, 20, 15, .25); }
.btn-dark:hover { background: #000; }
.btn-kept { background: var(--kept); color: #fff; box-shadow: 0 3px 0 var(--kept-deep); }
.btn-pill { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.btn-ghost { background: rgba(23, 20, 15, .07); color: var(--ink); }
.btn-ghost:hover { background: rgba(23, 20, 15, .12); }
.btn .arr { transition: transform .15s ease; }
.btn:hover .arr { transform: translateX(3px); }

/* Chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 600; line-height: 1.2; white-space: nowrap;
  background: rgba(23, 20, 15, .07); color: var(--ink-2);
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.plain::before { display: none; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.info { background: var(--kept-bg); color: var(--kept); }
.chip.ex { background: #fff3bf; color: #5f4a00; border: 1px dashed rgba(95, 74, 0, .5); font-family: var(--mono); font-weight: 500; font-size: .7rem; letter-spacing: .02em; }
.chip.ex::before { display: none; }

/* Cards */
.card { background: var(--card); border: 1px solid rgba(23, 20, 15, .05); border-radius: var(--r-card); box-shadow: var(--shadow); }
.frost {
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, .7); border-radius: 16px; box-shadow: var(--shadow-pop);
}
.stat { padding: 0; min-width: 0; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: .9rem; font-weight: 500; color: var(--ink-2); }
.stat-main { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; padding: 14px 16px 16px; }
.stat-val { font-family: var(--display); font-size: clamp(2rem, 7vw, 2.7rem); line-height: 1; letter-spacing: -.04em; font-weight: 500; }
.stat-side { display: grid; justify-items: end; gap: 6px; font-size: .78rem; color: var(--muted); text-align: right; }

/* Resibo: the receipt. Paper slip with a torn edge, mono type and dotted leaders. */
.resibo-wrap { filter: drop-shadow(0 22px 30px rgba(23, 20, 15, .32)); }
.resibo {
  background: var(--card); color: var(--ink); padding: 18px 18px 30px; font-family: var(--mono); font-size: .84rem; line-height: 1.35;
  border-radius: 8px 8px 0 0; display: grid; gap: 7px;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 16px 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 16px 100%;
}
.resibo .rhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 9px; margin-bottom: 3px; border-bottom: 1px dashed var(--line-strong); }
.resibo .rhead svg { height: 18px; width: auto; }
.resibo .r { display: flex; align-items: baseline; gap: 6px; }
.resibo .r i { flex: 1; border-bottom: 1.5px dotted rgba(23, 20, 15, .3); transform: translateY(-3px); min-width: 12px; }
.resibo .r.minus b { font-weight: 400; color: var(--bad); }
.resibo .r b { font-weight: 500; }
.resibo .total { margin-top: 5px; padding-top: 10px; border-top: 1px dashed var(--line-strong); display: flex; align-items: center; justify-content: space-between; gap: 10px; font-family: var(--font); font-weight: 600; }
.resibo .total b { font-family: var(--mono); font-size: 1.9rem; letter-spacing: -.06em; font-weight: 600; color: var(--kept); line-height: 1; }

/* The Kept stamp */
.stamp {
  display: inline-block; padding: 3px 10px 2px; border: 2.5px solid var(--kept); border-radius: 8px; outline: 1px solid var(--kept); outline-offset: 2px;
  color: var(--kept); font-family: var(--display); font-weight: 800; font-size: .95rem; letter-spacing: .12em; text-transform: uppercase;
  transform: rotate(-7deg); opacity: .92;
}

/* John's pen: handwritten notes are only used for John's own comments */
.pen { font-family: var(--hand); font-size: 1.35rem; line-height: 1.15; color: var(--kept); }

/* Painterly canvases: the Kept gradient (sales, then costs, then what is kept). */
.paint { position: relative; overflow: hidden; isolation: isolate; background: var(--lilac); border-radius: var(--r-card); }
.paint::before, .paint::after { content: ""; position: absolute; pointer-events: none; }
.paint::before { inset: -14px; z-index: -2; filter: blur(2px); background-size: cover; background-position: center; }
.paint::after {
  inset: 0; z-index: -1; opacity: .35; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1.1 -.1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
.paint-a::before {
  background-image: url("img/hero-3.jpg"),
    linear-gradient(115deg, #e9e0f5 0%, #f6ece6 22%, #f7c79a 40%, #f08a3c 54%, #e2552a 64%, #2f7d4a 76%, #0b6b4f 100%);
}
.paint-b { background: #0d5560; }
.paint-b::before {
  background-image: url("img/hero-2.jpg"),
    linear-gradient(168deg, #0b4a58 0%, #0e6b7a 22%, #2a8c96 38%, #6f8f58 52%, #d99a1e 66%, #e6a92a 80%, #c9741a 100%);
}

/* Grounds */
.ground-kept { background: linear-gradient(180deg, #04271d 0%, var(--kept-deep) 22%, var(--kept) 52%, #4fa98a 76%, #cfe6d8 90%, var(--paper) 100%); color: #fff; }
.ground-blush {
  background:
    radial-gradient(60% 50% at 0% 100%, rgba(245, 154, 60, .5), transparent 70%),
    radial-gradient(45% 60% at 100% 30%, rgba(233, 224, 241, .95), transparent 70%),
    radial-gradient(50% 40% at 65% 60%, rgba(255, 196, 150, .5), transparent 70%),
    linear-gradient(180deg, #f8ece0, #f7e2d6 55%, #f8ece0);
}

/* Ink pill nav */
.pillnav {
  display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 999px;
  background: var(--ink); color: #c4bdb0; width: max-content; max-width: 100%;
}
.pillnav a, .pillnav button {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px;
  font-size: .92rem; font-weight: 500; text-decoration: none; background: none; border: 0; cursor: pointer; color: inherit; white-space: nowrap;
}
.pillnav a:hover, .pillnav button:hover { color: #fff; }
.pillnav .on { background: var(--paper); color: var(--ink); }
.pillnav .on:hover { color: var(--ink); }

/* Example data ribbon */
.ribbon {
  background: repeating-linear-gradient(135deg, #ffe066 0 14px, var(--tape) 14px 28px);
  color: #3d2f00; font-family: var(--mono); font-weight: 600; font-size: .76rem; letter-spacing: .08em; text-transform: uppercase;
  text-align: center; padding: 8px 12px;
}
.ribbon span { background: #fff8d6; padding: 3px 10px; border-radius: 999px; display: inline-block; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
