/* The story: one screen at a time. Phone first, then tablet (720) and desktop (1230). */

:root {
  --paper: #f5f1e7; --ink: #27312f; --dark: #34464a; --muted: #5a6865;
  --hair: #cfd7cd; --light: #e6ebe3; --teal: #cddcd7; --teal-d: #3f5b59;
  --orange: #d8935a; --orange-l: #f4dcc2; --brown: #8a5326;
  --on-dark: #f6f2e8; --on-dark-2: #e6ede7; --dark-hair: #5b7071;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --gut: 24px; --pad: 16px; --banner: 56px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--banner); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
p, h1, h2, ol { margin: 0; }
ol { padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
h1:focus, h2:focus, .big:focus { outline: none; }

/* ---------- banner ---------- */
.banner { position: sticky; top: 0; z-index: 5; height: var(--banner); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px; background: var(--dark); color: var(--on-dark); font-size: 14px; font-weight: 700; }
.brand { display: flex; align-items: center; gap: 8px; min-height: 44px; color: inherit; text-decoration: none; }
.brand .dot { width: 12px; height: 12px; flex: none; border-radius: 50%; background: var(--orange); }
.brand.plain #chapter { font-weight: 400; }
.bars { display: flex; gap: 5px; }
.bars i { width: 34px; height: 6px; border-radius: 3px; background: var(--dark-hair); overflow: hidden; }
.bars b { display: block; height: 6px; width: 0; background: var(--orange); transition: width .3s ease; }

/* ---------- a screen ---------- */
.screen { display: none; min-height: calc(100vh - var(--banner)); min-height: calc(100dvh - var(--banner)); flex-direction: column; }
.screen.on { display: flex; }
.text { padding: 40px var(--gut) 0; }
h2 { font: 600 36px/1.06 var(--serif); letter-spacing: -0.02em; }
.sub { margin-top: 8px; font-size: 15px; line-height: 1.4; color: var(--muted); }
.stage { display: flex; flex-direction: column; padding: 40px var(--pad) 0; }
.foot { margin-top: auto; display: flex; flex-direction: column; gap: 16px; padding: 28px var(--pad) 20px; }
.closing { padding: 0 8px; font-size: 18px; }
.btn { width: 100%; height: 54px; border: 0; border-radius: 999px; background: var(--ink); color: var(--on-dark); font: 600 17px system-ui, sans-serif; text-decoration: none; display: grid; place-items: center; cursor: pointer; }
.btn.accent { background: var(--orange); color: var(--ink); }
.btn[disabled] { opacity: .6; cursor: progress; }
.linkish { min-height: 44px; padding: 0; border: 0; background: none; font: 600 14.5px system-ui, sans-serif; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.label { font-size: 14px; font-weight: 700; }
.label.brown { color: var(--brown); }
.label.teal-ink { color: var(--teal-d); }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 600; }
.field input { height: 48px; padding: 0 16px; border: 2px solid var(--hair); border-radius: 999px; background: #fff; font-size: 15px; font-weight: 400; }
.notice { margin-top: 12px; padding: 12px 16px; border-radius: 12px; background: var(--orange-l); font-size: 14.5px; }

/* ---------- hero ---------- */
.hero { background: var(--dark); color: var(--on-dark); padding: 28px var(--gut) 20px; justify-content: space-between; gap: 28px; }
.hero h1, .hero-b { font: 600 54px/1.02 var(--serif); letter-spacing: -0.025em; }
.hero-b { text-align: right; }
.hero-mid { display: flex; flex-direction: column; gap: 18px; }
.lede { font-size: 18px; color: var(--on-dark-2); }
.chapters { border-bottom: 1px solid var(--dark-hair); }
.chapters li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-top: 1px solid var(--dark-hair); }
.chapters b { font-size: 17px; font-weight: 600; }
.chapters span { font-size: 14.5px; line-height: 1.35; color: var(--on-dark-2); }
.hero-foot { margin: 0 -8px; }

/* ---------- 01a ---------- */
.pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; align-items: center; }
.col-h { font: 600 22px var(--serif); }
.blob, .box { min-height: 52px; display: flex; align-items: center; padding: 6px 14px; font-size: 14.5px; font-weight: 700; line-height: 1.25; }
.blob { background: var(--teal); }
.b1 { border-radius: 26px 34px 28px 36px / 32px 26px 34px 28px; }
.b2 { border-radius: 34px 26px 36px 28px / 28px 34px 26px 32px; }
.b3 { border-radius: 28px 36px 26px 34px / 34px 28px 32px 26px; }
.box { padding: 6px 12px; background: #fff; border: 2px solid var(--orange); border-radius: 6px; }
.day-label { margin-top: 20px; }
.daybar { display: flex; gap: 3px; height: 44px; margin-top: 8px; font-size: 13.5px; font-weight: 700; }
.daybar > span { display: grid; place-items: center; overflow: hidden; }
.daybar .artist { flex: none; background: var(--teal-d); color: #fff; border-radius: 22px 6px 6px 26px / 26px 6px 6px 22px; }
.daybar .architect { flex: 1; background: var(--orange); border-radius: 6px; }
.deadlines { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 13px; line-height: 1.3; }
.deadlines .t { color: var(--teal-d); }
.deadlines .o { color: var(--brown); text-align: right; }
.deadlines b { display: block; }

/* ---------- 01b ---------- */
.day { position: relative; padding-top: 22px; --s: 0; }
.day .label { position: absolute; top: 0; left: 0; }
.eod-label { position: absolute; top: 0; right: 29%; font-size: 13px; font-weight: 600; color: var(--muted); }
.daybar.tall { height: 60px; font-size: 15px; }
.daybar.tall .artist { width: calc(21% + var(--s) * 0.29%); border-radius: 26px 6px 6px 30px / 30px 6px 6px 26px; }
.daybar.tall .architect { flex: none; width: 49%; }
.eod { position: absolute; left: 71%; top: 22px; bottom: -6px; border-left: 2px dashed var(--ink); }
.pull { display: flex; flex-direction: column; gap: 2px; margin-top: 20px; padding: 10px 14px 6px; border-radius: 14px; font-size: 14px; font-weight: 700; }
.pull.teal { background: var(--teal); }
.pull.orange { background: var(--orange-l); }
.pull input { width: 100%; height: 44px; margin: 0; }
.pull.teal input { accent-color: var(--teal-d); }
.pull.orange input { accent-color: var(--brown); }

/* ---------- 01c ---------- */
.daybar.big { height: 104px; }
.daybar.big .artist { flex: 1; min-width: 0; padding: 0 10px 0 16px; text-align: center; font: 600 16px/1.15 var(--serif); border-radius: 40px 8px 8px 46px / 46px 8px 8px 40px; transition: font-size .2s ease; }
.daybar.big .piece { flex: none; width: 20%; font-size: 12.5px; }
#hand[data-agents="1"] .daybar.big .artist { font-size: 18px; }
#hand[data-agents="2"] .daybar.big .artist { font-size: 21px; }
#hand[data-agents="3"] .daybar.big .artist { font-size: 24px; }
#hand[data-agents="1"] .piece[data-i="0"], #hand[data-agents="2"] .piece[data-i="0"], #hand[data-agents="2"] .piece[data-i="1"], #hand[data-agents="3"] .piece { display: none; }
.agents-label { margin-top: 22px; }
.agents { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.agent { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 46px; padding: 0 14px; border: 2px dashed var(--hair); border-radius: 6px; }
.agent b { font-size: 15px; visibility: hidden; }
.agent .track { display: none; width: 112px; height: 8px; flex: none; border-radius: 4px; background: #fff; overflow: hidden; }
.agent .track i { display: block; width: 40%; height: 8px; border-radius: 4px; background: var(--orange); animation: run 1.6s linear infinite; }
#hand[data-agents="1"] .agent[data-i="0"], #hand[data-agents="2"] .agent[data-i="0"], #hand[data-agents="2"] .agent[data-i="1"], #hand[data-agents="3"] .agent { background: var(--orange-l); border: 2px solid var(--orange); }
#hand[data-agents="1"] .agent[data-i="0"] > *, #hand[data-agents="2"] .agent[data-i="0"] > *, #hand[data-agents="2"] .agent[data-i="1"] > *, #hand[data-agents="3"] .agent > * { visibility: visible; display: block; }
@keyframes run { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* ---------- 01d ---------- */
.poster-screen .poster { margin-top: auto; padding: 24px var(--pad) 0; }
.shape { display: flex; flex-direction: column; justify-content: center; gap: 10px; min-height: 280px; padding: 52px 28px 76px; background: var(--teal-d); color: #fff; border-radius: 88px 124px 104px 140px / 110px 84px 130px 96px; }
.shape .tag { font-size: 16px; font-weight: 700; color: var(--on-dark-2); }
.shape .big { font: 600 38px/1.04 var(--serif); letter-spacing: -0.02em; }
.shape .tag2 { font-size: 17px; font-weight: 600; color: var(--on-dark-2); }
.card { position: relative; display: flex; flex-direction: column; gap: 4px; margin: -44px 12px 0; padding: 14px 14px 16px; background: #fff; border: 2px solid var(--orange); border-radius: 6px; }
.card .tag { font-size: 16px; font-weight: 700; color: var(--brown); }
.card .big { font: 600 28px/1.1 var(--serif); letter-spacing: -0.01em; }
.card .tag2 { font-size: 16px; font-weight: 600; color: var(--muted); }
.result { padding: 26px var(--pad) 0 44px; }
.result .tag { font-size: 16px; font-weight: 700; color: var(--muted); }
.result p { margin-top: 4px; font: 600 40px/1.04 var(--serif); letter-spacing: -0.02em; }

/* ---------- 02a ---------- */
.bubble { padding: 14px 16px; border-radius: 4px 18px 18px 18px; background: #fff; font-size: 16px; }
.stage > .field { margin-top: 14px; padding: 0 2px; }
textarea { padding: 14px 16px; border: 2px solid var(--ink); border-radius: 18px; background: #fff; font: 400 16px/1.45 system-ui, sans-serif; resize: none; }
.hint { margin-top: 12px; padding: 0 4px; font-size: 14px; color: var(--muted); }

/* ---------- the graph ---------- */
.stage.wide { padding-left: 0; padding-right: 0; }
.segs { display: flex; gap: 4px; margin: 0 var(--pad) 12px; padding: 4px; border-radius: 999px; background: var(--light); }
.segs button { flex: 1; min-height: 44px; border: 0; border-radius: 999px; background: transparent; font: 700 13.5px system-ui, sans-serif; cursor: pointer; }
.segs button[aria-pressed="true"] { background: var(--ink); color: var(--on-dark); }
.graph-scroll { overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }
.graph-scroll::-webkit-scrollbar { display: none; }
.graph { position: relative; width: 780px; transform-origin: top left; }
.graph svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.graph .head { position: absolute; top: 0; width: 160px; text-align: center; font-size: 14px; font-weight: 700; color: var(--muted); display: none; }
.g-in, .g-st, .g-out, .g-ok { position: absolute; width: 160px; }
.g-in { height: 52px; display: grid; place-items: center; padding: 0 10px; text-align: center; background: #fff; border-radius: 999px; font-size: 15px; font-weight: 600; line-height: 1.2; }
.g-st { height: 84px; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 0 14px; background: #fff; border: 2px solid var(--orange); border-radius: 6px; }
.g-st b { font-size: 15.5px; line-height: 1.2; }
.g-st span { align-self: flex-start; padding: 2px 9px; border-radius: 999px; background: var(--orange-l); font-size: 12px; font-weight: 700; }
.g-st.review span { background: var(--teal); }
.g-out { height: 72px; display: flex; align-items: center; padding: 0 16px; background: var(--dark); color: var(--on-dark); border-radius: 6px; font-size: 15px; font-weight: 700; line-height: 1.25; }
.g-ok { width: 112px; height: 34px; display: grid; place-items: center; background: var(--teal); font-size: 13px; font-weight: 700; border-radius: 18px 22px 18px 24px / 20px 18px 22px 18px; }
.g-line { position: absolute; width: 0; border-left: 2px dashed var(--teal-d); }
.graph-host.loading .graph { opacity: .35; }
.fix .field { padding: 0 4px; }

/* ---------- 02c, 02d ---------- */
.picks { display: flex; flex-direction: column; gap: 8px; }
.pick { min-height: 52px; padding: 0 20px; border: 0; background: var(--teal); font: 700 15.5px system-ui, sans-serif; text-align: left; cursor: pointer; border-radius: 26px 32px 28px 34px / 30px 26px 32px 28px; }
.pick:nth-child(2n) { border-radius: 32px 26px 34px 28px / 26px 32px 28px 30px; }
.pick:nth-child(3n) { border-radius: 28px 34px 26px 32px / 32px 28px 30px 26px; }
.pick[aria-pressed="true"] { background: var(--teal-d); color: #fff; }
.own { margin-top: 14px; padding: 0 4px; }
.yours-band { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.yours { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.yours span { padding: 10px 18px; background: var(--teal-d); color: #fff; font-size: 15px; font-weight: 700; border-radius: 26px 32px 28px 34px / 30px 26px 32px 28px; }
.yours em { font-style: normal; font-size: 15px; color: var(--muted); }
#\30 2d .stage { padding-top: 16px; }

/* ---------- 03a ---------- */
.rows { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.rows-h { margin-top: 18px; }
#yours-h, .rows-h { padding: 0 6px; font-size: 13px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 0 16px; font-size: 15.5px; font-weight: 700; }
.row small { flex: none; font-size: 12.5px; font-weight: 600; }
.row.mine { min-height: 50px; padding: 0 18px; background: var(--teal-d); color: #fff; border-radius: 26px 32px 28px 34px / 30px 26px 32px 28px; }
.row.mine small { color: var(--on-dark-2); }
.row.agent-row { background: #fff; border: 2px solid var(--orange); border-radius: 6px; }
.row.agent-row small { color: var(--muted); }
.row.start { min-height: 52px; background: var(--orange-l); border-color: var(--ink); }
.row.start small { color: var(--ink); font-weight: 700; }

/* ---------- 03b ---------- */
.board { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: #fff; border: 2px solid var(--orange); border-radius: 12px; }
.board-name { font-size: 17px; font-weight: 700; }
.cols { display: flex; gap: 6px; }
.cols span { flex: 1; min-height: 44px; display: grid; place-items: center; border-radius: 999px; background: var(--light); font-size: 12.5px; font-weight: 600; }
.cols .on { background: var(--ink); color: var(--on-dark); font-weight: 700; }
.cards { display: flex; flex-direction: column; gap: 8px; }
.cardlet { display: flex; flex-direction: column; gap: 1px; padding: 9px 14px; background: var(--paper); border-radius: 10px; }
.cardlet b { font-size: 14.5px; }
.cardlet span { font-size: 12.5px; color: var(--muted); }
.cardlet.you { background: var(--teal); }
.cardlet.you span { font-weight: 600; color: var(--teal-d); }
.ending { display: flex; flex-direction: column; gap: 10px; padding: 18px 24px; border-radius: 26px; background: var(--dark); color: var(--on-dark); }
.ending .e1 { font: 600 21px/1.2 var(--serif); }
.ending .e2 { font-size: 15px; color: var(--on-dark-2); }
.ending .btn { height: 52px; font-size: 16px; }
#\30 3b .foot { padding-bottom: 16px; }

/* ---------- 03c ---------- */
.steps { display: flex; flex-direction: column; gap: 10px; }
.step { border-radius: 22px; background: var(--light); }
.step.open { background: #fff; }
.step-head { width: 100%; min-height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 18px; border: 0; background: none; text-align: left; cursor: pointer; }
.step-head .num { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--orange-l); font-size: 15px; font-weight: 700; }
.step.open .num { background: var(--orange); }
.step-head b { flex: 1; font: 600 21px var(--serif); }
.step-head .once { font-size: 12px; font-weight: 700; color: var(--muted); }
.step-body { display: flex; flex-direction: column; gap: 12px; padding: 0 18px 18px; }
.step-body[hidden] { display: none; }
.step-body p { font-size: 15px; }
.step-body textarea { border-width: 2px; border-color: var(--hair); border-radius: 14px; font-size: 14px; }
.step-body .linkish { align-self: center; }
#\30 3c .foot { align-items: center; }
.make { display: flex; flex-direction: column; gap: 10px; }
.step-body [hidden] { display: none; }
.make .field { font-size: 15px; }
.make input { font-size: 16px; }
.notice.made { margin-top: 0; }
.notice.made p + p { margin-top: 6px; font-size: 13.5px; }
.two { display: flex; flex-direction: column; gap: 10px; }

/* ---------- tablet: one centred column, the graph shows whole ---------- */
@media (min-width: 720px) {
  .banner { padding: 0 32px; }
  h2 { font-size: 44px; }
  .text, .stage:not(.wide), .foot, .poster-screen .poster, .result { width: 100%; max-width: 608px; margin-left: auto; margin-right: auto; }
  .foot { margin-top: auto; }
  .text { padding-top: 48px; }
  .segs { display: none; }
  .graph-scroll { overflow: hidden; padding-top: 34px; }
  .graph .head { display: block; top: -34px; }
  .hero { padding: 40px 104px 40px; }
  .hero-foot { margin: 0; }
  .shape { min-height: 340px; padding: 64px 48px 96px; border-radius: 120px 170px 140px 190px / 140px 110px 170px 126px; }
  .shape .big { font-size: 54px; }
  .card { margin: -56px 24px 0; padding: 16px 20px 18px; }
  .card .big { font-size: 38px; }
  .result p { font-size: 58px; }
  .picks { flex-direction: row; flex-wrap: wrap; gap: 12px; }
  .pick { min-height: 56px; padding: 0 28px; font-size: 17px; }
  .closing { font-size: 20px; }
}

/* ---------- desktop: words on the left, the thing itself on the right ---------- */
@media (min-width: 1230px) {
  .banner { padding: 0 64px; }
  .screen.on:not(.hero):not(.poster-screen) { display: grid; grid-template-columns: 440px minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .text { grid-column: 1; grid-row: 1; max-width: none; margin: 0; padding: 64px 0 0 64px; }
  h2 { font-size: 52px; line-height: 1.04; }
  .sub { margin-top: 16px; font-size: 18px; line-height: 1.45; }
  .foot { grid-column: 1; grid-row: 2; align-self: end; align-items: flex-start; gap: 20px; max-width: none; margin: 0; padding: 32px 0 48px 64px; }
  .closing { padding: 0; }
  .btn { width: 240px; height: 56px; }
  .stage:not(.wide) { grid-column: 2; grid-row: 1 / 3; align-self: center; justify-self: center; width: 600px; max-width: none; margin: 0; padding: 48px 0; }
  .stage.wide { grid-column: 2; grid-row: 1 / 3; align-self: center; padding: 48px 30px; }
  .fix { width: 100%; }
  .fix .field { padding: 0; }

  .blob, .box { min-height: 60px; padding: 8px 20px; font-size: 16.5px; }
  .pairs { gap: 12px 20px; }
  .col-h { font-size: 26px; }
  .day-label { margin-top: 36px; }
  .daybar { height: 56px; font-size: 15px; }
  .deadlines { font-size: 14.5px; }
  .deadlines b { display: inline; }
  .daybar.tall { height: 76px; font-size: 17px; }
  .daybar.big { height: 120px; }
  .daybar.big .artist { font-size: 22px; padding: 0 16px 0 24px; }
  .daybar.big .piece { font-size: 15px; width: 17.5%; }
  #hand[data-agents="1"] .daybar.big .artist { font-size: 26px; }
  #hand[data-agents="2"] .daybar.big .artist { font-size: 30px; }
  #hand[data-agents="3"] .daybar.big .artist { font-size: 34px; }
  .agent { height: 52px; padding: 0 18px; }
  .agent b { font-size: 16.5px; }
  .agent .track { width: 200px; }
  .pull { margin-top: 28px; padding: 12px 18px 8px; font-size: 15px; }
  .bubble { padding: 18px 22px; font-size: 18px; border-radius: 4px 22px 22px 22px; }
  textarea { padding: 18px 22px; font-size: 18px; border-radius: 22px; }
  .yours-band { margin-top: 32px; }

  .hero.on { display: grid; grid-template-columns: minmax(0, 1fr) 340px minmax(0, 1fr); grid-template-rows: 1fr auto; align-items: center; column-gap: 48px; padding: 0 64px 48px; }
  .hero h1, .hero-b { font-size: 66px; letter-spacing: -0.03em; }
  .hero-a { grid-column: 1; grid-row: 1; }
  .hero-mid { grid-column: 2; grid-row: 1; }
  .hero-b { grid-column: 3; grid-row: 1; }
  .hero-mid .lede { display: none; }
  .chapters li { align-items: center; text-align: center; padding: 12px 0; }
  .chapters b { font-size: 18px; }
  .chapters span { font-size: 15px; }
  .hero-foot { grid-column: 1 / 4; grid-row: 2; display: flex; flex-direction: column; align-items: center; gap: 24px; }
  .hero-foot::before { content: 'Turn your week into task boards that AI agents can work through.'; font-size: 20px; color: var(--on-dark-2); }
  .hero-foot .btn { width: 300px; }

  .poster-screen.on { display: grid; grid-template-columns: 600px minmax(0, 1fr); grid-template-rows: 1fr auto auto 1fr; }
  .poster-screen .poster { grid-column: 1; grid-row: 1 / 5; align-self: center; max-width: none; margin: 0; padding: 0 0 0 64px; }
  .result { grid-column: 2; grid-row: 2; max-width: none; margin: 0; padding: 0 64px 0 72px; }
  .result p { font-size: 64px; }
  .poster-screen .foot { grid-column: 2; grid-row: 3; align-self: start; padding: 40px 64px 0 72px; }

  #\30 3b .foot { padding-right: 24px; }
  .ending .btn { width: 100%; }
  #\30 3c .foot { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .agent .track i { animation: none; width: 100%; }
  .bars b, .daybar.big .artist { transition: none; }
  .graph-scroll { scroll-behavior: auto; }
}
