/* KOLO on the web: the landing, the legal pages and the server's own pages (/join, /connect, /qr, login).
   Paper and ink. Heavy tight headlines. One black pill. One quiet link. One yellow thing per screen.

   Shared building blocks (used by the server's HTML too):
     .page          centred column with the logo on top
     .title         heavy headline; <mark> inside = the yellow highlighter
     .copy          body text (also long-form legal text)
     .btn           black pill; .btn--primary is the same pill full width
     .link          quiet text link
     .card          white rounded panel
     .field         label + input
     .qr            QR code box (wrap an <svg> or <img>)
     .steps         numbered 01/02/03 list
*/

@font-face {
  font-family: "Inter";
  src: url("inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --yellow: #ffd400;
  --ink: #000;
  --body: #424245;
  --quiet: #6e6e73;
  --paper: #fff;
  --soft: #f5f5f7;
  --line: rgba(0, 0, 0, 0.08);
  --focus: #0071e3;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; padding: 8px 12px; background: var(--paper); }

/* ---------- shared blocks ---------- */

.page {
  display: grid;
  gap: 24px;
  width: min(100% - 40px, 480px);
  margin: 0 auto;
  padding: 28px 0 64px;
}
.page--wide { width: min(100% - 40px, 1120px); }
.page--text { width: min(100% - 40px, 680px); }

.logo { display: inline-block; width: 92px; line-height: 0; }
.logo img { width: 100%; height: auto; }

.title {
  margin: 0;
  font-size: clamp(2.1rem, 1.4rem + 3.2vw, 3.4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.title mark {
  padding: 0 0.12em;
  margin: 0 -0.06em;
  color: inherit;
  background: url("highlight.webp") center 58% / 100% 82% no-repeat;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.copy { color: var(--body); font-size: 1.0625rem; line-height: 1.55; }
.copy > :first-child { margin-top: 0; }
.copy > :last-child { margin-bottom: 0; }
.copy h2 { margin: 2.2em 0 0.5em; color: var(--ink); font-size: 1.35rem; letter-spacing: -0.02em; line-height: 1.2; }
.copy h3 { margin: 1.6em 0 0.4em; color: var(--ink); font-size: 1.05rem; }
.copy ul { padding-left: 1.2em; }
.copy li { margin: 0.3em 0; }
.copy a { color: var(--ink); text-underline-offset: 3px; }
.copy strong { color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font: 700 1.0625rem/1 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: #2c2c2e; }
.btn:active { transform: scale(0.985); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.3; cursor: default; }
.btn--primary { width: 100%; }

.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--quiet);
  font: 600 0.9375rem/1.4 var(--font);
  text-decoration: none;
  cursor: pointer;
}
.link:hover { color: var(--ink); }

.card {
  display: grid;
  gap: 16px;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
}

.field { display: grid; gap: 6px; }
.field label, .field > span { font-size: 0.875rem; font-weight: 600; color: var(--body); }
.field input, .field textarea, .field select {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.4 var(--font);
}
.field input:focus { outline: none; border-color: #000; box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08); }
.field small { color: var(--quiet); font-size: 0.8125rem; }
.field--error input { border-color: #c4271b; }
.field--error small { color: #c4271b; }

.qr {
  display: grid;
  place-items: center;
  width: min(100%, 280px);
  margin: 0 auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}
.qr svg, .qr img { display: block; width: 100%; height: auto; image-rendering: pixelated; }

.steps { display: grid; gap: 28px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { display: grid; gap: 6px; counter-increment: step; }
.steps li::before {
  content: "0" counter(step);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--quiet);
}
.steps h3 { margin: 0; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; }
.steps p { margin: 0; color: var(--body); }

.muted { color: var(--quiet); font-size: 0.875rem; }
.center { text-align: center; justify-self: center; }

/* ---------- landing ---------- */

.top { display: flex; align-items: center; justify-content: space-between; padding: 24px 0 0; }

.hero { display: grid; gap: 28px; justify-items: start; padding: 12vh 0 10vh; }
.hero .title { font-size: clamp(2.6rem, 1.2rem + 6.4vw, 6rem); letter-spacing: -0.05em; line-height: 0.98; }
.hero__line { display: block; }
.hero__sub { margin: 0; max-width: 30ch; color: var(--body); font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem); }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }

.section { display: grid; gap: 32px; padding: 72px 0; border-top: 1px solid var(--line); }
.section__title { margin: 0; font-size: clamp(1.8rem, 1.3rem + 2.2vw, 2.8rem); font-weight: 800; letter-spacing: -0.045em; line-height: 1.02; }

/* the moment: a ChatGPT exchange, KOLO's line in yellow */
.chat {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 560px;
  margin: 0;
  padding: 22px 20px 20px;
  border-radius: 24px;
  background: var(--soft);
}
.chat__head { display: flex; align-items: center; justify-content: space-between; font-size: 0.875rem; font-weight: 600; color: var(--quiet); }
.chat__head b { color: var(--ink); }
.chat__stage { display: grid; }
.chat__turn { grid-area: 1 / 1; display: grid; gap: 12px; align-content: start; transition: opacity 0.45s ease, transform 0.45s ease; }
.chat__turn[aria-hidden="true"] { opacity: 0; transform: translateY(6px); pointer-events: none; }
.chat__ask { justify-self: end; max-width: 85%; margin: 0; padding: 9px 16px; border-radius: 20px; background: #e3e3e8; font-size: 1rem; }
.moment { display: grid; gap: 8px; padding: 16px 18px; border-radius: 18px; background: var(--yellow); color: #000; }
.moment p { margin: 0; font-size: 1.0625rem; font-weight: 600; line-height: 1.4; }
.moment small { font-size: 0.8125rem; color: #4c4000; }
.dots { display: flex; gap: 4px; }
.dots button { width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.dots button::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #c7c7cc; transition: background-color 0.2s; }
.dots button[aria-pressed="true"]::after { background: #000; }

.split { display: grid; gap: 40px; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; }
}

.privacy-line { display: grid; justify-items: start; margin: 0; font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.25; max-width: 32ch; }
.privacy-line a { display: inline-block; margin-top: 12px; color: var(--quiet); font-size: 1rem; font-weight: 600; letter-spacing: 0; text-decoration: none; white-space: nowrap; }
.privacy-line a:hover { color: var(--ink); }

.end { display: grid; gap: 28px; justify-items: start; padding: 96px 0; border-top: 1px solid var(--line); }

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: 0.875rem;
}
.foot nav { display: flex; gap: 20px; }
.foot a { color: inherit; text-decoration: none; font-weight: 600; }
.foot a:hover { color: var(--ink); }

/* legal / support pages */
.doc-head { display: grid; gap: 12px; padding: 48px 0 8px; }
.doc-head .title { font-size: clamp(2.2rem, 1.6rem + 2.6vw, 3.2rem); }
.todo { padding: 0 4px; border-radius: 4px; background: #fff3b0; color: #5a4a00; font-size: 0.9em; }


/* ---------- server pages (server/app/templates use kolo-* names) ----------
   The same look as the web app at /app (web/src/styles.css, "landing look" layer): the tilted
   kolo. sticker top left, a heavy headline with a yellow highlighter, one black pill, quiet grey
   text links, no boxes, no bullet lists. Mobile first. */

.kolo-page { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; letter-spacing: -0.008em; }
.kolo-header, .kolo-main, .kolo-footer { width: 100%; padding-inline: max(20px, calc((100vw - 1040px) / 2)); }
.kolo-header { display: flex; align-items: center; height: 72px; }
.kolo-logo { display: inline-flex; line-height: 0; transform: rotate(-4deg); }
.kolo-logo img { width: 65px; height: 32px; }
.kolo-main { display: grid; gap: 24px; align-content: start; justify-items: start; padding-top: 32px; padding-bottom: 64px; }
.kolo-main > * { max-width: 560px; width: 100%; }
.kolo-footer { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-top: 24px; padding-bottom: 36px; color: var(--quiet); font-size: 0.875rem; }
.kolo-footer a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; font-weight: 600; text-decoration: none; }
.kolo-footer a:hover { color: var(--ink); }

.kolo-title {
  margin: 0;
  font-size: clamp(2.6rem, 1.6rem + 4vw, 4.6rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.045em;
  color: #000;
  text-wrap: balance;
}
.kolo-title mark {
  padding: 0 0.1em;
  color: inherit;
  background: linear-gradient(transparent 16%, var(--yellow) 16%, var(--yellow) 90%, transparent 90%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.kolo-lead { margin: 0; max-width: 30ch; color: var(--body); font-size: 1.25rem; line-height: 1.4; }
.kolo-muted { margin: 0; color: var(--quiet); font-size: 0.875rem; }
.kolo-muted a { color: inherit; font-weight: 600; }
.kolo-error { margin: 0; padding: 12px 16px; border-radius: 14px; background: #fdecea; color: #a1190f; font-size: 0.9375rem; }

.kolo-card { display: grid; gap: 24px; justify-items: start; padding: 0; border: 0; background: none; }
.kolo-auth-title { margin: 0; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.03em; }
.kolo-form { display: grid; gap: 12px; justify-items: start; }
.kolo-label { display: grid; gap: 6px; font-size: 0.875rem; font-weight: 600; color: var(--body); }
.kolo-input {
  width: 100%; min-height: 50px; padding: 12px 16px;
  border: 1px solid rgba(0, 0, 0, 0.16); border-radius: 14px;
  background: var(--paper); color: var(--ink); font: 1rem/1.4 var(--font);
}
.kolo-input:focus { outline: none; border-color: #000; box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08); }

/* primary = the one black pill; plain kolo-button = a quiet grey text link */
.kolo-button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0;
  border: 0; border-radius: 0; background: none; color: var(--quiet);
  font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer;
}
.kolo-button:hover { color: var(--ink); }
.kolo-button-primary {
  min-width: 220px; min-height: 52px; padding: 0 28px;
  border-radius: 999px; background: #000; color: #fff; font-weight: 700; font-size: 1.0625rem;
}
.kolo-button-primary:hover { background: #2c2c2e; color: #fff; }
.kolo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; }

/* connect steps */
.kolo-connect-steps { display: grid; gap: 24px; }
.kolo-steps { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.kolo-step { display: block; counter-increment: step; font-size: 1.0625rem; line-height: 1.45; }
.kolo-step::before { display: block; margin-bottom: 6px; content: "0" counter(step); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; color: var(--quiet); }
.kolo-step a { color: var(--ink); text-underline-offset: 3px; }
.kolo-fields { display: grid; gap: 8px; margin: 10px 0 0; }
.kolo-field { display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--soft); }
.kolo-field-label { font-size: 0.8125rem; font-weight: 600; color: var(--quiet); }
.kolo-field-value { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; min-width: 0; }
.kolo-copy-value { min-width: 0; overflow-wrap: anywhere; font: 0.875rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); }
.kolo-copy { flex: none; color: var(--ink); }

/* QR: the code on white with a soft shadow, the link under it, one black pill */
.kolo-qr-card { gap: 20px; }
.kolo-qr-image { line-height: 0; width: min(280px, 72vw); border-radius: 20px; overflow: hidden; background: #fff; box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.35); }
.kolo-qr-image svg { display: block; width: 100%; height: auto; }
.kolo-qr-link { margin: 0; max-width: 100%; overflow-wrap: anywhere; color: #424245; font-size: 0.9375rem; font-weight: 600; }
@media (min-width: 900px) {
  .kolo-main > .kolo-qr-card { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px 64px; align-items: center; max-width: none; }
  .kolo-qr-card > .kolo-qr-side { grid-row: 1 / span 4; grid-column: 2; justify-self: center; display: grid; justify-items: center; gap: 20px; text-align: center; }
}
.kolo-qr-side { display: grid; justify-items: start; gap: 20px; }

/* a ChatGPT example line, as on the web app's home */
.kolo-moment { margin: 0; display: grid; gap: 8px; max-width: 30rem; padding: 18px 20px 16px; border-radius: 22px; background: var(--yellow); color: #000; box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.35); }
.kolo-moment p { margin: 0; font-size: 1.15rem; line-height: 1.35; font-weight: 700; letter-spacing: -0.01em; }
.kolo-moment small { font-size: 0.8rem; color: #4c4000; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* consent page (/authorize/login): plain lines, no bullets */
.kolo-consent-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--body); font-size: 1.0625rem; }
.kolo-deny { justify-items: start; }

/* Google-only sign-in (mobile first): the black pill with the Google mark */
.kolo-google { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; text-decoration: none; }
.kolo-google svg { flex: none; background: #fff; border-radius: 50%; padding: 3px; width: 26px; height: 26px; }
.kolo-fine { margin: 0; max-width: 40ch; font-size: 0.8125rem; line-height: 1.45; color: var(--quiet); }
.kolo-fine a { color: inherit; }
.kolo-reviewer { margin-top: 28px; font-size: 0.8125rem; color: #86868b; }
.kolo-reviewer > summary { cursor: pointer; list-style: none; padding: 8px 0; }
.kolo-reviewer > summary::-webkit-details-marker { display: none; }
.kolo-danger { color: #b3261e; }
@media (max-width: 480px) {
  .kolo-header { height: 64px; }
  .kolo-main { padding-top: 16px; }
}
/* /connect: phones get the QR first; the computer-only steps stay below */
.kolo-on-phone { display: none; }
@media (max-width: 720px), (pointer: coarse) {
  .kolo-on-phone:not([hidden]) { display: grid; gap: 16px; margin-bottom: 28px; }
}
