/* Chrona landing. Plain CSS, no build step.
   Uses the demo's visual language so the landing and the demo read as one product:
   system font, primary #4a9ee8, brand mark #8ec5f5, light grey surfaces, calendar blocks with a
   tinted fill and a coloured left edge, and a lock on fixed blocks.
   Token values are copied from demo/css/base.css, setup.css and calendar.css. */

:root {
  --text: #1d2633;
  --muted: #5b6878;
  --faint: #8a96a6;
  --hour: #a3adba;
  --bg: #f4f6f9;
  --panel: #f1f5fa;
  --white: #ffffff;
  --line: #e3e8ef;
  --line-soft: #eef1f5;
  --field: #d9e0ea;
  --primary: #4a9ee8;
  --primary-dark: #2b7de9;
  --link: #1d6fb8;
  --mark: #8ec5f5;

  /* category colours, as in the demo's sign-in week preview */
  --work-bg: #bfe0fb;   --work-edge: #4a9ee8;
  --meet-bg: #e4dcfb;   --meet-edge: #7c5ce6;

  --font: Onest, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif; /* fonts: demo/css/fonts.css (ALM-97) */
  --shadow-pop: 0 12px 32px rgba(30, 60, 110, .2);
  --shadow-lift: 0 10px 24px rgba(30, 60, 110, .28);

  --gutter: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  font-variant-numeric: normal;
}
h1, h2, h3 { margin: 0; line-height: 1.15; font-family: var(--serif); font-weight: 700; }
button, input { font-family: inherit; }
p { margin: 0; }
a { color: var(--link); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 800px; }

/* ---------- buttons (demo .b and .b.p, scaled up) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 22px;
  border: 1px solid var(--primary); border-radius: 10px;
  background: var(--primary); color: var(--white);
  font: 600 1rem/1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .875rem; border-radius: 8px; }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 1.0625rem; }
.btn-block { width: 100%; }
.btn-ghost { background: var(--white); color: var(--text); border-color: var(--field); min-height: 40px; font-size: .9375rem; }
.btn-ghost:hover { background: var(--panel); border-color: var(--primary); }
.btn:disabled { opacity: .6; cursor: default; }

/* ---------- header (demo .hdr) ---------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--white); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 24px; height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 1.0625rem; color: var(--text); text-decoration: none; }
.mark { width: 20px; height: 20px; background: url(../demo/img/logo/mark.svg) center / contain no-repeat; flex-shrink: 0; } /* logo: scripts/build-logo.py (ALM-106) */
.top-nav { display: flex; gap: 4px; margin-left: auto; }
.top-nav a { padding: 6px 12px; border-radius: 8px; color: var(--muted); font-size: .9375rem; font-weight: 500; text-decoration: none; }
.top-nav a:hover { background: var(--bg); color: var(--text); }

/* ---------- hero ---------- */
.hero { padding: clamp(32px, 4.5vw, 56px) 0 clamp(48px, 6vw, 80px); }
.hero-in { display: grid; grid-template-columns: minmax(0, 10fr) minmax(0, 11fr); gap: 48px; align-items: center; }
.hero-title {
  font-size: clamp(2.5rem, 1.2rem + 2.8vw, 3.75rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -.012em;
}
.hero-title span { display: block; text-wrap: balance; }
.lede { margin-top: clamp(18px, 2vw, 24px); max-width: 46ch; font-size: 1.1875rem; line-height: 1.55; color: var(--muted); }
.hero-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 28px; }
.ea-link { font-size: .9375rem; color: var(--link); text-decoration: none; }
.ea-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.final-card .ea-link { display: inline-block; margin-top: 14px; }
.final-card .btn { display: flex; width: max-content; margin: 0 auto; }

/* falling-blocks week, the same component and panel as demo sign-in (.si-right) */
.hero-week-desktop { height: clamp(460px, 44vw, 560px); }
.hero-week-mobile { display: none; }

/* ---------- replanning board (demo calendar) ---------- */
.section-lede { margin-top: 12px; max-width: 60ch; font-size: 1.0625rem; color: var(--muted); }
.promises { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; }
.promises li { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9375rem; color: var(--text); }
.promises svg { flex-shrink: 0; width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: #e3f6ea; color: #2f9e5a; }
.board-fig { margin: 28px 0 0; }
.board-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 12px; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: .875rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 26px; height: 16px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: flex-end; padding-right: 3px; color: rgba(29, 38, 51, .7); }
.sw-fixed { background: var(--meet-bg); border-left: 3px solid var(--meet-edge); }
.sw-flex { background: var(--work-bg); border-left: 3px solid var(--work-edge); }
.sw-ext { background: var(--white); border: 1px solid var(--field); justify-content: center; padding: 0; color: var(--link); }
.blk .ext { flex-shrink: 0; margin-top: 2px; color: rgba(29, 38, 51, .7); }

/* an event arriving from the visitor's calendar (read-only connection, ALM-100) */
.board { position: relative; }
.incoming {
  position: absolute; z-index: 6; top: 48px; right: 14px; width: 260px;
  background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop);
  font-size: .8125rem; line-height: 1.35; overflow: hidden;
  opacity: 0; transform: translateY(-8px); pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}
.incoming.on { opacity: 1; transform: none; }
.inc-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line-soft); font-weight: 600; color: var(--muted); }
.inc-ic { width: 22px; height: 22px; border-radius: 6px; background: var(--meet-bg); color: var(--meet-edge); display: inline-flex; align-items: center; justify-content: center; }
.inc-ic svg { width: 13px; height: 13px; }
.inc-src { margin-left: auto; font-size: .6875rem; font-weight: 600; color: var(--faint); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.inc-ev { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 10px 12px 10px 14px; border-left: 3px solid var(--meet-edge); margin: 10px 12px; background: var(--meet-bg); border-radius: 6px; }
.inc-ev b { grid-column: 1 / -1; font-weight: 600; }
.inc-ev span { color: rgba(29, 38, 51, .7); }
.inc-org { grid-column: 1; font-size: .75rem; }
.inc-ok { grid-column: 2; grid-row: 2 / span 2; align-self: end; font-size: .6875rem; font-weight: 700; color: #2f9e5a !important; background: #e3f6ea; border-radius: 999px; padding: 2px 8px; }
.inc-foot { padding: 0 12px 10px; font-size: .75rem; color: var(--muted); }
.blk small.src { color: rgba(29, 38, 51, .75); font-weight: 600; }
.no-anim .incoming { transition: none !important; }

.board {
  --hours: 9;
  --gut: 48px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.board-days { display: grid; grid-template-columns: var(--gut) repeat(var(--cols, 5), 1fr); border-bottom: 1px solid var(--line-soft); }
.board-days div { padding: 9px 0 8px; text-align: center; font-size: .8125rem; font-weight: 600; color: var(--muted); }
.board-days div.is-hot span { background: var(--primary); color: var(--white); border-radius: 999px; padding: 2px 10px; }
.board-body { position: relative; display: grid; grid-template-columns: var(--gut) 1fr; height: clamp(420px, 40vw, 470px); }
.board-hours { position: relative; }
.board-hours span { position: absolute; right: 8px; transform: translateY(-50%); font-size: .6875rem; color: var(--hour); }
.board-hours span:first-child { transform: none; }
.board-grid {
  position: relative;
  background-image:
    linear-gradient(to bottom, #f1f4f8 1px, transparent 1px),
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px);
  background-size: 100% calc(100% / var(--hours)), calc(100% / var(--cols, 5)) 100%;
}

.blk {
  position: absolute;
  margin: 1px 3px 0 4px;
  padding: 4px 6px;
  border-radius: 6px;
  border-left: 3px solid rgba(0, 0, 0, .25);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
  overflow: hidden;
  color: var(--text);
  font-size: .75rem;
  line-height: 1.25;
  transition: top .55s cubic-bezier(.3, .7, .2, 1), left .55s cubic-bezier(.3, .7, .2, 1), height .55s ease, opacity .3s ease, box-shadow .3s ease, transform .35s ease;
}
.blk .bt { display: flex; gap: 4px; align-items: flex-start; }
.blk .bt b { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk { flex-shrink: 0; margin-top: 2px; color: rgba(29, 38, 51, .7); }
.blk small { display: block; font-size: .6875rem; color: rgba(29, 38, 51, .6); white-space: nowrap; }
.blk-meet { background: var(--meet-bg); border-left-color: var(--meet-edge); }
.blk-work { background: var(--work-bg); border-left-color: var(--work-edge); }
.blk.is-short small { display: none; }
.blk.is-short { padding-top: 2px; padding-bottom: 2px; }
.blk.is-new { opacity: 0; transform: translateY(-12px); box-shadow: var(--shadow-lift); }
.blk.is-in { opacity: 1; transform: none; box-shadow: 0 0 0 2px var(--primary-dark); z-index: 2; }
.blk.is-moved { box-shadow: 0 0 0 2px var(--primary-dark); z-index: 2; }

figcaption { margin-top: 12px; min-height: 3em; }
.log { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: .875rem; }
.log li { display: inline-flex; align-items: baseline; gap: 8px; animation: logIn .35s ease both; }
.log li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--primary-dark); flex-shrink: 0; transform: translateY(-1px); }
.log li.log-fixed::before { background: var(--meet-edge); }
.log-idle { font-size: .875rem; color: var(--muted); }
.log-idle[hidden] { display: none; }
@keyframes logIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- sections ---------- */
main > section:not(.hero) { padding: clamp(56px, 8vw, 104px) 0; }
h2 { font-size: clamp(1.75rem, 1.25rem + 1.8vw, 2.5rem); font-weight: 700; letter-spacing: -.01em; }

.feats-sec, .progress-sec { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.replan h2 { max-width: 24ch; }

/* closing call to action: a card on top of a faint calendar week */
.final { position: relative; overflow: hidden; }
.final-week { position: absolute; inset: 0; pointer-events: none; }
.final-week::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(to bottom, #e6ebf2 1px, transparent 1px), linear-gradient(to right, #e6ebf2 1px, transparent 1px);
  background-size: 100% 48px, calc(100% / 7) 100%;
  -webkit-mask-image: radial-gradient(ellipse 75% 85% at 50% 50%, transparent 30%, #000 75%);
  mask-image: radial-gradient(ellipse 75% 85% at 50% 50%, transparent 30%, #000 75%);
}
.final-week .blk { width: min(190px, 13vw); box-shadow: 0 6px 18px rgba(30, 60, 110, .10); }
.final-week .blk-fam { background: #fde2c8; border-left-color: #f08a2e; }
.fw1 { left: 5%; top: 14%; height: 76px; }
.fw2 { left: 11%; top: 58%; height: 52px; }
.fw3 { left: 22%; top: 82%; height: 44px; }
.fw4 { right: 6%; top: 10%; height: 92px; }
.fw5 { right: 12%; top: 54%; height: 52px; }
.fw6 { right: 21%; top: 84%; height: 38px; }
.final .wrap { position: relative; }
.final-card {
  max-width: 600px; margin: 0 auto; text-align: center;
  background: var(--white); border: 1px solid var(--line); border-radius: 16px;
  padding: clamp(32px, 5vw, 52px) clamp(22px, 5vw, 48px);
  box-shadow: 0 24px 60px rgba(30, 60, 110, .12);
}
.final-card h2 { max-width: 20ch; margin: 0 auto; text-wrap: balance; }
.final-card p { margin: 14px auto 28px; max-width: 42ch; color: var(--muted); font-size: 1.0625rem; }

.foot { padding: 24px 0 36px; font-size: .875rem; color: var(--faint); }
.foot-in { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.logo-sm { font-size: .9375rem; color: var(--muted); }
.logo-sm .mark { width: 14px; height: 14px; }



/* ---------- benefit scenes (js/scenes.js, js/loop.js) ---------- */
.feat { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; margin-top: 56px; }
.feat:first-of-type { margin-top: 40px; }
.feat:nth-of-type(even) .feat-text { order: 2; }
.feat-text h3 { font-size: 1.5rem; letter-spacing: -.005em; margin-bottom: 10px; }
.feat-text p { color: var(--muted); max-width: 44ch; }

.scene { margin: 0; }
.scene-stage { position: relative; min-height: 120px; }
.scene figcaption { min-height: 2.2em; margin-top: 10px; font-size: .875rem; color: var(--muted); }

.mini { background: var(--white); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.mini-days { display: grid; grid-template-columns: 40px repeat(var(--cols), 1fr); border-bottom: 1px solid var(--line-soft); }
.mini-days div { padding: 6px 0 5px; text-align: center; font-size: .75rem; font-weight: 600; color: var(--muted); }
.mini-body { position: relative; display: grid; grid-template-columns: 40px 1fr; height: calc(var(--rows) * 36px); }
.mini-hours { position: relative; }
.mini-hours span { position: absolute; right: 6px; transform: translateY(-50%); font-size: .625rem; color: var(--hour); }
.mini-hours span:first-child { transform: none; }
.mini-grid {
  position: relative;
  background-image: linear-gradient(to bottom, #f1f4f8 1px, transparent 1px), linear-gradient(to right, var(--line-soft) 1px, transparent 1px);
  background-size: 100% calc(100% / var(--rows)), calc(100% / var(--cols)) 100%;
}
.mini .blk { font-size: .6875rem; padding: 3px 5px; transition: top 1s cubic-bezier(.45, 0, .2, 1), left 1s cubic-bezier(.45, 0, .2, 1), height 1s cubic-bezier(.45, 0, .2, 1), opacity .3s ease, box-shadow .3s ease, transform .35s ease; }
.mini .blk small { font-size: .625rem; }
.mini .blk.is-short { padding-top: 1px; padding-bottom: 1px; }
.blk.is-try { opacity: .55; outline: 2px dashed var(--work-edge); outline-offset: -2px; }
.blk.is-done { opacity: .62; }
.blk.is-done b { text-decoration: line-through; text-decoration-color: rgba(29, 38, 51, .6); }
.blk.flash { animation: scFlash 1s ease-out 1; }
.blk.appear { animation: scIn .5s ease-out 1; }
.blk.is-gone { opacity: 0; }
@keyframes scFlash { 0% { box-shadow: 0 0 0 3px rgba(67, 178, 107, .6); background: #e3f6ea; } 100% { box-shadow: 0 0 0 3px rgba(67, 178, 107, 0); } }
@keyframes scIn { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }

/* time spaces: work hours and family time */
.mini-band { position: absolute; transition: box-shadow .3s ease; }
.mini-band.band-work { background: #eef6fe; }
.mini-band.band-family { background: repeating-linear-gradient(135deg, #fdf3e8 0 6px, #fbeadb 6px 12px); border-top: 1px solid #f3d6b8; }
.mini-band.is-hot { box-shadow: inset 0 0 0 2px #f08a2e; }
.spaces { display: flex; gap: 16px; margin-bottom: 10px; font-size: .75rem; font-weight: 600; color: var(--muted); }
.spaces span { display: inline-flex; align-items: center; gap: 6px; }
.spaces i { width: 18px; height: 12px; border-radius: 3px; border: 1px solid var(--line); }
.sw-work-hours { background: #eef6fe; }
.sw-family { background: repeating-linear-gradient(135deg, #fdf3e8 0 4px, #fbeadb 4px 8px); border-color: #f3d6b8 !important; }

/* to-do list next to the calendar */
.scene-todo { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 14px; align-items: start; }
.scene-todo .mini { overflow: visible; }
.todo { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 100%; }
.todo-h { font-size: .75rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.todo ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.todo li { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; padding: 6px 0; border-top: 1px solid var(--line-soft); font-size: .8125rem; line-height: 1.3; transition: opacity .25s ease, transform .25s ease; }
.todo li:first-child { border-top: 0; }
.todo li.is-hidden { opacity: 0; transform: translateY(-6px); }
.todo-t { font-weight: 600; }
.todo-d { color: var(--faint); font-size: .75rem; }
.todo-at { grid-column: 1 / -1; font-size: .6875rem; color: var(--link); height: 0; overflow: hidden; transition: height .3s ease; }
.todo li.is-placed .todo-at { height: 1.2em; }
.blk.is-flying { z-index: 4; }
.blk.fly { transition: transform 2s cubic-bezier(.45, 0, .2, 1); }

/* time block form with Auto-Fill, as in the demo */
.af { background: var(--white); border: 1px solid var(--field); border-radius: 12px; padding: 10px 12px; box-shadow: 0 10px 28px rgba(30, 60, 110, .14); margin-bottom: 14px; }
.af-h { font-size: .8125rem; font-weight: 600; color: var(--muted); margin: 2px 2px 6px; }
.af-title { position: relative; display: flex; align-items: center; min-height: 32px; padding: 0 4px; font-size: .9375rem; font-weight: 600; }
.af-ph { color: var(--hour); font-weight: 500; }
.af-ph[hidden] { display: none; }
.af-caret { width: 1.5px; height: 18px; background: var(--text); margin-left: 1px; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.af-row { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.af-row .sp { flex: 1; }
.af-plus { width: 28px; height: 28px; border-radius: 7px; background: #f1f4f8; display: inline-flex; align-items: center; justify-content: center; color: #3b4656; font-size: 17px; }
.af-ai { width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: #7c5ce6; position: relative; }
.af-ai.is-busy { background: #f3effe; }
.af-ai.is-busy svg { animation: aiSpin .8s linear infinite; }
@keyframes aiSpin { to { transform: rotate(360deg); } }
.af-fb { height: 28px; display: inline-flex; align-items: center; gap: 6px; padding: 0 9px; border: 1px solid var(--field); border-radius: 7px; background: var(--white); font-size: .75rem; color: var(--faint); white-space: nowrap; }
.af-fb .dot { width: 9px; height: 9px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .12); background: var(--white); }
.af-fb.is-set { color: #3b4656; }
.af-fb.flash { animation: scFlash 1s ease-out 1; }
.af-save { width: 32px; height: 32px; border-radius: 8px; background: var(--primary); color: var(--white); display: inline-flex; align-items: center; justify-content: center; transition: transform .15s ease, background-color .15s ease; }
.af-save.is-press { transform: scale(.9); background: var(--primary-dark); }
.af-msg { margin: 6px 2px 0; min-height: 1.3em; font-size: .75rem; color: #6a4fd8; }

/* demo actions menu */
.scene-menu { position: absolute; z-index: 5; width: 236px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(30, 60, 110, .22); padding: 5px; font-size: .8125rem; animation: scIn .18s ease-out 1; }
.scene-menu .mi { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 7px; color: var(--text); }
.scene-menu .mi.on { background: #eaf4fd; color: #1d4f7a; }
.scene-menu .ic { width: 16px; display: inline-flex; justify-content: center; color: var(--muted); }
.scene-menu .lab { flex: 1; }
.scene-menu .val { color: var(--faint); font-size: .75rem; }
.scene-menu .arr { color: var(--faint); }
.scene-menu .mh { padding: 5px 8px 4px; font-size: .6875rem; font-weight: 600; color: var(--faint); }

/* task progress under the progress scene */
.task-progress { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; font-size: .8125rem; }
.tp-name { font-weight: 600; }
.tp-bar { height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.tp-bar b { display: block; height: 100%; width: 0; background: #43b26b; border-radius: 999px; transition: width 1s ease; }
.tp-val { font-style: normal; color: var(--muted); font-size: .75rem; }

/* focus / deadlines switch, the demo's segmented look */
.seg { display: inline-flex; margin-top: 18px; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 8px; font: 600 .875rem var(--font); color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--white); color: var(--text); box-shadow: 0 1px 3px rgba(30, 60, 110, .15); }

/* progress: one calendar, two steps of text that light up in turn */
.feat-progress { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); margin-top: 32px; }
.progress-steps { display: grid; gap: 22px; }
.pstep { padding-left: 16px; border-left: 3px solid var(--line); opacity: .55; transition: opacity .3s ease, border-color .3s ease; }
.pstep.on { opacity: 1; border-left-color: var(--primary); }

/* replanning board: every task moves at once, in about 2 seconds */
.board .blk { transition: top 2s cubic-bezier(.45, 0, .2, 1), left 2s cubic-bezier(.45, 0, .2, 1), height 2s cubic-bezier(.45, 0, .2, 1), opacity .3s ease, box-shadow .3s ease, transform .35s ease; }

.no-anim .blk, .no-anim .tp-bar b, .no-anim .mini-band, .no-anim .todo li, .no-anim .af-save, .no-anim .pstep, .no-anim .scene-menu { transition: none !important; animation: none !important; }

/* ---------- responsive ---------- */
/* ---------- AI harness (MCP) scene ---------- */
#scene-mcp .scene-stage { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; align-items: stretch; }
.chat { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; min-height: 280px; }
.chat-h { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line-soft); font-size: .8125rem; font-weight: 600; color: var(--text); }
.chat-ic { width: 24px; height: 24px; border-radius: 7px; background: #efeafd; color: #7c5ce0; display: inline-flex; align-items: center; justify-content: center; }
.chat-ic svg { width: 15px; height: 15px; }
.chat-conn { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; color: var(--text) !important; font-size: .6875rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }
.chat-conn i { width: 7px; height: 7px; border-radius: 50%; background: #43b26b; }
.chat-log { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 12px; }
.msg { max-width: 88%; font-size: .8125rem; line-height: 1.45; border-radius: 12px; padding: 8px 11px; animation: msgIn .3s ease-out 1; }
.msg-me { align-self: flex-end; background: var(--primary); color: var(--white); border-bottom-right-radius: 4px; }
.msg-ai { align-self: flex-start; background: var(--panel); color: var(--text); border-bottom-left-radius: 4px; }
.msg-tool { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; font-size: .75rem; font-weight: 600; color: var(--muted); background: var(--white); border: 1px solid var(--line); border-radius: 8px; }
.msg-tool code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .6875rem; font-weight: 500; color: var(--text); background: var(--panel); border-radius: 4px; padding: 1px 5px; }
.tool-st { width: 14px; height: 14px; border-radius: 50%; background: #43b26b; position: relative; flex-shrink: 0; }
.tool-st::after { content: ""; position: absolute; left: 4.5px; top: 2.5px; width: 3px; height: 6px; border: solid var(--white); border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); }
.msg-tool.is-busy .tool-st { background: none; border: 2px solid var(--line); border-top-color: var(--primary); animation: spin .8s linear infinite; }
.msg-tool.is-busy .tool-st::after { display: none; }
.chat-in { position: relative; display: flex; align-items: center; margin: 0 10px 10px; padding: 8px 8px 8px 12px; min-height: 40px; border: 1px solid var(--field); border-radius: 10px; font-size: .8125rem; }
.chat-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-ph { color: var(--faint); }
.chat-ph[hidden] { display: none; }
.chat-send { margin-left: auto; width: 28px; height: 28px; flex-shrink: 0; border-radius: 8px; background: var(--primary); color: var(--white); display: inline-flex; align-items: center; justify-content: center; transition: transform .15s ease; }
.chat-send.is-press { transform: scale(.9); }
.mcp-cal .mini { height: 100%; display: flex; flex-direction: column; }
.mcp-cal .mini-body { flex: 1; height: auto; min-height: calc(var(--rows) * 36px); }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
.no-anim .msg { animation: none; }

@media (max-width: 800px) {
  .hero-in { grid-template-columns: 1fr; gap: 28px; }
  .hero-week-desktop { display: none; }
  .hero-week-mobile { display: block; }
  .feat, .feat-progress { grid-template-columns: 1fr; gap: 18px; margin-top: 44px; }
  .feat:nth-of-type(even) .feat-text { order: 0; }
  .feat-progress .progress-steps { order: -1; }
}
@media (max-width: 720px) {
  .top-nav { display: none; }
  .top-in { justify-content: space-between; height: 56px; }
  .lede { font-size: 1.0625rem; }
  .hero-cta { align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .hero-cta .ea-link { text-align: center; }
  .board-bar { flex-direction: column; align-items: stretch; }
  .board { --gut: 42px; }
  .board-body { height: 500px; }
  .final .btn { width: 100%; }
  .final-week .blk { display: none; }
  .scene-todo { grid-template-columns: 1fr; }
  #scene-mcp .scene-stage { grid-template-columns: 1fr; }
  }

@media (prefers-reduced-motion: reduce) {
  .blk, .log li, .scene-menu, .af-caret, .msg, .msg-tool .tool-st { transition: none; animation: none; }
}
.foot a { color: inherit; }
