/*
 * NOUN Student Commons 5.12.0 — Academic Discovery & Collaboration Overhaul.
 * Final /community/-only layout layer for Courses, Study Circles, Students and
 * Study Centres. No schema ownership lives here.
 */

html[data-theme] body.nsc5-document .nsc5-app {
  --nsc512-surface: var(--nsc5111-surface, #fff);
  --nsc512-alt: var(--nsc5111-surface-alt, #eef4f0);
  --nsc512-hover: var(--nsc5111-surface-hover, #e6f0ea);
  --nsc512-ink: var(--nsc5111-ink, #10231b);
  --nsc512-body: var(--nsc5111-body, #263a32);
  --nsc512-muted: var(--nsc5111-muted, #405249);
  --nsc512-border: var(--nsc5111-border, #8fa69a);
  --nsc512-border-soft: var(--nsc5111-border-soft, #c8d5ce);
  --nsc512-link: var(--nsc5111-link, #005a36);
  --nsc512-link-hover: var(--nsc5111-link-hover, #00442a);
  --nsc512-accent: var(--nsc5111-accent-soft, #dff3e8);
  --nsc512-shadow: 0 12px 34px rgba(10, 39, 27, .07);
  --nsc512-radius: 22px;
  --nsc512-radius-sm: 14px;
}

html[data-theme="dark"] body.nsc5-document .nsc5-app {
  --nsc512-shadow: 0 16px 40px rgba(0, 0, 0, .2);
}

/* Academic routes are intentionally two-column on member desktop: nav + work. */
html[data-theme] body.nsc5-document .nsc5-app.is-wide-route[data-route="courses"] .nsc5-layout,
html[data-theme] body.nsc5-document .nsc5-app.is-wide-route[data-route="circles"] .nsc5-layout,
html[data-theme] body.nsc5-document .nsc5-app.is-wide-route[data-route="people"] .nsc5-layout,
html[data-theme] body.nsc5-document .nsc5-app.is-wide-route[data-route="study-centres"] .nsc5-layout,
html[data-theme] body.nsc5-document .nsc5-app.is-wide-route[data-route^="course/"] .nsc5-layout,
html[data-theme] body.nsc5-document .nsc5-app.is-wide-route[data-route^="people/"] .nsc5-layout,
html[data-theme] body.nsc5-document .nsc5-app.is-wide-route[data-route^="study-centre/"] .nsc5-layout {
  grid-template-columns: 220px minmax(0, 1fr) !important;
  width: min(calc(100% - 32px), 1440px) !important;
  gap: 26px !important;
}

html[data-theme] body.nsc5-document .nsc512-workspace {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 24px;
  color: var(--nsc512-body) !important;
  -webkit-text-fill-color: currentColor !important;
}
html[data-theme] body.nsc5-document .nsc512-workspace :where(h1,h2,h3,strong,b,summary) {
  color: var(--nsc512-ink) !important;
  -webkit-text-fill-color: var(--nsc512-ink) !important;
  opacity: 1 !important;
}
html[data-theme] body.nsc5-document .nsc512-workspace :where(p,li,label,dd,dt) {
  color: var(--nsc512-body) !important;
  -webkit-text-fill-color: var(--nsc512-body) !important;
  opacity: 1 !important;
}
html[data-theme] body.nsc5-document .nsc512-workspace :where(small,.nsc512-muted) {
  color: var(--nsc512-muted) !important;
  -webkit-text-fill-color: var(--nsc512-muted) !important;
  opacity: 1 !important;
}
html[data-theme] body.nsc5-document .nsc512-workspace a:not(.nsc5-primary):not(.nsc5-secondary) {
  color: var(--nsc512-link) !important;
  -webkit-text-fill-color: var(--nsc512-link) !important;
}
html[data-theme] body.nsc5-document .nsc512-workspace a:not(.nsc5-primary):not(.nsc5-secondary):hover {
  color: var(--nsc512-link-hover) !important;
  -webkit-text-fill-color: var(--nsc512-link-hover) !important;
}

/* Directory hero */
html[data-theme] body.nsc5-document .nsc512-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--nsc512-border-soft) !important;
  border-radius: var(--nsc512-radius);
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--nsc512-accent) 70%, transparent) 0, transparent 42%),
    var(--nsc512-surface) !important;
  box-shadow: var(--nsc512-shadow);
}
html[data-theme] body.nsc5-document .nsc512-hero-copy { max-width: 820px; }
html[data-theme] body.nsc5-document .nsc512-hero-copy h1 {
  margin: 8px 0 12px !important;
  max-width: 850px;
  font-size: clamp(2rem, 4vw, 3.6rem) !important;
  line-height: 1.02 !important;
  letter-spacing: -.035em !important;
}
html[data-theme] body.nsc5-document .nsc512-hero-copy p {
  margin: 0 !important;
  max-width: 740px;
  font-size: clamp(1rem, 1.2vw, 1.12rem) !important;
  line-height: 1.65 !important;
}
html[data-theme] body.nsc5-document .nsc512-hero .nsc5-primary,
html[data-theme] body.nsc5-document .nsc512-hero .nsc5-secondary {
  flex: 0 0 auto;
  min-height: 48px;
  white-space: nowrap;
}

/* Search and filters */
html[data-theme] body.nsc5-document .nsc512-searchbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid var(--nsc512-border-soft) !important;
  border-radius: 18px;
  background: var(--nsc512-surface) !important;
}
html[data-theme] body.nsc5-document .nsc512-searchbox {
  min-width: 0;
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  border: 1px solid var(--nsc512-border) !important;
  border-radius: 13px;
  background: var(--nsc512-alt) !important;
  color: var(--nsc512-link) !important;
}
html[data-theme] body.nsc5-document .nsc512-searchbox svg { flex: 0 0 auto; stroke: currentColor !important; opacity: 1 !important; }
html[data-theme] body.nsc5-document .nsc512-searchbox input {
  width: 100% !important;
  min-width: 0 !important;
  height: 48px !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: var(--nsc512-ink) !important;
  -webkit-text-fill-color: var(--nsc512-ink) !important;
}
html[data-theme] body.nsc5-document .nsc512-searchbox input::placeholder {
  color: var(--nsc512-muted) !important;
  -webkit-text-fill-color: var(--nsc512-muted) !important;
  opacity: 1 !important;
}

html[data-theme] body.nsc5-document .nsc512-segmented,
html[data-theme] body.nsc5-document .nsc512-tabs {
  display: flex;
  gap: 7px;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: thin;
  padding: 6px;
  border: 1px solid var(--nsc512-border-soft) !important;
  border-radius: 16px;
  background: var(--nsc512-surface) !important;
}
html[data-theme] body.nsc5-document .nsc512-segmented a,
html[data-theme] body.nsc5-document .nsc512-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 11px;
  color: var(--nsc512-body) !important;
  -webkit-text-fill-color: var(--nsc512-body) !important;
  font-weight: 750;
  text-decoration: none !important;
  white-space: nowrap;
}
html[data-theme] body.nsc5-document .nsc512-segmented a:hover,
html[data-theme] body.nsc5-document .nsc512-tabs a:hover { background: var(--nsc512-alt) !important; }
html[data-theme] body.nsc5-document .nsc512-segmented a.is-active,
html[data-theme] body.nsc5-document .nsc512-tabs a.is-active {
  background: var(--nsc512-accent) !important;
  color: var(--nsc512-link-hover) !important;
  -webkit-text-fill-color: var(--nsc512-link-hover) !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nsc512-link) 45%, transparent);
}

html[data-theme] body.nsc5-document .nsc512-filter-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  border: 1px solid var(--nsc512-border-soft) !important;
  border-radius: 18px;
  background: var(--nsc512-alt) !important;
}
html[data-theme] body.nsc5-document .nsc512-circle-filters,
html[data-theme] body.nsc5-document .nsc512-people-filters { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
html[data-theme] body.nsc5-document .nsc512-filter-row label {
  min-width: 0;
  display: grid;
  gap: 7px;
  font-weight: 750;
  font-size: .86rem;
  color: var(--nsc512-ink) !important;
  -webkit-text-fill-color: var(--nsc512-ink) !important;
}
html[data-theme] body.nsc5-document .nsc512-filter-row input,
html[data-theme] body.nsc5-document .nsc512-filter-row select,
html[data-theme] body.nsc5-document .nsc512-create-form input,
html[data-theme] body.nsc5-document .nsc512-create-form select,
html[data-theme] body.nsc5-document .nsc512-create-form textarea {
  width: 100% !important;
  min-height: 46px !important;
  border: 1px solid var(--nsc512-border) !important;
  border-radius: 11px !important;
  background: var(--nsc512-surface) !important;
  color: var(--nsc512-ink) !important;
  -webkit-text-fill-color: var(--nsc512-ink) !important;
}
html[data-theme] body.nsc5-document .nsc512-filter-row :where(input,textarea)::placeholder,
html[data-theme] body.nsc5-document .nsc512-create-form :where(input,textarea)::placeholder {
  color: var(--nsc512-muted) !important;
  -webkit-text-fill-color: var(--nsc512-muted) !important;
  opacity: 1 !important;
}
html[data-theme] body.nsc5-document .nsc512-clear { align-self: center; font-weight: 750; }

/* Section headings */
html[data-theme] body.nsc5-document .nsc512-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}
html[data-theme] body.nsc5-document .nsc512-section-head > div > span {
  display: block;
  margin-bottom: 4px;
  color: var(--nsc512-link) !important;
  -webkit-text-fill-color: var(--nsc512-link) !important;
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
html[data-theme] body.nsc5-document .nsc512-section-head h2 { margin: 0 !important; font-size: clamp(1.35rem, 2vw, 1.8rem) !important; line-height: 1.18 !important; }
html[data-theme] body.nsc5-document .nsc512-section-head p { margin: 5px 0 0 !important; max-width: 680px; }
html[data-theme] body.nsc5-document .nsc512-section-head > a { flex: 0 0 auto; min-height: 42px; display: inline-flex; align-items: center; font-weight: 800; }

/* Course directory cards */
html[data-theme] body.nsc5-document .nsc512-course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
html[data-theme] body.nsc5-document .nsc512-course-card {
  min-width: 0;
  min-height: 290px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 20px;
  border: 1px solid var(--nsc512-border-soft) !important;
  border-radius: 18px;
  background: var(--nsc512-surface) !important;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--nsc512-ink) 5%, transparent);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
html[data-theme] body.nsc5-document .nsc512-course-card:hover { transform: translateY(-2px); border-color: var(--nsc512-border) !important; box-shadow: var(--nsc512-shadow); }
html[data-theme] body.nsc5-document .nsc512-course-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
html[data-theme] body.nsc5-document .nsc512-code-pill,
html[data-theme] body.nsc5-document .nsc512-purpose-pill,
html[data-theme] body.nsc5-document .nsc512-following-pill,
html[data-theme] body.nsc5-document .nsc512-status-pill,
html[data-theme] body.nsc5-document .nsc512-privacy-pill {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 5px 9px;
  border: 1px solid var(--nsc512-border-soft) !important;
  border-radius: 999px;
  background: var(--nsc512-accent) !important;
  color: var(--nsc512-link-hover) !important;
  -webkit-text-fill-color: var(--nsc512-link-hover) !important;
  font-size: .75rem;
  font-weight: 850;
  line-height: 1;
}
html[data-theme] body.nsc5-document .nsc512-privacy-pill { background: var(--nsc512-alt) !important; color: var(--nsc512-body) !important; -webkit-text-fill-color: var(--nsc512-body) !important; }
html[data-theme] body.nsc5-document .nsc512-course-card h3 { margin: 0 !important; font-size: 1.2rem !important; line-height: 1.3 !important; }
html[data-theme] body.nsc5-document .nsc512-course-card h3 a { color: var(--nsc512-ink) !important; -webkit-text-fill-color: var(--nsc512-ink) !important; text-decoration: none !important; }
html[data-theme] body.nsc5-document .nsc512-course-card > p { margin: 0 !important; font-size: .9rem; }
html[data-theme] body.nsc5-document .nsc512-course-card-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: auto; }
html[data-theme] body.nsc5-document .nsc512-course-card-stats span {
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--nsc512-alt) !important;
  color: var(--nsc512-muted) !important;
  -webkit-text-fill-color: var(--nsc512-muted) !important;
  font-size: .78rem;
}
html[data-theme] body.nsc5-document .nsc512-course-card-stats strong { display: inline; font-size: .92rem; }
html[data-theme] body.nsc5-document .nsc512-course-card-actions { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding-top: 2px; }
html[data-theme] body.nsc5-document .nsc512-course-card-actions > a { font-weight: 850; text-decoration: none !important; }
html[data-theme] body.nsc5-document .nsc512-course-card-actions button,
html[data-theme] body.nsc5-document .nsc512-person-actions button {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--nsc512-border) !important;
  border-radius: 10px;
  background: var(--nsc512-alt) !important;
  color: var(--nsc512-ink) !important;
  -webkit-text-fill-color: var(--nsc512-ink) !important;
  font-weight: 800;
}

/* Course hub */
html[data-theme] body.nsc5-document .nsc512-back { display: inline-flex; width: max-content; min-height: 42px; align-items: center; font-weight: 800; text-decoration: none !important; }
html[data-theme] body.nsc5-document .nsc512-course-hub-hero,
html[data-theme] body.nsc5-document .nsc512-person-hero,
html[data-theme] body.nsc5-document .nsc512-centre-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(22px, 3.5vw, 38px);
  border: 1px solid var(--nsc512-border-soft) !important;
  border-radius: var(--nsc512-radius);
  background: var(--nsc512-surface) !important;
  box-shadow: var(--nsc512-shadow);
}
html[data-theme] body.nsc5-document .nsc512-course-hub-copy { min-width: 0; max-width: 850px; }
html[data-theme] body.nsc5-document .nsc512-title-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
html[data-theme] body.nsc5-document .nsc512-title-line > span:not(.nsc512-code-pill) { color: var(--nsc512-muted) !important; -webkit-text-fill-color: var(--nsc512-muted) !important; font-size: .84rem; font-weight: 750; }
html[data-theme] body.nsc5-document .nsc512-course-hub-hero h1 { margin: 12px 0 7px !important; font-size: clamp(2rem, 4vw, 3.25rem) !important; line-height: 1.04 !important; letter-spacing: -.035em !important; }
html[data-theme] body.nsc5-document .nsc512-course-hub-hero p { margin: 0 !important; }
html[data-theme] body.nsc5-document .nsc512-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; }
html[data-theme] body.nsc5-document .nsc512-course-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
html[data-theme] body.nsc5-document .nsc512-course-stats > div {
  display: grid;
  gap: 3px;
  padding: 18px;
  border: 1px solid var(--nsc512-border-soft) !important;
  border-radius: 15px;
  background: var(--nsc512-alt) !important;
}
html[data-theme] body.nsc5-document .nsc512-course-stats strong { font-size: 1.55rem; }
html[data-theme] body.nsc5-document .nsc512-course-stats span { color: var(--nsc512-muted) !important; -webkit-text-fill-color: var(--nsc512-muted) !important; font-size: .82rem; font-weight: 750; }
html[data-theme] body.nsc5-document .nsc512-section,
html[data-theme] body.nsc5-document .nsc512-panel {
  min-width: 0;
  display: grid;
  gap: 17px;
  padding: 22px;
  border: 1px solid var(--nsc512-border-soft) !important;
  border-radius: 18px;
  background: var(--nsc512-surface) !important;
}
html[data-theme] body.nsc5-document .nsc512-two-up,
html[data-theme] body.nsc5-document .nsc512-circle-home-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

/* Thread previews */
html[data-theme] body.nsc5-document .nsc512-thread-list { display: grid; gap: 10px; }
html[data-theme] body.nsc5-document .nsc512-thread-list > article { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; padding: 14px; border: 1px solid var(--nsc512-border-soft) !important; border-radius: 13px; background: var(--nsc512-alt) !important; }
html[data-theme] body.nsc5-document .nsc512-thread-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: var(--nsc512-accent) !important; color: var(--nsc512-link) !important; }
html[data-theme] body.nsc5-document .nsc512-thread-icon svg { stroke: currentColor !important; }
html[data-theme] body.nsc5-document .nsc512-thread-copy { min-width: 0; }
html[data-theme] body.nsc5-document .nsc512-thread-meta,
html[data-theme] body.nsc5-document .nsc512-thread-stats { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
html[data-theme] body.nsc5-document .nsc512-thread-meta span { color: var(--nsc512-link) !important; -webkit-text-fill-color: var(--nsc512-link) !important; font-size: .74rem; font-weight: 850; text-transform: uppercase; letter-spacing: .05em; }
html[data-theme] body.nsc5-document .nsc512-thread-list h3 { margin: 4px 0 6px !important; font-size: 1rem !important; line-height: 1.35 !important; }
html[data-theme] body.nsc5-document .nsc512-thread-list h3 a { color: var(--nsc512-ink) !important; -webkit-text-fill-color: var(--nsc512-ink) !important; text-decoration: none !important; }
html[data-theme] body.nsc5-document .nsc512-thread-stats { color: var(--nsc512-muted) !important; -webkit-text-fill-color: var(--nsc512-muted) !important; font-size: .78rem; }

/* Study Circle directory */
html[data-theme] body.nsc5-document .nsc512-circle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
html[data-theme] body.nsc5-document .nsc512-circle-card {
  min-width: 0;
  min-height: 305px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--nsc512-border-soft) !important;
  border-radius: 18px;
  background: var(--nsc512-surface) !important;
  transition: transform .18s ease, border-color .18s ease;
}
html[data-theme] body.nsc5-document .nsc512-circle-card:hover { transform: translateY(-2px); border-color: var(--nsc512-border) !important; }
html[data-theme] body.nsc5-document .nsc512-circle-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
html[data-theme] body.nsc5-document .nsc512-circle-card h3 { margin: 0 !important; font-size: 1.16rem !important; line-height: 1.3 !important; }
html[data-theme] body.nsc5-document .nsc512-circle-card h3 a { color: var(--nsc512-ink) !important; -webkit-text-fill-color: var(--nsc512-ink) !important; text-decoration: none !important; }
html[data-theme] body.nsc5-document .nsc512-circle-card > p { margin: 0 !important; }
html[data-theme] body.nsc5-document .nsc512-circle-tags,
html[data-theme] body.nsc5-document .nsc512-person-tags,
html[data-theme] body.nsc5-document .nsc512-circle-focus-tags { display: flex; flex-wrap: wrap; gap: 7px; }
html[data-theme] body.nsc5-document :is(.nsc512-circle-tags,.nsc512-person-tags,.nsc512-circle-focus-tags) > span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--nsc512-alt) !important;
  color: var(--nsc512-body) !important;
  -webkit-text-fill-color: var(--nsc512-body) !important;
  font-size: .74rem;
  font-weight: 750;
}
html[data-theme] body.nsc5-document .nsc512-capacity { margin-top: auto; display: grid; gap: 8px; }
html[data-theme] body.nsc5-document .nsc512-capacity > div { display: flex; justify-content: space-between; gap: 10px; color: var(--nsc512-muted) !important; -webkit-text-fill-color: var(--nsc512-muted) !important; font-size: .77rem; }
html[data-theme] body.nsc5-document .nsc512-capacity i { display: block; height: 7px; overflow: hidden; border-radius: 999px; background: var(--nsc512-alt) !important; }
html[data-theme] body.nsc5-document .nsc512-capacity i b { display: block; height: 100%; border-radius: inherit; background: var(--nsc512-link) !important; }
html[data-theme] body.nsc5-document .nsc512-circle-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
html[data-theme] body.nsc5-document .nsc512-circle-card-actions > a { font-weight: 850; text-decoration: none !important; }
html[data-theme] body.nsc5-document .nsc512-invitations { display: grid; gap: 14px; }
html[data-theme] body.nsc5-document .nsc512-create-card {
  scroll-margin-top: 110px;
  border: 1px solid var(--nsc512-border-soft) !important;
  border-radius: 18px;
  background: var(--nsc512-surface) !important;
  overflow: hidden;
}
html[data-theme] body.nsc5-document .nsc512-create-card > summary { display: flex; gap: 12px; align-items: center; padding: 18px 20px; cursor: pointer; list-style: none; }
html[data-theme] body.nsc5-document .nsc512-create-card > summary::-webkit-details-marker { display: none; }
html[data-theme] body.nsc5-document .nsc512-create-card > summary > span:first-child { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--nsc512-accent) !important; color: var(--nsc512-link) !important; }
html[data-theme] body.nsc5-document .nsc512-create-card > summary > span:last-child { display: grid; gap: 2px; }
html[data-theme] body.nsc5-document .nsc512-create-card > summary small { font-weight: 500; }
html[data-theme] body.nsc5-document .nsc512-create-form { margin: 0 18px 18px !important; padding: 20px !important; border: 1px solid var(--nsc512-border-soft) !important; border-radius: 14px !important; background: var(--nsc512-alt) !important; }
html[data-theme] body.nsc5-document .nsc512-guest-callout,
html[data-theme] body.nsc5-document .nsc512-notice,
html[data-theme] body.nsc5-document .nsc512-auth-gate,
html[data-theme] body.nsc5-document .nsc512-privacy-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--nsc512-border-soft) !important;
  border-radius: 15px;
  background: var(--nsc512-alt) !important;
}
html[data-theme] body.nsc5-document .nsc512-notice { display: block; }
html[data-theme] body.nsc5-document .nsc512-notice p { margin: 4px 0 8px !important; }
html[data-theme] body.nsc5-document .nsc512-guest-callout > div { display: grid; gap: 4px; }
html[data-theme] body.nsc5-document .nsc512-guest-callout > div > span { color: var(--nsc512-link) !important; -webkit-text-fill-color: var(--nsc512-link) !important; font-weight: 850; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }

/* People discovery */
html[data-theme] body.nsc5-document .nsc512-people-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
html[data-theme] body.nsc5-document .nsc512-person-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 18px; border: 1px solid var(--nsc512-border-soft) !important; border-radius: 17px; background: var(--nsc512-surface) !important; }
html[data-theme] body.nsc5-document .nsc512-person-card-head { display: flex; gap: 12px; align-items: center; }
html[data-theme] body.nsc5-document .nsc512-person-card-head > div { min-width: 0; }
html[data-theme] body.nsc5-document .nsc512-person-card h3 { margin: 0 !important; font-size: 1.04rem !important; }
html[data-theme] body.nsc5-document .nsc512-person-card h3 a { color: var(--nsc512-ink) !important; -webkit-text-fill-color: var(--nsc512-ink) !important; text-decoration: none !important; }
html[data-theme] body.nsc5-document .nsc512-person-card > p { margin: 0 !important; }
html[data-theme] body.nsc5-document .nsc512-person-avatar { width: 52px; height: 52px; flex: 0 0 52px; display: grid; place-items: center; overflow: hidden; border: 2px solid var(--nsc512-border) !important; border-radius: 50%; background: var(--nsc512-accent) !important; color: var(--nsc512-link-hover) !important; }
html[data-theme] body.nsc5-document .nsc512-person-avatar.is-large { width: 92px; height: 92px; flex-basis: 92px; }
html[data-theme] body.nsc5-document .nsc512-person-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
html[data-theme] body.nsc5-document .nsc512-person-avatar b { font-size: 1.25rem; }
html[data-theme] body.nsc5-document .nsc512-person-avatar.is-large b { font-size: 2rem; }
html[data-theme] body.nsc5-document .nsc512-person-actions { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 9px; border-top: 1px solid var(--nsc512-border-soft); padding-top: 12px; }
html[data-theme] body.nsc5-document .nsc512-person-actions > a { font-weight: 800; text-decoration: none !important; }
html[data-theme] body.nsc5-document .nsc512-person-actions form { margin: 0; }
html[data-theme] body.nsc5-document .nsc512-person-hero { justify-content: flex-start; }
html[data-theme] body.nsc5-document .nsc512-person-hero-copy { min-width: 0; flex: 1 1 auto; }
html[data-theme] body.nsc5-document .nsc512-person-hero-copy h1 { margin: 6px 0 7px !important; font-size: clamp(2rem, 4vw, 3rem) !important; }
html[data-theme] body.nsc5-document .nsc512-person-hero-copy p { margin: 0 0 12px !important; }
html[data-theme] body.nsc5-document .nsc512-message-form { margin-left: auto; }
html[data-theme] body.nsc5-document .nsc512-person-info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
html[data-theme] body.nsc5-document .nsc512-person-info-grid > div { display: grid; gap: 4px; padding: 17px; border: 1px solid var(--nsc512-border-soft) !important; border-radius: 14px; background: var(--nsc512-alt) !important; }
html[data-theme] body.nsc5-document .nsc512-person-info-grid > div > span { color: var(--nsc512-muted) !important; -webkit-text-fill-color: var(--nsc512-muted) !important; font-size: .77rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
html[data-theme] body.nsc5-document .nsc512-credential-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
html[data-theme] body.nsc5-document .nsc512-credential-grid article { padding: 14px; border: 1px solid var(--nsc512-border-soft) !important; border-radius: 12px; background: var(--nsc512-alt) !important; }
html[data-theme] body.nsc5-document .nsc512-credential-grid p { margin: 5px 0 0 !important; }
html[data-theme] body.nsc5-document .nsc512-privacy-note { justify-content: flex-start; }
html[data-theme] body.nsc5-document .nsc512-privacy-note svg,
html[data-theme] body.nsc5-document .nsc512-auth-gate > svg { flex: 0 0 auto; stroke: var(--nsc512-link) !important; }
html[data-theme] body.nsc5-document .nsc512-privacy-note p,
html[data-theme] body.nsc5-document .nsc512-auth-gate p { margin: 3px 0 0 !important; }

/* Study centre discovery */
html[data-theme] body.nsc5-document .nsc512-my-centre { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 15px 18px; border: 1px solid var(--nsc512-border-soft) !important; border-radius: 15px; background: var(--nsc512-accent) !important; text-decoration: none !important; }
html[data-theme] body.nsc5-document .nsc512-my-centre svg { stroke: var(--nsc512-link) !important; }
html[data-theme] body.nsc5-document .nsc512-my-centre > span { display: grid; gap: 2px; }
html[data-theme] body.nsc5-document .nsc512-my-centre small { color: var(--nsc512-muted) !important; -webkit-text-fill-color: var(--nsc512-muted) !important; }
html[data-theme] body.nsc5-document .nsc512-my-centre b { color: var(--nsc512-link-hover) !important; -webkit-text-fill-color: var(--nsc512-link-hover) !important; }
html[data-theme] body.nsc5-document .nsc512-centre-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
html[data-theme] body.nsc5-document .nsc512-centre-card { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; padding: 19px; border: 1px solid var(--nsc512-border-soft) !important; border-radius: 17px; background: var(--nsc512-surface) !important; }
html[data-theme] body.nsc5-document .nsc512-centre-card-icon,
html[data-theme] body.nsc5-document .nsc512-centre-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--nsc512-accent) !important; color: var(--nsc512-link) !important; }
html[data-theme] body.nsc5-document :is(.nsc512-centre-card-icon,.nsc512-centre-icon) svg { stroke: currentColor !important; }
html[data-theme] body.nsc5-document .nsc512-centre-card h3 { margin: 1px 0 10px !important; font-size: 1.08rem !important; }
html[data-theme] body.nsc5-document .nsc512-centre-card h3 a { color: var(--nsc512-ink) !important; -webkit-text-fill-color: var(--nsc512-ink) !important; text-decoration: none !important; }
html[data-theme] body.nsc5-document .nsc512-centre-card-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; color: var(--nsc512-muted) !important; -webkit-text-fill-color: var(--nsc512-muted) !important; font-size: .8rem; }
html[data-theme] body.nsc5-document .nsc512-centre-card-stats strong { display: inline; }
html[data-theme] body.nsc5-document .nsc512-centre-card > div:last-child > a { font-weight: 800; text-decoration: none !important; }
html[data-theme] body.nsc5-document .nsc512-centre-hero { justify-content: flex-start; }
html[data-theme] body.nsc5-document .nsc512-centre-hero h1 { margin: 6px 0 8px !important; font-size: clamp(2rem, 4vw, 3rem) !important; }
html[data-theme] body.nsc5-document .nsc512-centre-hero p { margin: 0 !important; max-width: 800px; }
html[data-theme] body.nsc5-document .nsc512-centre-courses { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
html[data-theme] body.nsc5-document .nsc512-centre-courses a { display: grid; gap: 3px; padding: 13px; border: 1px solid var(--nsc512-border-soft) !important; border-radius: 12px; background: var(--nsc512-alt) !important; text-decoration: none !important; }
html[data-theme] body.nsc5-document .nsc512-centre-courses a strong { color: var(--nsc512-ink) !important; -webkit-text-fill-color: var(--nsc512-ink) !important; }
html[data-theme] body.nsc5-document .nsc512-centre-courses a small { color: var(--nsc512-muted) !important; -webkit-text-fill-color: var(--nsc512-muted) !important; }

/* Individual Study Circle: wide, task-oriented workspace, no permanent right rail. */
html[data-theme] body.nsc5-document .nsc5-app[data-route="circles"].is-wide-route .nsc5-main > .nsc5-back-link { display: inline-flex; width: max-content; min-height: 42px; align-items: center; margin-bottom: 12px; font-weight: 800; }
html[data-theme] body.nsc5-document .nsc5-circle-header { display: grid !important; grid-template-columns: minmax(0, 1fr) auto !important; gap: 24px !important; align-items: center !important; padding: clamp(22px, 3.5vw, 36px) !important; border: 1px solid var(--nsc512-border-soft) !important; border-radius: 21px !important; background: var(--nsc512-surface) !important; box-shadow: var(--nsc512-shadow) !important; }
html[data-theme] body.nsc5-document .nsc5-circle-header h1 { margin: 6px 0 9px !important; font-size: clamp(2rem, 4vw, 3.2rem) !important; line-height: 1.05 !important; letter-spacing: -.035em !important; color: var(--nsc512-ink) !important; -webkit-text-fill-color: var(--nsc512-ink) !important; }
html[data-theme] body.nsc5-document .nsc5-circle-header p { margin: 0 0 9px !important; color: var(--nsc512-body) !important; -webkit-text-fill-color: var(--nsc512-body) !important; }
html[data-theme] body.nsc5-document .nsc5-circle-header small { color: var(--nsc512-muted) !important; -webkit-text-fill-color: var(--nsc512-muted) !important; }
html[data-theme] body.nsc5-document .nsc5-circle-summary { min-width: 150px; display: grid !important; gap: 2px !important; justify-items: center; padding: 16px !important; border: 1px solid var(--nsc512-border-soft) !important; border-radius: 15px !important; background: var(--nsc512-alt) !important; }
html[data-theme] body.nsc5-document .nsc5-circle-summary strong { font-size: 2rem !important; }
html[data-theme] body.nsc5-document .nsc5-circle-summary :where(span,small) { color: var(--nsc512-muted) !important; -webkit-text-fill-color: var(--nsc512-muted) !important; }
html[data-theme] body.nsc5-document .nsc5-circle-membership { margin: 14px 0 !important; min-height: 62px; display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 12px !important; padding: 12px 16px !important; border: 1px solid var(--nsc512-border-soft) !important; border-radius: 14px !important; background: var(--nsc512-alt) !important; }
html[data-theme] body.nsc5-document .nsc5-circle-membership p { color: var(--nsc512-body) !important; -webkit-text-fill-color: var(--nsc512-body) !important; }
html[data-theme] body.nsc5-document .nsc5-circle-tabs { display: flex !important; gap: 7px !important; overflow-x: auto !important; padding: 6px !important; margin-bottom: 18px !important; border: 1px solid var(--nsc512-border-soft) !important; border-radius: 15px !important; background: var(--nsc512-surface) !important; }
html[data-theme] body.nsc5-document .nsc5-circle-tabs a { min-height: 42px !important; display: inline-flex !important; align-items: center !important; padding: 9px 14px !important; border: 0 !important; border-radius: 10px !important; color: var(--nsc512-body) !important; -webkit-text-fill-color: var(--nsc512-body) !important; font-weight: 800 !important; white-space: nowrap; text-decoration: none !important; }
html[data-theme] body.nsc5-document .nsc5-circle-tabs a.is-active { background: var(--nsc512-accent) !important; color: var(--nsc512-link-hover) !important; -webkit-text-fill-color: var(--nsc512-link-hover) !important; }
html[data-theme] body.nsc5-document .nsc512-circle-overview { display: grid; gap: 16px; }
html[data-theme] body.nsc5-document .nsc512-circle-overview-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr); gap: 16px; }
html[data-theme] body.nsc5-document .nsc512-circle-focus-card,
html[data-theme] body.nsc5-document .nsc512-next-session-card { display: grid; align-content: start; gap: 9px; padding: 21px; border: 1px solid var(--nsc512-border-soft) !important; border-radius: 17px; background: var(--nsc512-surface) !important; }
html[data-theme] body.nsc5-document .nsc512-circle-focus-card h2,
html[data-theme] body.nsc5-document .nsc512-next-session-card h2 { margin: 0 !important; font-size: 1.35rem !important; }
html[data-theme] body.nsc5-document .nsc512-circle-focus-card p,
html[data-theme] body.nsc5-document .nsc512-next-session-card p { margin: 0 !important; }
html[data-theme] body.nsc5-document .nsc512-next-session-card a { margin-top: 5px; font-weight: 800; text-decoration: none !important; }
html[data-theme] body.nsc5-document .nsc512-mini-list { display: grid; gap: 9px; }
html[data-theme] body.nsc5-document .nsc512-mini-list article { display: grid; gap: 3px; padding: 11px 12px; border: 1px solid var(--nsc512-border-soft) !important; border-radius: 11px; background: var(--nsc512-alt) !important; }
html[data-theme] body.nsc5-document .nsc512-mini-list article > span { color: var(--nsc512-link) !important; -webkit-text-fill-color: var(--nsc512-link) !important; font-size: .7rem; font-weight: 850; text-transform: uppercase; letter-spacing: .05em; }
html[data-theme] body.nsc5-document .nsc512-mini-list small { color: var(--nsc512-muted) !important; -webkit-text-fill-color: var(--nsc512-muted) !important; }
html[data-theme] body.nsc5-document .nsc512-panel-note { margin: 0 !important; }
html[data-theme] body.nsc5-document :is(.nsc5-circle-feed,.nsc5-circle-events,.nsc5-circle-resources,.nsc5-circle-members) { display: grid !important; gap: 12px !important; }
html[data-theme] body.nsc5-document :is(.nsc5-circle-post,.nsc5-circle-event,.nsc5-circle-resource,.nsc5-circle-member,.nsc5-form-card,.nsc5-report-box,.nsc5-locked) { border-color: var(--nsc512-border-soft) !important; background: var(--nsc512-surface) !important; color: var(--nsc512-body) !important; }

/* Keep controls usable over historical high-specificity layers. */
html[data-theme] body.nsc5-document .nsc512-workspace :where(button,.nsc5-primary,.nsc5-secondary) { opacity: 1 !important; }
html[data-theme] body.nsc5-document .nsc512-workspace .nsc5-primary,
html[data-theme] body.nsc5-document .nsc512-workspace button.nsc5-primary { background: #176b43 !important; border-color: #176b43 !important; color: #fff !important; -webkit-text-fill-color: #fff !important; }
html[data-theme] body.nsc5-document .nsc512-workspace .nsc5-primary:hover,
html[data-theme] body.nsc5-document .nsc512-workspace button.nsc5-primary:hover { background: #0f5735 !important; border-color: #0f5735 !important; }
html[data-theme="dark"] body.nsc5-document .nsc512-workspace .nsc5-primary,
html[data-theme="dark"] body.nsc5-document .nsc512-workspace button.nsc5-primary { background: #276f4d !important; border-color: #87b79e !important; color: #fff !important; -webkit-text-fill-color: #fff !important; }
html[data-theme] body.nsc5-document .nsc512-workspace .nsc5-secondary { background: var(--nsc512-surface) !important; border-color: var(--nsc512-border) !important; color: var(--nsc512-ink) !important; -webkit-text-fill-color: var(--nsc512-ink) !important; }

/* Guest pages use the guest token set but retain the same component hierarchy. */
html[data-theme] body.nsc591-guest-document .nsc590-guest-app .nsc512-workspace {
  --nsc512-surface: var(--nsc5111-guest-surface, var(--nsc5111-surface));
  --nsc512-alt: var(--nsc5111-guest-alt, var(--nsc5111-surface-alt));
  --nsc512-hover: var(--nsc5111-guest-alt, var(--nsc5111-surface-hover));
  --nsc512-ink: var(--nsc5111-guest-ink, var(--nsc5111-ink));
  --nsc512-body: var(--nsc5111-guest-body, var(--nsc5111-body));
  --nsc512-muted: var(--nsc5111-guest-muted, var(--nsc5111-muted));
  --nsc512-border: var(--nsc5111-guest-border, var(--nsc5111-border));
  --nsc512-border-soft: var(--nsc5111-guest-border, var(--nsc5111-border-soft));
  --nsc512-link: var(--nsc5111-guest-link, var(--nsc5111-link));
  --nsc512-link-hover: var(--nsc5111-guest-link-hover, var(--nsc5111-link-hover));
}
html[data-theme] body.nsc591-guest-document .nsc590-guest-app[data-route="courses"] .nsc590-guest-main,
html[data-theme] body.nsc591-guest-document .nsc590-guest-app[data-route="circles"] .nsc590-guest-main,
html[data-theme] body.nsc591-guest-document .nsc590-guest-app[data-route^="course/"] .nsc590-guest-main { width: min(calc(100% - 40px), 1320px) !important; max-width: 1320px !important; margin-inline: auto !important; }

@media (max-width: 1180px) {
  html[data-theme] body.nsc5-document .nsc512-course-grid,
  html[data-theme] body.nsc5-document .nsc512-circle-grid,
  html[data-theme] body.nsc5-document .nsc512-people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html[data-theme] body.nsc5-document .nsc512-filter-row,
  html[data-theme] body.nsc5-document .nsc512-circle-filters,
  html[data-theme] body.nsc5-document .nsc512-people-filters { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  html[data-theme] body.nsc5-document .nsc512-centre-courses { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  html[data-theme] body.nsc5-document .nsc5-app.is-wide-route[data-route="courses"] .nsc5-layout,
  html[data-theme] body.nsc5-document .nsc5-app.is-wide-route[data-route="circles"] .nsc5-layout,
  html[data-theme] body.nsc5-document .nsc5-app.is-wide-route[data-route="people"] .nsc5-layout,
  html[data-theme] body.nsc5-document .nsc5-app.is-wide-route[data-route="study-centres"] .nsc5-layout,
  html[data-theme] body.nsc5-document .nsc5-app.is-wide-route[data-route^="course/"] .nsc5-layout,
  html[data-theme] body.nsc5-document .nsc5-app.is-wide-route[data-route^="people/"] .nsc5-layout,
  html[data-theme] body.nsc5-document .nsc5-app.is-wide-route[data-route^="study-centre/"] .nsc5-layout {
    display: block !important;
    width: min(calc(100% - 24px), 900px) !important;
  }
  html[data-theme] body.nsc5-document .nsc512-hero,
  html[data-theme] body.nsc5-document .nsc512-course-hub-hero,
  html[data-theme] body.nsc5-document .nsc512-person-hero { align-items: flex-start; flex-direction: column; }
  html[data-theme] body.nsc5-document .nsc512-message-form { margin-left: 0; }
  html[data-theme] body.nsc5-document .nsc512-course-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html[data-theme] body.nsc5-document .nsc512-circle-overview-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  html[data-theme] body.nsc5-document .nsc512-workspace { gap: 17px; }
  html[data-theme] body.nsc5-document .nsc512-hero { padding: 22px 18px; border-radius: 17px; }
  html[data-theme] body.nsc5-document .nsc512-hero-copy h1 { font-size: clamp(1.85rem, 10vw, 2.6rem) !important; }
  html[data-theme] body.nsc5-document .nsc512-searchbar { grid-template-columns: 1fr; padding: 10px; }
  html[data-theme] body.nsc5-document .nsc512-searchbar > button { width: 100%; }
  html[data-theme] body.nsc5-document .nsc512-filter-row,
  html[data-theme] body.nsc5-document .nsc512-circle-filters,
  html[data-theme] body.nsc5-document .nsc512-people-filters { grid-template-columns: 1fr; }
  html[data-theme] body.nsc5-document .nsc512-course-grid,
  html[data-theme] body.nsc5-document .nsc512-circle-grid,
  html[data-theme] body.nsc5-document .nsc512-people-grid,
  html[data-theme] body.nsc5-document .nsc512-centre-grid,
  html[data-theme] body.nsc5-document .nsc512-two-up,
  html[data-theme] body.nsc5-document .nsc512-circle-home-columns,
  html[data-theme] body.nsc5-document .nsc512-person-info-grid,
  html[data-theme] body.nsc5-document .nsc512-credential-grid,
  html[data-theme] body.nsc5-document .nsc512-centre-courses { grid-template-columns: 1fr; }
  html[data-theme] body.nsc5-document .nsc512-course-card,
  html[data-theme] body.nsc5-document .nsc512-circle-card { min-height: 0; }
  html[data-theme] body.nsc5-document .nsc512-section,
  html[data-theme] body.nsc5-document .nsc512-panel { padding: 17px; }
  html[data-theme] body.nsc5-document .nsc512-section-head { align-items: flex-start; flex-direction: column; gap: 8px; }
  html[data-theme] body.nsc5-document .nsc512-section-head > a { min-height: 38px; }
  html[data-theme] body.nsc5-document .nsc512-course-hub-hero,
  html[data-theme] body.nsc5-document .nsc512-person-hero,
  html[data-theme] body.nsc5-document .nsc512-centre-hero { padding: 20px 17px; border-radius: 17px; }
  html[data-theme] body.nsc5-document .nsc512-hero-actions { width: 100%; justify-content: stretch; }
  html[data-theme] body.nsc5-document .nsc512-hero-actions > * { flex: 1 1 100%; text-align: center; justify-content: center; }
  html[data-theme] body.nsc5-document .nsc512-course-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  html[data-theme] body.nsc5-document .nsc512-course-stats > div { padding: 13px; }
  html[data-theme] body.nsc5-document .nsc512-guest-callout,
  html[data-theme] body.nsc5-document .nsc512-auth-gate,
  html[data-theme] body.nsc5-document .nsc512-privacy-note { align-items: flex-start; flex-direction: column; }
  html[data-theme] body.nsc5-document .nsc512-my-centre { grid-template-columns: 40px minmax(0, 1fr); }
  html[data-theme] body.nsc5-document .nsc512-my-centre > b { grid-column: 2; }
  html[data-theme] body.nsc5-document .nsc512-person-hero { align-items: flex-start; }
  html[data-theme] body.nsc5-document .nsc5-circle-header { grid-template-columns: 1fr !important; padding: 20px 17px !important; border-radius: 17px !important; }
  html[data-theme] body.nsc5-document .nsc5-circle-summary { width: 100%; grid-template-columns: auto auto auto; justify-content: start; justify-items: start; align-items: center; gap: 8px !important; }
  html[data-theme] body.nsc5-document .nsc5-circle-membership { align-items: flex-start !important; flex-direction: column !important; }
  html[data-theme] body.nsc591-guest-document .nsc590-guest-app[data-route="courses"] .nsc590-guest-main,
  html[data-theme] body.nsc591-guest-document .nsc590-guest-app[data-route="circles"] .nsc590-guest-main,
  html[data-theme] body.nsc591-guest-document .nsc590-guest-app[data-route^="course/"] .nsc590-guest-main { width: calc(100% - 20px) !important; }
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme] body.nsc5-document .nsc512-course-card,
  html[data-theme] body.nsc5-document .nsc512-circle-card { transition: none !important; }
}
