/* /tipptest.css */
/* The typing speed test: its own stage. The clock is the sun: it crosses the sky of a painted plate while the time
   runs, and the plate's hour moves from noon to dusk with it. The text lies on one clean sheet; what is typed turns
   to ink, a wrong key is marked, the line being typed stays in view. The result stays on the same plate: your
   number next to the pace of speaking. Behaviour: tipptest.js. */
/* a tool page: the tool itself stands in the first window, so the head is one line and the room above it is small */
.calm--tool { padding-top: clamp(112px, 6.4rem + 1.6vw, 136px); }
.tth { text-align: center; }
.tth .ph__h, .tth .ph__lead { margin-inline: auto; }
.tth .ph__h { max-width: none; font-size: clamp(2.1rem, 1.3rem + 2.6vw, 3.4rem); }
.tth .ph__lead { margin-top: 14px; }
.tt { margin-top: clamp(24px, 2.6vw, 34px); }
.tt__stage { position: relative; min-height: clamp(470px, 36vw, 520px); padding: clamp(92px, 8.4vw, 118px) clamp(16px, 5vw, 72px) clamp(22px, 2.6vw, 34px); border-radius: 14px; clip-path: inset(0 round 14px); display: grid; align-content: center; justify-items: center; gap: clamp(20px, 2.6vw, 32px);
  background-color: var(--pc, #f3e7cf); background-image: var(--impasto-soft); background-size: 640px; transition: background-color 1600ms linear; }
.tt__stage[data-hour="noon"] { --pc: #f3e7cf; }
.tt__stage[data-hour="golden"] { --pc: #f2d39b; }
.tt__stage[data-hour="late"] { --pc: #eab47f; }
.tt__stage[data-hour="dusk"] { --pc: #d9998b; }
.tt__sky { position: absolute; inset: 0 0 auto 0; width: 100%; height: clamp(110px, 11vw, 150px); pointer-events: none; overflow: visible; }
.tt__sky path { fill: none; stroke: rgb(22 19 15 / 0.2); stroke-width: 1.5; stroke-dasharray: 2 9; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.tt__sun { position: absolute; left: 0; top: 0; width: clamp(34px, 4vw, 52px); aspect-ratio: 1; margin: calc(clamp(34px, 4vw, 52px) / -2) 0 0 calc(clamp(34px, 4vw, 52px) / -2); border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 10px rgb(251 185 39 / 0.22), 0 0 44px 8px rgb(251 185 39 / 0.38); will-change: transform; }
.tt__time { position: absolute; left: 50%; top: clamp(20px, 3vw, 36px); transform: translateX(-50%); font: 600 1.0625rem var(--sans); font-variant-numeric: tabular-nums; color: rgb(22 19 15 / 0.7); }

.tt__sheet { position: relative; width: min(100%, 860px); padding: clamp(22px, 3.2vw, 40px) clamp(20px, 3.6vw, 48px); border-radius: 16px; background: #fffdf8; box-shadow: 0 30px 60px -34px rgb(22 19 15 / 0.7), 0 0 0 1px rgb(22 19 15 / 0.08); cursor: text; }
.tt__view { height: calc(3 * var(--tt-lh)); overflow: hidden; --tt-lh: clamp(2.3rem, 1.7rem + 2vw, 3.25rem); }
.tt__text { margin: 0; font-family: var(--sans); font-weight: 400; font-size: clamp(1.3125rem, 0.95rem + 1.25vw, 1.875rem); line-height: var(--tt-lh); letter-spacing: 0.005em; color: rgb(22 19 15 / 0.34); transition: transform 240ms cubic-bezier(0.23, 1, 0.32, 1); overflow-wrap: break-word; }
.tt__text span.is-ok { color: var(--ink); }
.tt__text span.is-bad { color: #a8321f; background: rgb(217 153 139 / 0.42); border-radius: 3px; }
.tt__text span.is-at { box-shadow: -2px 0 0 var(--forest); }
.tt__sheet:not(.is-focus) .tt__text span.is-at { box-shadow: -2px 0 0 rgb(30 81 65 / 0.3); }
@media (prefers-reduced-motion: no-preference) { .tt__sheet.is-focus:not(.is-run) .tt__text span.is-at { animation: tt-caret 1.1s steps(1) infinite; } }
@keyframes tt-caret { 50% { box-shadow: -2px 0 0 transparent; } }
.tt__in { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; resize: none; font-size: 16px; cursor: text; }
.tt__hint { margin: 0; font-size: 1.0625rem; color: rgb(22 19 15 / 0.72); text-align: center; min-height: 1.6em; }
.tt__live { display: flex; align-items: baseline; gap: 10px; font-size: 1.0625rem; color: rgb(22 19 15 / 0.72); }
.tt__live b { font-family: var(--display); font-weight: 600; font-variation-settings: var(--head-axes-sm); font-size: 2.25rem; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }

.tt__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; margin-top: 20px; }
.tt__opt { display: inline-flex; padding: 4px; border-radius: 999px; background: rgb(22 19 15 / 0.07); }
.tt__opt button, .tt__again { height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: none; color: var(--ink-3); font: 500 1rem var(--sans); cursor: pointer; transition: background-color 160ms ease, color 160ms ease, transform 120ms ease-out; }
.tt__opt button[aria-pressed="true"] { background: var(--ink); color: var(--morning); }
.tt__again { background: rgb(22 19 15 / 0.07); }
.tt__opt button:active, .tt__again:active { transform: scale(0.97); }
.tt__opt button:focus-visible, .tt__again:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .tt__again:hover { background: rgb(22 19 15 / 0.12); color: var(--ink); } }

/* the result, on the same plate */
.tt__res { width: min(100%, 980px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(18px, 2.4vw, 28px) clamp(28px, 4vw, 64px); align-items: center; }
.tt__res > .tt__race { grid-column: 2; grid-row: 1 / span 3; }
.tt__res > :not(.tt__race) { grid-column: 1; }
@media (max-width: 860px) { .tt__res { grid-template-columns: minmax(0, 1fr); } .tt__res > .tt__race { grid-column: 1; grid-row: auto; } }
.tt__sheet.is-run ~ .tt__hint { visibility: hidden; }
.tt__res[hidden], .tt.is-done .tt__sheet, .tt.is-done .tt__hint, .tt.is-done .tt__live { display: none; }
.tt__n { margin: 0; font-family: var(--display); font-weight: 600; font-variation-settings: var(--head-axes); font-size: clamp(2.25rem, 1.4rem + 2.8vw, 3.6rem); line-height: 1; letter-spacing: -0.02em; }
.tt__n b { font-weight: inherit; font-variant-numeric: tabular-nums; }
.tt__n span { display: block; margin-top: 10px; font-family: var(--sans); font-weight: 400; font-variation-settings: normal; font-size: 1.1875rem; letter-spacing: 0; color: rgb(22 19 15 / 0.76); }
.tt__race { display: grid; gap: 10px; padding: clamp(18px, 2.4vw, 28px); border-radius: 16px; background: #fffdf8; box-shadow: 0 30px 60px -34px rgb(22 19 15 / 0.7), 0 0 0 1px rgb(22 19 15 / 0.08); }
.tt__lane { display: grid; grid-template-columns: 6.6em minmax(0, 1fr) 3.2em; align-items: center; gap: 14px; margin: 0; font-size: 1.0625rem; }
.tt__race { align-self: center; padding-block: clamp(26px, 3.4vw, 44px) !important; gap: 18px !important; }
.tt__lane i { display: block; height: 18px; border-radius: 999px; background: rgb(22 19 15 / 0.22); width: calc(var(--w, 0) * 1%); min-width: 6px; transition: width 900ms cubic-bezier(0.23, 1, 0.32, 1); }
.tt__lane b { font-family: var(--display); font-weight: 600; font-variation-settings: var(--head-axes-sm); font-size: 1.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.tt__lane--say i { background: var(--forest); }
.tt__say { margin: 0; font-size: 1.1875rem; line-height: 1.5; max-width: 44ch; }
.tt__acts { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
@media (max-width: 640px) {
  .tt__stage { padding-top: 104px; border-radius: 12px; }
  .tt__lane { grid-template-columns: 6.2em minmax(0, 1fr) 2.6em; gap: 10px; font-size: 1rem; }
}

/* the numbers a searcher came for */
.ttn { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: clamp(28px, 3.4vw, 44px); }
.ttn li { display: flex; flex-direction: column; justify-content: flex-end; min-height: 230px; padding: 28px; border-radius: 16px; background-color: var(--pc); background-image: var(--impasto-soft); background-size: 420px; }
.ttn li[data-hour="noon"] { --pc: #f3e7cf; } .ttn li[data-hour="golden"] { --pc: #f2d39b; } .ttn li[data-hour="dusk"] { --pc: #d9998b; }
.ttn b { font-family: var(--display); font-weight: 600; font-variation-settings: var(--head-axes); font-size: clamp(3rem, 2rem + 3.2vw, 5rem); line-height: 1; letter-spacing: -0.02em; }
.ttn h3 { margin-top: 12px; font: 600 1.1875rem var(--sans); }
.ttn p { margin-top: 6px; font-size: 1.0625rem; line-height: 1.5; color: rgb(22 19 15 / 0.76); }
@media (max-width: 860px) { .ttn { grid-template-columns: minmax(0, 1fr); } .ttn li { min-height: 0; } }
