/* learning-bundle/learning-bundle.css — dedicated learner-facing data page */

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: "Carlito","Helvetica Neue",Arial,sans-serif;
  color: #334155;
}

.tj-wrap {
  width: 100%;
}

.tj-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.tj-header-actions {
  display: inline-flex;
  align-items: stretch;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.tj-preset-picker {
  display: inline-flex;
  align-items: stretch;
}

.tj-preset-picker label {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
}

.tj-header-control {
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #fff;
  border-radius: 10px;
  min-height: 34px;
  padding: 0 0.72rem;
  cursor: pointer;
  font-size: 0.76rem;
  line-height: 1;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
}

.tj-header-control:hover {
  background: rgba(37, 99, 235, 0.06);
  color: #0b5cab;
  border-color: rgba(37, 99, 235, 0.24);
}

.tj-header-control:focus-visible,
.tj-btn:focus-visible,
.tj-title-link:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.22);
  outline-offset: 2px;
}

.tj-preset-picker select.tj-header-control {
  appearance: auto;
  -webkit-appearance: menulist;
  padding-right: 0.4rem;
  font-weight: 600;
}

.tj-header-link.is-current,
.tj-header-control[aria-current="page"] {
  background: #e6f1ff;
  border-color: rgba(37, 99, 235, 0.22);
  color: #0b5cab;
  cursor: default;
}

.tj-explorer-indicator {
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #f8fafc;
  color: #64748b;
  border-radius: 999px;
  min-height: 34px;
  padding: 0 0.8rem;
  font-size: 0.74rem;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.tj-explorer-indicator.is-active {
  background: #ecfdf5;
  border-color: rgba(22, 163, 74, 0.22);
  color: #166534;
}

.tj-title-link {
  color: #0f172a;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.tj-title-link:hover {
  color: #0b5cab;
}

.tj-setting-group {
  display: flex;
  flex-direction: column;
}

.lb-category {
  margin: 0.9rem 0 0.5rem;
}

.lb-category-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #64748b;
}

.lb-section {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.lb-section + .lb-section {
  margin-top: 0.6rem;
}

.lb-section-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
  background: linear-gradient(180deg, #f8fbff 0%, #f5f7fb 100%);
}

.lb-section-summary::-webkit-details-marker {
  display: none;
}

.lb-section-summary::after {
  content: "▾";
  font-size: 0.9rem;
  color: #64748b;
  transition: transform 0.2s ease;
}

.lb-section[open] .lb-section-summary::after {
  transform: rotate(180deg);
}

.lb-summary-hint {
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  background: #eef2ff;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}

.lb-section-body {
  padding: 0.7rem 0.75rem 0.8rem;
  display: grid;
  gap: 0.5rem;
}

.lb-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.lb-action-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: #fff;
  padding: 0.6rem 0.7rem;
  display: grid;
  gap: 0.4rem;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.04);
}

.lb-action-card.lb-action-danger {
  border-color: rgba(185, 28, 28, 0.22);
  background: #fff8f8;
}

.lb-action-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: #0f172a;
}

.lb-action-note {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.4;
}

.lb-list {
  margin: 0.2rem 0 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.2rem;
  font-size: 0.74rem;
  color: #475569;
}

.lb-callout {
  margin-top: 0.3rem;
  font-size: 0.72rem;
  color: #475569;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
}

.lb-info-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lb-info-card {
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 12px;
  background: #fff;
  padding: 0.55rem 0.65rem;
  display: grid;
  gap: 0.2rem;
}

.lb-info-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: #0f172a;
}

.lb-info-text {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.4;
  color: #64748b;
}

.lb-info-note {
  margin-top: 0.35rem;
  font-size: 0.7rem;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  padding: 0.4rem 0.55rem;
}

.tj-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: #0f172a;
}

.tj-worksheet-actions,
.lb-saved-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tj-btn {
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}

.tj-btn:hover {
  background: rgba(37, 99, 235, 0.06);
  color: #0b5cab;
  border-color: rgba(37, 99, 235, 0.24);
}

.tj-btn-danger {
  border-color: rgba(185, 28, 28, 0.18);
  color: #991b1b;
}

.tj-btn-danger:hover {
  background: rgba(185, 28, 28, 0.06);
  color: #7f1d1d;
  border-color: rgba(185, 28, 28, 0.26);
}

.tj-worksheet-file {
  display: none;
}

.tj-explorer-row {
  display: grid;
  gap: 0.35rem;
}

.tj-explorer-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: #334155;
}

.tj-explorer-input {
  width: 100%;
  min-height: 36px;
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  color: #0f172a;
}

.tj-explorer-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.tj-explorer-status {
  min-height: 1.2rem;
  font-size: 0.75rem;
  color: #475569;
}

.tj-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.tj-modal.is-open {
  display: flex;
}

.tj-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.24);
}

.tj-modal-panel {
  position: relative;
  width: min(420px, 94vw);
  max-height: 82vh;
  overflow: auto;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16);
  padding: 0.75rem 0.85rem 0.85rem;
}

.tj-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.tj-modal-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

.tj-modal-close {
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  border-radius: 9px;
  width: 28px;
  height: 28px;
  font-size: 1rem;
  cursor: pointer;
}

.tj-modal-body {
  display: grid;
  gap: 0.6rem;
}

.tj-started-body {
  font-size: 0.74rem;
  line-height: 1.5;
  color: #475569;
}

.tj-started-body h2 {
  margin: 0.55rem 0 0.2rem;
  font-size: 0.78rem;
  color: #0f172a;
}

.tj-started-body p,
.tj-started-body li {
  margin: 0.22rem 0;
}

.tj-started-body ol,
.tj-started-body ul {
  margin: 0.2rem 0 0.45rem 1rem;
  padding: 0;
}

.tj-started-link a {
  color: #0b5cab;
  text-decoration: none;
}

.tj-started-link a:hover {
  text-decoration: underline;
}

.lb-page {
  background:
    radial-gradient(circle at top left, rgba(214, 240, 255, 0.75), transparent 28%),
    radial-gradient(circle at top right, rgba(240, 248, 217, 0.8), transparent 24%),
    linear-gradient(180deg, #f7fbff 0%, #f9fafb 28%, #f8f7f3 100%);
}

.lb-page .tj-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

.lb-page .tj-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 251, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom-color: rgba(15, 23, 42, 0.08);
  padding-top: 8px;
  padding-bottom: 8px;
}

.lb-page .tj-title-link {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.lb-page .tj-header-actions {
  gap: 0.4rem;
}

.lb-page .tj-header-control,
.lb-page .tj-explorer-indicator {
  border-radius: 999px;
  min-height: 30px;
  font-size: 0.72rem;
  padding: 0 0.6rem;
}

.lb-page .tj-header-link.is-current,
.lb-page .tj-header-control[aria-current="page"] {
  background: #e6f1ff;
  border-color: rgba(37, 99, 235, 0.22);
}

.lb-page .tj-worksheet-page-head {
  margin: 0.9rem 0 0.45rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.04);
}

.lb-page .tj-worksheet-page-head h2 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.lb-page .tj-worksheet-page-head p {
  max-width: 72ch;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #475569;
}

.lb-page .tj-data-page {
  display: block;
}

.lb-page .lb-category:first-of-type {
  margin-top: 0.6rem;
}

.lb-page .tj-setting-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #1e3a5f;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 0;
}

.lb-page .tj-data-note {
  font-size: 0.74rem;
  line-height: 1.5;
  color: #475569;
  border-radius: 12px;
  padding: 0.6rem 0.7rem;
  background: linear-gradient(180deg, #f8fbff 0%, #f8fafc 100%);
  border-color: rgba(37, 99, 235, 0.08);
}

.lb-page .tj-data-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.lb-page .tj-data-card {
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border-color: rgba(15, 23, 42, 0.07);
}

.lb-page .tj-data-card-title {
  font-size: 0.76rem;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.lb-page .tj-data-card-copy {
  font-size: 0.74rem;
  line-height: 1.45;
  color: #475569;
}

.lb-page .tj-worksheet-actions {
  gap: 0.45rem;
  flex-wrap: wrap;
}

.lb-page .tj-btn {
  border-radius: 999px;
  padding: 0.38rem 0.7rem;
  font-size: 0.72rem;
  line-height: 1.2;
}

.lb-page .tj-btn-danger {
  background: #fff8f8;
}

.lb-page .tj-data-ledger,
.lb-page .tj-worksheet-summary,
.lb-page .tj-worksheet-saved-list {
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border-color: rgba(15, 23, 42, 0.07);
}

.lb-page .tj-data-ledger-row {
  padding: 0.32rem 0;
}

.lb-page .tj-data-ledger-title {
  font-size: 0.74rem;
}

.lb-page .tj-data-ledger-meta {
  font-size: 0.7rem;
  line-height: 1.45;
  color: #64748b;
}

.lb-page .tj-worksheet-saved-item {
  border-radius: 12px;
  padding: 0.65rem 0.7rem;
  border: 1px solid rgba(15, 23, 42, 0.07);
  background: #fff;
}

.lb-page .tj-worksheet-saved-item.is-active {
  background: #f5fbff;
  border-color: rgba(37, 99, 235, 0.18);
}

.lb-saved-item {
  border-radius: 12px;
  padding: 0.65rem 0.7rem;
  border: 1px solid rgba(15, 23, 42, 0.07);
  background: #fff;
  display: grid;
  gap: 0.45rem;
}

.lb-saved-item.is-active {
  background: #f5fbff;
  border-color: rgba(37, 99, 235, 0.18);
}

.lb-page .tj-data-status {
  min-height: 1.1rem;
  font-size: 0.72rem;
  color: #475569;
}

.lb-page .tj-modal-panel {
  width: min(420px, 94vw);
}

.lb-empty-note {
  font-size: 0.72rem;
  color: #64748b;
}

.lb-ledger-row {
  display: grid;
  gap: 0.16rem;
  padding: 0.34rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.lb-ledger-row:last-child {
  border-bottom: 0;
}

.lb-ledger-title {
  font-size: 0.74rem;
  font-weight: 600;
  color: #0f172a;
}

.lb-ledger-meta {
  font-size: 0.7rem;
  line-height: 1.45;
  color: #64748b;
}

.lb-saved-main {
  display: grid;
  gap: 0.18rem;
}

.lb-saved-id {
  font-size: 0.76rem;
  font-weight: 700;
  color: #0f172a;
}

.lb-saved-meta {
  font-size: 0.7rem;
  color: #64748b;
  line-height: 1.4;
}

.lb-saved-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.3rem;
  padding: 0.06rem 0.4rem;
  border-radius: 999px;
  background: #e6f1ff;
  color: #0b5cab;
  font-size: 0.64rem;
  font-weight: 700;
}

@media (max-width: 900px) {
  .lb-page .tj-data-summary {
    grid-template-columns: 1fr;
  }

  .lb-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lb-info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .lb-page .tj-wrap {
    padding-left: 12px;
    padding-right: 12px;
  }

  .lb-page .tj-header {
    position: static;
  }

  .lb-page .tj-title-link {
    font-size: 0.98rem;
  }

  .tj-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .lb-page .tj-setting-group {
    padding: 0.7rem 0.7rem 0.75rem;
  }

  .lb-action-grid {
    grid-template-columns: 1fr;
  }
}
