:root {
  --ink: #16211d;
  --muted: #5f6d66;
  --paper: #f7f3ea;
  --panel: #fffaf0;
  --line: #d9d0bd;
  --accent: #0f6b5d;
  --accent-strong: #083f37;
  --warm: #c7522a;
  --blue: #1f5f8b;
  --shadow: 0 20px 70px rgba(22, 33, 29, .12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(22, 33, 29, .035) 1px, transparent 1px),
    linear-gradient(rgba(22, 33, 29, .03) 1px, transparent 1px),
    var(--paper);
  background-size: 38px 38px;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(22, 33, 29, .14);
  background: rgba(247, 243, 234, .88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 54px;
  height: 54px;
  object-fit: contain;
  flex: 0 0 auto;
}

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

.brand small {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.top-nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
}

.top-nav a,
.site-footer a {
  text-decoration-color: rgba(15, 107, 93, .35);
  text-underline-offset: 4px;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: end;
  min-height: 72vh;
  padding: clamp(60px, 9vw, 120px) 0 52px;
}

.eyebrow,
.panel-kicker,
.tag,
.crumbs {
  color: var(--warm);
  font: 700 12px/1.2 Verdana, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.02;
  letter-spacing: 0;
}

h1 {
  max-width: 980px;
  font-size: clamp(46px, 8vw, 96px);
}

h2 {
  font-size: clamp(32px, 5vw, 60px);
}

h3 {
  font-size: 28px;
}

.lede {
  max-width: 740px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 24px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid var(--ink);
  text-decoration: none;
  font: 700 14px/1 Verdana, sans-serif;
}

.button.primary {
  background: var(--ink);
  color: white;
}

.button.secondary {
  background: var(--panel);
  box-shadow: 4px 4px 0 rgba(22, 33, 29, .18);
}

.hero-panel,
.term-card,
.term-quick,
.term-section,
.path-list a,
.method {
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, .82);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 24px;
}

.hero-panel ul {
  margin: 18px 0 0;
  padding-left: 22px;
}

.search-section {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 470px);
  gap: 24px;
  align-items: end;
  padding: 46px 0 26px;
  border-top: 2px solid var(--ink);
}

.search-box {
  display: grid;
  gap: 8px;
  font: 700 12px/1 Verdana, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.search-box input {
  width: 100%;
  min-height: 52px;
  border: 2px solid var(--ink);
  background: white;
  color: var(--ink);
  padding: 0 16px;
  font: 18px/1.2 Georgia, serif;
  outline: none;
}

.search-box input:focus {
  box-shadow: 0 0 0 4px rgba(15, 107, 93, .18);
}

.terms-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  padding: 24px 0 62px;
}

.term-card {
  min-height: 230px;
  padding: 20px;
  transition: transform .18s ease, box-shadow .18s ease;
}

.term-card:hover {
  transform: translateY(-4px);
  box-shadow: 8px 12px 0 rgba(22, 33, 29, .16);
}

.term-card h3 {
  margin-top: 24px;
}

.term-card h3 a {
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.term-card p {
  color: var(--muted);
}

.term-card.is-hidden {
  display: none;
}

.learning-paths,
.method {
  margin: 20px 0 72px;
}

.path-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.path-list a {
  display: grid;
  gap: 8px;
  padding: 22px;
  text-decoration: none;
}

.path-list span {
  color: var(--muted);
}

.method {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 30px;
  padding: 30px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.auth-page {
  display: grid;
  min-height: 100vh;
  width: min(760px, calc(100% - 36px));
  place-items: center;
  padding: 42px 0;
}

.auth-card {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, .9);
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 46px);
}

.auth-card h1 {
  margin-top: 26px;
  font-size: clamp(38px, 7vw, 68px);
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  font: 700 12px/1 Verdana, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.auth-form input {
  min-height: 54px;
  border: 2px solid var(--ink);
  background: white;
  color: var(--ink);
  padding: 0 16px;
  font: 18px/1.2 Georgia, serif;
}

.auth-form .check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font: 14px/1.4 Georgia, serif;
  letter-spacing: 0;
  text-transform: none;
}

.auth-form .check-row input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
}

.auth-error {
  border-left: 5px solid var(--warm);
  background: white;
  padding: 14px 16px;
}

.auth-note {
  color: var(--muted);
}

.term-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 30px;
  padding: 54px 0 80px;
}

.term-main {
  min-width: 0;
}

.crumbs {
  margin-bottom: 18px;
}

.term-title {
  margin-bottom: 18px;
}

.term-definition {
  max-width: 760px;
  color: var(--muted);
  font-size: 24px;
}

.term-section {
  margin-top: 18px;
  padding: 26px;
}

.term-section h2 {
  margin-bottom: 14px;
  font-size: 32px;
}

.term-section ul,
.term-section ol {
  padding-left: 22px;
}

.example-box {
  border-left: 5px solid var(--accent);
  background: white;
  padding: 18px;
}

.term-quick {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 22px;
}

.term-quick h2 {
  font-size: 24px;
}

.term-quick a {
  display: block;
  margin-top: 10px;
  color: var(--accent-strong);
}

.related {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.related a {
  border: 1px solid var(--line);
  background: white;
  padding: 6px 10px;
  text-decoration: none;
  font: 700 12px/1 Verdana, sans-serif;
}

@media (max-width: 980px) {
  .hero,
  .search-section,
  .method,
  .term-layout {
    grid-template-columns: 1fr;
  }

  .terms-grid,
  .path-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .term-quick {
    position: static;
  }
}

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

  .top-nav {
    width: 100%;
    justify-content: space-between;
  }

  h1 {
    font-size: 44px;
  }

  .terms-grid,
  .path-list {
    grid-template-columns: 1fr;
  }

  .term-card {
    min-height: auto;
  }
}
