:root {
  color-scheme: light;
  --background: #f7f9f7;
  --ink: #192a23;
  --line: #e0e8e1;
  --green: #246047;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--ink);
}

.wrap {
  width: min(100% - 48px, 1080px);
  margin-inline: auto;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  min-height: 66px;
  gap: 11px;
}

.brand h1 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
}

.brand-mark {
  position: relative;
  width: 29px;
  height: 29px;
  border-radius: 8px;
  background: #28644c;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  background: #e6f6e8;
  border-radius: 80% 0 80% 0;
}

.brand-mark::before {
  top: 7px;
  left: 9px;
  width: 12px;
  height: 11px;
}

.brand-mark::after {
  top: 15px;
  left: 7px;
  width: 7px;
  height: 6px;
  opacity: .78;
  transform: rotate(83deg);
}

main { padding-block: clamp(24px, 5vw, 60px) 64px; }

.site-footer {
  margin-top: auto;
  padding: 20px 18px;
  text-align: center;
  font-size: .875rem;
}

.site-footer a {
  color: #52645c;
  text-underline-offset: .2em;
}

.tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.card {
  height: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: clamp(14px, 1.8vw, 24px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: inherit;
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.card:hover, .card:focus-visible {
  border-color: #8dac9a;
  box-shadow: 0 6px 20px #203f2810;
}

.card:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}

.icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 13px;
}

.projects .icon { background: #e9f3ed; color: #2d6a50; }
.handbook .icon { background: #edf1fb; color: #465f94; }
.library .icon { background: #fbf1e5; color: #825626; }

.icon > span {
  position: relative;
  display: block;
  width: 22px;
  height: 20px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.icon > span::before, .icon > span::after {
  position: absolute;
  content: "";
}

.icon-projects::before {
  inset: 5px 0 auto;
  border-top: 2px solid;
}

.icon-projects::after {
  top: 8px;
  left: 6px;
  border: 3px solid transparent;
  border-left: 5px solid currentColor;
}

.icon-handbook::before {
  inset: 0 auto 0 5px;
  border-right: 2px solid;
}

.icon-handbook::after {
  top: 5px;
  left: 9px;
  width: 5px;
  border-top: 2px solid;
  box-shadow: 0 4px currentColor;
}

.icon-library {
  overflow: hidden;
}

.icon-library::before {
  top: 2px;
  right: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.icon-library::after {
  bottom: -6px;
  left: 2px;
  width: 10px;
  height: 12px;
  border: 2px solid;
  border-radius: 3px;
  transform: rotate(45deg);
}

.card h2 {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.4;
}

.open {
  border-radius: 7px;
  padding: 5px 10px;
  background: #edf4ef;
  color: var(--green);
  font-size: .875rem;
  font-weight: 650;
}

.card:hover .open, .card:focus-visible .open { background: #dfede3; }

@media (max-width: 820px) {
  .wrap { width: min(100% - 36px, 560px); }
  .tools { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  main { padding-bottom: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
}
