/* Scoped styles for main-domain curriculum system, original notes library, and guest check-in balance. */
#dtoj-home .home-lower:has(> .home-curriculum) {
  grid-template-columns: minmax(0, 1fr);
  row-gap: 48px;
}
@media (max-width: 1120px) {
  #dtoj-home .home-lower:has(> .home-curriculum) { row-gap: 40px; }
}
@media (max-width: 760px) {
  #dtoj-home .home-lower:has(> .home-curriculum) { row-gap: 32px; }
}

#dtoj-home .home-curriculum,
#dtoj-home .home-library {
  min-width: 0;
  max-width: 100%;
  padding: 36px;
  border: 1px solid #d5deea;
  border-radius: 18px;
  background: #f8fafc;
  color: #172a43;
}
#dtoj-home .home-library {
  background: #ffffff;
}
#dtoj-home .home-section-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 32px;
  margin-bottom: 24px;
}
#dtoj-home .home-section-bar-text {
  min-width: 0;
  max-width: 660px;
}
#dtoj-home .home-section-bar-text h2 {
  margin: 0;
  color: #172a43;
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 760;
  letter-spacing: -0.025em;
  line-height: 1.25;
}
#dtoj-home .home-section-bar-text p {
  margin: 10px 0 0;
  color: #4b5c72;
  font-size: 14px;
  line-height: 1.75;
}
#dtoj-home .home-section-bar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
#dtoj-home .home-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #cbd6e6;
  border-radius: 10px;
  background: #ffffff;
  color: #172a43;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
#dtoj-home .home-inline-link:hover {
  background: #eaf1fa;
  border-color: #9fb8da;
  color: #1e4f94;
}
#dtoj-home .home-inline-link--primary {
  background: #164754;
  border-color: #164754;
  color: #f4fafb;
}
#dtoj-home .home-inline-link--primary:hover {
  background: #103742;
  border-color: #103742;
  color: #ffffff;
}
#dtoj-home .home-inline-link:focus-visible,
#dtoj-home .home-stage-link:focus-visible,
#dtoj-home .home-lib-tab:focus-visible,
#dtoj-home .home-lib-row-link:focus-visible,
#dtoj-home .home-spotlight-link:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

#dtoj-home .home-curriculum-spine {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 6px;
  padding: 14px 0 22px;
  border-top: 1px solid #d5deea;
  border-bottom: 1px solid #d5deea;
  margin: 0;
  list-style: none;
}
#dtoj-home .home-curriculum-spine li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 650;
  color: #37577f;
}
#dtoj-home .home-curriculum-spine-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #edf3fa;
  color: #1e406d;
}
#dtoj-home .home-curriculum-spine-step b {
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: #164754;
}
#dtoj-home .home-curriculum-spine-arrow {
  color: #8496ad;
  font-size: 13px;
  user-select: none;
}

#dtoj-home .home-curriculum-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid #d5deea;
}
#dtoj-home .home-stage {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 24px 24px 22px;
  border-right: 1px solid #e0e6ef;
  border-bottom: 1px solid #e0e6ef;
  transition: background-color 0.16s ease;
}
#dtoj-home .home-stage:nth-child(3n) { border-right: 0; }
#dtoj-home .home-stage:nth-child(n+4) { border-bottom: 0; }
#dtoj-home .home-stage:hover { background: rgba(234, 241, 250, 0.45); }
#dtoj-home .home-stage-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
#dtoj-home .home-stage-num {
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: #164754;
}
#dtoj-home .home-stage-track {
  font-size: 12px;
  font-weight: 600;
  color: #526b8c;
}
#dtoj-home .home-stage h3 {
  margin: 0;
  color: #172a43;
  font-size: 18px;
  font-weight: 740;
  line-height: 1.35;
}
#dtoj-home .home-stage-goal {
  margin: 8px 0 0;
  color: #364962;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
}
#dtoj-home .home-stage-scope {
  margin: 8px 0 18px;
  color: #526277;
  font-size: 13px;
  line-height: 1.7;
  flex: 1;
}
#dtoj-home .home-stage-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding-top: 12px;
  border-top: 1px solid #e6ecf3;
}
#dtoj-home .home-stage-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #1e4f94;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  text-underline-offset: 3px;
}
#dtoj-home .home-stage-link:hover {
  color: #12376b;
  text-decoration: underline;
}
#dtoj-home .home-stage-link--muted {
  color: #4b5c72;
}
#dtoj-home .home-stage-link--muted:hover {
  color: #172a43;
}

#dtoj-home .home-curriculum-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 18px;
  color: #4b5c72;
  font-size: 13px;
  line-height: 1.65;
}
#dtoj-home .home-curriculum-pillars {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
#dtoj-home .home-curriculum-pillars li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #364962;
  font-weight: 600;
}
#dtoj-home .home-curriculum-pillars li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #164754;
}

#dtoj-home .home-lib-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 20px;
  border-bottom: 1px solid #d5deea;
}
#dtoj-home .home-lib-tab {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #d5deea;
  border-radius: 999px;
  background: #f8fafc;
  color: #364962;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
#dtoj-home .home-lib-tab:hover {
  background: #eaf1fa;
  border-color: #a9c0df;
  color: #172a43;
}
#dtoj-home .home-lib-tab[aria-selected="true"] {
  background: #172a43;
  border-color: #172a43;
  color: #ffffff;
}

#dtoj-home .home-lib-spotlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid #d5deea;
}
#dtoj-home .home-spotlight {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 24px 26px 22px;
  background: #f8fafc;
}
#dtoj-home .home-spotlight:first-child {
  padding-left: 4px;
  background: transparent;
  border-right: 1px solid #e0e6ef;
}
#dtoj-home .home-spotlight--member {
  background: #f4f8fc;
}
#dtoj-home .home-spotlight-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
#dtoj-home .home-access-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
#dtoj-home .home-access-tag--public {
  background: #e6f4f1;
  color: #0f5f59;
}
#dtoj-home .home-access-tag--book {
  background: #edf3fa;
  color: #1e4f94;
}
#dtoj-home .home-access-tag--member {
  background: #f6efe1;
  color: #7a5c22;
}
#dtoj-home .home-spotlight-format {
  color: #526277;
  font-size: 12px;
  font-weight: 600;
}
#dtoj-home .home-spotlight h3 {
  margin: 0;
  color: #172a43;
  font-size: 20px;
  font-weight: 760;
  line-height: 1.35;
}
#dtoj-home .home-spotlight p {
  margin: 9px 0 18px;
  color: #4b5c72;
  font-size: 13px;
  line-height: 1.75;
  flex: 1;
}
#dtoj-home .home-spotlight-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
}
#dtoj-home .home-spotlight-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #1e4f94;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  text-underline-offset: 3px;
}
#dtoj-home .home-spotlight-link:hover {
  color: #12376b;
  text-decoration: underline;
}
#dtoj-home .home-spotlight-link--secondary {
  color: #4b5c72;
  font-weight: 600;
}
#dtoj-home .home-spotlight-link--secondary:hover {
  color: #172a43;
}

#dtoj-home .home-lib-ledger {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 32px;
  border-bottom: 1px solid #d5deea;
}
#dtoj-home .home-lib-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 20px 6px 18px;
  border-bottom: 1px solid #e6ecf3;
  transition: background-color 0.16s ease;
}
#dtoj-home .home-lib-item:hover { background: #f8fafd; }
#dtoj-home .home-lib-item[hidden] { display: none !important; }
#dtoj-home .home-lib-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}
#dtoj-home .home-lib-item h3 {
  margin: 0;
  color: #172a43;
  font-size: 16px;
  font-weight: 720;
  line-height: 1.4;
}
#dtoj-home .home-lib-item p {
  margin: 8px 0 0;
  color: #526277;
  font-size: 13px;
  line-height: 1.68;
}
#dtoj-home .home-lib-item-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  margin-top: 2px;
}
#dtoj-home .home-lib-item-kind {
  color: #61748c;
  font-size: 12px;
  font-weight: 550;
}
#dtoj-home .home-lib-row-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #1e4f94;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  text-underline-offset: 3px;
}
#dtoj-home .home-lib-row-link:hover {
  color: #12376b;
  text-decoration: underline;
}
#dtoj-home .home-lib-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 18px;
}
#dtoj-home .home-lib-foot p {
  margin: 0;
  max-width: 680px;
  color: #526277;
  font-size: 13px;
  line-height: 1.7;
}

#dtoj-home .home-checkin-guest {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding-top: 6px;
}
#dtoj-home .home-checkin-guest-lead {
  margin: 0;
  color: #4b5c72;
  font-size: 13px;
  line-height: 1.7;
}
#dtoj-home .home-checkin-guest-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 16px;
  list-style: none;
  border: 1px solid #e0e6ef;
  border-radius: 14px;
  background: #f8fafc;
}
#dtoj-home .home-checkin-guest-list li {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  font-size: 13px;
  line-height: 1.6;
  color: #364962;
}
#dtoj-home .home-checkin-guest-list strong {
  color: #164754;
  font-weight: 700;
}

@media (max-width: 1080px) {
  #dtoj-home .home-curriculum,
  #dtoj-home .home-library { padding: 28px; }
  #dtoj-home .home-curriculum-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #dtoj-home .home-stage:nth-child(3n) { border-right: 1px solid #e0e6ef; }
  #dtoj-home .home-stage:nth-child(2n) { border-right: 0; }
  #dtoj-home .home-stage:nth-child(n+4) { border-bottom: 1px solid #e0e6ef; }
  #dtoj-home .home-stage:nth-child(n+5) { border-bottom: 0; }
}
@media (max-width: 820px) {
  #dtoj-home .home-lib-spotlights,
  #dtoj-home .home-lib-ledger { grid-template-columns: 1fr; }
  #dtoj-home .home-spotlight:first-child {
    padding-left: 0;
    padding-right: 0;
    border-right: 0;
    border-bottom: 1px solid #e0e6ef;
  }
  #dtoj-home .home-spotlight--member {
    padding: 20px 18px;
    border-radius: 12px;
    margin: 16px 0;
  }
  #dtoj-home .home-lib-item {
    padding: 16px 4px;
  }
}
@media (max-width: 600px) {
  #dtoj-home .home-curriculum,
  #dtoj-home .home-library {
    padding: 20px 16px 16px;
    border-radius: 14px;
  }
  #dtoj-home .home-section-bar {
    gap: 12px;
    margin-bottom: 16px;
  }
  #dtoj-home .home-section-bar-text h2 { font-size: 23px; }
  #dtoj-home .home-section-bar-actions { width: 100%; }
  #dtoj-home .home-inline-link { min-height: 38px; padding: 0 13px; font-size: 12px; }
  #dtoj-home .home-curriculum-spine { display: none; }
  #dtoj-home .home-curriculum-grid {
    grid-template-columns: minmax(0, 1fr);
    border-top: 1px solid #d5deea;
  }
  #dtoj-home .home-stage {
    padding: 15px 0 14px;
    border-right: 0 !important;
    border-bottom: 1px solid #e0e6ef !important;
  }
  #dtoj-home .home-stage:last-child { border-bottom: 0 !important; }
  #dtoj-home .home-stage-scope { margin: 6px 0 12px; }
  #dtoj-home .home-stage-links { padding-top: 10px; }
  #dtoj-home .home-lib-tabs {
    flex-wrap: wrap;
    gap: 6px;
    padding-bottom: 14px;
  }
  #dtoj-home .home-lib-tab {
    min-height: 34px;
    padding: 0 11px;
    font-size: 12px;
  }
  #dtoj-home .home-spotlight { padding: 16px 0; }
  #dtoj-home .home-spotlight--member { padding: 16px 14px; margin: 12px 0; }
  #dtoj-home .home-lib-item { padding: 14px 0 13px; gap: 8px; }
  #dtoj-home .home-checkin-guest-list li {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #dtoj-home .home-inline-link,
  #dtoj-home .home-stage,
  #dtoj-home .home-lib-tab,
  #dtoj-home .home-lib-item { transition: none; }
}
