/* ============================================================
   Landing page and public pages: Linear's homepage, section for section (linear.app, measured 2026-10-21).
   Same sizes, weights, spacing and hairlines; FitEntrepreneur's copy, mark and accent. Tokens: css/tokens.css
   ============================================================ */

.mk {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  overflow: clip;
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.011em;
}

.mk-inner { width: 100%; max-width: 1248px; margin: 0 auto; padding: 0 32px; }
.mk [hidden] { display: none !important; }

/* The demos' buttons start bare; their own rules further down give them their look */
.mk-side-item, .mk-mtabs button, .mk-icon-btn, .mk-step button, .mk-fail, .mk-log-btn, .mk-link-btn,
.mk-seg button, .mk-row, .mk-rec-row {
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

/* Header: 64px, translucent with a blur, hairline underneath */
.mk-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 9, 10, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.mk-header-inner { height: 64px; display: flex; align-items: center; gap: 4px; }
.mk-brand { display: flex; align-items: center; gap: 9px; margin-right: auto; text-decoration: none; }
.mk-brand .brand-name { font-size: 15px; }
.mk-nav { display: flex; align-items: center; }

.mk-nav a,
.mk-login {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 13px;
  text-decoration: none;
  transition: color var(--transition-base);
}

.mk-nav a:hover,
.mk-login:hover { color: var(--text); }
.mk-divider { width: 1px; height: 16px; margin: 0 8px; background: var(--border-strong); }
.mk-pill { height: 32px; padding: 0 14px; font-size: 13px; }

/* Hero: a big left-aligned headline, one quiet line under it, a link on the right */
.mk-hero { padding-top: clamp(96px, 16vh, 168px); }

.mk-hero h1 {
  max-width: 900px;
  font-size: 64px;
  line-height: 1.06;
  font-weight: 500;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.mk-hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-top: 28px; }
.mk-hero-sub { max-width: 600px; color: var(--text-muted); }
.mk-hero-link { flex-shrink: 0; color: var(--text-muted); text-decoration: none; transition: color var(--transition-base); }
.mk-hero-link strong { margin-right: 10px; color: var(--text); font-weight: 500; }
.mk-hero-link:hover { color: var(--text); }
.mk-hero-waitlist { max-width: 480px; margin-top: 32px; }
.mk-hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 32px; }
.mk-hero-cta span { color: var(--text-muted); font-size: 13px; }

/* The app window under the hero: sidebar on the frame, content in an inset panel (Linear's product shot) */
.mk-app { position: relative; margin-top: 64px; }

.mk-app::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -96px;
  height: 260px;
  background: radial-gradient(ellipse at center, rgba(113, 197, 251, 0.12), transparent 70%);
  pointer-events: none;
}

.mk-window {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 212px 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 520px;
  padding: 8px;
  background: #090A0B;
  border-radius: 12px;
  box-shadow: 0 0 0 1px var(--border-subtle), var(--shadow-lg);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0;
  text-align: left;
}

/* macOS window chrome: traffic lights and a centred title (js/landing.js keeps it on the current view).
   Decoration only, so nothing in it looks clickable */
.mk-titlebar { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 36px; margin: -8px -8px 0; padding: 0 14px; color: var(--text-secondary); font-size: 13px; font-weight: 500; }
.mk-titlebar-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mk-titlebar-title > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-lights { display: inline-flex; flex-shrink: 0; gap: 8px; }
.mk-lights i { width: 12px; height: 12px; border-radius: 50%; background: var(--mac-close); box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.3); }
.mk-lights i:nth-child(2) { background: var(--mac-minimize); }
.mk-lights i:nth-child(3) { background: var(--mac-zoom); }

.mk-side { display: flex; flex-direction: column; gap: 1px; padding: 4px 8px 4px 4px; }
.mk-side-brand { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; margin-bottom: 8px; color: var(--text-secondary); font-weight: 500; }
.mk-side-brand .brand-mark { font-size: 14px; }
.mk-side-item { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 8px; border-radius: 6px; color: var(--text-secondary); font-weight: 500; white-space: nowrap; overflow: hidden; }
.mk-side-item svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--text-quaternary); }
.mk-side-item.on { background: rgba(255, 255, 255, 0.04); }
.mk-side-item.on svg { color: var(--accent); }
.mk-side-label { margin: 16px 0 4px; padding: 0 8px; color: var(--text-muted); font-size: 12px; font-weight: 500; }

.mk-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
}

.mk-main-top { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-bottom: 1px solid var(--border-subtle); color: var(--text-secondary); font-size: 12px; font-weight: 500; }
.mk-crumb-sep { color: var(--text-quaternary); }
.mk-main-top-right { display: flex; align-items: center; gap: 12px; margin-left: auto; color: var(--text-muted); }
.mk-sample { padding: 2px 8px; border: 1px solid var(--border-subtle); border-radius: var(--radius-full); color: var(--text-muted); font-size: 11px; font-weight: 500; white-space: nowrap; }

.mk-main-body { display: grid; grid-template-columns: 1fr 232px; flex: 1; }
.mk-doc { padding: 36px 48px; min-width: 0; }
.mk-doc h3 { color: var(--text); font-size: 20px; font-weight: 600; letter-spacing: -0.012em; }
.mk-doc-sub { max-width: 520px; margin-top: 8px; color: var(--text-muted); font-size: 14px; }
.mk-doc h4 { margin-top: 32px; color: var(--text-secondary); font-size: 15px; font-weight: 600; }

.mk-log { display: grid; grid-template-columns: 1fr 1fr auto auto; align-items: stretch; gap: 8px; margin-top: 24px; }
.mk-field { padding: 10px 14px; background: var(--bg); border: 1px solid var(--border-subtle); border-radius: 10px; }
.mk-field > span:first-child { display: block; color: var(--text-muted); font-size: 12px; font-weight: 500; }
.mk-field strong { display: block; margin-top: 2px; font-size: 26px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.mk-field small { color: var(--text-muted); font-size: 13px; font-weight: 500; }
.mk-fail { display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--accent-border); border-radius: 8px; background: var(--accent-weak); color: var(--text); font-weight: 500; }
.mk-fail i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.mk-log-btn { display: flex; align-items: center; padding: 0 18px; border-radius: 8px; background: var(--accent); color: var(--accent-text); font-weight: 600; }

.mk-activity { margin: 12px 0 0; padding: 0; list-style: none; }
.mk-activity li { display: flex; align-items: center; gap: 10px; padding: 8px 0; color: var(--text-secondary); }
.mk-activity li b { font-weight: inherit; white-space: nowrap; }
.mk-activity li span { color: var(--text-muted); }
.mk-dot { width: 8px; height: 8px; flex-shrink: 0; border: 1.5px solid var(--text-quaternary); border-radius: 50%; }
.mk-dot.on { border-color: var(--accent); background: var(--accent); }
.mk-dot.done { border-color: var(--success); background: var(--success); }

.mk-props { display: flex; flex-direction: column; gap: 18px; padding: 36px 20px; border-left: 1px solid var(--border-subtle); }
.mk-props span { display: block; color: var(--text-muted); font-size: 12px; font-weight: 500; }
.mk-props strong { display: flex; align-items: center; gap: 8px; margin-top: 4px; color: var(--text-secondary); font-weight: 500; font-variant-numeric: tabular-nums; }
.mk-props .mk-rest { color: var(--accent); font-size: 22px; font-weight: 600; }

/* The statement: one white sentence, the rest grey */
.mk-statement-wrap { padding-top: 160px; }
.mk-eyebrow { font-family: var(--font-family-mono); font-size: 12px; letter-spacing: 0.02em; text-transform: uppercase; color: var(--text-muted); }

.mk-statement {
  max-width: 1080px;
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 40px;
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.022em;
  text-wrap: pretty;
}

.mk-statement strong { color: var(--text); font-weight: 500; }

/* FIG 0.1-0.3: line drawings with a caption, like Linear's three principles */
.mk-figs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 96px; }
.mk-fig { margin: 0; padding-top: 20px; border-top: 1px solid var(--border-subtle); }
.mk-fig-label { display: block; font-family: var(--font-family-mono); font-size: 12px; color: var(--text-muted); }
.mk-fig-art { display: block; width: 100%; max-width: 320px; height: auto; margin: 24px auto; color: var(--text-quaternary); }
.mk-accent { stroke: var(--accent); }
.mk-accent-fill { fill: var(--accent-weak); stroke: var(--accent); }
.mk-fig h3 { color: var(--text-secondary); font-size: 15px; font-weight: 500; letter-spacing: -0.011em; }
.mk-fig p { max-width: 340px; margin-top: 4px; color: var(--text-muted); }
.mk-disclaimer { margin-top: 48px; color: var(--text-muted); font-size: 13px; }

/* Feature sections: two-line headline left, a 24px paragraph right, a product panel, an "Included" row */
.mk-feature { margin-top: 160px; padding-top: 96px; border-top: 1px solid var(--border-subtle); }
.mk-feature-head { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }

.mk-feature h2 {
  font-size: 48px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.022em;
}

.mk-feature-copy p { color: var(--text-secondary); font-size: 24px; line-height: 1.33; letter-spacing: -0.012em; }
.mk-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 20px; color: var(--text); font-size: 16px; text-decoration: none; }
.mk-more:hover { text-decoration: underline; text-underline-offset: 3px; }

.mk-panel {
  margin-top: 64px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0;
}

.mk-panel-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 44px; padding: 0 16px; border-bottom: 1px solid var(--border-subtle); color: var(--text-secondary); font-size: 12px; font-weight: 500; }

.mk-tags { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; padding: 28px 0 0; list-style: none; color: var(--text-secondary); font-size: 13px; }
.mk-tags li:first-child { color: var(--text-muted); }

/* Workout panel: Linear's grouped list (Done / In progress / Up next) */
.mk-group { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 16px; background: rgba(255, 255, 255, 0.025); color: var(--text-secondary); font-weight: 500; }
.mk-group span { color: var(--text-muted); }
.mk-row { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 16px; border-top: 1px solid var(--border-subtle); color: var(--text-secondary); }
.mk-row-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.mk-row-meta { color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mk-row.done .mk-row-name { color: var(--text-muted); }
.mk-row.on { background: var(--accent-weak); }
.mk-status { width: 14px; height: 14px; flex-shrink: 0; border: 1.5px solid var(--text-quaternary); border-radius: 50%; }
.mk-status.half { border-color: var(--accent); background: linear-gradient(90deg, var(--accent) 50%, transparent 50%); }
.mk-status.done { border-color: var(--success); background: var(--success); box-shadow: inset 0 0 0 3px var(--panel); }
.mk-chip { padding: 1px 8px; border: 1px solid var(--border-subtle); border-radius: var(--radius-full); color: var(--text-muted); font-size: 11px; font-weight: 500; }

/* Progress panel */
.mk-chart-stats { display: flex; gap: 48px; padding: 24px 24px 0; }
.mk-chart-stats span { display: block; color: var(--text-muted); font-size: 12px; font-weight: 500; }
.mk-chart-stats strong { display: block; margin-top: 4px; font-size: 28px; font-weight: 600; letter-spacing: -0.022em; font-variant-numeric: tabular-nums; }
.mk-chart-svg { display: block; width: 100%; height: auto; overflow: visible; cursor: crosshair; touch-action: pan-y; }
.mk-chart-svg .grid { fill: none; stroke: var(--border-subtle); stroke-width: 1; }
.mk-chart-svg .fill { fill: var(--accent-weak); }
.mk-chart-svg .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.mk-chart-svg circle { fill: var(--accent); stroke: var(--panel); stroke-width: 3; }

/* Coach panel: a conversation, as Linear shows its agent */
.mk-chat-body { display: flex; flex-direction: column; gap: 20px; max-width: 720px; padding: 28px 24px; }
.mk-q { align-self: flex-end; max-width: 80%; padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--border-subtle); border-radius: 12px; color: var(--text); font-size: 14px; }
.mk-a-name { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-weight: 500; }
.mk-a-name .brand-mark { font-size: 13px; }
.mk-ai { padding: 0 6px; border: 1px solid var(--border-subtle); border-radius: 4px; color: var(--text-muted); font-size: 10px; font-weight: 600; }
.mk-a p { margin-top: 8px; color: var(--text-secondary); font-size: 14px; line-height: 1.6; }
.mk-table { width: 100%; max-width: 420px; margin-top: 12px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.mk-table th { padding: 6px 12px 6px 0; border-bottom: 1px solid var(--border-subtle); color: var(--text-muted); font-size: 12px; font-weight: 500; text-align: left; }
.mk-table td { padding: 7px 12px 7px 0; border-bottom: 1px solid var(--border-subtle); color: var(--text-secondary); }
.mk-reply { padding: 12px 14px; background: var(--surface); border: 1px solid var(--border-subtle); border-radius: 12px; color: var(--text-muted); }

/* Founder quote, set like Linear's customer quotes */
.mk-quote-wrap { margin-top: 160px; padding-top: 96px; border-top: 1px solid var(--border-subtle); }
.mk-quote { max-width: 900px; margin: 0; }
.mk-quote blockquote { margin: 0; color: var(--text); font-size: 32px; line-height: 1.25; font-weight: 500; letter-spacing: -0.022em; text-wrap: pretty; }
.mk-quote figcaption { display: flex; align-items: center; gap: 12px; margin-top: 28px; color: var(--text-muted); font-size: 14px; }
.mk-quote img { display: block; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.mk-quote figcaption strong { display: block; color: var(--text); font-weight: 500; }

/* Beta facts: three cards, like Linear's changelog row */
.mk-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 96px; }
.mk-card { padding: 24px; background: var(--panel); border: 1px solid var(--border-subtle); border-radius: 12px; }
.mk-card-label { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 8px; border: 1px solid var(--border-subtle); border-radius: 10px; color: var(--accent); font-size: 13px; font-weight: 600; }
.mk-card h3 { margin-top: 20px; color: var(--text); font-size: 15px; font-weight: 500; letter-spacing: -0.011em; }
.mk-card p { margin-top: 6px; color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.mk-card a { color: var(--text-secondary); }

/* ---------- Clickable demos (js/landing.js) ---------- */

/* Hero window */
.mk-side-item { width: 100%; transition: background var(--transition-base), color var(--transition-base); }
.mk-side-item:hover { background: rgba(255, 255, 255, 0.03); color: var(--text); }
.mk-side-item.on { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.mk-mtabs { display: none; }
.mk-view { display: flex; flex: 1; flex-direction: column; min-height: 0; }

.mk-pager { display: inline-flex; align-items: center; gap: 2px; }
.mk-pager .num { margin-right: 6px; white-space: nowrap; }
.mk-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 6px; color: var(--text-muted); transition: background var(--transition-base), color var(--transition-base); }
.mk-icon-btn:hover { background: var(--hover); color: var(--text); }
.mk-icon-btn svg { width: 14px; height: 14px; }

.mk-field { position: relative; }
.mk-step { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; }
.mk-step button { width: 28px; height: 28px; border: 1px solid var(--border-subtle); border-radius: 8px; background: var(--surface-2); color: var(--text-secondary); font-size: 15px; line-height: 1; text-align: center; transition: background var(--transition-base), color var(--transition-base); }
.mk-step button:hover { background: var(--surface-3); color: var(--text); }
.mk-step button:active, .mk-fail:active, .mk-log-btn:active { transform: scale(0.96); }
.mk-fail { transition: background var(--transition-base), border-color var(--transition-base), color var(--transition-base); }
.mk-fail:not(.on) { border-color: var(--border-subtle); background: transparent; color: var(--text-muted); }
.mk-fail:not(.on) i { background: var(--text-quaternary); }
.mk-log-btn { justify-content: center; transition: background var(--transition-base); }
.mk-log-btn:hover { background: var(--accent-hover); }

.mk-link-btn { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; color: var(--accent); font-size: 12px; font-weight: 500; }
.mk-link-btn:hover { text-decoration: underline; text-underline-offset: 2px; }
.mk-props .mk-next { margin-top: 4px; color: var(--text-secondary); font-size: 13px; }
.mk-props .mk-next.mk-attn { color: var(--accent); animation: mk-nudge 1.2s ease 2; }

.mk-activity .mk-empty { color: var(--text-muted); }
.mk-activity li.mk-in { animation: mk-rise 500ms cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: calc(var(--i, 0) * 140ms + 300ms); }
.mk-activity li.mk-new { animation: mk-rise 450ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.mk-activity .mk-chip { font-style: normal; }
.mk-chip-accent { border-color: var(--accent-border); color: var(--accent); }
.mk-flash { animation: mk-flash 500ms cubic-bezier(0.16, 1, 0.3, 1); }

/* History and Progress views: the app's own pages (tokens.css classes), padded like the app's content area */
.mk-app-page { padding: 24px 28px 32px; font-size: 14px; line-height: 1.5; letter-spacing: 0; }
.mk .active-period { color: var(--text) !important; background: var(--surface-2) !important; } /* as in Progress.razor */
.mk-main { position: relative; }
.mk-modal { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(2px); border-radius: 8px; }
.mk-modal > .card { background: var(--surface-2); box-shadow: var(--shadow-lg); }

/* Segmented control: the tabs over each panel */
.mk-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 2px; border: 1px solid var(--border-subtle); border-radius: var(--radius-full); }
.mk-seg button { height: 26px; padding: 0 12px; border-radius: var(--radius-full); color: var(--text-muted); font-size: 12px; font-weight: 500; white-space: nowrap; transition: background var(--transition-base), color var(--transition-base); }
.mk-seg button:hover { color: var(--text); }
.mk-seg button.on { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.mk-panel-top { justify-content: flex-start; }
.mk-panel-top > .mk-lights { margin-right: 4px; }
.mk-panel-top > .mk-lights + span { margin-right: 8px; }
.mk-panel-top .mk-sample { margin-left: auto; }

/* Workout panel */
.mk-row { width: 100%; transition: background var(--transition-base); }
.mk-row:hover { background: rgba(255, 255, 255, 0.025); }
.mk-row.on:hover { background: rgba(113, 197, 251, 0.14); }
.mk-hint { padding: 12px 16px; border-top: 1px solid var(--border-subtle); color: var(--text-muted); font-size: 12px; }

.mk-timer { display: grid; place-items: center; padding: 36px 24px 20px; }
.mk-ring { grid-area: 1 / 1; width: 184px; height: 184px; transform: rotate(-90deg); }
.mk-ring circle { fill: none; stroke-width: 5; }
.mk-ring-bg { stroke: var(--border-subtle); }
.mk-ring-fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear; }
.mk-timer-text { grid-area: 1 / 1; max-width: 136px; text-align: center; }
.mk-timer-text strong { display: block; font-size: 44px; font-weight: 600; line-height: 1.1; letter-spacing: -0.022em; font-variant-numeric: tabular-nums; }
.mk-timer-text span { display: block; margin-top: 4px; color: var(--text-muted); font-size: 12px; line-height: 1.4; }
.mk-timer-actions { display: flex; justify-content: center; gap: 8px; padding: 0 24px 32px; }

.mk-records { padding: 8px 0; }
.mk-rec-row { display: flex; align-items: center; gap: 12px; width: 100%; height: 48px; padding: 0 20px; border-bottom: 1px solid var(--border-subtle); color: var(--text-secondary); transition: background var(--transition-base); }
.mk-rec-row:hover,
.mk-rec-row[aria-expanded="true"] { background: rgba(255, 255, 255, 0.025); }
.mk-rec-more { padding: 10px 20px 14px; border-bottom: 1px solid var(--border-subtle); color: var(--text-muted); font-size: 13px; }
/* The panels clip their edges, so full-width rows draw the focus ring inside */
.mk-row:focus-visible,
.mk-rec-row:focus-visible { outline-offset: -2px; }

.mk-units { padding: 24px; }
.mk-units .mk-table { max-width: 560px; margin-top: 20px; }

/* Progress chart */
.mk-chart-wrap { position: relative; padding: 16px 24px 16px; }
.mk-cross { stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; transition: opacity 0.15s; }
.mk-cross.on { opacity: 1; }
.mk-tip { position: absolute; z-index: 2; transform: translate(-50%, calc(-100% - 12px)); padding: 6px 10px; background: var(--surface-2); border: 1px solid var(--border-subtle); border-radius: 8px; box-shadow: var(--shadow-md); color: var(--text); font-size: 12px; font-weight: 500; white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }
.mk-axis { display: flex; justify-content: space-between; margin-top: 8px; color: var(--text-muted); font-size: 12px; }

/* Coach */
.mk-coach-qs { align-self: flex-start; }
.mk-thinking::after { content: "\2022\2022\2022"; letter-spacing: 3px; color: var(--text-muted); animation: mk-blink 1s ease-in-out infinite; }
.mk-typing::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--accent); animation: mk-blink 0.8s steps(2) infinite; }
.mk-coach-list { margin: 12px 0 0; padding-left: 18px; color: var(--text-secondary); font-size: 14px; }
.mk-coach-list li + li { margin-top: 4px; }

/* FIG 0.1-0.3 come alive on hover */
.mk-hands { transform-box: view-box; transform-origin: 120px 94px; transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1); }
.mk-fig:hover .mk-hands { transform: rotate(360deg); }
.mk-arc { stroke-dasharray: 100; }
.mk-fig:hover .mk-arc { animation: mk-draw 1.4s cubic-bezier(0.16, 1, 0.3, 1); }
.mk-bar,
.mk-plates-l,
.mk-plates-r { transform-box: view-box; transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.mk-fig:hover .mk-bar { transform: translateY(-10px); }
.mk-fig:hover .mk-plates-l { transform: translateX(-3px); }
.mk-fig:hover .mk-plates-r { transform: translateX(3px); }
.mk-fig:hover .mk-accent-fill { animation: mk-pulse 1.2s ease both; animation-delay: calc(var(--i, 0) * 110ms); }

@keyframes mk-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes mk-flash { from { opacity: 0.35; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@keyframes mk-blink { 50% { opacity: 0; } }
@keyframes mk-nudge { 0%, 100% { transform: none; } 50% { transform: translateY(2px); } }
@keyframes mk-draw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes mk-pulse { 0%, 100% { fill: var(--accent-weak); } 40% { fill: var(--accent); } }

/* Touch: the -/+ buttons get a full-width row under the number, every target 44px */
@media (pointer: coarse) {
  .mk-step { position: static; margin-top: 10px; }
  .mk-step button { flex: 1; height: 44px; }
  .mk-icon-btn { width: 44px; height: 44px; }
  .mk-seg button { height: 44px; }
  .mk-link-btn { min-height: 44px; }
  .mk-login, .mk-brand, .mk-more { min-height: 44px; }
}

/* Waitlist questions */
.mk-faq { max-width: 760px; margin-top: 160px; }
.mk-faq h2 { margin-top: 16px; font-size: 40px; line-height: 1.1; font-weight: 500; letter-spacing: -0.022em; }
.faq-list { margin-top: 32px; border-top: 1px solid var(--border-subtle); }
.faq-list details { border-bottom: 1px solid var(--border-subtle); }
/* The row's padding sits on the summary, so tapping anywhere on the row opens it */
.faq-list summary { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; cursor: pointer; font-size: 15px; font-weight: 500; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--text-muted); }
.faq-list details[open] summary::after { content: "\2212"; }
.faq-list p { margin-top: -6px; padding-bottom: 16px; color: var(--text-muted); font-size: 14px; line-height: 1.7; }
.faq-list a { color: var(--text); }

/* Closing call to action, centred */
.mk-cta { margin-top: 160px; padding: 120px 24px; border-top: 1px solid var(--border-subtle); text-align: center; }
.mk-cta h2 { font-size: 40px; line-height: 1.1; font-weight: 500; letter-spacing: -0.022em; }
.mk-cta-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.mk-cta-note { margin-top: 16px; color: var(--text-muted); font-size: 13px; }

/* Footer: the mark and three link columns (Linear has six) */
.mk-footer { padding: 64px 0 40px; border-top: 1px solid var(--border-subtle); }
.mk-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; align-items: start; gap: 32px; }
.mk-footer-col h3 { margin-bottom: 12px; color: var(--text); font-size: 13px; font-weight: 500; letter-spacing: -0.01em; }
.mk-footer-col > a,
.mk-footer-links a { display: flex; align-items: center; min-height: 28px; color: var(--text-muted); font-size: 13px; text-decoration: none; transition: color var(--transition-base); }
.mk-footer-col > a:hover,
.mk-footer-links a:hover { color: var(--text); }
.legal-links.mk-footer-links { flex-direction: column; align-items: flex-start; flex-wrap: nowrap; gap: 0; }
.mk-footer-bottom { margin-top: 48px; color: var(--text-muted); font-size: 13px; }

@media (pointer: coarse) {
  .mk-footer-col > a,
  .mk-footer-links a { min-height: 44px; }
}

/* The legal pages' footer bar (Shared/LegalShell.razor) */
.mk-footer-bar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; width: 100%; max-width: 1040px; margin: 0 auto; padding: 24px; border-top: 1px solid var(--border-subtle); color: var(--text-muted); font-size: 13px; }

/* Scroll reveal (wwwroot/js/app.js): a short, quiet fade up */
.reveal-ready [data-reveal] { opacity: 0; transform: translateY(12px); }

.reveal-ready [data-reveal].reveal-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1), transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  .reveal-ready [data-reveal],
  .reveal-ready [data-reveal].reveal-visible { opacity: 1; transform: none; transition: none; }
  .mk-window *,
  .mk-panel *,
  .mk-fig * { animation: none !important; transition: none !important; }
}

@media (min-width: 769px) {
  .mk-window { height: 628px; min-height: 0; } /* 28px more for the title bar: the app under it keeps its size */
  .mk-main { min-height: 0; }
  .mk-view { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
}

@media (max-width: 1024px) {
  .mk-hero h1 { font-size: 56px; }
  .mk-statement { font-size: 32px; }
  .mk-feature h2 { font-size: 40px; }
  .mk-feature-copy p { font-size: 20px; }
  .mk-main-body { grid-template-columns: 1fr; }
  /* The properties move under the exercise, two to a row, so the rest timer stays in view */
  .mk-props { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 20px 24px; border-left: 0; border-top: 1px solid var(--border-subtle); }
}

@media (max-width: 768px) {
  .mk-inner { padding: 0 16px; }
  .mk-nav,
  .mk-divider { display: none; }
  .mk-hero { padding-top: 64px; }
  .mk-hero h1 { font-size: 40px; line-height: 1.1; }
  .mk-hero-row { flex-direction: column; align-items: flex-start; gap: 16px; margin-top: 20px; }
  .mk-hero-cta { margin-top: 24px; }
  .mk-hero-cta .btn { width: 100%; }
  .mk-app { margin-top: 40px; }
  .mk-window { grid-template-columns: 1fr; min-height: 0; padding: 6px; }
  .mk-titlebar { grid-template-columns: auto minmax(0, 1fr); gap: 12px; height: 32px; margin: -6px -6px 0; padding: 0 12px; font-size: 12px; }
  .mk-lights { gap: 6px; }
  .mk-lights i { width: 10px; height: 10px; }
  .mk-side { display: none; }
  .mk-doc { padding: 20px 16px; }
  .mk-log { grid-template-columns: 1fr 1fr; }
  .mk-fail,
  .mk-log-btn { justify-content: center; min-height: 44px; }
  /* The exercise's name is the title just below: the bar keeps the pager, and goes outside the workout view */
  .mk-main-top > span:nth-child(-n+3) { display: none; }
  .mk-main-top-right { justify-content: flex-end; width: 100%; margin-left: 0; }
  .mk-main-top:has([data-pager][hidden]) { display: none; }
  .mk-chart-svg .line { stroke-width: 3.5; }
  .mk-mtabs { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--border-subtle); }
  .mk-mtabs button { flex: 1; min-height: 44px; border-radius: 8px; color: var(--text-muted); font-size: 13px; font-weight: 500; text-align: center; }
  .mk-mtabs button.on { background: rgba(255, 255, 255, 0.07); color: var(--text); }
  .mk-props { padding: 16px; }
  .mk-app-page { padding: 16px; }
  .mk-view[data-panel="history"],
  .mk-view[data-panel="progress"] { max-height: 640px; overflow-y: auto; }
  .mk-panel-top { flex-wrap: wrap; height: auto; padding: 10px 12px; }
  .mk-panel-top .mk-seg { order: 3; }
  .mk-chart-wrap { padding: 12px 16px; }
  .mk-chart-stats { flex-wrap: wrap; gap: 20px 32px; padding: 20px 16px 0; }
  .mk-timer-actions { flex-wrap: wrap; }
  .mk-rec-row { flex-wrap: wrap; height: auto; padding: 10px 16px; row-gap: 2px; }
  .mk-statement-wrap { padding-top: 96px; }
  .mk-statement { font-size: 24px; line-height: 1.25; }
  .mk-figs { grid-template-columns: 1fr; gap: 40px; margin-top: 56px; }
  .mk-feature,
  .mk-quote-wrap { margin-top: 96px; padding-top: 64px; }
  .mk-feature-head { grid-template-columns: 1fr; gap: 20px; }
  .mk-feature h2 { font-size: 32px; line-height: 1.1; }
  .mk-feature-copy p { font-size: 17px; line-height: 1.5; }
  .mk-panel { margin-top: 32px; }
  .mk-chart-stats { gap: 32px; }
  .mk-quote blockquote { font-size: 22px; }
  .mk-cards { grid-template-columns: 1fr; margin-top: 64px; }
  .mk-faq { margin-top: 96px; }
  .mk-faq h2,
  .mk-cta h2 { font-size: 30px; }
  .mk-cta { margin-top: 96px; padding: 80px 16px; }
  .mk-cta-actions .btn { width: 100%; }
  .mk-footer-grid { grid-template-columns: 1fr 1fr; }
  .mk-footer-grid > .mk-brand { grid-column: 1 / -1; }
}
