@import url("/lib/tools/timekit/time.css?v=1");
/* Time kit, part 2: clock faces (digital, flip, analog), night and burn-in modes, city search, the world clock wall and
   planner, alarms, countdown units and focus timer parts. */

.tk-stage { --tk-card: #1c1d25; }
.tk-stage[data-theme="black"] { --tk-card: #111; }
.tk-stage[data-theme="light"] { --tk-card: #e2e2dd; }
.tk-stage[data-theme="calm"] { --tk-card: #1e3f48; }
.tk-stage[data-theme="purple"] { --tk-card: #2b1a47; }
.tk-stage[data-theme="sunset"] { --tk-card: #52261a; }
.tk-stage[data-theme="ocean"] { --tk-card: #0b3a56; }
.tk-stage[data-theme="orange"] { --tk-card: #e3e3e3; }

/* digital */
.fc-dig { display: flex; align-items: baseline; gap: .08em; font-size: 72px; font-weight: 700; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--tk-fg); }
.fc-dig .fc-ap { font-size: .3em; font-weight: 600; color: var(--tk-dim); }
.fc-dig .fc-ap:empty { display: none; }
.tk-stage[data-font="thin"] .fc-dig, .tk-stage[data-font="thin"] .fc-flip { font-weight: 200; }
.tk-stage[data-font="mono"] .fc-dig, .tk-stage[data-font="mono"] .fc-flip, .tk-stage[data-font="mono"] .fc-nums { font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace; font-weight: 600; letter-spacing: -.04em; }
.tk-stage[data-font="rounded"] .fc-dig, .tk-stage[data-font="rounded"] .fc-flip, .tk-stage[data-font="rounded"] .fc-nums { font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Varela Round", system-ui, sans-serif; }
.tk-stage[data-font="serif"] .fc-dig, .tk-stage[data-font="serif"] .fc-flip, .tk-stage[data-font="serif"] .fc-nums { font-family: ui-serif, Georgia, "Times New Roman", serif; font-weight: 600; }

/* flip */
.fc-flip { --fc: 80px; display: flex; align-items: center; justify-content: center; gap: calc(var(--fc) * .3); font-size: var(--fc); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--tk-fg); }
.fc-group { position: relative; display: flex; gap: .06em; }
.fc-group .fc-ap { position: absolute; left: .1em; bottom: .1em; z-index: 3; font-size: .16em; font-weight: 700; color: var(--tk-dim); }
.fc-card { position: relative; width: .74em; height: 1.16em; line-height: 1.16em; text-align: center; perspective: 3.5em; }
.fc-card > div { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; background: var(--tk-card); backface-visibility: hidden; }
.fc-card b { display: block; height: 1.16em; font-weight: inherit; }
.fc-up, .fc-fu { top: 0; border-radius: .07em .07em 0 0; transform-origin: 50% 100%; }
.fc-down, .fc-fd { bottom: 0; border-radius: 0 0 .07em .07em; transform-origin: 50% 0; }
.fc-down b, .fc-fd b { margin-top: -.58em; }
.fc-card::after { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - .01em); height: .02em; background: var(--tk-bg, #000); z-index: 4; opacity: .7; }
.fc-fu, .fc-fd { visibility: hidden; z-index: 2; }
.fc-card.go .fc-fu { visibility: visible; animation: fc-top .3s ease-in forwards; }
.fc-card.go .fc-fd { visibility: visible; transform: rotateX(90deg); animation: fc-bot .3s ease-out .3s forwards; }
@keyframes fc-top { to { transform: rotateX(-90deg); } }
@keyframes fc-bot { from { transform: rotateX(90deg); } to { transform: rotateX(0); } }

/* analog */
.fc-ana { width: 100%; height: 100%; display: block; }
.fc-plate { fill: var(--tk-card); }
.fc-tick { stroke: var(--tk-dim); stroke-width: 1; }
.fc-tick5 { stroke: var(--tk-fg); stroke-width: 2.4; }
.fc-nums text { fill: var(--tk-fg); font-size: 14px; font-weight: 600; }
.fc-hh { stroke: var(--tk-fg); stroke-width: 6; stroke-linecap: round; }
.fc-mh { stroke: var(--tk-fg); stroke-width: 3.6; stroke-linecap: round; }
.fc-sh { stroke: var(--tk-accent); stroke-width: 1.4; stroke-linecap: round; }
.fc-pin { fill: var(--tk-accent); }

/* lines under the big clock */
.tk-sub2 { min-height: 20px; text-align: center; font-size: 15px; color: var(--tk-dim); font-variant-numeric: tabular-nums; }
.tk-sub2:empty { display: none; }
.tk-stage:fullscreen .tk-sub2, .tk-stage.tk-fake-full .tk-sub2 { font-size: clamp(14px, 3vh, 34px); }
.tk-stage .tk-face > .fc-move { display: grid; place-items: center; width: 100%; height: 100%; transition: transform 4s ease-in-out; }

/* night, burn-in, green screen */
.tk-stage.tk-night { filter: brightness(.38); }
.tk-stage.tk-nightred { --tk-bg: #000; --tk-fg: #ff3a24; --tk-dim: #8a1e14; --tk-accent: #ff3a24; --tk-card: #160403; filter: brightness(.55); }
.tk-stage.tk-burn .tk-face { animation: tk-drift 600s ease-in-out infinite alternate; }
@keyframes tk-drift { to { opacity: .82; } }
.tk-stage.tk-green { --tk-bg: #00b140; --tk-fg: #fff; --tk-dim: rgba(255, 255, 255, .8); --tk-card: rgba(0, 0, 0, .25); --tk-btn: rgba(0, 0, 0, .2); --tk-btn-b: rgba(255, 255, 255, .4); }

/* city search */
.cp-wrap { position: relative; }
.cp-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, .45); max-height: 320px; overflow: auto; }
.cp-opt { display: flex; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 7px; cursor: pointer; font-size: 14px; }
.cp-opt.on, .cp-opt:hover { background: var(--panel-2); color: var(--accent); }
.cp-name { min-width: 0; overflow-wrap: anywhere; }
.cp-when { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.cp-wrap .in { font-size: 16px; min-height: 44px; }

/* chosen places, alarms, countdowns, tasks: cards in a list */
.tk-rows { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.tk-row2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2); }
.tk-row2.sel { border-color: var(--accent-dim); box-shadow: 0 0 0 1px var(--accent-dim) inset; }
.tk-row2.off { opacity: .6; }
.tk-row2 .t-main { min-width: 0; }
.tk-row2 .t-big { font: 700 26px/1.1 system-ui, sans-serif; font-variant-numeric: tabular-nums; color: var(--text); }
.tk-row2 .t-big small { font-size: 14px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.tk-row2 .t-name { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.tk-row2 .t-meta { font-size: 13px; color: var(--muted); }
.tk-row2 .t-warn { font-size: 13px; color: var(--warn); }
.tk-row2 .t-btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.tk-row2 .t-btns .btn { min-height: 36px; }
.tk-row2 .in.sm { width: 140px; padding: 6px 8px; font-size: 14px; }
.tk-dayn { display: flex; gap: 4px; flex-wrap: wrap; }
.tk-dayn .chip { min-height: 34px; min-width: 44px; padding: 5px 8px; font-size: 12px; }
.switch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.switch input { width: 20px; height: 20px; accent-color: var(--accent); }

/* world clock wall (inside the stage) */
.wl-wall { display: grid; gap: 10px; width: 100%; height: 100%; align-self: stretch; justify-self: stretch; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); }
.wl-tile { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; padding: 6px; border-radius: 10px; background: var(--tk-btn); }
.wl-tile .wl-face { flex: 1 1 auto; min-height: 0; display: grid; place-items: center; }
.wl-tile .wl-name, .wl-tile .wl-date { flex: none; line-height: 1.25; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-tile .wl-name { font-size: clamp(12px, 2.2vh, 26px); font-weight: 650; color: var(--tk-fg); }
.wl-tile .wl-date { font-size: clamp(11px, 1.8vh, 20px); color: var(--tk-dim); }

/* meeting planner */
.pl-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.pl { border-collapse: separate; border-spacing: 0; font-size: 12px; font-variant-numeric: tabular-nums; min-width: 100%; }
.pl th { position: sticky; left: 0; z-index: 2; background: var(--panel); text-align: left; padding: 6px 10px; min-width: 150px; max-width: 200px; font-weight: 600; border-bottom: 1px solid var(--border); }
.pl th .pl-sub { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.pl td { padding: 0; border-bottom: 1px solid var(--border); border-left: 1px solid rgba(255, 255, 255, .04); }
.pl td button { display: block; width: 100%; min-width: 44px; min-height: 40px; padding: 4px 2px; border: 0; background: transparent; color: var(--muted); font: inherit; cursor: pointer; }
.pl td.work button { background: rgba(149, 214, 0, .12); color: var(--text); }
.pl td.night button { color: #5b6070; }
.pl td.newday button { box-shadow: inset 2px 0 0 #9147ff; }
.pl tr.pl-all td.ok button { background: rgba(149, 214, 0, .35); color: #10130a; font-weight: 700; }
.pl td.pick button, .pl td.pick.work button { outline: 2px solid var(--accent); outline-offset: -2px; color: var(--text); }
.pl-head td { font-size: 11px; color: var(--muted); text-align: center; padding: 4px 0; }

/* readiness check (alarm) */
.rd { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rd li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 14px; }
.rd li::before { content: "•"; text-align: center; font-weight: 800; color: var(--muted); }
.rd li.ok::before { content: "✓"; color: var(--accent); }
.rd li.bad::before { content: "!"; color: var(--warn); }
.rd li.no::before { content: "×"; color: var(--bad); }
.rd .why { color: var(--muted); font-size: 13px; }
.rd-verdict { font-size: 17px; font-weight: 700; margin: 0 0 10px; }
.rd-verdict.ok { color: var(--accent); }
.rd-verdict.bad { color: var(--warn); }
.qr-box { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.qr-box svg { width: 196px; height: 196px; background: #fff; border-radius: 8px; padding: 0; }
.tk-sunrise { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(circle at 50% 100%, #ffd9a0, #ff9a5a 40%, #3a1a10 85%); opacity: 0; transition: opacity 2s linear; }
.tk-stage > :not(.tk-sunrise) { position: relative; z-index: 1; }

/* countdown units */
.cd-units { display: flex; justify-content: center; align-items: flex-start; gap: .25em; font-size: 72px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; color: var(--tk-fg); }
.cd-unit { display: flex; flex-direction: column; align-items: center; gap: .12em; }
.cd-unit b { font-weight: inherit; }
.cd-unit i { font-style: normal; font-size: .16em; font-weight: 600; color: var(--tk-dim); letter-spacing: .04em; text-transform: uppercase; }
.cd-big { font-size: 200px; font-weight: 800; line-height: 1; color: var(--tk-accent); font-variant-numeric: tabular-nums; }
.cd-done { font-size: 64px; font-weight: 800; color: var(--tk-done); text-align: center; line-height: 1.1; overflow-wrap: anywhere; }
.tk-stage[data-font="thin"] .cd-units { font-weight: 200; }
.tk-stage[data-font="mono"] .cd-units, .tk-stage[data-font="mono"] .cd-big { font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace; }
.tk-stage[data-font="rounded"] .cd-units, .tk-stage[data-font="rounded"] .cd-big { font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, sans-serif; }
.tk-stage[data-font="serif"] .cd-units, .tk-stage[data-font="serif"] .cd-big { font-family: ui-serif, Georgia, serif; }
.cd-confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
.tk-form { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; }
.tk-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.tk-form .in, .tk-form .sel { min-height: 42px; font-size: 15px; }
.tk-form .wide { grid-column: 1 / -1; }
.tk-mile { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.tk-mile b { color: var(--text); }
.tk-mile span { color: var(--muted); }

/* focus timer */
.fo-phase { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.fo-phase span { padding: 3px 10px; border-radius: 999px; font-size: 13px; color: var(--tk-dim); border: 1px solid var(--tk-btn-b); }
.fo-phase span.on { color: var(--tk-on-accent); background: var(--tk-accent); border-color: transparent; font-weight: 700; }
.fo-dots { display: flex; justify-content: center; gap: 6px; min-height: 12px; }
.fo-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--tk-track); }
.fo-dots i.on { background: var(--tk-accent); }
.tk-stage[data-phase="short"], .tk-stage[data-phase="long"] { --tk-accent: #48cae4; --tk-on-accent: #032030; }
.fo-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 10px; }
.fo-stats div { padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel-2); }
.fo-stats b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.fo-stats span { font-size: 12px; color: var(--muted); }

/* ?embed=1: only the countdown */
body.tk-embed .site, body.tk-embed .contact, body.tk-embed .head, body.tk-embed main > section:not(.tk-panel), body.tk-embed .tk-hint, body.tk-embed .tk-ctl { display: none !important; }
body.tk-embed .wrap { padding: 0; max-width: none; }
body.tk-embed .tk-panel { margin: 0; padding: 0; border: 0; background: none; }
body.tk-embed .tk-stage { height: 100vh; border-radius: 0; border: 0; }

@media (max-width: 560px) {
  .tk-row2 { grid-template-columns: minmax(0, 1fr); }
  .tk-row2 .t-btns { justify-content: flex-start; }
  .wl-wall { --cols: 2 !important; }
  .cd-unit i { font-size: .2em; }
}
