/* The timer pages under /timers/, on top of site.css and guides.css.
   The timer is a band at the top: black during a focus, the break blue during a break, as the home page's sections are.
   The cat beside it is the app's: at its laptop, then with its mug. Under the band, the same timer in the island. */

.tm { background: var(--black); color: var(--ink); padding: 116px 0 88px;
      transition: background-color 700ms var(--ease-out), color 700ms var(--ease-out); }
.tm.brk { background: var(--break); color: var(--break-ink); }
.tm h1 { font-size: clamp(34px, 4.4vw, 52px); line-height: 1.04; margin: 0; text-wrap: balance; }
.tm .stage { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px 56px; align-items: center; margin-top: 36px; }
.tm .cats { position: relative; aspect-ratio: 359 / 480; }
.tm .cats img { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 500ms var(--ease-out); }
.tm .cats .rest, .tm.brk .cats .work { opacity: 0; }
.tm.brk .cats .rest { opacity: 1; }

.tm .phase { margin: 0; font: 600 19px/1.3 var(--sans); }
.tm .digits { margin: 2px 0 0; font: 700 clamp(84px, 14.5vw, 184px)/1 var(--display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums;
              white-space: nowrap; }
.tm .digits.hms { font-size: clamp(64px, 11vw, 144px); }

.tm .ctl { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
/* Start is the site's own .btn, as Download is: .btn was made for links, so a <button> also needs its border and cursor
   reset. Reset next to it has the same size and shape, in the dark */
.tm button.btn { border: 0; cursor: pointer; min-width: 148px; -webkit-tap-highlight-color: transparent; }
.tm .btn .ip, .tm .btn.running .ig { display: none; }
.tm .btn.running .ip { display: block; }
.tm .ghost { all: unset; box-sizing: border-box; height: 48px; padding: 0 24px; border-radius: 24px; background: #1c1c1e; color: var(--ink);
             font: 600 16px/48px var(--sans); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out); }
.tm .ghost:active:not(:disabled) { transform: scale(0.97); }
.tm .ghost:disabled { cursor: default; color: #636366; }
@media (hover: hover) and (pointer: fine) { .tm .ghost:not(:disabled):hover { background: #2c2c2e; } }
.tm .ghost:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.tm.brk .ghost { background: rgba(14, 42, 63, 0.08); color: var(--break-ink); }
.tm.brk .ghost:disabled { color: rgba(14, 42, 63, 0.4); }
@media (hover: hover) and (pointer: fine) { .tm.brk .ghost:not(:disabled):hover { background: rgba(14, 42, 63, 0.14); } }
.tm.brk :focus-visible { outline-color: var(--break-ink); }
.tm.brk ::selection { background: rgba(14, 42, 63, 0.18); color: var(--break-ink); }

/* The two switches, drawn like the app's */
.tm .opts { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 28px; font-size: 15px; color: var(--ink-2); }
.tm .sw { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 32px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tm .sw input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tm .sw i { position: relative; flex: none; width: 32px; height: 19px; border-radius: 10px; background: #3a3a3c; transition: background-color 160ms ease; }
.tm .sw i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff;
                   box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); transition: transform 200ms var(--ease-out); }
.tm .sw input:checked + i { background: var(--amber); }
.tm .sw input:checked + i::after { transform: translateX(13px); }
.tm .sw input:focus-visible + i { outline: 2px solid var(--amber); outline-offset: 3px; }
.tm .note, .tm .hint { margin: 14px 0 0; font-size: 14px; color: var(--ink-2); }
.tm .note[hidden] { display: none; }
.tm.brk .opts, .tm.brk .note, .tm.brk .hint { color: var(--break-ink-2); }
.tm.brk .sw i { background: rgba(14, 42, 63, 0.22); }
.tm.brk .sw input:checked + i { background: var(--break-ink); }
@media (hover: none) and (pointer: coarse) { .tm .hint { display: none; } }

/* Pomodoro: the rounds, as the island's dots */
.tm .dots { display: flex; gap: 8px; margin: 12px 0 0; }
.tm .dots i { width: 10px; height: 10px; border-radius: 50%; background: #3a3a3c; }
.tm .dots i.on { background: var(--amber); }
.tm .dots i.cur { background: transparent; box-shadow: inset 0 0 0 2px var(--amber); }
.tm.brk .dots i { background: rgba(14, 42, 63, 0.2); }
.tm.brk .dots i.on { background: var(--break-ink); }

/* The other timers, a row of links at the foot of the band; the page's own is marked */
.tm .others { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 56px; }
.tm .others a { padding: 7px 12px; border-radius: 16px; background: #1c1c1e; color: var(--ink); font-size: 14px; text-decoration: none;
                font-variant-numeric: tabular-nums; transition: background-color 160ms ease; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) and (pointer: fine) { .tm .others a:hover { background: #2c2c2e; } }
.tm .others a[aria-current] { background: var(--ink); color: #000; font-weight: 600; }
.tm.brk .others a { background: rgba(14, 42, 63, 0.08); color: var(--break-ink); }
@media (hover: hover) and (pointer: fine) { .tm.brk .others a:hover { background: rgba(14, 42, 63, 0.14); } }
.tm.brk .others a[aria-current] { background: var(--break-ink); color: var(--break); }

/* The same timer in the island, beside what Meowdoro is */
.mirror { padding: 112px 0 0; }
.mirror .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 64px; align-items: center; }
.mirror h2 { font: 700 clamp(30px, 3.4vw, 44px)/1.06 var(--display); letter-spacing: -0.03em; margin: 0; text-wrap: balance; }
.mirror p { color: var(--ink-2); margin: 16px 0 0; max-width: 32em; }
.mirror .get { margin-top: 28px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
/* the island's button: play while stopped, pause while it runs */
.isl .pp .pause, .isl.running .pp .play { display: none; }
.isl.running .pp .pause { display: block; }

/* the text under it starts at the same left edge as the timer */
.doc.tdoc { padding-top: 104px; }
.doc.tdoc .wrap { max-width: 1180px; }

@media (max-width: 760px) {
  .tm { padding: 92px 0 64px; }
  .tm .stage { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 24px; }
  .tm .cats { width: 112px; }
  .tm button.btn, .tm .ghost { flex: 1; min-width: 0; }
  .mirror { padding-top: 80px; }
  .mirror .wrap { grid-template-columns: minmax(0, 1fr); }
  .doc.tdoc { padding-top: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .tm, .tm .cats img, .tm .sw i::after { transition: none; }
  .tm .ghost:active:not(:disabled) { transform: none; }
}
