/* CapaCITIES 2.0 Learning Portfolio — v3 */
/* All classes prefixed with lp- to avoid WordPress theme conflicts */

/* ── Tokens ── */

.lp-wrap {
  max-width: 1100px;
  padding: 0 1.5rem 3rem;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
}

.lp-wrap {
  --lp-lime: #ACC51A;
  --lp-lime-light: #D4E36E;
  --lp-lime-bg: #EFF4D6;
  --lp-lime-subtle: #F5F7ED;
  --lp-teal: #053541;
  --lp-teal-mid: #0A5E6C;
  --lp-teal-light: #E6EEF0;
  --lp-teal-hover: #074A59;

  --lp-bg: #F4F5F0;
  --lp-surface: #FFFFFF;
  --lp-surface-glass: rgba(255, 255, 255, 0.68);
  --lp-surface-alt: #F0F1EB;
  --lp-border: #D8DBC8;
  --lp-border-light: #E6E8DC;

  --lp-text: #1A1F14;
  --lp-text-2: #4A5240;
  --lp-text-3: #7A8470;

  --lp-coral: #B84233;
  --lp-coral-light: #FBEAE7;
  --lp-amber: #8A6218;
  --lp-amber-light: #FBF3DD;

  --lp-radius: 8px;
  --lp-radius-lg: 12px;
  --lp-radius-xl: 16px;
  --lp-shadow-sm: 0 1px 3px rgba(5, 53, 65, 0.06);
  --lp-shadow-md: 0 4px 12px rgba(5, 53, 65, 0.08);
  --lp-glass-border: rgba(255, 255, 255, 0.45);

  font-family: 'Trueno', Verdana, Geneva, sans-serif;
  color: var(--lp-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

.lp-wrap *, .lp-wrap *::before, .lp-wrap *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Word cloud (compact) ── */
.lp-cloud-section {
  background: var(--lp-surface-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--lp-glass-border);
  border-radius: var(--lp-radius-lg);
  margin: 1.25rem 0 0.75rem;
  padding: 0.75rem 1.1rem;
  box-shadow: var(--lp-shadow-sm);
}

.lp-cloud-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--lp-text-3);
  margin-bottom: 0.4rem;
}

.lp-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 5px;
}

.lp-tag {
  cursor: pointer;
  border-radius: 14px;
  padding: 1px 8px;
  transition: all 0.18s ease;
  border: 1.5px solid transparent;
  color: var(--lp-text-2);
  white-space: nowrap;
  user-select: none;
  background: none;
  font-family: inherit;
  line-height: 1.4;
}

.lp-tag:hover {
  background: var(--lp-lime-bg);
  color: var(--lp-teal);
}

.lp-tag.active {
  background: var(--lp-teal);
  color: #fff;
  border-color: var(--lp-teal);
}

.lp-tag.disabled {
  opacity: 0.22;
  cursor: default;
  pointer-events: none;
}

/* ── Filter bar ── */
.lp-filter-bar {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  margin-bottom: 0.75rem;
  font-size: 0.78rem;
  color: var(--lp-text-2);
  background: var(--lp-teal-light);
  border-radius: var(--lp-radius-lg);
  border: 1px solid var(--lp-border);
}

.lp-filter-bar.visible {
  display: flex;
}

.lp-filter-bar-label {
  font-size: 0.72rem;
  color: var(--lp-text-3);
  margin-right: 2px;
}

.lp-active-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px 3px 10px;
  border-radius: 20px;
  background: var(--lp-teal);
  color: #fff;
  border: none;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.lp-active-tag:hover {
  background: var(--lp-teal-hover);
}

.lp-active-tag svg {
  width: 12px;
  height: 12px;
  opacity: 0.7;
}

.lp-clear-all {
  margin-left: auto;
  cursor: pointer;
  color: var(--lp-coral);
  font-size: 0.7rem;
  font-family: inherit;
  font-weight: 600;
  border: 1px solid var(--lp-border);
  background: var(--lp-surface);
  padding: 3px 12px;
  border-radius: var(--lp-radius);
  transition: background 0.15s;
}

.lp-clear-all:hover {
  background: var(--lp-coral-light);
}

/* ── Domain navigation ── */
.lp-domain-nav {
  margin-bottom: 1.25rem;
}

.lp-domain-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.lp-dtab {
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 400;
  padding: 6px 14px;
  border-radius: var(--lp-radius);
  cursor: pointer;
  border: 1px solid var(--lp-border);
  background: var(--lp-surface);
  color: var(--lp-text-2);
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.lp-dtab:hover {
  border-color: var(--lp-teal-mid);
  color: var(--lp-teal);
}

.lp-dtab .lp-dtab-num {
  font-weight: 700;
  color: var(--lp-teal-mid);
  font-size: 0.72rem;
}

.lp-dtab.active {
  background: var(--lp-teal);
  color: #fff;
  border-color: var(--lp-teal);
}

.lp-dtab.active .lp-dtab-num {
  color: var(--lp-lime-light);
}

/* Mobile domain dropdown */
.lp-domain-select {
  display: none;
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--lp-teal);
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23053541' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

/* ── Domain header ── */
.lp-domain-header {
  background: var(--lp-surface);
  border: 1px solid var(--lp-border-light);
  border-radius: var(--lp-radius-xl);
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--lp-shadow-sm);
}

.lp-domain-header-top {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 0.25rem;
}

.lp-domain-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--lp-lime);
  line-height: 1;
  letter-spacing: -0.03em;
}

.lp-domain-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--lp-teal);
  line-height: 1.3;
}

/* Info tabs (Lessons / Deep Dive / Principles) */
.lp-info-section {
  margin-top: 1rem;
  border-top: 1px solid var(--lp-border-light);
  padding-top: 0.75rem;
}

.lp-info-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 0;
}

.lp-info-tab {
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 7px 14px;
  cursor: pointer;
  border: 1px solid var(--lp-border-light);
  border-bottom: none;
  background: var(--lp-surface-alt);
  color: var(--lp-text-3);
  transition: all 0.15s;
  border-radius: var(--lp-radius) var(--lp-radius) 0 0;
}

.lp-info-tab:hover {
  color: var(--lp-text-2);
  background: var(--lp-surface);
}

.lp-info-tab.active {
  color: var(--lp-teal);
  background: var(--lp-teal-light);
  border-color: var(--lp-teal-light);
}

.lp-info-panel {
  display: none;
  padding: 1.1rem 1.25rem;
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--lp-text-2);
  background: var(--lp-teal-light);
  border-radius: 0 var(--lp-radius) var(--lp-radius) var(--lp-radius);
  border: 1px solid var(--lp-teal-light);
  border-left: 3px solid var(--lp-teal-mid);
}

.lp-info-panel.active {
  display: block;
}

.lp-info-panel[data-info-type="lessons"] {
  border-left-color: var(--lp-teal-mid);
}

.lp-info-panel[data-info-type="deepdive"] {
  border-left-color: var(--lp-lime);
}

.lp-info-panel[data-info-type="principles"] {
  border-left-color: var(--lp-amber);
}

/* Info panel content elements */
.lp-info-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--lp-text-3);
  margin-bottom: 0.85rem;
}

.lp-info-heading {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--lp-teal);
  line-height: 1.45;
  margin-bottom: 0.5rem;
}

.lp-info-item {
  margin-bottom: 0.85rem;
  padding-left: 12px;
  border-left: 2px solid var(--lp-border);
}

.lp-info-item:last-child {
  margin-bottom: 0;
}

.lp-info-item-label {
  font-weight: 700;
  color: var(--lp-teal);
  font-size: 0.82rem;
}

.lp-info-item-text {
  color: var(--lp-text-2);
}

.lp-info-para {
  margin-bottom: 0.7rem;
  line-height: 1.7;
}

.lp-info-para:last-child {
  margin-bottom: 0;
}

.lp-info-link-btn {
  display: inline-block;
  margin-top: 0.75rem;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  background: var(--lp-teal-mid);
  padding: 6px 16px;
  border-radius: 20px;
  text-decoration: none;
  transition: background 0.15s;
}

.lp-info-link-btn:hover {
  background: var(--lp-teal);
}

/* ── Subdomains ── */
.lp-subdomain {
  border: 1px solid var(--lp-border-light);
  border-radius: var(--lp-radius-lg);
  margin-bottom: 8px;
  overflow: hidden;
  background: var(--lp-surface);
  transition: box-shadow 0.15s, border-color 0.15s;
}

.lp-subdomain:hover {
  box-shadow: var(--lp-shadow-sm);
  border-color: var(--lp-border);
}

.lp-subdomain.hidden {
  display: none;
}

.lp-subdomain.expanded {
  border-color: var(--lp-teal-mid);
  box-shadow: var(--lp-shadow-md);
}

.lp-sd-header {
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

.lp-sd-header:hover {
  background: var(--lp-surface-alt);
}

.lp-sd-num {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--lp-teal-mid);
  min-width: 26px;
  flex-shrink: 0;
}

.lp-sd-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--lp-text);
  flex: 1;
}

.lp-sd-count {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--lp-text-3);
  background: var(--lp-surface-alt);
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.lp-chevron {
  transition: transform 0.2s;
  font-size: 0.6rem;
  color: var(--lp-text-3);
  flex-shrink: 0;
}

.lp-chevron.open {
  transform: rotate(90deg);
}

.lp-sd-body {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--lp-border-light);
}

.lp-sd-body.open {
  display: block;
}

.lp-sd-intro {
  font-size: 0.8rem;
  color: var(--lp-text-2);
  line-height: 1.65;
  margin: 12px 0;
}

.lp-sd-quote {
  font-style: italic;
  font-size: 0.82rem;
  color: var(--lp-teal);
  border-left: 3px solid var(--lp-lime);
  padding: 10px 14px;
  margin: 12px 0;
  background: var(--lp-lime-subtle);
  border-radius: 0 var(--lp-radius) var(--lp-radius) 0;
}

.lp-sd-quote-attr {
  font-style: normal;
  font-size: 0.7rem;
  color: var(--lp-text-3);
  margin-top: 4px;
  display: block;
}

.lp-challenges {
  margin: 12px 0;
}

.lp-ch-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--lp-coral);
  margin-bottom: 4px;
}

.lp-ch-item {
  font-size: 0.78rem;
  color: var(--lp-text-2);
  padding: 2px 0 2px 14px;
  position: relative;
}

.lp-ch-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lp-coral);
  opacity: 0.45;
}

/* ── Subdomain tags (static context labels) ── */
.lp-sd-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
}

.lp-sd-tag {
  font-size: 0.62rem;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: 20px;
  background: var(--lp-surface-alt);
  color: var(--lp-text-3);
}

/* ── Materials section ── */
.lp-items-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--lp-text-3);
  margin-top: 16px;
  margin-bottom: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--lp-border-light);
}

/* ── Compact material list ── */
.lp-mat-list {
  border: 1px solid var(--lp-border-light);
  border-radius: var(--lp-radius);
  overflow: hidden;
}

.lp-mat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--lp-text);
  border-bottom: 1px solid var(--lp-border-light);
  transition: background 0.12s;
}

.lp-mat-row:last-child,
.lp-mat-row:last-of-type {
  border-bottom: none;
}

/* If detail follows, keep bottom border */
.lp-mat-row + .lp-mat-detail {
  /* detail handles its own top border */
}

.lp-mat-row:hover {
  background: var(--lp-surface-alt);
}

.lp-mat-row.active {
  background: var(--lp-teal-light);
  font-weight: 600;
  color: var(--lp-teal);
}

.lp-mat-row.hidden {
  display: none;
}

.lp-mat-arrow {
  font-size: 0.55rem;
  color: var(--lp-text-3);
  flex-shrink: 0;
  transition: transform 0.15s;
  width: 10px;
}

.lp-mat-row.active .lp-mat-arrow {
  transform: rotate(90deg);
  color: var(--lp-teal-mid);
}

.lp-mat-name {
  flex: 1;
  line-height: 1.35;
}

.lp-mat-meta {
  font-size: 0.65rem;
  color: var(--lp-text-3);
  font-weight: 400;
  white-space: nowrap;
  flex-shrink: 0;
}

.lp-mat-format {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--lp-teal-light);
  color: var(--lp-teal-mid);
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* ── Material detail (expanded card) ── */
.lp-mat-detail {
  display: none;
  padding: 14px 16px 14px 30px;
  background: var(--lp-bg);
  border-bottom: 1px solid var(--lp-border-light);
}

.lp-mat-detail.open {
  display: block;
}

.lp-mat-detail:last-child {
  border-bottom: none;
}

.lp-mat-detail-body {
  font-size: 0.78rem;
  color: var(--lp-text-2);
  line-height: 1.65;
}

.lp-mat-detail-features {
  margin-top: 8px;
}

.lp-mat-detail-feat {
  font-size: 0.72rem;
  color: var(--lp-text-2);
  padding: 2px 0 2px 14px;
  position: relative;
}

.lp-mat-detail-feat::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--lp-text-3);
  font-size: 0.6rem;
}

.lp-mat-detail-links {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.lp-mat-detail-link {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--lp-teal-mid);
  text-decoration: none;
  padding: 3px 10px;
  border: 1px solid var(--lp-border);
  border-radius: 20px;
  background: var(--lp-surface);
  transition: all 0.15s;
}

.lp-mat-detail-link:hover {
  background: var(--lp-teal-light);
  border-color: var(--lp-teal-mid);
}

.lp-mat-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 8px;
}

.lp-mat-detail-tag {
  font-size: 0.62rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--lp-surface-alt);
  color: var(--lp-text-3);
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.15s;
}

.lp-mat-detail-tag:hover {
  background: var(--lp-lime-bg);
  color: var(--lp-teal);
}

/* ── No results with domain suggestions ── */
.lp-no-results {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--lp-text-3);
  font-size: 0.82rem;
}

.lp-no-results-msg {
  margin-bottom: 1rem;
}

.lp-no-results-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--lp-text-3);
  margin-bottom: 0.5rem;
}

.lp-no-results-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  margin-bottom: 1rem;
}

.lp-no-results-domain {
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: var(--lp-radius);
  cursor: pointer;
  border: 1px solid var(--lp-border);
  background: var(--lp-surface);
  color: var(--lp-teal-mid);
  transition: all 0.15s;
}

.lp-no-results-domain:hover {
  background: var(--lp-teal);
  color: #fff;
  border-color: var(--lp-teal);
}

.lp-no-results-clear {
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 16px;
  border-radius: var(--lp-radius);
  cursor: pointer;
  border: 1px solid var(--lp-border);
  background: var(--lp-surface);
  color: var(--lp-coral);
  transition: all 0.15s;
}

.lp-no-results-clear:hover {
  background: var(--lp-coral-light);
}

/* ── Toast notification ── */
.lp-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 10000;
  font-family: 'Trueno', Verdana, Geneva, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: #ACC51A;
  background: #053541;
  padding: 8px 20px;
  border-radius: 24px;
  box-shadow: 0 4px 16px rgba(5, 53, 65, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}

.lp-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.lp-toast .lp-toast-tag {
  color: var(--lp-lime-light);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .lp-wrap {
    padding: 0 0.75rem 2rem;
  }

  .lp-domain-tabs {
    display: none;
  }

  .lp-domain-select {
    display: block;
  }

  .lp-domain-header {
    padding: 1.1rem;
  }

  .lp-domain-number {
    font-size: 1.5rem;
  }

  .lp-domain-title {
    font-size: 1rem;
  }

  .lp-cloud-section {
    padding: 0.6rem 0.8rem;
  }

  .lp-sd-header {
    padding: 10px 12px;
  }

  .lp-sd-body {
    padding: 0 12px 12px;
  }

  .lp-info-tabs {
    flex-wrap: wrap;
    gap: 2px;
  }

  .lp-info-tab {
    padding: 6px 10px;
    font-size: 0.68rem;
  }

  .lp-mat-row {
    padding: 7px 10px;
    font-size: 0.74rem;
  }

  .lp-mat-format {
    display: none;
  }

  .lp-mat-detail {
    padding: 12px;
  }
}

.lp-wrap {
  max-width: 1100px;
  padding: 0 1.5rem 3rem;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
}