html {
  scrollbar-gutter: stable;
}

.hour-layout {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 2.4rem;
  margin-top: 1.2rem;
}

.hour-steps {
  padding-right: 1rem;
  border-right: 1px solid #d8dee3;
  font-size: 0.9rem;
}

.hour-steps a {
  text-decoration: none;
}

.hour-group {
  margin-bottom: 1.1rem;
}

.hour-group-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.3rem 0.5rem;
  border-radius: 0.35rem;
  color: #17222b;
  font-weight: 650;
}

.hour-progress {
  color: #8a97a1;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}

.hour-group.closed .hour-group-head {
  color: #52606b;
}

.hour-group.closed .hour-group-head:hover {
  background: #f1f4f6;
  color: #17222b;
}

.hour-group-row {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.hour-group-row > .hour-group-head {
  flex: 1;
}

.hour-group-reset {
  padding: 0.1rem 0.3rem;
  border: 0;
  border-radius: 0.35rem;
  background: none;
  color: #17222b;
  font: inherit;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}

.hour-group-reset:hover {
  background: #f1f4f6;
}

.hour-group.untouched .hour-group-reset {
  visibility: hidden;
}

.hour-group.complete .hour-group-head,
.hour-group.complete.closed .hour-group-head {
  background: #e3f1e7;
  color: #2e6b3d;
}

.hour-group.complete.closed .hour-group-head:hover {
  background: #d3eadb;
  color: #2e6b3d;
}

.hour-group.complete .hour-progress,
.hour-group.complete .hour-done-mark {
  color: #2e6b3d;
  font-weight: 650;
}

.hour-group.closed.complete .hour-dots {
  display: none;
}

.hour-dots {
  display: flex;
  gap: 4px;
  padding: 0.15rem 0.5rem 0;
}

.hour-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d8dee3;
}

.hour-dots i.done {
  background: #9fcfae;
}

.hour-done-mark {
  color: #9fcfae;
  font-weight: 700;
}

.hour-step-list {
  position: relative;
  margin-top: 0.2rem;
}

.hour-step-list::before {
  content: "";
  position: absolute;
  top: 0.9rem;
  bottom: 0.9rem;
  left: calc(0.3rem + 0.625rem - 1px);
  width: 2px;
  background: #e6eaee;
}

.hour-step {
  position: relative;
  display: block;
  padding: 0.28rem 0.5rem 0.28rem 2rem;
  border-radius: 0.35rem;
  color: #405249;
}

.hour-step-mark {
  position: absolute;
  top: 0.32rem;
  left: 0.3rem;
  display: grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid #b8c2ca;
  border-radius: 50%;
  background: #fff;
  color: #52606b;
  font-size: 0.68rem;
  font-weight: 650;
}

.hour-step.current {
  color: #17222b;
  font-weight: 650;
}

.hour-step.current .hour-step-mark {
  border-color: #17222b;
  background: #17222b;
  color: #fff;
}

.hour-step.done {
  color: #2e6b3d;
}

.hour-step.done .hour-step-mark {
  border-color: #2e6b3d;
  background: #eef7f0;
  color: #2e6b3d;
}

.hour-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
}

.hour-card {
  padding: 1rem 1.2rem;
  border: 1px solid #d8dee3;
  border-radius: 0.6rem;
}

.hour-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.hour-card h2 {
  margin: 0;
  color: #17222b;
  font-size: 1.1rem;
}

.hour-reset {
  padding: 0;
  border: 0;
  background: none;
  color: #b8c2ca;
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.hour-reset:hover {
  color: #52606b;
  text-decoration: underline;
}

.hour-reset-all {
  position: fixed;
  right: 1.25rem;
  bottom: 1rem;
  padding: 0.25rem;
  border: 0;
  background: none;
  color: #b8c2ca;
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.hour-reset-all:hover {
  color: #52606b;
}

.hour-reset-all:disabled {
  visibility: hidden;
}

.hour-overview-link.placeholder {
  visibility: hidden;
}

.hour-card ol {
  margin: 0;
  padding-left: 1.3rem;
  color: #52606b;
  font-size: 0.9rem;
}

.hour-card li {
  margin: 0.15rem 0;
}

.hour-start {
  display: inline-block;
  margin-top: 0.8rem;
  padding: 0.4rem 0.9rem;
  border-radius: 0.4rem;
  background: #17222b;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.step {
  color: #2b3740;
  line-height: 1.55;
}

.step .kicker {
  color: #52606b;
  font-size: 0.75rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.step-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.step h2 {
  margin: 0;
  color: #17222b;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.step ol {
  margin: 0.9rem 0 1.2rem;
  padding-left: 1.3rem;
}

.step li {
  margin: 0.2rem 0;
}

.step code {
  font-size: 0.92em;
}

.hour-prompt {
  margin: 0 0 1.6rem;
  border: 1px solid #8a97a2;
  border-radius: 0.5rem;
  box-shadow: 0 2px 6px rgba(23, 34, 43, 0.1);
  overflow: hidden;
}

.hour-prompt-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.8rem;
  border-bottom: 1px solid #8a97a2;
  background: #c4cdd5;
}

.hour-prompt-bar span,
.hour-prompt-part {
  color: #52606b;
  font-size: 0.75rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hour-prompt-bar span {
  color: #1f2a33;
}

.hour-prompt pre {
  margin: 0;
  padding: 0.9rem 1rem;
  white-space: pre-wrap;
  font: 0.9rem/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.hour-file pre {
  max-height: 80vh;
  overflow-y: auto;
}

.hour-verdicts {
  margin-top: 1rem;
  border: 1px solid #cfd6dc;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.hour-verdict {
  display: grid;
  grid-template-columns: 1.6rem 1fr auto;
  gap: 0.75rem;
  align-items: start;
  padding: 0.65rem 0.9rem;
  border-top: 1px solid #e5e9ec;
}

.hour-verdict:first-child {
  border-top: 0;
}

.hour-verdict.good {
  background: #f1faf4;
}

.hour-verdict.so-so {
  background: #fdf6d8;
}

.hour-verdict.bad {
  background: #fdf2f1;
}

.hour-verdict-letter {
  font-weight: 700;
  color: #5b6770;
}

.hour-verdict pre {
  margin: 0;
  white-space: pre-wrap;
  color: #3b4750;
  font: 0.8rem/1.45 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.hour-verdict-switch {
  display: inline-flex;
  border: 1px solid #cfd6dc;
  border-radius: 8px;
  overflow: hidden;
}

.hour-verdict-switch button {
  border: 0;
  background: #fff;
  padding: 0.3rem 0.6rem;
  font-size: 0.95rem;
  cursor: pointer;
}

.hour-verdict-switch button + button {
  border-left: 1px solid #cfd6dc;
}

.hour-verdict-switch [data-verdict="good"][aria-pressed="true"] {
  background: #3aa56b;
}

.hour-verdict-switch [data-verdict="so-so"][aria-pressed="true"] {
  background: #e8c547;
}

.hour-verdict-switch [data-verdict="bad"][aria-pressed="true"] {
  background: #d4574e;
}

.hour-prompt-part {
  padding: 0.55rem 1rem 0;
  font-size: 0.72rem;
}

.hour-prompt-part + pre {
  padding-top: 0.35rem;
}

.hour-prompt-part ~ .hour-prompt-part,
.hour-prompt-part ~ .hour-prompt-part + pre {
  background: #eef4f9;
}

.hour-prompt-part ~ .hour-prompt-part {
  border-top: 1px solid #d8dee3;
  color: #235f91;
}

.hour-bingo {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0.6rem;
  margin: 0 0 1.2rem;
}

.hour-bingo label {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.7rem 0.85rem;
  border: 1px solid #d8dee3;
  border-radius: 0.5rem;
  background: #fbf8e6;
  font-size: 0.92rem;
  line-height: 1.35;
  cursor: pointer;
}

.hour-bingo input {
  margin: 0.15rem 0 0;
}

.hour-bingo label:has(input:checked) {
  background: #eef7f0;
  border-color: #9fcfae;
}

.hour-fallback {
  margin: 0 0 1.2rem;
}

.hour-fallback summary {
  color: #52606b;
  cursor: pointer;
}

.hour-fallback[open] summary {
  margin-bottom: 0.6rem;
}

.hour-choice {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid #8a97a2;
  border-radius: 0.4rem;
  background: #fff;
}

.hour-choice button {
  padding: 0.18rem 0.7rem;
  border: 0;
  background: none;
  color: #1f2a33;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.hour-choice button.on {
  background: #1f2a33;
  color: #fff;
}

.hour-prompt-actions {
  display: flex;
  gap: 0.4rem;
}

.hour-copy,
.hour-open {
  padding: 0.25rem 0.75rem;
  border: 1px solid #235f91;
  border-radius: 0.4rem;
  background: #fff;
  color: #235f91;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.hour-copy.done {
  background: #235f91;
  color: #fff;
}

.hour-next {
  padding: 0.55rem 1rem;
  border: 0;
  border-radius: 0.5rem;
  background: #17222b;
  color: #fff;
  font: inherit;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.step-head .hour-next {
  padding: 0.4rem 0.85rem;
  font-size: 0.9rem;
}

.hour-next:disabled {
  background: #e6eaee;
  color: #8a97a2;
  cursor: default;
}

@media (max-width: 44rem) {
  .hour-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .hour-steps {
    padding: 0 0 0.6rem;
    border-right: 0;
    border-bottom: 1px solid #d8dee3;
  }

  .hour-step-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.1rem 0.4rem;
  }

  .hour-step-list::before {
    display: none;
  }
}
