/* Date & Time: the five tools. Sizes come from the kit's variables so Big and easy scales them. */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hx-tool .hx-in::placeholder { color: var(--hx-muted); opacity: 1; }
.hx-tool select.hx-in { padding-right: 6px; }
.hx-tool p { margin: 0; }
.hx-tool .hx-formula { margin-top: 4px; }
.hx-tool .hx-note { margin-top: 8px; }
.hx-tool dl { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.hx-tool dl div { display: flex; gap: 6px; align-items: baseline; }
.hx-tool dt { color: var(--hx-muted); font-size: var(--hx-small); }
.hx-tool dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }
.dt-card, .at-q, .db-q, .cd-q { border: 1px solid var(--hx-line); border-radius: 16px; padding: 12px 14px; background: #fdfdfc; min-width: 0; }
.at-h, .db-h, .cd-h { font-size: var(--hx-small); font-weight: 700; color: var(--hx-muted); margin: 0 0 8px !important; }
.at, .db, .cd { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: var(--hx-gap); align-items: start; }

/* Hours: the week on the left, the total and its working on the right. A phone shows the total,
   then the days, then the week and rate, then the working. */
.tc { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px 24px; align-items: start; }
.tc-l { grid-column: 1; grid-row: 1; min-width: 0; }
.tc-r { grid-column: 2; grid-row: 1; min-width: 0; border: 1px solid var(--hx-line); border-radius: 16px; padding: 14px 16px; background: var(--hx-soft); }
.tc-main .hx-lab { margin: 0; }
.tc-main .hx-out { display: block; font-size: calc(var(--hx-out) * 1.3); }
.tc-more { margin-top: 6px; }
.tc-notes { margin: 6px 0 0; padding-left: 1.2em; font-size: var(--hx-small); line-height: 1.4; }
.tc-notes:empty { display: none; }
.tc-set { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin-bottom: 12px; }
.tc-wk { flex: 1 1 10em; min-width: 0; }
.tc-rate { flex: 1 1 7em; min-width: 0; }
.tc-clr { font-size: var(--hx-small); }
.tc-row { display: grid; grid-template-columns: 4.4em minmax(0, 1fr) minmax(0, 1fr) 4.4em 3.8em; grid-template-areas: "day i o b h"; gap: 6px 8px; align-items: center; margin: 0 0 6px; }
.tc-row > :nth-child(1) { grid-area: day; } .tc-row > input[id^="i"], .tc-head > :nth-child(2) { grid-area: i; }
.tc-row > input[id^="o"], .tc-head > :nth-child(3) { grid-area: o; } .tc-row > input[id^="b"], .tc-head > :nth-child(4) { grid-area: b; }
.tc-h, .tc-head > :nth-child(5) { grid-area: h; text-align: right; }
.tc-head { margin: 0 0 2px; }
.tc-head span { font-size: var(--hx-small); font-weight: 700; color: var(--hx-muted); }
.tc-day { line-height: 1.15; }
.tc-day b { display: block; }
.tc-day span { font-size: var(--hx-small); color: var(--hx-muted); white-space: nowrap; }
.tc-row .hx-in { padding: 0 8px; min-width: 0; }
.tc-h { font-weight: 800; font-variant-numeric: tabular-nums; }
.tc-tip { margin-top: 4px !important; }
@media (max-width: 760px) {
  .tc { display: flex; flex-direction: column; gap: 12px; }
  .tc-l, .tc-r { display: contents; }
  .tc-sum { order: 1; border: 1px solid var(--hx-line); border-radius: 16px; padding: 8px 14px; background: var(--hx-soft); }
  .tc-rows { order: 2; } .tc-set { order: 3; margin: 0; } .tc-more { order: 4; margin: 0; }
  .tc-main { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
  .tc-main .hx-out { display: inline; }
  .tc-sum dl { margin-top: 0; }
  .tc-row { grid-template-columns: 2.7em minmax(0, 1fr) minmax(0, 1fr) 3em 3.1em; gap: 6px 5px; }
  .tc-row .hx-in { padding: 0 5px; font-size: max(16px, calc(var(--hx-fs) * .9)); }
  .tc-day span { display: block; font-size: 13px; }
  .tc-wk { flex-basis: 9.5em; }
  .tc-rate { flex-basis: 5.5em; }
  html.hx-big .tc-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 4.2em; grid-template-areas: "day day h" "i o b"; margin-bottom: 12px; }
  html.hx-big .tc-day b, html.hx-big .tc-day span { display: inline; font-size: inherit; }
  html.hx-big .tc-head { grid-template-areas: "i o b"; margin-bottom: 0; }
  html.hx-big .tc-head > :nth-child(1), html.hx-big .tc-head > :nth-child(5) { display: none; }
}

/* A toggle: a box that is ticked when on. */
.hx-btn.tg, .hx-btn.tg[aria-pressed="true"] { background: #fff; color: var(--hx-ink); border-color: var(--hx-edge); font-size: var(--hx-small); }
.tg::before { content: ""; display: inline-block; width: 1em; height: 1em; margin-right: .45em; vertical-align: -.15em; border: 2px solid var(--hx-edge); border-radius: 4px; box-sizing: border-box; }
.tg[aria-pressed="true"]::before { background: var(--hx-accent); border-color: var(--hx-accent); box-shadow: inset 0 0 0 2px #fff; }

/* Add time and sum */
.at-line { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; }
.at-t { flex: 1 1 8em; min-width: 0; }
.at-n { flex: 0 1 5.2em; min-width: 0; }
.at-out { margin-top: 10px; }
.at-out .hx-out { font-size: calc(var(--hx-out) * 1.2); }
.at-day { font-weight: 700; }
.at-sum { display: flex; gap: 8px; }
.at-sum .hx-in { flex: 1 1 auto; min-width: 0; }
.at-sum .hx-btn { padding: 0; font-size: calc(var(--hx-fs) * 1.2); }

/* Age */
.ag { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px 24px; align-items: start; }
.ag-in { display: grid; gap: 12px; }
.ag-on { display: flex; gap: 8px; }
.ag-on .hx-in { flex: 1 1 auto; min-width: 0; }
.ag-out, .db-out { border: 1px solid var(--hx-line); border-radius: 16px; padding: 14px 16px; background: var(--hx-soft); min-width: 0; }
.ag-ans .hx-lab { margin: 0; }
.ag-ans .hx-out { display: block; }
.ag-next { margin-top: 10px !important; font-weight: 700; }
@media (max-width: 760px) { .ag { grid-template-columns: 1fr; gap: 12px; } .ag-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; } .ag-out { padding: 10px 14px; } }
@media (max-width: 420px) { .ag-in { grid-template-columns: 1fr; } }

/* Days between */
.db-in, .db-add { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; margin-bottom: 10px; }
.db-in > div, .db-from { flex: 1 1 9.5em; min-width: 0; }
@media (max-width: 760px) { .db-in > div { flex-basis: 8em; } .db-in .hx-in { padding: 0 8px; } .db-h { display: none; } }
.db-k { flex: 0 1 4.4em; min-width: 0; }
.db-u { flex: 0 1 7.2em; min-width: 0; }
.db-out { padding: 10px 14px; }
.db-out .hx-out { font-size: calc(var(--hx-out) * 1.2); }
.db-res { font-size: calc(var(--hx-out) * .8) !important; }

/* Countdown and the timer */
.cd-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 10px; }
.cd-name { grid-column: 1 / -1; }
.cd-out { margin-top: 10px; }
.cd-out .hx-out { font-size: calc(var(--hx-out) * 1.2); }
.cd-tick { margin-top: 10px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.cd-tick div { border-radius: 12px; background: var(--hx-soft); padding: 6px 4px; text-align: center; }
.cd-tick b { display: block; font-size: calc(var(--hx-out) * 1.15); line-height: 1.1; font-variant-numeric: tabular-nums; }
.cd-tick span { font-size: var(--hx-small); color: var(--hx-muted); }
.tm-mode { margin-bottom: 10px; }
.tm-set { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; }
.tm-set[hidden] { display: none; }
.tm-min { flex: 0 1 6em; }
.tm-set .hx-chips .hx-btn { padding: 0 6px; }
.tm-disp { margin: 10px 0 !important; text-align: center; font-size: calc(var(--hx-out) * 2.3); font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; color: var(--hx-ink); }
.tm-disp.done { color: var(--hx-bad); animation: tm-blink 1s steps(2, start) 3; }
@keyframes tm-blink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .tm-disp.done { animation: none; } }
.tm-go { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tm-go .hx-btn { min-width: 6.5em; }
#tsnd { font-size: var(--hx-small); }
html.hx-fs .hx-tool { max-width: none; }
html.hx-fs .tm-disp { font-size: min(22vw, 36vh); }
html.hx-fs .cd-tick b { font-size: min(9vw, 14vh); }
