:root {
  --canvas: #151719;
  --panel: #202325;
  --ink: #f7f8f8;
  --muted: #bbbfc3;
  --surface: #191b1e;
  --hover: #303438;
  --subtle: #262a2d;
  --line: #34383b;
  --line-strong: #62696e;
  --accent: #caff20;
  --highlight: var(--accent);
  --error-text: #ffb8aa;
  --radius: 12px;
}

:focus-visible { outline-color: var(--accent); }
.brand { font-weight: 840; }
.local::before { background: var(--accent); }
.masthead nav button[aria-current="page"] {
  color: var(--accent);
  background: #2d3523;
  border-color: #566339;
}
.primary:hover:not(:disabled) { background: #deff76; }
.dashboard-track { background: #3b4143; }
.dashboard-track > span { background: var(--accent); }
.target-progress progress { accent-color: var(--accent); }
.target-progress progress::-webkit-progress-bar { background: #3b4143; }
.target-progress progress::-webkit-progress-value { background: var(--accent); }
.target-progress progress::-moz-progress-bar { background: var(--accent); }
#license-panel { overflow-wrap: anywhere; }
#license-panel table { font-size: clamp(.75rem, 3.4vw, .875rem); }
#license-panel :is(th, td) { padding-inline: clamp(5px, 2vw, 14px); }

#date {
  color: var(--muted);
  font-size: .9375rem;
  letter-spacing: 0;
  text-transform: none;
}
#capture h1 { font-weight: 850; }
.capture-grid { align-items: start; }
.clock-card {
  background: transparent;
  border-color: transparent;
  padding: 0;
}
.clock-display {
  --dial-highlight: var(--accent);
  background: #101214;
  border: 1px solid #25282a;
  border-radius: 10px;
  display: grid;
  align-content: start;
  justify-items: center;
  isolation: isolate;
  min-height: 0;
  padding: clamp(3.85rem, 8vw, 5.7rem) .7rem 1.1rem;
  position: relative;
  text-align: center;
}
.clock-display::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset-block-start: 12px;
  inset-inline: 0;
  margin-inline: auto;
  width: min(88%, 380px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 270deg, #333639 0deg 33deg, var(--dial-highlight) 33deg 70deg, #333639 70deg 180deg, transparent 180deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), black calc(100% - 5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 6px), black calc(100% - 5px));
  clip-path: inset(0 0 50% 0);
  pointer-events: none;
}
.clock-display { overflow: hidden; }
.clock-display:has(.state[data-status="paused"]) { --dial-highlight: #ffca76; }
.clock-display .count {
  color: var(--accent);
  font-size: clamp(2.65rem, 11.6vw, 5.2rem);
  font-weight: 900;
  letter-spacing: -.085em;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  position: relative;
}
.clock-display .state {
  background: #101214;
  border: 0;
  border-radius: 4px;
  color: var(--ink);
  font-size: 1rem;
  padding: 4px 9px;
  margin-top: 8px;
}
.clock-display .state::before { display: none; }
.clock-display .state[data-status="paused"] { color: #ffca76; }
.clock-display p {
  background: #101214;
  border-radius: 5px;
  color: var(--muted);
  font-size: .875rem;
  padding-inline: 6px;
  margin: 4px 0 0;
}
.clock-card .person-select, .clock-card .clock-field {
  width: 100%;
  min-width: 0;
  margin-bottom: 8px;
  background: #24272a;
  border: 1px solid #34383c;
  border-radius: 8px;
  padding: 9px 14px 4px;
}
.clock-card .person-select label, .clock-card .clock-field label {
  color: var(--muted);
  font-size: .875rem;
  font-weight: 740;
  margin-bottom: 0;
}
.clock-card .person-select select, .clock-card .clock-field select {
  min-height: 44px;
  margin: 0;
  max-width: none;
  width: 100%;
  padding: 0 4px 4px 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 3px;
  font-size: 1.06rem;
  font-weight: 760;
}
.clock-card select option { color: var(--ink); background: var(--panel); }
.clock-card .clock-greeting {
  color: var(--muted);
  font-size: .875rem;
  font-weight: 500;
  margin-block: 4px 10px;
}
.clock-card .actions { margin-top: 5px; }
.clock-card #clock-main:not([hidden]) {
  flex: 1 1 100%;
  width: 100%;
  height: auto;
  min-height: 56px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--accent);
  color: #141806;
  font-size: clamp(1.16rem, 3vw, 1.65rem);
  font-weight: 850;
}
.clock-card #clock-main:hover:not(:disabled) { background: #deff76; }
#clock-main[data-action="stop"]:not([hidden]) { background: #f4f6ed; }
#clock-main[data-action="stop"]:hover:not(:disabled) { background: #dfe4d3; }
#clock-main .clock-action-icon { display: none; }
.clock-card .secondary { background: var(--subtle); }
.month-card { border-color: var(--line); }
.month-card .card-heading h2 { font-size: clamp(1.4rem, 4.4vw, 1.9rem); font-weight: 820; }

.masthead .graphit-more { display: contents; }
.graphit-more > summary { display: none; }
.graphit-more-items { display: grid; gap: 5px; }

@media (max-width: 950px) {
  .masthead { min-height: 62px; }
  main.shell { padding-bottom: calc(6.25rem + env(safe-area-inset-bottom, 0px)); }
  .masthead nav {
    position: fixed;
    z-index: 3;
    display: flex;
    align-items: stretch;
    flex-wrap: nowrap;
    width: 100%;
    bottom: 0;
    inset-inline: 0;
    margin: 0;
    gap: 0;
    padding: 4px max(4px, env(safe-area-inset-left, 0px)) max(4px, env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: #202326;
  }
  .masthead nav:not(:has([data-view]:not([hidden]))) { display: none; }
  .masthead nav > button, .graphit-more > summary {
    flex: 1 1 0;
    min-width: 0;
    min-height: 54px;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 4px;
    padding: 5px 2px;
    color: var(--ink);
    text-align: center;
    font-size: clamp(.75rem, 2.8vw, .875rem);
    font-weight: 700;
    line-height: 1.12;
  }
  .masthead nav > button[aria-current="page"] {
    border-color: transparent;
    color: var(--accent);
    background: #2b3325;
  }
  .masthead nav > button::before, .graphit-more > summary::before {
    display: block;
    content: "";
    flex: none;
    width: 17px;
    height: 17px;
    border: 1.5px solid currentColor;
  }
  .masthead nav > [data-view="reports"]::before {
    border-width: 0 0 2px 2px;
    border-radius: 1px;
    background: linear-gradient(to top, currentColor 55%, transparent 55%) 3px bottom / 2px 100% no-repeat,
                linear-gradient(to top, currentColor 83%, transparent 83%) 8px bottom / 2px 100% no-repeat;
  }
  .masthead .graphit-more {
    display: block;
    flex: 1 1 0;
    min-width: 0;
  }
  .graphit-more:not(:has([data-view]:not([hidden]))) { display: none; }
  .graphit-more > summary { display: flex; list-style: none; border-radius: 7px; }
  .graphit-more > summary::-webkit-details-marker { display: none; }
  .graphit-more > summary::before {
    border: 0;
    border-radius: 0;
    background: repeating-linear-gradient(to bottom, currentColor 0 2px, transparent 2px 6px);
    height: 14px;
  }
  .graphit-more[open] > summary, .graphit-more:has([aria-current="page"]) > summary { color: var(--accent); }
  .graphit-more-items {
    position: absolute;
    inset-inline-end: max(8px, env(safe-area-inset-right, 0px));
    bottom: 100%;
    width: min(15rem, calc(100% - 16px));
    margin-bottom: 7px;
    padding: 7px;
    background: #202326;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    box-shadow: 0 8px 25px #0009;
  }
  .graphit-more-items button { width: 100%; min-height: 44px; font-size: .94rem; }
}

@media (max-width: 670px) {
  #capture .heading { margin-bottom: 14px; }
  #capture h1 { font-size: clamp(1.95rem, 6.9vw, 3.1rem); }
  .clock-display { margin-bottom: 12px; }
  .month-card { margin-top: 2px; }
  .dashboard-axis, .dashboard-bars li {
    grid-template-columns: minmax(3.5rem, 5.7rem) minmax(0, 1fr) minmax(3rem, max-content);
    gap: 5px;
  }
}
