[data-tool] .sf[hidden], [data-tool] .fld[hidden], #hd2-cust[hidden], .hd2-pane[hidden] { display: none !important; }
#hd2-cust { display: grid; gap: inherit; }
.hd2-tag { display: inline-block; padding: 1px 8px; margin-left: 4px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: .74rem; font-weight: 700; white-space: nowrap; vertical-align: 1px; }
.hd2-tag.ok { background: #ecfdf5; color: #065f46; }
.hd2-tag.warn { background: #fffbeb; color: #92400e; }
.hd2-tag.bad { background: #fef2f2; color: #991b1b; }
.hd2-gl { margin: 4px 0 -6px; font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
/* weekly timesheet */
.hd2-ts { display: grid; gap: 6px; }
.hd2-tsr { display: grid; grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1fr) 72px; gap: 6px; align-items: center; }
.hd2-tsr > span { font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.hd2-tsh span { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.fld .hd2-tsr input { padding: 8px 6px !important; font-size: .92rem !important; border-radius: 10px !important; text-align: center; min-width: 0; }
/* date formats */
.hd2-fmt { display: grid; }
.hd2-fmt > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l b" "v b"; column-gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--border); align-items: center; }
.hd2-fmt > div:last-child { border-bottom: 0; }
.hd2-fmt span { grid-area: l; font-size: .78rem; color: var(--muted); font-weight: 600; }
.hd2-fmt code { grid-area: v; font-size: .95rem; color: var(--ink); background: none; padding: 0; word-break: break-word; font-family: inherit; font-weight: 600; }
.hd2-fmt button { grid-area: b; padding: 6px 10px; }
/* stopwatch & timer */
.hd2-sw { display: grid; gap: 18px; }
.hd2-pane { display: grid; gap: 16px; }
.hd2-disp { text-align: center; font-size: clamp(2.8rem, 12vw, 4.4rem); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; padding: 22px 10px; border-radius: 20px; background: var(--surface-2); color: var(--ink); line-height: 1.1; }
.hd2-disp.hd2-done { background: var(--brand); color: #fff; animation: hd2Flash 1s ease 3; }
@keyframes hd2Flash { 50% { opacity: .55; } }
.hd2-go { justify-content: center; }
.hd2-go .btn { min-width: 110px; justify-content: center; }
.hd2-hms { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto; gap: 8px; align-items: center; }
.hd2-hms input { width: 100%; min-width: 0; padding: 12px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); font-size: 1.1rem; text-align: center; }
.hd2-hms span { color: var(--muted); font-weight: 600; }
.hd2-pre { justify-content: center; }
.hd2-pre .chip-link { padding: 6px 12px; font-size: .86rem; cursor: pointer; }
.hd2-st { text-align: center; }
/* calendar */
.hd2-nav { justify-content: flex-end; }
.hd2-nav .btn i { margin: 0 4px; }
.hd2-cal-t { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; font-variant-numeric: tabular-nums; }
.hd2-cal-t caption { font-weight: 800; font-size: 1.15rem; padding: 4px 0 8px; text-align: left; color: var(--ink); }
.hd2-cal-t th { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 4px 0; }
.hd2-cal-t td { height: 54px; vertical-align: top; padding: 6px; border-radius: 10px; background: var(--surface-2); color: var(--ink); }
.hd2-cal-t td b { display: block; font-size: .98rem; }
.hd2-cal-t td small { display: block; margin-top: 2px; font-size: .62rem; line-height: 1.15; font-weight: 600; }
.hd2-cal-t td.o { background: none; }
.hd2-cal-t .sun, .hd2-cal-t th.sun { color: var(--brand); }
.hd2-cal-t td.hol { background: #fff1e6; color: #b45309; box-shadow: inset 0 0 0 1px #fdba74; }
.hd2-cal-t td.td { box-shadow: inset 0 0 0 2px var(--brand); }
.hd2-cal-t .wk { width: 30px; background: none; color: var(--muted); font-size: .7rem; font-weight: 600; text-align: center; padding: 6px 0; }
.hd2-year { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 18px; }
.hd2-year .hd2-cal-t caption { font-size: .92rem; padding-bottom: 2px; }
.hd2-year .hd2-cal-t { border-spacing: 1px; }
.hd2-year .hd2-cal-t td { height: auto; padding: 3px 0; text-align: center; border-radius: 6px; }
.hd2-year .hd2-cal-t td b { font-size: .78rem; font-weight: 600; }
.hd2-year .hd2-cal-t th { font-size: .62rem; }
.hd2-yh { margin: 0 0 8px; font-size: 1.4rem; }
.hd2-key { margin: 10px 0 0; font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hd2-k { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.hd2-k.hol { background: #fff1e6; box-shadow: inset 0 0 0 1px #fdba74; }
.hd2-k.sun { background: var(--brand); margin-left: 8px; }
.hd2-hl { margin: 6px 0 0; font-size: .85rem; color: var(--ink-2); }
@media (max-width: 480px) { .hd2-cal-t td { height: 44px; padding: 4px; } .hd2-cal-t td small { display: none; } }
@media print {
  body:has(.hd2-cal) * { visibility: hidden; }
  body:has(.hd2-cal) .hd2-cal, body:has(.hd2-cal) .hd2-cal * { visibility: visible; }
  body:has(.hd2-cal) .hd2-cal { position: absolute; left: 0; top: 0; width: 100%; }
  .hd2-cal-t td { background: none !important; border: 1px solid #cbd5e1; }
  .hd2-cal-t td.o { border: 0; }
  .hd2-year { grid-template-columns: repeat(3, 1fr); }
}
.hd2-cal-t td { overflow: hidden; }
.hd2-cal-t td small { overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .hd2-tsr { grid-template-columns: 32px minmax(0, 1fr) minmax(0, 1fr) 50px; gap: 4px; }
  .fld .hd2-tsr input { padding: 8px 2px !important; font-size: .84rem !important; }
  .hd2-tsr input::-webkit-calendar-picker-indicator { display: none; }
  .hd2-tsh span { font-size: .64rem; }
}
.hd2-year { align-items: start; }
