/* LEARNINGLINES.RESOURCES.01 | Alexandria + learning resources */

.llres-library,
.llres-public,
.llres-run {
  container-type: inline-size;
}

.llres-library {
  margin: 22px 0;
  padding: clamp(18px, 2vw, 28px);
  border: 1px solid rgba(30, 95, 75, .14);
  border-radius: 26px;
  background:
    radial-gradient(circle at 100% 0, rgba(49, 137, 111, .10), transparent 34%),
    linear-gradient(150deg, #fff, #f7fbf9);
  box-shadow: 0 18px 46px rgba(20, 61, 49, .08);
}

.llres-library__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.llres-library__eyebrow,
.llres-public__intro > span,
.llres-run__head > span {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: #24765f;
}

.llres-library__head h2,
.llres-public__intro h2,
.llres-run__head h2 {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 30px);
  color: #183b32;
}

.llres-library__head p,
.llres-public__intro p,
.llres-run__head p {
  max-width: 780px;
  margin: 7px 0 0;
  color: #60766f;
  line-height: 1.55;
}

.llres-library__add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #287a63;
  border-radius: 14px;
  background: #1f6e59;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.llres-schema-warning,
.llres-empty {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 13px;
  align-items: start;
  padding: 16px;
  border: 1px dashed rgba(59, 98, 87, .24);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  color: #526a63;
}

.llres-schema-warning > .material-icons,
.llres-empty > .material-icons {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #eaf5f1;
  color: #25755f;
}

.llres-schema-warning strong,
.llres-empty strong { color: #244c40; }
.llres-schema-warning p,
.llres-empty p { margin: 4px 0 0; }

.llres-stage-list,
.llres-public,
.llres-run { display: grid; gap: 18px; }

.llres-stage-group,
.llres-public-stage,
.llres-run-stage {
  display: grid;
  gap: 12px;
}

.llres-stage-group > header,
.llres-public-stage > header,
.llres-run-stage > header {
  display: grid;
  grid-template-columns: 40px minmax(0,1fr);
  gap: 10px;
  align-items: center;
}

.llres-stage-group > header > span,
.llres-public-stage > header > span,
.llres-run-stage > header > span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: #e9f5f1;
  color: #216e59;
  font-weight: 900;
}

.llres-stage-group > header strong,
.llres-stage-group > header small,
.llres-public-stage > header strong,
.llres-public-stage > header small { display: block; }
.llres-stage-group > header strong,
.llres-public-stage > header strong,
.llres-run-stage > header strong { color: #1d4237; }
.llres-stage-group > header small,
.llres-public-stage > header small { margin-top: 2px; color: #74847f; }

.llres-resource-grid,
.llres-public-grid,
.llres-run-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.llres-resource-card,
.llres-public-card,
.llres-run-grid > article {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(34, 91, 74, .13);
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 10px 30px rgba(28, 67, 56, .05);
}

.llres-resource-card__top,
.llres-public-card__type {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  color: #2d755f;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.llres-resource-card__top .material-icons,
.llres-public-card__type .material-icons { font-size: 18px; }

.llres-resource-card__top .is-visibility {
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f0f6f4;
  color: #5e746d;
  font-size: 10px;
  letter-spacing: .02em;
}

.llres-resource-card h3,
.llres-public-card h3,
.llres-run-grid h3 {
  margin: 10px 0 6px;
  color: #183b32;
  font-size: 17px;
  line-height: 1.3;
}

.llres-resource-card > p,
.llres-public-card > p,
.llres-run-grid p,
.llres-run-grid blockquote {
  color: #667a74;
  line-height: 1.5;
}

.llres-resource-card__meta,
.llres-public-card__meta { font-size: 13px; }

.llres-resource-card__links,
.llres-public-card > a,
.llres-run-grid a {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.llres-resource-card__links a,
.llres-public-card > a,
.llres-run-grid a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #216e59;
  font-weight: 800;
  text-decoration: none;
}

.llres-resource-card__links .material-icons,
.llres-public-card > a .material-icons,
.llres-run-grid a .material-icons { font-size: 17px; }

.llres-resource-card details { margin-top: 12px; }
.llres-resource-card summary { cursor: pointer; color: #4c6960; font-weight: 700; }

.llres-resource-form,
.llres-id-fallback form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
  margin-top: 12px;
}

.llres-resource-form label,
.llres-id-fallback label,
.llres-dialog__controls label {
  display: grid;
  gap: 5px;
  color: #48645b;
  font-size: 12px;
  font-weight: 800;
}

.llres-resource-form label.is-wide,
.llres-id-fallback label.is-wide { grid-column: 1 / -1; }

.llres-resource-form input,
.llres-resource-form select,
.llres-id-fallback input,
.llres-id-fallback select,
.llres-dialog__controls input,
.llres-dialog__controls select {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(43, 94, 78, .18);
  border-radius: 11px;
  background: #fff;
  color: #243f37;
}

.llres-resource-form button,
.llres-id-fallback button {
  justify-self: start;
  min-height: 40px;
  padding: 0 13px;
  border: 0;
  border-radius: 11px;
  background: #e8f4f0;
  color: #1f6955;
  font-weight: 800;
  cursor: pointer;
}

.llres-resource-remove { margin-top: 8px; }
.llres-resource-remove button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #965047;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.llres-id-fallback {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(45, 95, 80, .10);
}
.llres-id-fallback summary { cursor: pointer; color: #5c716a; font-size: 13px; font-weight: 800; }

.llres-dialog {
  width: min(920px, calc(100vw - 28px));
  max-height: min(82vh, 780px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
  opacity: 0;
  transform: translateY(10px) scale(.985);
  transition:
    opacity .2s ease,
    transform .2s ease,
    display .2s allow-discrete,
    overlay .2s allow-discrete;
}
.llres-dialog[open] { opacity: 1; transform: translateY(0) scale(1); }
@starting-style {
  .llres-dialog[open] { opacity: 0; transform: translateY(10px) scale(.985); }
}
.llres-dialog::backdrop {
  background: rgba(10, 31, 25, .42);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .2s ease, display .2s allow-discrete, overlay .2s allow-discrete;
}
.llres-dialog[open]::backdrop { opacity: 1; }
@starting-style { .llres-dialog[open]::backdrop { opacity: 0; } }

.llres-dialog__surface {
  overflow: auto;
  max-height: min(82vh, 780px);
  padding: clamp(18px, 2.5vw, 28px);
  border: 1px solid rgba(38, 90, 74, .14);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 26px 80px rgba(15, 49, 39, .24);
}

.llres-dialog__surface > header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}
.llres-dialog__surface > header span { color: #24765f; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; }
.llres-dialog__surface > header h2 { margin: 4px 0; color: #183b32; }
.llres-dialog__surface > header p { margin: 0; color: #6b7d77; }
.llres-dialog__surface > header button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: #eff5f3;
  color: #315e51;
  cursor: pointer;
}

.llres-dialog__controls {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px,.7fr) minmax(170px,.6fr);
  gap: 10px;
  margin-top: 18px;
}
.llres-dialog__controls .is-search,
.llres-dialog__controls .is-guidance { grid-column: 1 / -1; }
.llres-dialog__controls .is-search { position: relative; }
.llres-dialog__controls .is-search > .material-icons { position: absolute; left: 12px; bottom: 10px; font-size: 20px; color: #6a7f77; }
.llres-dialog__controls .is-search input { padding-left: 40px; }

.llres-search-status { min-height: 22px; margin: 12px 0 8px; color: #6b7d77; font-size: 13px; }
.llres-search-results { display: grid; gap: 8px; }
.llres-search-result {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(39, 91, 75, .12);
  border-radius: 15px;
  background: #fbfdfc;
  text-align: left;
  cursor: pointer;
}
.llres-search-result:hover,
.llres-search-result:focus-visible { border-color: rgba(31, 110, 89, .42); background: #f4faf7; outline: none; }
.llres-search-result strong,
.llres-search-result small { display: block; }
.llres-search-result strong { color: #1d4237; }
.llres-search-result small { margin-top: 3px; color: #71827c; }
.llres-search-result > span { color: #24765f; font-weight: 900; }

.llres-public {
  margin: 24px 0;
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid rgba(45, 98, 80, .12);
  border-radius: 24px;
  background: linear-gradient(145deg, #fff, #f8fbfa);
}
.llres-public-card__guidance,
.llres-run-grid blockquote {
  margin-top: 11px;
  padding: 10px 12px;
  border-left: 3px solid #8ac3b1;
  border-radius: 0 10px 10px 0;
  background: #f2f8f6;
}
.llres-public-card__guidance span { color: #37705f; font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.llres-public-card__guidance p { margin: 4px 0 0; }

.llres-run {
  margin: 20px 0 28px;
  padding: clamp(18px, 2vw, 24px);
  border: 1px solid rgba(47, 93, 80, .12);
  border-radius: 22px;
  background: rgba(255,255,255,.86);
}
.llres-run-stage > header { grid-template-columns: 40px minmax(0,1fr); }
.llres-run-grid > article { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 10px; }
.llres-run-grid > article > .material-icons { color: #26745e; }
.llres-run-grid h3 { margin-top: 3px; }
.llres-run-grid blockquote { margin-bottom: 0; }

.llres-activity-stage {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.llres-activity-stage .material-icons { font-size: 15px; }

@container (max-width: 720px) {
  .llres-library__head { display: grid; }
  .llres-library__add { justify-self: start; }
  .llres-resource-grid,
  .llres-public-grid,
  .llres-run-grid { grid-template-columns: 1fr; }
  .llres-dialog__controls { grid-template-columns: 1fr; }
  .llres-dialog__controls .is-search,
  .llres-dialog__controls .is-guidance { grid-column: auto; }
}

@media (max-width: 620px) {
  .llres-resource-form,
  .llres-id-fallback form { grid-template-columns: 1fr; }
  .llres-resource-form label.is-wide,
  .llres-id-fallback label.is-wide { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .llres-dialog,
  .llres-dialog::backdrop { transition: none; }
}

@media (forced-colors: active) {
  .llres-library,
  .llres-resource-card,
  .llres-public,
  .llres-public-card,
  .llres-run,
  .llres-run-grid > article,
  .llres-dialog__surface { border: 1px solid CanvasText; box-shadow: none; }
  .llres-library__add { border: 1px solid ButtonText; }
}

.llres-class-library,
.llres-activity-library {
  margin: 22px 0;
  padding: clamp(18px, 2vw, 24px);
  border: 1px solid rgba(44, 96, 79, .12);
  border-radius: 22px;
  background: linear-gradient(145deg, #fff, #f8fbfa);
  container-type: inline-size;
}

.llres-class-library > header h2,
.llres-activity-library > header h2 {
  margin: 2px 0 6px;
  color: #183b32;
}
.llres-class-library > header p,
.llres-activity-library > header p { margin: 0; color: #647972; }

.llres-class-library__stages { display: grid; gap: 16px; margin-top: 16px; }
.llres-class-stage { display: grid; gap: 10px; }
.llres-class-stage > header {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr);
  gap: 9px;
  align-items: center;
}
.llres-class-stage > header > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #e9f5f1;
  color: #216e59;
  font-weight: 900;
}
.llres-class-stage > header strong { color: #244a3f; }
.llres-class-grid,
.llres-activity-library__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
}
.llres-class-grid > article,
.llres-activity-library__grid > article {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(42, 91, 75, .11);
  border-radius: 16px;
  background: #fff;
}
.llres-class-grid > article {
  display: grid;
  grid-template-columns: 30px minmax(0,1fr);
  gap: 9px;
}
.llres-class-grid > article > .material-icons { color: #24765f; }
.llres-class-grid small,
.llres-activity-library__grid small { color: #2a745e; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.llres-class-grid h3,
.llres-activity-library__grid h3 { margin: 3px 0 5px; color: #1c4136; font-size: 16px; }
.llres-class-grid p,
.llres-activity-library__grid p { margin: 0; color: #687b75; }
.llres-class-grid blockquote,
.llres-activity-library__grid blockquote {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-left: 3px solid #8ac3b1;
  background: #f3f8f6;
  color: #557069;
}
.llres-class-grid a,
.llres-activity-library__grid a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 9px;
  color: #216e59;
  font-weight: 800;
  text-decoration: none;
}
.llres-class-grid a .material-icons,
.llres-activity-library__grid a .material-icons { font-size: 17px; }

.llres-activity-library > header {
  display: grid;
  grid-template-columns: 42px minmax(0,1fr);
  gap: 11px;
  align-items: start;
}
.llres-activity-library > header > .material-icons {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: #e9f5f1;
  color: #216e59;
}
.llres-activity-library__grid { margin-top: 14px; }

@container (max-width: 640px) {
  .llres-class-grid,
  .llres-activity-library__grid { grid-template-columns: 1fr; }
}
