:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #5d6773;
  --line: #dfe5ea;
  --paper: #ffffff;
  --soft: #f6f8f7;
  --green: #1f6f5b;
  --blue: #235a97;
  --gold: #916900;
  --rose: #a4455a;
  --shadow: 0 14px 40px rgba(23, 32, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 14px clamp(18px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 8px;
  color: #fff;
  background: var(--green);
  font-size: 14px;
  font-weight: 800;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.15;
}

.brand p {
  color: var(--muted);
  font-size: 13px;
}

.source-link,
.meta-row button,
.card a {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  font-weight: 700;
}

.source-link {
  padding: 9px 12px;
  white-space: nowrap;
  color: var(--blue);
  font-size: 13px;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(36px, 7vw, 72px) 0 24px;
}

.intro-copy {
  max-width: 760px;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.intro h2 {
  max-width: 760px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 0.98;
  letter-spacing: 0;
}

.intro p:last-child {
  max-width: 690px;
  margin-top: 18px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
}

.intro img {
  width: 100%;
  min-height: 180px;
  max-height: 320px;
  object-fit: contain;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.paths {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 10px 0 18px;
}

.path {
  min-height: 122px;
  padding: 16px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: none;
  cursor: pointer;
}

.path:hover {
  border-color: #b8c7d3;
  box-shadow: var(--shadow);
}

.path span {
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.path strong,
.path small {
  display: block;
}

.path strong {
  margin-top: 6px;
  font-size: 17px;
}

.path small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.controls {
  display: grid;
  grid-template-columns: 1.7fr repeat(3, minmax(145px, 0.7fr));
  gap: 10px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input,
select {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 15px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin: 16px 0;
  color: var(--muted);
}

.meta-row button {
  min-height: 38px;
  padding: 7px 11px;
  color: var(--blue);
  cursor: pointer;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding-bottom: 60px;
}

.card {
  display: flex;
  min-height: 310px;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.card:hover {
  border-color: #b8c7d3;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.byline {
  color: var(--muted);
  font-size: 14px;
}

.summary {
  color: #39444f;
  font-size: 15px;
}

.useful {
  margin-top: auto;
  padding-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.badge {
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf2f4;
  color: #32414f;
  font-size: 12px;
  font-weight: 800;
}

.badge.topic {
  background: #e6f2ee;
  color: var(--green);
}

.badge.advanced {
  background: #f5e9ec;
  color: var(--rose);
}

.badge.intermediate {
  background: #eef2f8;
  color: var(--blue);
}

.badge.beginner {
  background: #f6eed8;
  color: var(--gold);
}

.card a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  margin-top: 2px;
  padding: 8px 11px;
  color: var(--blue);
}

.empty {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px dashed #b8c7d3;
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
}

footer {
  padding: 24px clamp(18px, 4vw, 48px) 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
  font-size: 14px;
}

@media (max-width: 900px) {
  .intro,
  .controls,
  .resource-grid {
    grid-template-columns: 1fr;
  }

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

  .intro {
    padding-top: 32px;
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .source-link {
    display: none;
  }

  main {
    width: min(100% - 24px, 1180px);
  }

  .intro h2 {
    font-size: 38px;
  }

  .meta-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
