:root {
  color: #19172b;
  background: #fff;
  font: 100%/1.55 "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --muted: #514d67;
  --accent: #5034bc;
  --outline: #dfd8f1;
  --section: #f6f4fb;
}

* { box-sizing: border-box; }

body, h1, h2, h3, p, figure, ul { margin: 0; }

a {
  color: inherit;
  text-underline-offset: .2em;
}

a:focus-visible {
  outline: 3px solid #7e5de6;
  outline-offset: 4px;
}

.wrap {
  width: min(100% - 3rem, 73rem);
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid #eae5f3;
}

.header-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.header-inner { min-height: 5.1rem; }

.brand {
  display: grid;
  gap: .1rem;
  text-decoration: none;
}

.brand strong {
  font-size: 1.45rem;
  font-weight: 760;
  letter-spacing: -.04em;
  line-height: 1.14;
  white-space: nowrap;
}

.brand strong span { color: var(--accent); }

.company {
  color: var(--muted);
  font-size: .875rem;
  white-space: nowrap;
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(.8rem, 2.75vw, 2rem);
}

nav a {
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-size: .9rem;
  white-space: nowrap;
}

nav a:hover, .footer-inner a:hover { color: var(--accent); }

nav .nav-primary {
  padding: .5rem .95rem;
  border: 1px solid var(--outline);
  border-radius: .65rem;
  color: #34227e;
  font-weight: 650;
}

nav .nav-primary:hover, .button-secondary:hover { background: #eee7ff; }

.hero { background: linear-gradient(110deg, #f9f7ff, #f0eafb); }

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.13fr);
  gap: clamp(1.8rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(2.8rem, 5.5vw, 5rem);
}

h1 {
  margin-bottom: 1.25rem;
  font-size: clamp(2.55rem, 4.8vw, 4.25rem);
  font-weight: 760;
  line-height: 1.15;
  letter-spacing: -.045em;
}

.hero-copy p {
  max-width: 29rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1.8rem;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: .7rem 1.05rem;
  min-height: 2.85rem;
  border: 1px solid transparent;
  border-radius: .7rem;
  font-size: .95rem;
  font-weight: 680;
  text-decoration: none;
}

.button-primary {
  background: var(--accent);
  color: #fff;
}

.button-primary:hover { background: #412998; }

.button-secondary {
  border-color: var(--outline);
  background: #fff;
  color: #33236e;
}

.hero-visual {
  position: relative;
  overflow: hidden;
  border-radius: 1.45rem;
  box-shadow: 0 .75rem 1.7rem #32205719;
}

.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-visual figcaption {
  position: absolute;
  bottom: .7rem;
  right: .7rem;
  padding: .2rem .55rem;
  border-radius: .4rem;
  color: #332360;
  background: #f7f3ff;
  font-size: .8125rem;
}

.content-section, .topic-section { padding-block: clamp(2.6rem, 5vw, 4rem); }

h2 {
  margin-bottom: 1.35rem;
  font-size: clamp(1.55rem, 2.8vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: -.02em;
}

.resources {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .9rem;
}

.resource-card {
  display: block;
  min-height: 8.5rem;
  padding: 1.12rem 1.25rem;
  border: 1px solid #e7def5;
  border-radius: .95rem;
  background: #faf8fe;
  text-decoration: none;
}

.resource-card:nth-child(2) {
  border-color: #deebfa;
  background: #f4f9ff;
}

.resource-card:nth-child(3) {
  border-color: #dcefeb;
  background: #f1faf8;
}

.resource-card:hover, .topics a:hover {
  border-color: #a991e9;
  background: #f2ecff;
}

.resource-card h3 {
  margin-bottom: .5rem;
  color: #39268a;
  font-size: 1.13rem;
  line-height: 1.38;
}

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

.topic-section { background: var(--section); }

.topics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  padding: 0;
  list-style: none;
}

.topics a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .6rem 1.1rem;
  min-height: 3.5rem;
  padding: .95rem 1rem;
  border: 1px solid #e5def3;
  border-radius: .8rem;
  background: #fff;
  text-decoration: none;
}

.topics span {
  color: #352480;
  font-weight: 650;
}

.topics small {
  color: var(--muted);
  font-size: .875rem;
}

footer { border-top: 1px solid #e9e3f1; }

.footer-inner {
  min-height: 5rem;
  font-size: .875rem;
}

.footer-inner a {
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 54rem) {
  .topics a {
    flex-direction: column;
    min-height: 4.3rem;
    gap: .25rem;
  }
}

@media (max-width: 44rem) {
  .wrap { width: calc(100% - 2rem); }

  .header-inner {
    flex-wrap: wrap;
    gap: .7rem;
    padding-block: .9rem;
  }

  nav {
    width: 100%;
    gap: .95rem;
  }

  nav .nav-primary { margin-left: auto; }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 1.65rem;
  }

  .hero-visual { border-radius: 1rem; }

  .resources, .topics { grid-template-columns: 1fr; }

  .resource-card {
    min-height: auto;
    padding: .95rem 1rem;
  }

  .topics a {
    min-height: auto;
    padding: .8rem 1rem;
  }
}

@media (max-width: 23rem) {
  nav { gap: .65rem; }
  nav a { font-size: .85rem; }
  nav .nav-primary { padding-inline: .6rem; }
}
