:root { color-scheme: dark; --bg: #0B0B0C; --panel: #151517; --raised: #26262A; --orange: #FF6A13; --text: #FAFAFA; --muted: #B4B4BC; --faint: #8A8A93; --line: #303035; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
/* Hide the document until the frame guard allows the app to render. */
html { visibility: hidden; }
html.unframed { visibility: visible; }
/* Inside a frame, only the standalone-window notice is visible. */
.frame-notice { visibility: visible; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); min-height: 100dvh; }
header, main, footer, .notice { width: min(100% - 40px, 720px); margin-inline: auto; }
header { display: flex; align-items: center; gap: 20px; padding-block: 24px; border-bottom: 1px solid var(--line); }
/* The K4 Record lockup: the circled K4 mark, then the word. */
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--orange); text-decoration: none; white-space: nowrap; }
.brand img { display: block; width: 40px; height: 40px; }
.brand span { font-size: 22px; font-weight: 700; letter-spacing: 3px; }
.tagline { color: var(--muted); font-size: 13px; margin-right: auto; }
main { padding-block: clamp(36px, 8vw, 76px); min-height: 65vh; }
.eyebrow { color: var(--orange); font-size: 12px; letter-spacing: 2px; font-weight: 800; text-transform: uppercase; }
h1 { font-size: clamp(32px, 6vw, 54px); letter-spacing: -1.5px; line-height: 1.08; max-width: 650px; margin: 14px 0 24px; overflow-wrap: anywhere; }
h2 { font-size: 22px; margin-top: 32px; }
p, li { line-height: 1.65; color: var(--muted); }
p { margin: 12px 0; }
a { color: var(--orange); text-underline-offset: 4px; }
.panel { background: #151517; padding: 24px; border: 1px solid var(--line); border-radius: 16px; margin: 28px 0; }
.share { color: var(--text); font-size: 20px; font-weight: 650; }
label { display: block; margin-bottom: 8px; font-weight: 650; }
input { display: block; width: 100%; min-height: 52px; padding: 12px 14px; border-radius: 8px; border: 1px solid #66666D; background: var(--bg); color: var(--text); font: inherit; }
input[name="code"] { letter-spacing: 6px; font-size: 24px; }
button { min-height: 48px; border-radius: 8px; border: 1px solid transparent; padding: 12px 20px; background: var(--orange); color: var(--bg); font: inherit; font-weight: 750; cursor: pointer; }
button.secondary { background: transparent; color: var(--text); border-color: #66666D; }
button.link { background: transparent; color: var(--orange); padding-inline: 0; font-weight: 550; }
button:disabled { cursor: default; opacity: .5; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
form button { width: 100%; margin-top: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.actions button { flex: 1; }
.apple { width: 100%; margin-top: 16px; }
.help, .account { font-size: 14px; }
.error { color: #FFD0B6; padding: 14px 16px; border-left: 3px solid var(--orange); background: #231912; margin-bottom: 20px; }
dl { margin: 0; }
dt { color: var(--muted); font-size: 13px; margin-top: 18px; }
dt:first-child { margin-top: 0; }
dd { margin: 6px 0 0; overflow-wrap: anywhere; }
code { display: block; overflow-wrap: anywhere; font-size: 13px; line-height: 1.7; color: var(--text); }
ol { padding-left: 22px; }
li { padding: 6px 0; }
footer { padding-block: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
@media (max-width: 420px) { .tagline { display: none; } .panel { padding: 20px; } .actions { flex-direction: column; } }
@media (prefers-reduced-motion: no-preference) { button { transition: opacity .15s; } button:hover:not(:disabled) { opacity: .85; } }

/* Wide pages: the cover and the signed-in home. Sign-in, consent and claim stay a narrow column. */
body[data-page="home"] :is(header, main, footer), body[data-page="dashboard"] :is(header, main, footer) { width: min(100% - 40px, 1120px); }
body:not([data-page="home"]):not([data-page="dashboard"]) #nav { display: none; }
#nav { display: flex; align-items: center; gap: 14px; }
#nav button { min-height: 38px; padding: 6px 14px; font-size: 14px; }
.nav-cta { color: var(--text); text-decoration: none; font-weight: 700; padding: 8px 16px; border: 1px solid #66666D; border-radius: 8px; }
.nav-email { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; border-radius: 8px; border: 1px solid transparent;
  background: var(--orange); color: var(--bg); font-weight: 750; text-decoration: none; }
.button.secondary { background: transparent; color: var(--text); border-color: #66666D; }
h3 { font-size: 20px; margin: 10px 0 6px; color: var(--text); }
.label { font-size: 12px; letter-spacing: 1.5px; font-weight: 800; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }

/* Cover */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; align-items: center; padding-bottom: 56px; }
.hero h1 { font-size: clamp(44px, 7vw, 82px); letter-spacing: -2.5px; line-height: 1; margin: 18px 0 24px; }
.lede { font-size: 19px; max-width: 560px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-card { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.ask { margin: 0 0 18px auto; width: fit-content; max-width: 85%; background: var(--raised); color: var(--text); padding: 12px 16px; border-radius: 16px 16px 4px 16px; }
.answer { border-left: 3px solid var(--orange); padding-left: 18px; }
.answer-head { color: var(--text); margin: 0; }
.answer-big { font-size: 64px; font-weight: 900; letter-spacing: -2px; line-height: 1; color: var(--text); margin: 8px 0 12px; font-variant-numeric: tabular-nums; }
.answer-facts { list-style: none; padding: 0; margin: 0; }
.answer-facts li { padding: 10px 0; border-top: 1px solid var(--line); color: var(--text); line-height: 1.45; }
.answer-facts b { font-variant-numeric: tabular-nums; }
.answer-facts .flag { color: #FFD0B6; }
figcaption { font-size: 12px; color: var(--faint); margin-top: 16px; }
.band { padding-block: 44px; border-top: 1px solid var(--line); }
.band h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -1px; margin: 0 0 24px; color: var(--text); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.step-list { list-style: none; padding: 0; margin: 0; }
.step-list li, .card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.step-n { font-size: 40px; font-weight: 900; line-height: 1; color: var(--orange); font-variant-numeric: tabular-nums; }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding: 8px 0 8px 32px; color: var(--text); }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--orange); font-weight: 900; }
.connect h2 { margin-top: 0; }
.mcp-url { font-size: 15px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin-top: 16px; }

/* Signed-in home */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.dash-head h1 { margin: 10px 0 8px; }
.dash-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0; }
.badge { border: 1px solid #F5C04A; color: #F5C04A; font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--line); margin: 28px 0 36px; }
.tile { padding: 20px 22px; border-left: 1px solid var(--line); }
.tile:first-child { border-left: 0; padding-left: 0; }
.tile-label { font-size: 12px; letter-spacing: 1.5px; font-weight: 800; text-transform: uppercase; color: var(--muted); margin: 0; }
.tile-value { font-size: 44px; font-weight: 900; letter-spacing: -1.5px; line-height: 1.05; color: var(--text); margin: 8px 0 4px; font-variant-numeric: tabular-nums; }
.tile-note { font-size: 14px; margin: 0; line-height: 1.4; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.col-main > .label { margin-top: 8px; }
.check-list { list-style: none; padding: 0; margin: 0 0 36px; display: grid; gap: 10px; }
.check { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: var(--panel); border-left: 3px solid var(--orange); border-radius: 8px; padding: 14px 16px; }
.check-name { color: var(--text); font-weight: 750; margin: 0 0 4px; }
.check-why { margin: 0; font-size: 15px; line-height: 1.45; }
button.chip-button { min-height: 36px; padding: 8px 12px; font-size: 14px; font-weight: 650; background: var(--raised); color: var(--text); white-space: nowrap; }
.table-wrap { overflow-x: auto; margin-bottom: 36px; }
table.lineup { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.lineup th { text-align: left; font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); padding: 10px; border-bottom: 1px solid var(--line); }
.lineup td { padding: 12px 10px; border-bottom: 1px solid #1E1E21; color: var(--text); }
.lineup tbody tr:nth-child(odd) { background: #111113; }
.lineup .num { text-align: right; }
.lineup .wt { font-weight: 800; }
.yr { color: var(--muted); font-size: 13px; margin-left: 8px; }
.side-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-bottom: 18px; }
.side-title { color: var(--text); font-weight: 750; font-size: 18px; margin: 0; }
.side-note { font-size: 14px; line-height: 1.5; margin: 6px 0 0; }
.dual-list, .prompt-list { list-style: none; padding: 0; margin: 0; }
.dual { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.dual:first-child { border-top: 0; }
.dual-opp { flex: 1; color: var(--text); line-height: 1.35; }
.dual-date { display: block; color: var(--faint); font-size: 13px; }
.dual-score { color: var(--muted); font-variant-numeric: tabular-nums; }
.wl { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 4px; font-size: 12px; font-weight: 900; }
.wl.w { background: var(--orange); color: var(--bg); }
.wl.l { border: 1.5px solid var(--text); color: var(--text); }
.prompt { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.prompt:first-child { border-top: 0; }
.prompt-text { color: var(--text); margin: 0; line-height: 1.4; }
.story { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 28px 0 36px; }
.story-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.story-card.focus { border-left: 3px solid var(--orange); }
.big { font-size: 56px; font-weight: 900; letter-spacing: -2px; line-height: 1; color: var(--text); margin: 4px 0; font-variant-numeric: tabular-nums; }
.big-label { margin: 0; font-size: 14px; }
.last-line { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; margin: 0; }
.moves { margin: 0 0 36px; }
.chip { display: inline-block; padding: 6px 14px; margin: 0 8px 8px 0; border: 1px solid var(--line); border-radius: 999px; color: var(--text); }
.foot-note { font-size: 13px; color: var(--faint); margin-top: 24px; }
.second-label { margin-top: 16px; }
.password-card label { font-size: 14px; margin: 4px 0 6px; }
.password-card input { min-height: 44px; margin-bottom: 12px; }
@media (max-width: 960px) {
  /* minmax(0, 1fr), not 1fr: a wide table must scroll inside its column, not widen the page. */
  .hero, .dash-grid, .story, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile:nth-child(3) { border-left: 0; padding-left: 0; }
  .tile:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .check { flex-direction: column; align-items: flex-start; }
  .tile { padding: 16px 12px; } .tile-value { font-size: 34px; }
  .nav-email { display: none; }
}

/* The edge, cut and sharpened: on load one slice runs through "edge.", lights it, and carries on into the demo, which
   cuts in piece by piece; sections slice in as they arrive. Off when motion is reduced; without scroll-driven animation
   support the sections simply show. CSS only, no script. */
.cut { color: var(--orange); }
@media (prefers-reduced-motion: no-preference) {
  /* The chain: blade through "edge." (0.3-1.3s), the word lights (1.0s), the demo card (1.05s), the question (1.4s),
     then the answer (1.75s). */
  .cut { position: relative; display: inline-block; animation: edge-lit .35s 1s both; }
  .cut::after { content: ""; position: absolute; inset: -4% -6%; pointer-events: none;
    background: linear-gradient(105deg, transparent 44%, var(--orange) 47%, #FFD2B5 50%, var(--orange) 53%, transparent 56%);
    background-size: 260% 100%; animation: blade 1s .3s cubic-bezier(.7, 0, .25, 1) both; }
  .hero-card { animation: cut-in .6s 1.05s cubic-bezier(.2, .7, .2, 1) both; }
  .ask { animation: cut-in .5s 1.4s cubic-bezier(.2, .7, .2, 1) both; }
  .answer { animation: cut-in .7s 1.75s cubic-bezier(.2, .7, .2, 1) both; }
  .tile { animation: cut-in .6s cubic-bezier(.2, .7, .2, 1) both; }
  .tile:nth-child(2) { animation-delay: .07s; } .tile:nth-child(3) { animation-delay: .14s; } .tile:nth-child(4) { animation-delay: .21s; }
  @supports (animation-timeline: view()) {
    .band { position: relative; border-top-color: transparent; }
    .band::before { content: ""; position: absolute; top: -1px; left: 0; width: 100%; height: 1px; background: var(--line); }
    .band::after { content: ""; position: absolute; top: -1px; left: 0; width: 100%; height: 2px; transform-origin: left;
      background: linear-gradient(90deg, transparent, var(--orange) 88%, #FFD2B5); animation: slice linear both; animation-timeline: view(); animation-range: entry 15% cover 40%; }
    .band > h2, .band .grid-3 > *, .band .checks > li, .connect { animation: cut-in cubic-bezier(.2, .7, .2, 1) both; animation-timeline: view(); animation-range: entry 0% entry 85%; }
  }
}
@keyframes edge-lit { from { color: var(--text); } to { color: var(--orange); } }
@keyframes blade { from { background-position: 120% 0; opacity: 1; } 85% { opacity: 1; } to { background-position: -20% 0; opacity: 0; } }
@keyframes slice { 0% { transform: scaleX(0); opacity: 1; } 60% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
/* A slanted cut sweeps left to right, revealing the element as it rises into place. */
@keyframes cut-in {
  from { opacity: 0; transform: translateY(14px); clip-path: polygon(0 0, 16% 0, 0 100%, 0 100%); }
  to { opacity: 1; transform: none; clip-path: polygon(0 0, 140% 0, 100% 100%, 0 100%); }
}
