:root {
  color-scheme: light;
  --ink: #192e2b;
  --muted: #52665d;
  --green: #216650;
  --paper: #f4f6f2;
  --line: #dce5df;
}

* { box-sizing: border-box; }
[hidden], .directory-status:empty { display: none; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.65 system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

.shell {
  width: min(1100px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  background: #fafbf8;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-height: 74px;
  padding-block: 10px;
}

.header-inner a { text-decoration: none; }
.header-inner a:hover { text-decoration: underline; }
.brand {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  white-space: nowrap;
}
.brand-title { flex: 0 0 auto; width: clamp(124px, 23vw, 174px); }
.brand-title img { display: block; width: 100%; height: auto; }
.brand-separator, .brand-subtitle {
  color: #5d7069;
  font: 600 15px/1.3 system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.header-inner nav { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px 16px; margin-inline-start: auto; }
.header-inner nav a { font-size: .9375rem; font-weight: 600; }

main { flex: 1; }

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 24px;
  padding-block: 48px 40px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 3.625rem);
  letter-spacing: -.045em;
  line-height: 1.22;
}

.hero-art {
  display: grid;
  place-items: center;
  min-height: 196px;
  border: 1px solid #cfdfd3;
  border-radius: 20px;
  background-color: #e7efe5;
  background-image:
    linear-gradient(#73938126 1px, transparent 1px),
    linear-gradient(90deg, #73938126 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: center;
}

.book {
  position: relative;
  width: 96px;
  height: 68px;
  border: 3px solid var(--green);
  border-radius: 10px;
  background: #fafbf8;
  box-shadow: 6px 8px 0 #b5cbbb;
  transform: rotate(-9deg);
}

.book::before {
  position: absolute;
  inset: 0 auto 0 50%;
  border-left: 2px solid var(--green);
  content: "";
}

.book::after {
  position: absolute;
  top: 20px;
  left: 12px;
  width: 19px;
  height: 2px;
  background: #759d89;
  box-shadow: 0 10px #759d89, 45px 0 #759d89, 45px 10px #759d89;
  content: "";
}

.tools { padding-block: 24px 56px; border-top: 1px solid var(--line); }
.tools h2 { margin: 0 0 16px; font-size: 1.5rem; }

.directory-status, .tool-card {
  margin: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  overflow-wrap: anywhere;
}

.directory-status { color: var(--muted); }
.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool-card a { font-weight: 650; }
.site-footer {
  padding-block: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .875rem;
}

@media (max-width: 680px) {
  .shell { width: calc(100% - 36px); }
  .header-inner { min-height: 64px; gap: 8px 12px; }
  .hero { grid-template-columns: 1fr; padding-block: 32px; }
  .hero-art { min-height: 144px; }
  .tool-grid { grid-template-columns: 1fr; }
  .tools { padding-block-end: 40px; }
}

.account-panel { padding-block-end: 28px; }
.account-panel p { margin-top: 0; }
.account-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.account-buttons form { margin: 0; }
.account-buttons button {
  border: 1px solid var(--green);
  border-radius: 8px;
  padding: 8px 14px;
  background: var(--green);
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.account-buttons button.account-secondary { background: #fff; color: var(--green); }
.account-buttons button:disabled { opacity: .6; cursor: wait; }
.account-status:not(:empty) { margin: 14px 0 0; }

header #header-points {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  padding: 5px 11px;
  border: 1px solid #d5e3da;
  border-radius: 10px;
  background: #edf4ef;
  color: #216650;
  font-family: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.45;
  text-decoration: none;
  white-space: nowrap;
}

header #header-points:hover { background: #e3eee6; }
header #header-points strong { font-size: 1.25rem; font-weight: 750; }
header #header-points .header-point-details { color: #52665d; font-size: .75rem; }
header #header-points[hidden], header #header-points [hidden] { display: none; }
