:root {
  --forest: #234638;
  --forest-dark: #173128;
  --meadow: #72865c;
  --cream: #ffffff;
  --paper: #fffdf8;
  --wood: #8a6142;
  --roof: #a64d38;
  --text: #20231f;
  --muted: #6f746d;
  --line: #dcd8cd;
  --soft-green: #edf1e9;
  --shadow: 0 14px 38px rgba(32, 48, 39, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: #ffffff;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.wrap {
  width: min(820px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  color: white;
  background:
    linear-gradient(180deg, rgba(23,49,40,.12), rgba(23,49,40,.76)),
    linear-gradient(135deg, #69836b, #274c3d 62%, #173128);
}

.site-header::before,
.site-header::after {
  content: "";
  position: absolute;
  left: -8%;
  width: 116%;
  pointer-events: none;
}

.site-header::before {
  bottom: 52px;
  height: 155px;
  opacity: .34;
  background: var(--forest-dark);
  clip-path: polygon(
    0 100%, 0 78%, 9% 52%, 17% 67%, 29% 28%, 39% 62%,
    51% 20%, 63% 60%, 76% 33%, 88% 68%, 100% 42%, 100% 100%
  );
}

.site-header::after {
  bottom: -1px;
  height: 105px;
  background: #ffffff;
  clip-path: polygon(
    0 100%, 0 62%, 8% 57%, 13% 42%, 18% 62%,
    26% 54%, 32% 66%, 38% 50%, 45% 60%,
    53% 45%, 60% 60%, 67% 51%, 74% 64%,
    83% 49%, 91% 62%, 100% 53%, 100% 100%
  );
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  letter-spacing: -.03em;
}

.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 50%;
  background: rgba(255,255,255,.10);
}

.brand-mark::before {
  content: "";
  position: absolute;
  left: 9px;
  bottom: 9px;
  width: 20px;
  height: 14px;
  background: white;
  clip-path: polygon(0 100%, 35% 35%, 49% 61%, 70% 7%, 100% 100%);
}

.brand span:last-child {
  font-size: 1.15rem;
}

.top-link {
  color: rgba(255,255,255,.78);
  font-size: .9rem;
}

.hero {
  position: relative;
  z-index: 2;
  padding: 64px 0 108px;
}

.kicker {
  margin-bottom: 11px;
  color: rgba(255,255,255,.72);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1 {
  max-width: 660px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.7rem, 8vw, 5.2rem);
  font-weight: 600;
  line-height: .98;
  letter-spacing: -.045em;
}

.hero p {
  max-width: 570px;
  margin-top: 18px;
  color: rgba(255,255,255,.78);
  font-size: 1rem;
  line-height: 1.65;
}

main {
  padding: 34px 0 72px;
  background: #ffffff;
}

.intro-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
}

.intro-row h2 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--forest-dark);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -.03em;
}

.intro-row p {
  max-width: 300px;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.5;
  text-align: right;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.62);
}

.search span {
  color: var(--meadow);
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.search input::placeholder {
  color: #979b95;
}

.category-list {
  border-top: 1px solid var(--line);
}

details {
  border-bottom: 1px solid var(--line);
}

summary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 3px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  margin-left: auto;
  color: var(--forest);
  font-size: 1.35rem;
  font-weight: 300;
  transition: transform .2s ease;
}

details[open] summary::after {
  transform: rotate(45deg);
}

.category-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  color: var(--forest);
  background: var(--soft-green);
  font-size: 1rem;
}

.category-name {
  font-weight: 800;
  color: var(--forest-dark);
}

.category-count {
  margin-left: 7px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 400;
}

.links {
  padding: 0 0 14px 50px;
}

.link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 4px;
  border-top: 1px dashed #dfddd4;
  transition: padding-left .18s ease, color .18s ease;
}

.link-row:hover {
  padding-left: 7px;
  color: var(--roof);
}

.link-row:first-child {
  border-top: 0;
}

.link-info strong {
  display: block;
  margin-bottom: 3px;
  font-size: .97rem;
}

.link-info span {
  display: block;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.4;
}

.external {
  flex: 0 0 auto;
  color: var(--wood);
  font-size: 1rem;
}

.empty-message {
  display: none;
  padding: 22px 0;
  color: var(--muted);
  text-align: center;
}

.add-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding: 19px 20px;
  border-left: 4px solid var(--roof);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.add-link strong {
  display: block;
  margin-bottom: 4px;
  color: var(--forest-dark);
}

.add-link p {
  color: var(--muted);
  font-size: .87rem;
  line-height: 1.45;
}

.add-link a {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  color: white;
  background: var(--forest);
  font-size: .84rem;
  font-weight: 800;
}

footer {
  padding: 0 0 30px;
  color: var(--muted);
  font-size: .82rem;
  background: #ffffff;
}

.footer-line {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

@media (max-width: 600px) {
  .wrap {
    width: min(100% - 22px, 820px);
  }

  .site-header {
    min-height: 310px;
  }

  .top-link {
    display: none;
  }

  .hero {
    padding-top: 54px;
  }

  .intro-row {
    display: block;
  }

  .intro-row p {
    margin-top: 8px;
    text-align: left;
  }

  .links {
    padding-left: 0;
  }

  .add-link {
    align-items: flex-start;
    flex-direction: column;
  }

  .add-link a {
    width: 100%;
    text-align: center;
  }

  .footer-line {
    flex-direction: column;
    gap: 6px;
  }