/* The free tools (Paper, page "Blog": TL1 is the reading speed test, TL2 to TL4 the others). page.css and blog.css come
   first, and each newer tool adds its own file. */
.tool-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 64px; padding-top: 80px; }
.tool-title { display: flex; flex-direction: column; gap: 20px; }
.tool-lbl { color: var(--violet); }
.tool-title h1 { font-size: 84px; line-height: 84px; letter-spacing: -0.045em; font-weight: 800; }
.tool-title h1 .hl::before { left: -9px; right: -9px; bottom: 9px; height: 35px; border-radius: 8px; }
.tool-title p { max-width: 720px; font-size: 21px; line-height: 30px; color: var(--graphite); text-wrap: pretty; }
.tool-cover { flex-shrink: 0; width: 400px; border-radius: 28px; }
.tool[data-state]:not([data-state="start"]) .tool-head, .tool[data-state]:not([data-state="start"]) .tool-about { display: none; }

.panel { margin-top: 48px; border-radius: 32px; background: var(--canvas); }
.st[hidden] { display: none !important; }
.big { display: flex; align-items: center; justify-content: center; height: 60px; border-radius: 30px; background: var(--lilac); font-size: 18px; line-height: 22px; font-weight: 800; transition: filter .2s, transform .15s; }
.big:hover { filter: brightness(.96); }
.big:active { transform: scale(.98); }
.big:disabled { background: #E2E2DE; color: var(--pencil); cursor: default; filter: none; transform: none; }
.big:focus-visible, .outline:focus-visible, .option:has(input:focus-visible) { outline: 2px solid var(--violet); outline-offset: 2px; }
.outline { display: flex; align-items: center; justify-content: center; height: 56px; padding: 0 28px; border: 1.5px solid var(--ink); border-radius: 28px; background: #FFFFFF; font-size: 17px; line-height: 22px; font-weight: 800; transition: background .2s; }
.outline:hover { background: var(--canvas); }

/* 1. Start */
.st-start { display: flex; align-items: center; gap: 80px; padding: 56px; }
.measures { flex: 1; display: flex; flex-direction: column; gap: 28px; }
.measures ol { display: flex; flex-direction: column; gap: 28px; list-style: none; }
.measures li { display: flex; gap: 20px; }
.measures .n { width: 36px; flex-shrink: 0; font-size: 28px; line-height: 30px; letter-spacing: -0.02em; font-weight: 800; color: var(--violet); }
.measures li div { display: flex; flex-direction: column; gap: 6px; }
.measures b { font-size: 22px; line-height: 28px; letter-spacing: -0.015em; font-weight: 800; }
.measures p { font-size: 17px; line-height: 25px; color: var(--graphite); text-wrap: pretty; }
.start-card { width: 480px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 40px; border-radius: 24px; background: #FFFFFF; box-shadow: 0 1px 0 #0000000A, 0 12px 32px #00000014; text-align: center; }
.start-card > div { display: flex; flex-direction: column; gap: 8px; }
.start-card h2 { font-size: 26px; line-height: 31px; letter-spacing: -0.02em; font-weight: 800; }
.start-card p { font-size: 17px; line-height: 25px; color: var(--graphite); text-wrap: balance; }
.start-card .big { align-self: stretch; }
.start-card small { font-size: 14px; line-height: 19px; color: var(--graphite); }

/* 2. Reading and 3. Quick check */
.st-reading, .st-check { display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 32px 56px 48px; }
.st-check { padding-bottom: 56px; }
.st-bar { align-self: stretch; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.st-bar b { font-size: 17px; line-height: 22px; font-weight: 700; }
.clock { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 18px; background: #FFFFFF; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--graphite); font-variant-numeric: tabular-nums; }
.text-card { width: min(760px, 100%); display: flex; flex-direction: column; gap: 22px; padding: 56px 64px; border-radius: 24px; background: #FFFFFF; box-shadow: 0 1px 0 #0000000A, 0 8px 24px #0000000F; outline: none; }
.text-card h2 { font-size: 32px; line-height: 37px; letter-spacing: -0.03em; font-weight: 800; }
.text-card p { font-size: 20px; line-height: 33px; text-wrap: pretty; }
.done-bar { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 8px; }
.done-bar .big { width: 320px; }
.done-bar small { font-size: 15px; line-height: 20px; color: var(--graphite); }
.check { width: min(680px, 100%); display: flex; flex-direction: column; gap: 24px; }
.progress { display: flex; align-items: center; gap: 14px; }
.track { flex: 1; height: 6px; border-radius: 3px; background: #E2E2DE; overflow: hidden; }
.track i { display: block; height: 100%; width: 33%; border-radius: 3px; background: var(--ink); transition: width .4s var(--spring); }
.progress b { font-size: 15px; line-height: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.q-card { display: flex; flex-direction: column; gap: 22px; min-width: 0; padding: 32px; border: 0; border-top: 6px solid var(--butter); border-radius: 16px; background: #FFFFFF; box-shadow: 0 1px 0 #0000000A, 0 12px 32px #00000014; }
.q-card legend { float: left; width: 100%; padding: 0; font-size: 30px; line-height: 35px; letter-spacing: -0.025em; font-weight: 800; text-wrap: pretty; }
.q-card legend + * { clear: both; }
.options { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.option { position: relative; display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 14px 18px; border: 1.5px solid var(--hairline); border-radius: 14px; background: #FFFFFF; cursor: pointer; transition: border-color .15s, background .15s; }
.option:hover { border-color: var(--pencil); }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option i { width: 22px; height: 22px; flex-shrink: 0; border: 2px solid var(--pencil); border-radius: 11px; display: flex; align-items: center; justify-content: center; }
.option span { flex: 1; font-size: 18px; line-height: 24px; font-weight: 500; }
.option:has(input:checked) { border-color: var(--ink); background: var(--lilac-soft); }
.option:has(input:checked) i { border: 0; background: var(--ink); }
.option:has(input:checked) i::after { content: ""; width: 8px; height: 8px; border-radius: 4px; background: #FFFFFF; }
.option:has(input:checked) span { font-weight: 600; }
.check-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 4px; }
.check-foot span { font-size: 15px; line-height: 20px; color: var(--graphite); }
.check-foot .big { width: 200px; height: 56px; border-radius: 28px; font-size: 17px; }

/* 4. Result */
.st-result { display: flex; flex-direction: column; gap: 40px; padding: 32px 56px 48px; }
.st-sum { font-size: 15px; line-height: 20px; font-weight: 600; color: var(--graphite); font-variant-numeric: tabular-nums; }
.result { display: flex; align-items: flex-start; gap: 56px; }
.score { width: 460px; flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; }
.wpm { align-self: flex-start; font-size: 168px; line-height: 160px; letter-spacing: -0.055em; font-weight: 800; font-variant-numeric: tabular-nums; }
.wpm .hl::before { left: -10px; right: -10px; bottom: 24px; height: 56px; border-radius: 10px; }
.unit { font-size: 26px; line-height: 31px; letter-spacing: -0.02em; font-weight: 800; }
.right-pill { align-self: flex-start; display: flex; align-items: center; gap: 8px; height: 40px; margin-top: 8px; padding: 0 16px; border-radius: 20px; background: #FFFFFF; font-size: 17px; line-height: 22px; font-weight: 700; }
.score p { padding-top: 8px; font-size: 19px; line-height: 28px; color: var(--graphite); text-wrap: pretty; }
.result-cards { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.r-card { display: flex; flex-direction: column; gap: 20px; padding: 28px; border-radius: 20px; background: #FFFFFF; }
.r-card h2 { font-size: 20px; line-height: 26px; letter-spacing: -0.01em; font-weight: 800; }
.bar-row { display: flex; align-items: center; gap: 16px; font-size: 16px; line-height: 20px; }
.bar-row > :first-child { width: 120px; flex-shrink: 0; font-weight: 700; }
.bar-row > :last-child { width: 44px; flex-shrink: 0; text-align: right; font-size: 17px; line-height: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.bar-row.avg { color: var(--graphite); }
.bar-row.avg > :first-child { font-weight: 500; }
.bar-row.avg > :last-child { font-weight: 600; }
.bar { flex: 1; height: 28px; border-radius: 8px; background: var(--canvas); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 8px; background: var(--lilac); transition: width .8s var(--spring); }
.bar-row.avg .bar i { background: #D3D3CE; }
.r-card small { font-size: 14px; line-height: 20px; color: var(--graphite); }
.answers { gap: 4px; padding-bottom: 16px; }
.answers h2 { padding-bottom: 8px; }
.answers ul { list-style: none; }
.answers li { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.answers li:last-child { border-bottom: 0; }
.mark { width: 24px; height: 24px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 12px; }
.ok .mark { background: var(--lilac); }
.miss .mark { border: 2px solid var(--pencil); }
.answers li div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.answers b { font-size: 16px; line-height: 22px; font-weight: 600; }
.answers span { font-size: 15px; line-height: 20px; color: var(--graphite); }
.answers strong { font-size: 15px; line-height: 20px; font-weight: 600; }
.again { display: flex; align-items: center; gap: 16px; }
.again span { font-size: 15px; line-height: 20px; color: var(--graphite); }
.tool-join { padding-top: 32px; }
.tool-join .join { padding: 48px; }
.tool-join .join-art { right: 140px; top: 64px; width: 230px; height: 141px; }

/* What's a good reading speed */
.tool-about { display: flex; flex-direction: column; gap: 16px; padding: 96px 0 0; }
/* Each explainer is a 760px column on the wrap's left edge, under the page head. */
.tool-about > * { max-width: 760px; }
.tool-about h2 { font-size: 34px; line-height: 40px; letter-spacing: -0.03em; font-weight: 800; }
.tool-about p { font-size: 19px; line-height: 31px; text-wrap: pretty; }
.tool-about a { color: var(--violet); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.tool { padding-bottom: 120px; }

/* The newer tools (TL2 to TL4) have several explainer sections, with numbered steps, terms and a link of their own. */
.tool-about + .tool-about { padding-top: 64px; }
.tool-about .steps { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; list-style: none; counter-reset: step; }
.tool-about .steps li { display: flex; gap: 16px; font-size: 19px; line-height: 31px; counter-increment: step; text-wrap: pretty; }
.tool-about .steps li::before { content: counter(step); width: 28px; flex-shrink: 0; font-size: 22px; line-height: 31px; font-weight: 800; color: var(--violet); }
.tool-about dl { display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }
.tool-about dl > div { display: flex; flex-direction: column; gap: 2px; }
.tool-about dt { font-size: 19px; line-height: 31px; font-weight: 700; }
.tool-about dd { font-size: 19px; line-height: 31px; text-wrap: pretty; }
.tool-about .more { display: block; padding: 0; } /* blog.css styles .more as the Keep reading section */
.tool-about .more a { font-weight: 600; }

@media (max-width: 1180px) {
  .st-start { gap: 48px; padding: 44px; }
  .start-card { width: 420px; }
  .result { flex-direction: column; gap: 32px; }
  .score { width: auto; }
  .result-cards { align-self: stretch; }
  .tool-join .join-art { right: 48px; }
}
@media (max-width: 980px) {
  .tool-head { flex-direction: column-reverse; align-items: flex-start; gap: 32px; padding-top: 56px; }
  .tool-cover { width: min(400px, 100%); }
  .tool-title h1 { font-size: 64px; line-height: 66px; }
  .st-start { flex-direction: column-reverse; align-items: stretch; }
  .start-card { width: auto; }
}
@media (max-width: 760px) {
  .tool-head { gap: 24px; padding-top: 24px; }
  .tool-cover { width: 100%; border-radius: 24px; }
  .tool-title { gap: 12px; }
  .tool-title h1 { font-size: 46px; line-height: 48px; letter-spacing: -0.04em; }
  .tool-title h1 .hl::before { left: -6px; right: -6px; bottom: 5px; height: 20px; border-radius: 5px; }
  .tool-title p { font-size: 17px; line-height: 25px; }
  .panel { margin-top: 28px; border-radius: 28px; }
  /* On the start screen only the start card sits in a grey frame; What it measures follows on white. */
  .tool[data-state="start"] .panel { background: none; border-radius: 0; }
  .st-start { gap: 40px; padding: 12px 0 0; isolation: isolate; }
  .start-card { position: relative; margin: 0 12px; gap: 16px; padding: 24px 20px; border-radius: 22px; }
  .start-card::before { content: ""; position: absolute; inset: -12px; z-index: -1; border-radius: 34px; background: var(--canvas); }
  .start-card h2 { font-size: 22px; line-height: 27px; }
  .start-card p { font-size: 16px; line-height: 23px; }
  .big { height: 56px; border-radius: 28px; font-size: 17px; }
  .measures { gap: 20px; }
  .measures ol { gap: 20px; }
  .measures li { gap: 14px; }
  .measures .n { width: 22px; font-size: 22px; line-height: 24px; }
  .measures b { font-size: 18px; line-height: 24px; }
  .measures p { font-size: 15px; line-height: 22px; }

  /* Reading and the questions take the whole screen, as in the TL1 phone artboards. */
  body.focus .topbar { display: none; }
  body.focus .panel { width: 100%; margin: 0; border-radius: 0; background: #FFFFFF; }
  .st-reading, .st-check { gap: 0; padding: 0 0 120px; align-items: stretch; }
  .st-check { padding-bottom: 40px; }
  .st-bar { position: sticky; top: 0; z-index: 5; height: 64px; padding: 8px 20px 0; border-bottom: 1px solid var(--hairline); background: #FFFFFF; }
  .st-bar b { font-size: 16px; line-height: 20px; }
  .clock { height: 34px; gap: 7px; padding: 0 12px; background: var(--canvas); font-size: 14px; line-height: 18px; }
  .text-card { width: auto; gap: 18px; padding: 28px 20px 0; border-radius: 0; box-shadow: none; }
  .text-card h2 { font-size: 26px; line-height: 31px; letter-spacing: -0.025em; }
  .text-card p { font-size: 18px; line-height: 30px; }
  .done-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; gap: 8px; padding: 32px 20px calc(30px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(180deg, #FFFFFF00 0%, #FFFFFFF0 40%, #FFFFFF 100%); }
  .done-bar .big { width: 100%; box-shadow: 0 6px 18px #0000001A; }
  .done-bar small { font-size: 13px; line-height: 17px; }
  .check { width: auto; gap: 20px; padding: 24px 20px 0; }
  .q-card { gap: 18px; padding: 22px 18px; }
  .q-card legend { font-size: 22px; line-height: 27px; }
  .option { min-height: 54px; padding: 12px 14px; gap: 12px; }
  .option span { font-size: 16px; line-height: 22px; }
  .check-foot { flex-direction: column-reverse; align-items: stretch; gap: 12px; }
  .check-foot span { text-align: center; font-size: 14px; }
  .check-foot .big { width: 100%; }
  .st-result { position: relative; gap: 28px; padding: 0 0 16px; }
  /* The time sits on the YOUR RESULT line, as drawn. */
  .st-result .st-bar { position: absolute; top: 22px; right: 22px; height: auto; padding: 0; border: 0; background: none; }
  .st-result .st-bar b { display: none; }
  .result { gap: 24px; padding: 24px 16px 0; }
  .wpm { font-size: 112px; line-height: 108px; }
  .wpm .hl::before { bottom: 16px; height: 38px; border-radius: 8px; }
  .unit { font-size: 22px; line-height: 27px; }
  .score p { font-size: 17px; line-height: 25px; }
  .r-card { gap: 16px; padding: 20px; }
  .bar-row { gap: 10px; }
  .bar-row > :first-child { width: auto; font-size: 14px; white-space: nowrap; }
  .bar { height: 22px; border-radius: 6px; }
  .bar i { border-radius: 6px; }
  .again { flex-direction: column; align-items: stretch; gap: 10px; padding: 0 16px; text-align: center; }
  .tool-join { padding-top: 24px; }
  .tool-join .join { padding: 24px; }
  .tool-about { padding-top: 64px; }
  .tool-about h2 { font-size: 26px; line-height: 31px; }
  .tool-about p { font-size: 17px; line-height: 28px; }
  .tool-about + .tool-about { padding-top: 48px; }
  .tool-about .steps { gap: 10px; }
  .tool-about .steps li, .tool-about dt, .tool-about dd { font-size: 17px; line-height: 28px; }
  .tool-about .steps li::before { width: 22px; font-size: 18px; line-height: 28px; }
  .tool { padding-bottom: 88px; }
}
