:root {
  --primary: #7bc043;
  --primary-dark: #4d9c2f;
  --secondary: #6fc5e5;
  --secondary-dark: #396b88;
  --accent: #dff4fb;
  --bg: #f4faf7;
  --bg-strong: #eaf6f1;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-solid: #ffffff;
  --surface-soft: #f1faf7;
  --text: #15384a;
  --muted: #577181;
  --border: rgba(27, 104, 131, 0.14);
  --shadow: 0 22px 58px rgba(34, 91, 111, 0.1);
  --header: #3b6986;
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* { box-sizing: border-box; }

button,
input,
select,
textarea {
  font: inherit;
}

body {
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(123, 192, 67, 0.12), transparent 24%),
    radial-gradient(circle at top right, rgba(111, 197, 229, 0.16), transparent 26%),
    linear-gradient(180deg, #f8fcfa 0%, var(--bg) 55%, #f2faf7 100%);
  color: var(--text);
  line-height: 1.6;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 2rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(59, 105, 134, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 32px rgba(19, 45, 61, 0.12);
}

.site-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  min-height: 112px;
}

.brand-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  text-decoration-line: underline;
  text-decoration-color: rgba(123, 192, 67, 0.85);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.12em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.site-nav a,
.nav-form button {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  letter-spacing: 0.01em;
}

.nav-form {
  margin: 0;
}

.nav-form button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.site-nav a:hover,
.nav-form button:hover {
  color: rgba(255, 255, 255, 0.88);
}

main { padding: 2.4rem 0 5rem; }

section + section {
  margin-top: 2.8rem;
}

.hero-layout {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  background: var(--surface-solid);
  border-top: 1px solid rgba(123, 192, 67, 0.32);
  border-bottom: 1px solid rgba(123, 192, 67, 0.32);
  box-shadow: 0 20px 42px rgba(34, 91, 111, 0.08);
}

.hero-layout-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.85fr);
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 2rem;
  overflow: hidden;
}

.hero-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 2rem;
  min-height: 220px;
}

.hero-panel-logo {
  background: #ffffff;
}

.hero-panel-copy {
  justify-content: flex-start;
  text-align: left;
  border-left: 1px solid rgba(123, 192, 67, 0.48);
  background: #ffffff;
}

.hero-panel-copy > div {
  max-width: 400px;
}

.hero-logo {
  width: min(100%, 500px);
  height: auto;
  filter: drop-shadow(0 14px 28px rgba(27, 104, 131, 0.08));
}

.hero-panel-copy h1 {
  font-size: clamp(2rem, 4.6vw, 3.15rem);
  line-height: 1.1;
  margin: 0 0 0.85rem;
  color: var(--secondary-dark);
  max-width: 12ch;
}

.lede {
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.3rem);
  line-height: 1.45;
  max-width: 30ch;
  margin: 0;
}

.search-shell {
  padding: 1.45rem 1.5rem 1.2rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(242, 251, 248, 0.96), rgba(238, 249, 245, 0.98));
  box-shadow: var(--shadow);
}

.hero-layout + .search-shell {
  margin-top: 0.8rem;
}

.hero-meta {
  margin: 0.95rem 0 0;
  color: var(--secondary-dark);
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
}

.search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  max-width: 690px;
  margin: 0 auto;
}
.search select,
.search input,
.access-form input,
.filters-form input,
.filters-form select,
.feedback-form input,
.feedback-form select,
.feedback-form textarea,
.course-feedback input,
.course-feedback select,
.course-feedback textarea {
  flex: 1;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.search input:focus,
.search select:focus,
.access-form input:focus,
.filters-form input:focus,
.filters-form select:focus,
.feedback-form input:focus,
.feedback-form select:focus,
.feedback-form textarea:focus,
.course-feedback input:focus,
.course-feedback select:focus,
.course-feedback textarea:focus {
  outline: 2px solid rgba(111, 197, 229, 0.34);
  outline-offset: 2px;
  border-color: rgba(111, 197, 229, 0.42);
}

.search button,
.filters-form button {
  padding: 1rem 1.65rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #083447;
  border: none;
  border-radius: 18px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 26px rgba(111, 197, 229, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.search button {
  min-width: 132px;
}
.search button:hover,
.filters-form button:hover {
  transform: translateY(-1px);
  filter: saturate(1.04);
  box-shadow: 0 18px 32px rgba(111, 197, 229, 0.28);
}

.filters-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  margin: 1rem 0 1.75rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field span {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--secondary-dark);
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.clear-link {
  color: var(--secondary-dark);
  text-decoration: none;
  font-weight: 600;
}

.clear-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

h1 { color: var(--secondary-dark); }
h2 {
  margin-top: 3rem;
  color: var(--secondary-dark);
  border-bottom: 1px solid rgba(27, 104, 131, 0.12);
  padding-bottom: 0.5rem;
}

.section-block {
  padding-top: 0.4rem;
}

.section-heading {
  margin: 0 0 1.4rem;
  font-size: clamp(1.6rem, 3vw, 2rem);
  padding-bottom: 0.8rem;
}

.profession-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.15rem;
}
.profession-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 112px;
  padding: 1.25rem 1.3rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 20px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 24px rgba(21, 56, 74, 0.05);
}
.profession-card:hover {
  border-color: rgba(123, 192, 67, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(21, 56, 74, 0.12);
}
.profession-card span {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 0.75rem;
}

.profession-card strong {
  font-size: 1.02rem;
  line-height: 1.35;
}

.course-list {
  display: grid;
  gap: 1.25rem;
  margin-top: 1rem;
}

.course-card {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem 1.65rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 14px 34px rgba(21, 56, 74, 0.06);
}
.course-card:hover {
  border-color: rgba(111, 197, 229, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 20px 38px rgba(21, 56, 74, 0.1);
}
.course-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
}
.course-card h3 a {
  color: var(--secondary-dark);
  text-decoration: none;
}
.course-card h3 a:hover { text-decoration: underline; }
.course-card .provider {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0.5rem 0;
}
.card-meta span { white-space: nowrap; }
.course-card .desc {
  margin: 0.75rem 0 0;
  color: var(--text);
}

.tags { margin: 0.5rem 0; }
.tag {
  display: inline-block;
  padding: 0.3rem 0.72rem;
  background: rgba(123, 192, 67, 0.14);
  color: var(--primary-dark);
  border-radius: 999px;
  font-size: 0.75rem;
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
}
.tag-topic { background: rgba(123, 192, 67, 0.18); color: #3f7d24; }
.tag-tech { background: rgba(111, 197, 229, 0.2); color: #0f607e; }

.course-detail {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: var(--shadow);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: rgba(223, 244, 251, 0.8);
  color: var(--secondary-dark);
  text-decoration: none;
  font-weight: 700;
  border: 1px solid rgba(27, 104, 131, 0.12);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.back-link:hover {
  transform: translateX(-2px);
  background: rgba(223, 244, 251, 1);
  border-color: rgba(111, 197, 229, 0.35);
}
.course-detail h1 { margin-top: 0; }
.course-detail h2 {
  border: none;
  margin-top: 1.5rem;
  font-size: 1.25rem;
}
.course-detail__cta {
  margin-top: 1.5rem;
  text-align: right;
}
.course-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.5rem 1.5rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(233, 247, 242, 0.9), rgba(223, 244, 251, 0.85));
  border-radius: 18px;
  margin: 1rem 0 1.5rem;
}

.cta {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #083447;
  text-decoration: none;
  border-radius: 14px;
  font-weight: 800;
  box-shadow: 0 16px 30px rgba(111, 197, 229, 0.24);
}
.cta:hover { filter: saturate(1.05); }

.confidence {
  margin-top: 2rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.empty {
  padding: 2rem;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}
.empty code {
  background: var(--bg-strong);
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  font-size: 0.875rem;
}

.access-page {
  min-height: 100vh;
}

.access-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.access-card {
  width: min(100%, 460px);
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
}

.access-logo {
  display: block;
  width: min(100%, 280px);
  height: auto;
  margin: 0 auto 1.5rem;
}

.access-kicker {
  margin: 0 0 0.35rem;
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.access-card h1 {
  margin: 0;
  font-size: 1.9rem;
  line-height: 1.15;
}

.access-copy {
  margin: 0.75rem 0 1.4rem;
  color: var(--muted);
}

.access-form {
  display: grid;
  gap: 1rem;
}

.access-form button {
  width: 100%;
  padding: 1rem 1.2rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #083447;
  border: none;
  border-radius: 18px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 26px rgba(111, 197, 229, 0.22);
}

.access-error {
  margin: -0.25rem 0 0;
  color: #8a1f1f;
  font-size: 0.92rem;
  font-weight: 700;
}

.flash-messages {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
}

.flash-message {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(27, 104, 131, 0.14);
  background: rgba(255, 255, 255, 0.9);
  color: var(--secondary-dark);
  font-weight: 700;
}

.flash-message--error {
  border-color: rgba(138, 31, 31, 0.28);
  color: #8a1f1f;
}

.feedback-bubble {
  position: fixed;
  right: 1.35rem;
  bottom: 1.35rem;
  z-index: 40;
  padding: 0.9rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  background: #15384a;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(21, 56, 74, 0.24);
}

.feedback-bubble:hover,
.feedback-bubble:focus-visible {
  background: var(--secondary-dark);
}

.feedback-modal[hidden] {
  display: none;
}

.feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: end;
  padding: 1.25rem;
}

.feedback-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 35, 48, 0.42);
}

.feedback-dialog {
  position: relative;
  width: min(100%, 440px);
  max-height: calc(100vh - 2.5rem);
  overflow: auto;
  padding: 1.45rem;
  border: 1px solid rgba(27, 104, 131, 0.16);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 26px 70px rgba(12, 35, 48, 0.28);
}

.feedback-dialog h2 {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 1.25rem;
}

.feedback-dialog__intro {
  margin: 0.55rem 2.4rem 1rem 0;
  color: var(--muted);
  line-height: 1.45;
}

.feedback-dialog__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--secondary-dark);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.feedback-form,
.course-feedback__issue-form {
  display: grid;
  gap: 0.9rem;
}

.feedback-form textarea,
.course-feedback textarea {
  min-height: 7rem;
  resize: vertical;
}

.field em {
  color: var(--muted);
  font-size: 0.82em;
  font-style: normal;
  font-weight: 600;
}

.feedback-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.feedback-actions button {
  padding: 0.85rem 1.2rem;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #083447;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(111, 197, 229, 0.22);
}

.feedback-actions button:disabled,
.thumb-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.feedback-status {
  min-height: 1.35rem;
  margin: 0;
  color: var(--secondary-dark);
  font-size: 0.92rem;
  font-weight: 700;
}

.feedback-status.is-error {
  color: #8a1f1f;
}

.feedback-honeypot,
.feedback-honeypot-input {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.course-feedback {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(27, 104, 131, 0.12);
}

.course-feedback h2 {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 1.08rem;
}

.course-feedback .meta {
  margin: 0.25rem 0 0;
}

.course-feedback__quick-actions {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 430px;
}

.course-feedback__vote-form {
  margin: 0;
}

.thumb-button {
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  border: 1px solid rgba(27, 104, 131, 0.16);
  border-radius: 999px;
  background: #ffffff;
  color: var(--secondary-dark);
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(21, 56, 74, 0.08);
  line-height: 1;
}

.thumb-button:hover,
.thumb-button:focus-visible {
  border-color: rgba(111, 197, 229, 0.46);
  box-shadow: 0 12px 24px rgba(21, 56, 74, 0.12);
}

.thumb-button.is-selected {
  border-color: rgba(123, 192, 67, 0.6);
  background: rgba(123, 192, 67, 0.16);
}

.course-feedback__details {
  position: relative;
}

.course-feedback__details summary {
  list-style: none;
}

.course-feedback__details summary::-webkit-details-marker {
  display: none;
}

.course-feedback__issue-form {
  margin: 0.75rem 0 4.25rem;
  width: min(88vw, 360px);
  padding: 1rem;
  border: 1px solid rgba(27, 104, 131, 0.16);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(21, 56, 74, 0.2);
}

.course-feedback__issue-form textarea {
  min-height: 5.5rem;
}

.course-feedback__status {
  grid-column: 1 / -1;
}

footer {
  background: rgba(255, 255, 255, 0.78);
  border-top: 1px solid rgba(27, 104, 131, 0.1);
  padding: 1.5rem 0;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}

@media (max-width: 920px) {
  .site-header__inner {
    min-height: 92px;
  }

  .hero-layout-inner {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    min-height: auto;
  }

  .hero-panel-copy {
    border-left: none;
    border-top: 1px solid rgba(123, 192, 67, 0.48);
    justify-content: center;
  }

  .hero-panel-copy h1,
  .lede {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 1.25rem;
  }

  .hero-layout-inner {
    padding: 0 1.25rem;
  }

  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    min-height: auto;
    padding: 1rem 0;
  }

  .site-nav a {
    display: inline-block;
    font-size: 1.1rem;
  }

  .site-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.65rem;
  }

  .search {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    padding: 1.8rem 1.25rem;
  }

  .hero-logo {
    width: min(100%, 320px);
  }

  .search-shell {
    padding: 1.2rem 1rem 1rem;
  }

  .filter-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .clear-link {
    text-align: center;
  }

  .feedback-bubble {
    right: 1rem;
    bottom: 1rem;
    padding: 0.8rem 1rem;
  }

  .feedback-modal {
    align-items: end;
    padding: 0;
  }

  .feedback-dialog {
    width: 100%;
    max-height: calc(100vh - 1rem);
    border-radius: 18px 18px 0 0;
  }

  .course-feedback {
    grid-template-columns: 1fr;
  }

  .course-feedback__quick-actions {
    justify-content: flex-start;
    max-width: none;
  }

  .course-feedback__details[open] {
    width: 100%;
  }

  .course-feedback__issue-form {
    right: auto;
    left: 0;
    width: 100%;
  }
}
