/* One page, two places, one button. The big word says where you are, the small word where you can go. */
:root {
  --bg: #ffffff; --ink: #10131a; --soft: #5b6270; --pen: #1f45c6; --onpen: #ffffff; --line: #dfe3ea; --edge: #8a91a0; --late: #a3360b;
  --text: system-ui, -apple-system, "SF Arabic", "Segoe UI", Tahoma, sans-serif; --rule: 72px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #0a0c10; --ink: #f2f4f8; --soft: #a3abba; --pen: #9db7ff; --onpen: #0a0c10; --line: #2a303b; --edge: #6b7486; --late: #ffb38a;
} }
* { box-sizing: border-box; }
html { height: 100%; font-size: 17px; -webkit-text-size-adjust: 100%; background: var(--bg);
  padding-block: env(safe-area-inset-top, 0px) env(safe-area-inset-bottom, 0px); }
/* iPhone only: the size chosen in Settings decides everything, because every size below is in rem. */
@supports (-webkit-touch-callout: none) { html { font: -apple-system-body; } }
body { height: 100%; margin: 0; background: var(--bg); color: var(--ink); font-family: var(--text); font-size: 1rem; line-height: 1.6; overflow: hidden; }
button, input, textarea { font: inherit; color: inherit; letter-spacing: 0; }
button { appearance: none; border: 0; background: none; padding: 0; margin: 0; text-align: start; touch-action: manipulation;
  -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; cursor: pointer; }
button:active { opacity: .55; }
button:disabled { opacity: .5; }
:focus-visible { outline: 3px solid var(--pen); outline-offset: 3px; border-radius: 8px; }
p, h1, h2, ul, ol { margin: 0; padding: 0; }
ul { list-style: none; }
b { font-weight: 700; }
a { color: inherit; }
.keep { display: inline-block; max-width: 100%; }   /* a name stays whole, with the comma that follows it */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
[hidden] { display: none !important; }

.phone { height: var(--h, 100%); max-width: 430px; margin-inline: auto; display: flex; flex-direction: column; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-block: 8px 28px;
  -webkit-mask-image: linear-gradient(#000 calc(100% - 22px), transparent); mask-image: linear-gradient(#000 calc(100% - 22px), transparent); }
.foot { padding-block: 12px 14px; display: flex; flex-direction: column; gap: 14px; }
.scroll, .foot { padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }

.head { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 20px; }
.head > * { min-height: 48px; display: inline-flex; align-items: center; padding-inline: 2px; margin-inline: -2px; }
.big { font-size: min(2rem, 13vw); line-height: 1.4; font-weight: 700; text-wrap: balance; }
.big:focus { outline: 0; }
.head .end { margin-inline-start: auto; }
.small { font-size: min(1.18rem, 9vw); font-weight: 600; color: var(--soft); }
.end { margin-inline-start: auto; }
.sub { font-size: .88rem; color: var(--soft); }
.quiet { color: var(--soft); min-height: 44px; display: inline-flex; align-items: center; gap: .5em; text-decoration: none; }
.quiet svg { height: .85em; width: auto; flex: none; }
.center { align-self: center; text-align: center; }
.label { font-weight: 600; color: var(--pen); }
.late { font-weight: 600; color: var(--late); }
.small-late { font-size: .88rem; }
.meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 16px; min-height: 44px; }
.undo { font-weight: 600; }
.gap { margin-top: 18px; }
.status { margin-top: 18px; font-size: 1.18rem; }

.hero { margin-top: 26px; }
.hero .row { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.hero > p { font-size: min(1.82rem, 11.5vw); line-height: 1.52; text-wrap: balance; }
.list { margin-top: 26px; display: flex; flex-direction: column; gap: 16px; }
.list.tight { margin-top: 4px; }
.list li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); font-size: 1.12rem; line-height: 1.6; }
.list li.plain { grid-template-columns: minmax(0, 1fr); }
.tick { --box: max(44px, 1.4rem); --pull: calc((1.4rem - var(--box)) / 2); width: var(--box); height: var(--box);
  margin-block-start: calc(.9rem - var(--box) / 2); margin-inline-start: var(--pull); display: grid; place-items: center; color: var(--soft); }
.hero .tick { margin: 0; margin-inline-end: var(--pull); flex: none; }
.tick svg { width: 1.4rem; height: 1.4rem; }
.cut { stroke: var(--bg); }
.line { font: inherit; display: block; width: 100%; min-height: 44px; margin-block: -7px; padding-block: 7px; }
.line:active { opacity: .7; }
.from { font-size: .88rem; color: var(--soft); }
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.act { min-height: 48px; padding: 6px 20px; border-radius: 24px; border: 1.5px solid var(--edge); font-weight: 600; font-size: 1rem; line-height: 1.35; text-align: center; flex: 0 1 auto; }
.act.yes { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.act.no { border-color: var(--late); color: var(--late); }
.act.bare { border-color: transparent; color: var(--soft); padding-inline: 10px; }
.hero .acts { margin-top: 18px; }
.hero .who { margin-top: 10px; }
.hero .acts .act { flex: 1 1 7.4rem; min-height: 56px; border-radius: 28px; font-size: 1.06rem; }
.hero .acts .act.bare { flex: 0 1 auto; min-height: 44px; font-size: 1rem; margin-inline: auto; }
.who { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.who li, .list .who li { display: flex; align-items: center; gap: .5em; font-size: .94rem; line-height: 1.7; color: var(--soft); }
.who svg { width: 1.15em; height: 1.15em; flex: none; }
.who li.is-done, .list .who li.is-done { color: var(--ink); }
.who li.is-failed, .list .who li.is-failed { color: var(--late); font-weight: 600; }
.tick.is-failed { color: var(--late); }
.tick.is-done { color: var(--ink); }
h2 .sub { font-weight: 400; margin-inline-start: .5em; }
.foot b { font-weight: 700; color: var(--ink); }
.code-big { font-size: min(2rem, 13vw); letter-spacing: .18em; font-weight: 700; direction: ltr; text-align: start; unicode-bidi: isolate; display: block; margin-top: 6px; }
.done { color: var(--soft); text-decoration: line-through; text-decoration-thickness: 1px; }
.done b { font-weight: 400; }
.done .keep { text-decoration: inherit; }

.say { margin-top: 22px; display: flex; flex-direction: column; gap: 18px; }
.say > p { font-size: min(1.53rem, 10vw); line-height: 1.75; }
.say > p.note { font-size: .88rem; line-height: 1.6; color: var(--soft); margin-top: -10px; }
.word { font-weight: 700; color: var(--pen); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .32em;
  padding-block: .5rem; margin-block: -.5rem; display: inline; scroll-margin-block: 32px; }
.word[aria-expanded="true"] { background: color-mix(in srgb, var(--pen) 14%, transparent); border-radius: 6px; }
.word.fresh { animation: fresh 1.2s ease-out; }
.word.alone { margin-top: 22px; font-size: 1.18rem; min-height: 44px; display: inline-block; }
@keyframes fresh { from { background: color-mix(in srgb, var(--pen) 28%, transparent); } }

.key { width: 100%; min-height: 68px; border-radius: 34px; padding: 8px 24px; background: var(--ink); color: var(--bg);
  font-size: min(1.41rem, 34px); font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 14px; }
.key.down { background: var(--pen); color: var(--onpen); }
.key:active { opacity: 1; transform: scale(.985); }
.safe { display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.safe.start { justify-content: flex-start; text-align: start; }
.safe svg { width: 1.05em; height: 1.05em; flex: none; }
.choices { display: flex; flex-direction: column; gap: 10px; max-height: 46vh; overflow-y: auto; }
.choices > * { flex: none; }
.choices > div { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(8.2rem, 100%), 1fr)); gap: 8px; }
.choices button { min-height: 56px; padding: 6px 16px; border-radius: 28px; border: 1.5px solid var(--edge); font-weight: 600; text-align: center; line-height: 1.35; }
.choices button[aria-pressed="true"] { border-color: var(--pen); color: var(--pen); }

.paper { margin-top: 22px; background: repeating-linear-gradient(transparent 0 calc(var(--rule) - 1px), var(--line) calc(var(--rule) - 1px) var(--rule)); min-height: calc(var(--rule) * 6); }
.paper .row { height: var(--rule); position: relative; }
.paper canvas { position: absolute; inset: 0 0 auto auto; width: 100%; height: calc(var(--rule) + 24px); }
.mini { margin-top: 22px; width: 62%; display: flex; flex-direction: column; }
.mini .row { height: 46px; position: relative; }
.mini canvas { position: absolute; inset: 0 0 auto auto; width: 100%; height: auto; }
.paper.typing { --rule: 2.9rem; }
textarea { display: block; width: 100%; min-height: calc(var(--rule) * 6); border: 0; padding: 0 0 4px; background: none; resize: none;
  font-size: 1.35rem; line-height: var(--rule); outline: 0; border-radius: 0; }
.find { width: 100%; min-height: 52px; margin-top: 18px; border: 0; border-bottom: 2px solid var(--ink); border-radius: 0; background: none;
  font-size: 1.18rem; padding: 0; appearance: none; }
.find.code { letter-spacing: .3em; font-size: 1.53rem; direction: ltr; text-align: center; }
.find::placeholder, textarea::placeholder { color: var(--soft); opacity: 1; }
h2 { font-size: 1rem; font-weight: 600; color: var(--pen); margin-top: 28px; }
.rows > li > button { width: 100%; min-height: 64px; padding-block: 10px; display: block; border-bottom: 1px solid var(--line); }
.rows b { font-size: 1.12rem; display: block; line-height: 1.5; }
.rows .sub { display: block; line-height: 1.6; }
.past { margin-top: 8px; display: flex; flex-direction: column; gap: 14px; }
.past p { font-size: 1.12rem; line-height: 1.7; }
ol.steps { padding-inline-start: 1.5em; margin-top: 18px; display: flex; flex-direction: column; gap: 14px; font-size: 1.35rem; line-height: 1.6; }

@media (prefers-reduced-motion: no-preference) {
  .big { view-transition-name: big; }
  .key { view-transition-name: key; }
  .inked { view-transition-name: ink; }
  ::view-transition-group(*) { animation-duration: .28s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
  ::view-transition-old(*), ::view-transition-new(*) { animation-duration: .2s; }
}
@media (prefers-reduced-motion: reduce) { .word.fresh { animation: none; } }
