* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f8f6f0;
  color: #202427;
  font:
    16px/1.55 system-ui,
    sans-serif;
}
header {
  background: #171b1d;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 15px 4%;
  border-bottom: 3px solid #c8994a;
}
header a {
  color: #fff;
}
header a:last-child {
  margin-left: auto;
  font-size: 0.9rem;
}
.brand {
  font:
    600 1.65rem Georgia,
    serif;
  text-decoration: none;
}
.layout {
  display: grid;
  grid-template-columns: minmax(170px, 215px) minmax(0, 1fr);
  max-width: 1500px;
  margin: auto;
}
nav {
  padding: 30px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
nav a {
  color: inherit;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 4px;
}
nav a.active {
  background: #242b2b;
  color: white;
}
main {
  padding: 32px clamp(18px, 4vw, 60px) 80px;
  border-left: 1px solid #d8d4ca;
  min-height: 90vh;
  min-width: 0;
}
h1,
h2,
h3 {
  line-height: 1.17;
}
h1 {
  font:
    500 clamp(2.1rem, 5vw, 3.4rem) Georgia,
    serif;
  margin: 0.3em 0 0.55em;
}
h2 {
  font:
    500 1.65rem Georgia,
    serif;
  margin: 1.5em 0 0.6em;
}
#identity {
  font-size: 0.9rem;
  color: #56584e;
}
.stats,
.fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: 14px;
}
.stats div,
article,
details {
  background: white;
  border: 1px solid #dad6ca;
  border-radius: 5px;
  padding: 15px;
}
.stats strong {
  font:
    2rem Georgia,
    serif;
  display: block;
}
article,
details {
  margin: 0.65rem 0;
}
summary {
  font-weight: 650;
  cursor: pointer;
}
form {
  margin: 14px 0;
}
label {
  display: grid;
  align-content: start;
  gap: 4px;
  font-size: 0.9rem;
  font-weight: 600;
}
input,
select,
textarea,
button {
  font: inherit;
  padding: 9px;
  border: 1px solid #a5a599;
  border-radius: 3px;
  max-width: 100%;
  width: 100%;
}
textarea {
  min-height: 65px;
}
button,
.btn {
  width: auto;
  cursor: pointer;
  background: #202b2b;
  color: white;
  text-decoration: none;
  display: inline-block;
  padding: 9px 16px;
  border: 0;
  margin-top: 12px;
  border-radius: 3px;
}
p {
  max-width: 76ch;
}
a {
  color: #354d4b;
}
button:disabled {
  opacity: 0.6;
}
#notice:not(:empty) {
  background: #fff1cb;
  padding: 10px;
  margin: 10px 0;
}
small {
  color: #555;
}
details details {
  background: #f8f7f2;
}
meter {
  width: 100%;
  max-width: 360px;
}
.row {
  border-top: 1px solid #ddd9ce;
  padding: 10px 0;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.visually {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
@media (max-width: 700px) {
  .layout {
    display: block;
  }
  nav {
    flex-direction: row;
    overflow: auto;
    padding: 12px;
  }
  nav a {
    white-space: nowrap;
  }
  main {
    border: 0;
    padding: 16px;
  }
  header {
    gap: 10px;
  }
  header span {
    display: none;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(275px, 100%), 1fr));
  gap: 16px;
  align-items: start;
}
.catalog-grid article {
  display: grid;
  grid-template-rows: var(--course-intro, auto) var(--course-actions, auto);
  align-items: start;
  margin: 0;
}
.course-intro, .course-actions { display: flow-root; min-width: 0; }
.course-actions .btn { display: block; text-align: center; }
.catalog-grid h3 { margin: 8px 0; }
.catalog-grid details { margin-top: 12px; padding: 8px 12px; }
