:root {
  color-scheme: light dark;
  font: 16px/1.65 system-ui, "Microsoft YaHei", sans-serif;
  --background: #f5f7fa;
  --surface: #fff;
  --text: #172234;
  --muted: #445470;
  --border: #d6dee9;
  --link: #16478c;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #121923;
    --surface: #1c2736;
    --text: #e9eff8;
    --muted: #bdcadb;
    --border: #3a4b63;
    --link: #add1ff;
  }
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
}

a { color: var(--link); }

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

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

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

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 60px;
}

.brand {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 750;
  text-decoration: none;
}

main { padding-block: clamp(2rem, 8vw, 5rem); }

.intro { margin-bottom: 2rem; }

h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1.25;
}

.intro p { margin: 0; color: var(--muted); }

h2 { margin: 0 0 1rem; font-size: 1.2rem; }

.directory {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.directory a {
  display: block;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  text-decoration: none;
}

.directory a:hover { text-decoration: underline; }

@font-face {
  font-family: Satisfy;
  src: url('/fonts/Satisfy.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.seo-home {
  font-size: 15px;
  line-height: 1.55;
  --background: #f7f8f6;
  --surface: #fff;
  --text: #202923;
  --muted: #53615a;
  --border: #dce3dc;
  --link: #176347;
  --home-action: #174b39;
  --home-action-text: #fff;
  --home-accent: #eaf2eb;
}

@media (prefers-color-scheme: dark) {
  .seo-home {
    --background: #171917;
    --surface: #202421;
    --text: #f0f4ed;
    --muted: #bac6be;
    --border: #3a453d;
    --link: #98e0b7;
    --home-action: #75cc9a;
    --home-action-text: #13271b;
    --home-accent: #25382d;
  }
}

.seo-home .practice-app-topbar {
  position: relative;
  z-index: 1;
  color: #ddd;
  background: #343434;
}

.seo-home .practice-static-preview-nav {
  box-sizing: border-box;
  min-height: 50px;
  max-width: 1280px;
  padding-inline: 16px;
  margin-inline: auto;
}

.seo-home .practice-static-preview-nav > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.seo-home .practice-brand {
  font: 700 24px/1 Satisfy, cursive;
}

.seo-home .practice-static-preview-series summary {
  align-content: center;
  min-height: 44px;
}

.seo-home .practice-static-preview-series ul {
  top: calc(100% + 3px);
}

.seo-home .practice-static-preview-nav :is(a, summary):focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.seo-home .wrap {
  box-sizing: border-box;
  width: min(1024px, 100%);
  padding-inline: clamp(16px, 4.5vw, 48px);
  padding-block: clamp(24px, 5vw, 50px) 36px;
}

.seo-home main :is(h1, h2, h3, p, ul) { margin: 0; }
.seo-home main ul { padding: 0; list-style: none; }

.seo-home .intro { margin-bottom: clamp(18px, 3vw, 32px); }

.seo-home .intro h1 {
  font-size: clamp(30px, 5vw, 53px);
  font-weight: 760;
  line-height: 1.12;
  letter-spacing: -.04em;
}

.seo-home .intro p { margin-top: 11px; color: var(--muted); }

.seo-home .focus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.seo-home .focus-card {
  display: grid;
  align-content: start;
  gap: 15px;
  min-width: 0;
  padding: clamp(13px, 2.1vw, 22px);
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
}

.seo-home .focus-card h2 {
  font-size: clamp(19px, 2.5vw, 25px);
  font-weight: 740;
  line-height: 1.28;
  letter-spacing: -.02em;
}

.seo-home .focus-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.seo-home .home-action {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  padding: 6px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.seo-home .home-action.primary { color: var(--home-action-text); background: var(--home-action); }
.seo-home .home-action.primary:hover { background: var(--text); }
.seo-home .home-action.secondary { color: var(--home-action); border: 1px solid var(--border); }
.seo-home .home-action.secondary:hover { background: var(--home-accent); }

.seo-home .paper-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1px 9px;
  min-width: 0;
  border-top: 1px solid var(--border);
  padding-top: 2px;
}

.seo-home .paper-list h3 { font-size: 13px; color: var(--muted); font-weight: 550; }
.seo-home .paper-list ul { display: flex; gap: 4px; }

.seo-home .paper-list a {
  display: grid;
  place-items: center;
  min-width: 38px;
  min-height: 44px;
  color: var(--home-action);
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}

.seo-home .paper-list a:hover { text-decoration: underline; }
.seo-home .other-subjects { margin-top: clamp(24px, 4vw, 38px); }
.seo-home .other-subjects h2 { margin-bottom: 10px; font-size: 21px; font-weight: 720; }

.seo-home .subject-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 20px;
}

.seo-home .subject-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 44px;
  border-top: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
}

.seo-home .subject-links a:hover { color: var(--link); text-decoration: underline; }
.seo-home .subject-links a > span { color: var(--link); }

@media (min-width: 691px) and (max-width: 820px) {
  .seo-home .home-action [aria-hidden] { display: none; }
}

@media (max-width: 720px) {
  .seo-home .practice-static-preview-nav { padding-inline: 12px; }
  .seo-home .practice-brand { font-size: 20px; }
  .seo-home .practice-static-preview-series a { min-height: 44px; align-content: center; box-sizing: border-box; }
}

@media (max-width: 690px) {
  .seo-home .focus-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .seo-home .focus-card { gap: 8px; }
  .seo-home .paper-list a { min-width: 44px; }
  .seo-home .subject-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
}

@media (max-width: 480px) {
  .seo-home .subject-links a { font-size: 13px; }
}
