:root {
  --ink: #18212f;
  --muted: #5c6878;
  --line: #dbe6ef;
  --paper: #ffffff;
  --soft: #f4f9fc;
  --cream: #fffaf2;
  --blue: #2f7fb8;
  --blue-soft: #e6f3fb;
  --coral: #e97865;
  --coral-soft: #fff0ed;
  --yellow: #f6c657;
  --green: #4d9c7a;
  --shadow: 0 18px 50px rgba(29, 58, 86, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fbfdff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  line-height: 1.8;
}

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

img {
  max-width: 100%;
  display: block;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(24px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: white;
  background: var(--blue);
  border-radius: 8px;
}

.nav,
.footer nav,
.tag-row,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
}

.nav a,
.footer a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.hero {
  display: grid;
  grid-template-columns: minmax(360px, 520px) minmax(420px, 600px);
  align-items: center;
  gap: clamp(28px, 4vw, 56px);
  justify-content: center;
  min-height: auto;
  padding: clamp(30px, 3.4vw, 46px) clamp(36px, 6vw, 96px);
  background:
    linear-gradient(90deg, rgba(246, 251, 255, 0.96) 0%, rgba(255, 250, 242, 0.86) 100%),
    linear-gradient(180deg, #ffffff 0%, #f5fbff 100%);
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  margin: 0;
  font-size: clamp(3.4rem, 5vw, 5.7rem);
  line-height: 1.05;
  letter-spacing: 0;
  white-space: nowrap;
}

.hero p {
  max-width: 560px;
  color: var(--muted);
  font-size: 1.16rem;
}

.hero-art {
  position: relative;
  margin: 0;
}

.hero-art img {
  width: 100%;
  height: clamp(280px, 28vw, 380px);
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-art figcaption {
  position: absolute;
  left: 18px;
  bottom: 18px;
  max-width: min(420px, calc(100% - 36px));
  margin: 0;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 28px rgba(29, 58, 86, 0.12);
  backdrop-filter: blur(10px);
}

.hero-art figcaption span {
  display: block;
  color: #234b65;
  font-size: clamp(1rem, 1.45vw, 1.28rem);
  font-weight: 900;
  line-height: 1.35;
}

.eyebrow {
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.hero-pick {
  display: block;
  max-width: 560px;
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 4px solid var(--coral);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
}

.hero-pick span {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 900;
}

.hero-pick time {
  color: var(--muted);
  font-weight: 800;
}

.hero-pick strong {
  display: block;
  margin-top: 3px;
  font-size: 0.96rem;
  line-height: 1.55;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 800;
}

.hero-actions .button {
  min-width: 180px;
}

.button.primary {
  color: white;
  background: var(--blue);
}

.button.secondary {
  color: var(--blue);
  background: var(--blue-soft);
}

.section,
.page,
.listing {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 42px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  width: min(1120px, calc(100% - 36px));
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.breadcrumb a {
  color: var(--blue);
  font-weight: 700;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

h1,
h2,
h3 {
  line-height: 1.35;
  letter-spacing: 0;
}

.section h2,
.page h1,
.listing h1 {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
}

.section-head a {
  color: var(--blue);
  font-weight: 800;
}

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

.latest-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.small {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.article-card a {
  display: grid;
  min-height: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 10px 24px rgba(29, 58, 86, 0.06);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.article-card a:hover {
  border-color: #b9d7ea;
  box-shadow: 0 18px 40px rgba(29, 58, 86, 0.1);
  transform: translateY(-2px);
}

.article-card h3 {
  margin: 12px 0 8px;
  font-size: 1.04rem;
}

.article-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.article-card time,
.meta,
.note {
  color: var(--muted);
  font-size: 0.9rem;
}

.badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 3px 9px;
  color: #24638f;
  background: var(--blue-soft);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.feature-band,
.about-band,
.category-nav-band,
.conversation-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.55fr);
  gap: 22px;
  align-items: center;
  padding: clamp(28px, 4vw, 42px) clamp(18px, 5vw, 72px);
  background: var(--soft);
  border-block: 1px solid var(--line);
}

.compact-band {
  border-top: 0;
}

.about-band {
  display: block;
}

.category-nav-band {
  display: block;
  background: white;
}

.conversation-band {
  grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1fr);
  background: #fff8f2;
}

.conversation-band img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid #f0d6c7;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(118, 76, 56, 0.12);
}

.feature-band h2,
.about-band h2,
.category-nav-band h2,
.conversation-band h2 {
  margin: 0 0 8px;
}

.resource-list,
.compact-list,
.category-grid {
  display: grid;
  gap: 10px;
}

.resource-list a,
.compact-list a,
.category-tile,
.tag-cloud a,
.tag-row a {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-weight: 700;
}

.category-strip {
  margin-top: 28px;
}

.category-strip h2 {
  font-size: 1.35rem;
}

.category-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.category-chips,
.sidebar-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.category-chips a,
.sidebar-list a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #234b65;
  background: var(--soft);
  font-size: 0.9rem;
  font-weight: 800;
}

.category-chips span,
.sidebar-list span {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: var(--blue);
  font-size: 0.76rem;
}

.category-tile span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 760px) 280px;
  gap: 32px;
  align-items: start;
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 40px 0 72px;
}

.article {
  min-width: 0;
}

.article-hero {
  padding: clamp(24px, 5vw, 44px);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.article-hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(1.9rem, 5vw, 3rem);
}

.article-hero p {
  color: var(--muted);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.tag-row {
  margin-top: 16px;
}

.tag-row a,
.tag-cloud a {
  color: var(--green);
  font-size: 0.88rem;
}

.article-body {
  padding-top: 26px;
  font-size: 1.04rem;
}

.article-body h1 {
  display: none;
}

.article-body h2 {
  margin: 44px 0 12px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--blue-soft);
  font-size: 1.55rem;
}

.article-body h3 {
  margin: 28px 0 8px;
  color: #234b65;
}

.article-body p,
.article-body li {
  color: #243244;
}

.article-body ul {
  padding-left: 1.3em;
}

.talk {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: 18px 0;
}

.talk-avatar {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 8px 18px rgba(29, 58, 86, 0.14);
}

.talk-body {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.talk-student .talk-body {
  background: var(--coral-soft);
  border-color: #f6c8bf;
}

.talk-teacher .talk-body {
  background: var(--blue-soft);
  border-color: #c9e1f2;
}

.talk-name {
  display: block;
  margin-bottom: 4px;
  font-weight: 800;
}

.talk-body p {
  margin: 0;
}

.learning-box,
.sidebar,
.related {
  margin: 34px 0;
  padding: 18px;
  background: #fffaf0;
  border: 1px solid #f1d79b;
  border-radius: 8px;
}

.sidebar {
  position: sticky;
  top: 84px;
  background: white;
  border-color: var(--line);
}

.sidebar h2 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.sidebar-list {
  margin-bottom: 22px;
}

.sidebar-posts {
  display: grid;
  gap: 10px;
}

.sidebar-posts a {
  display: block;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--blue);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.55;
}

.post-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 32px;
}

.pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 28px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.pagination a {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue);
  background: white;
}

.post-nav a {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.post-nav span {
  display: block;
  color: var(--ink);
  font-weight: 800;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  padding: 30px clamp(18px, 4vw, 56px);
  background: #172331;
  color: white;
}

.footer p {
  margin: 4px 0 0;
  color: #c8d2dc;
}

.footer a {
  color: #dce8f2;
}

@media (max-width: 860px) {
  .site-header,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .feature-band,
  .conversation-band,
  .article-shell {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    gap: 18px;
    padding: 20px 18px 28px;
  }

  .grid,
  .grid.small,
  .category-grid,
  .latest-layout,
  .latest-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .hero-art img {
    height: clamp(170px, 42vw, 240px);
    object-fit: cover;
  }

  .hero-art figcaption {
    display: none;
  }

  .hero-copy h1 {
    font-size: clamp(2.35rem, 10vw, 3.5rem);
    white-space: normal;
  }

  .hero-copy p {
    margin: 8px 0 0;
    font-size: 0.98rem;
  }

  .hero-pick {
    margin-top: 14px;
    padding: 12px;
  }

  .featured-card h3 {
    margin-top: 90px;
  }

  .category-nav-band,
  .feature-band,
  .conversation-band,
  .about-band {
    padding: 28px 18px;
  }

  .category-chips {
    flex-wrap: nowrap;
    margin-inline: -18px;
    padding: 0 18px 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .category-chips::-webkit-scrollbar {
    display: none;
  }

  .category-chips a {
    flex: 0 0 auto;
  }
}

@media (max-width: 520px) {
  .site-header {
    gap: 10px;
    padding: 10px 16px;
  }

  .brand {
    font-size: 1.15rem;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }

  .nav {
    width: 100%;
    flex-wrap: nowrap;
    gap: 8px 14px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    flex: 0 0 auto;
    font-size: 0.9rem;
  }

  .eyebrow {
    font-size: 0.72rem;
  }

  .hero-actions {
    display: block;
    margin-top: 16px;
  }

  .hero-actions .button {
    width: 100%;
    min-width: 0;
  }

  .button {
    min-height: 42px;
    padding-inline: 10px;
    font-size: 0.9rem;
  }

  .post-nav {
    width: 100%;
  }

  .section,
  .page,
  .listing {
    width: min(100% - 28px, 1120px);
    padding: 34px 0;
  }

  .section-head {
    align-items: center;
    margin-bottom: 14px;
  }

  .section h2,
  .page h1,
  .listing h1 {
    font-size: 1.7rem;
  }

  .article-card a {
    padding: 14px;
  }

  .article-card h3 {
    margin: 10px 0 6px;
    font-size: 0.98rem;
  }

  .article-card p {
    display: none;
  }

  .post-nav {
    grid-template-columns: 1fr;
  }

  .talk {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .talk-avatar {
    width: 46px;
    height: 46px;
  }
}
