.main.home {
  --home-accent: #f52245;
  --home-accent-dark: #d91636;
  --home-ink: #262220;
  --home-copy: #5d5550;
  --home-muted: #948b85;
  --home-line: #ece8e5;
  --home-soft: #faf9f9;
  width: 1168px;
  margin: 92px auto 0;
  padding: 0 0 76px;
  box-sizing: border-box;
  color: var(--home-ink);
}

.home a {
  color: inherit;
}

.home a:focus-visible,
.home button:focus-visible,
.home input:focus-visible {
  outline: 3px solid rgba(245, 34, 69, .2);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.home-portal-layout {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.home-topic-index {
  position: sticky;
  top: 88px;
  min-width: 0;
}

.home-topic-index-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0 12px;
}

.home-topic-index-head img {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.home-topic-index-head h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.35;
}

.home-topic-index-nav {
  display: grid;
  gap: 2px;
}

.home-topic-index-nav a {
  display: block;
  padding: 11px 8px 11px 0;
  overflow: hidden;
  color: var(--home-copy);
  font-size: 15px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-topic-index-nav a:hover,
.home-topic-index-nav .home-topic-more {
  color: var(--home-accent);
}

.home-primary-column,
.home-utility-column {
  min-width: 0;
}

.home-mobile-briefs {
  display: none;
}

.home-lead-story,
.home-lead-story > a {
  display: block;
  position: relative;
  height: 290px;
  overflow: hidden;
  border-radius: 12px;
}

.home-lead-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .22s ease;
}

.home-lead-story:hover .home-lead-image {
  transform: scale(1.015);
}

.home-lead-copy {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 60px 22px 20px;
  background: linear-gradient(180deg, transparent, rgba(13, 17, 30, .82));
  color: #fff;
}

.home-lead-copy h2 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 21px;
  font-weight: 650;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-feed-head,
.home-rail-head,
.home-wide-head,
.home-topic-digest-head,
.home-stage-directory-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.home-feed-head {
  margin-top: 34px;
  padding: 0 0 13px;
  border-bottom: 1px solid var(--home-line);
}

.home-feed-head::before {
  width: 4px;
  height: 21px;
  flex: 0 0 auto;
  border-radius: 3px;
  background: var(--home-accent);
  content: "";
}

.home-feed-head h2 {
  margin: 0 auto 0 0;
  font-size: 20px;
  line-height: 1.35;
}

.home-feed-head > a,
.home-rail-head > a,
.home-wide-head > a,
.home-topic-digest-head > a,
.home-stage-directory-head > a {
  flex: 0 0 auto;
  color: var(--home-muted);
  font-size: 12px;
}

.home-feed-head > a:hover,
.home-rail-head > a:hover,
.home-wide-head > a:hover,
.home-topic-digest-head > a:hover,
.home-stage-directory-head > a:hover {
  color: var(--home-accent);
}

.official-date-label {
  padding: 20px 0 4px;
  color: var(--home-muted);
  font-size: 12px;
  font-weight: 600;
}

.official-post-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 18px;
  min-height: 112px;
  padding: 17px 0;
  border-bottom: 1px solid var(--home-line);
}

.official-post-row.noCover {
  grid-template-columns: 1fr;
  min-height: 0;
}

.official-post-thumb {
  grid-column: 2;
  grid-row: 1;
  width: 132px;
  height: 88px;
  border-radius: 8px;
  object-fit: cover;
}

.official-post-copy {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.official-post-title {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.official-post-row:hover .official-post-title {
  color: var(--home-accent);
}

.official-post-excerpt {
  display: -webkit-box;
  margin: 7px 0 0;
  overflow: hidden;
  color: var(--home-copy);
  font-size: 13px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.official-post-meta {
  display: flex;
  margin-top: 9px;
  align-items: center;
  gap: 12px;
  color: var(--home-muted);
  font-size: 11px;
}

.home-question-feed {
  margin-top: 44px;
}

.home-question-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-question-entry {
  border-bottom: 1px solid var(--home-line);
}

.home-question-entry a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 16px 0;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}

.home-question-entry a:hover {
  color: var(--home-accent);
}

.home-question-arrow {
  color: var(--home-accent);
  font-size: 17px;
}

.home-question-panel .home-question-list {
  padding-top: 8px;
}

.home-question-panel .home-question-entry a {
  gap: 10px;
  padding: 10px 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.home-question-panel .home-question-arrow {
  font-size: 14px;
}

.home-utility-column {
  display: grid;
  gap: 16px;
}

.home-rail-block {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--home-line);
  border-radius: 12px;
  background: #fff;
}

.home-ranking-card {
  padding: 24px 18px 18px;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(33, 22, 18, 0.05);
}

.home-ranking-head {
  display: flex;
  min-height: 28px;
  padding-bottom: 14px;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--home-line);
}

.home-ranking-icon {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.home-ranking-head h2 {
  margin: 0;
  font-size: var(--site-section-title-size);
  font-weight: 700;
  line-height: var(--site-section-title-line-height);
}

.home-ranking-list {
  margin: 0;
  padding: 14px 0 0;
  list-style: none;
}

.home-ranking-list li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  min-width: 0;
}

.home-ranking-list .sidebar-order {
  color: #ff274b;
  font-size: var(--site-rank-number-size);
  font-style: italic;
  font-weight: 700;
  line-height: var(--site-list-title-line-height);
}

.home-ranking-list a {
  display: block;
  min-width: 0;
  color: #333;
  white-space: normal;
}

.home-ranking-list a:hover {
  color: var(--home-accent);
}

.home-school-rank-list {
  display: grid;
  gap: 14px;
}

.home-school-rank-list a {
  font-size: var(--site-list-title-size);
  line-height: var(--site-list-title-line-height);
}

.home-question-rank-list {
  display: grid;
  gap: 8px;
}

.home-question-rank-list a {
  color: #231f1c;
  font-size: var(--site-list-title-size);
  line-height: var(--site-list-title-line-height);
}

.home-rail-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--home-line);
}

.home-rail-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.home-headline-panel {
  padding-top: 14px;
}

.home-headline-panel .home-rail-head h2 {
  color: var(--home-accent);
  font-size: 20px;
}

.home-headline-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-headline-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--home-line);
}

.home-headline-list li:last-child {
  border-bottom: 0;
}

.home-headline-list a {
  display: -webkit-box;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-headline-list a:hover {
  color: var(--home-accent);
}

.home-headline-list time {
  padding-top: 2px;
  color: var(--home-muted);
  font-size: 10px;
}

.home-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px 8px;
  padding-top: 16px;
}

.home-tool-grid .tool {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}

.home-tool-grid .tool img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.home-tool-grid .tool span {
  max-width: 100%;
  overflow: hidden;
  color: var(--home-copy);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-tool-note {
  margin: 14px 0 0;
  text-align: center;
}

.home-tool-note a {
  color: var(--home-accent);
  font-size: 11px;
  line-height: 1.5;
}

.home-school-stage-list {
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

.home-school-stage {
  display: block;
  min-width: 0;
  padding: 11px 12px;
  border-radius: 8px;
  background: var(--home-soft);
}

.home-school-stage strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.home-school-stage span {
  display: block;
  overflow: hidden;
  color: var(--home-muted);
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-school-stage:hover strong {
  color: var(--home-accent);
}

.home-hot-school-list {
  margin: 0;
  padding: 8px 0 0;
  list-style: none;
}

.home-hot-school-list li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 7px;
  padding: 8px 0;
  align-items: start;
}

.sidebar-order {
  color: var(--home-accent);
  font-size: 11px;
  font-weight: 700;
}

.home-hot-school-list a {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-hot-school-list a:hover {
  color: var(--home-accent);
}

.matrix-channel-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 14px;
}

.matrix-channel-item {
  min-width: 0;
  padding: 10px 8px;
  border-radius: 8px;
  background: var(--home-soft);
  text-align: center;
}

#home-mini-program {
  scroll-margin-top: 88px;
}

#home-mini-program:target {
  outline: 2px solid var(--home-accent);
  outline-offset: 2px;
  box-shadow: 0 8px 24px rgba(244, 49, 79, 0.16);
}

.matrix-qr-image {
  display: block;
  width: 68px;
  height: 68px;
  margin: 0 auto 8px;
  object-fit: cover;
}

.matrix-channel-copy strong {
  display: block;
  font-size: 12px;
}

.matrix-channel-copy p {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--home-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-topic-digest,
.home-school-guide,
.home-ai-guide {
  margin-top: 54px;
}

.home-wide-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--home-line);
}

.home-wide-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.35;
}

.home-topic-digest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 36px;
}

.home-topic-digest-item {
  min-width: 0;
  padding: 22px 0 6px;
  border-bottom: 1px solid var(--home-line);
}

.home-topic-digest-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
}

.home-topic-digest-item ul {
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}

.home-topic-digest-item li {
  position: relative;
  padding: 7px 0 7px 14px;
}

.home-topic-digest-item li::before {
  position: absolute;
  top: 15px;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #c9c2bd;
  content: "";
}

.home-topic-digest-item li a {
  display: block;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-topic-digest-item li a:hover {
  color: var(--home-accent);
}

.home-school-guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.home-stage-directory-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--home-line);
  border-radius: 12px;
  background: #fff;
}

.home-stage-directory-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--home-line);
}

.home-stage-directory-head h3 {
  margin: 0;
  font-size: 17px;
}

.home-district-row {
  padding: 13px 0;
  border-bottom: 1px solid var(--home-line);
}

.home-district-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.home-district-row > strong {
  display: block;
  margin-bottom: 7px;
  color: var(--home-accent);
  font-size: 12px;
}

.home-district-links {
  display: grid;
  gap: 5px;
}

.home-district-links a {
  overflow: hidden;
  color: var(--home-copy);
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-district-links a:hover {
  color: var(--home-accent);
}

.home-stage-directory-empty {
  display: flex;
  min-height: 154px;
  align-items: center;
  justify-content: center;
  color: var(--home-muted);
  font-size: 12px;
  text-align: center;
}

.home-stage-directory-empty:hover {
  color: var(--home-accent);
}

.home-ai-guide {
  padding: 26px 0 8px;
  border-top: 1px solid var(--home-line);
}

.home-ai-answer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 22px;
}

.home-ai-answer {
  min-width: 0;
  padding: 0 20px;
  border-left: 1px solid var(--home-line);
}

.home-ai-answer:first-child {
  padding-left: 0;
  border-left: 0;
}

.home-ai-answer:last-child {
  padding-right: 0;
}

.home-ai-answer h3 {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.4;
}

.home-ai-answer p {
  margin: 0;
  color: var(--home-copy);
  font-size: 12px;
  line-height: 1.7;
}

@media (min-width: 768px) and (max-width: 1199px) {
  .main.home {
    width: auto;
    margin: 86px 24px 0;
    padding-bottom: 64px !important;
  }

  .home-portal-layout {
    grid-template-columns: 148px minmax(0, 1fr);
    gap: 22px;
  }

  .home-utility-column {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 12px;
  }

  .home-utility-column .home-headline-panel,
  .home-utility-column .home-matrix-panel {
    grid-column: span 1;
  }

  .home-school-guide-grid,
  .home-ai-answer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-ai-answer:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .home-ai-answer:nth-child(n+3) {
    margin-top: 24px;
  }
}

@media (max-width: 767px) {
  .main.home {
    width: 100%;
    margin: 58px 0 0;
    padding: 0 0 calc(76px + env(safe-area-inset-bottom)) !important;
  }

  .home-portal-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .home-topic-index {
    position: sticky;
    top: 58px;
    z-index: 12;
    min-width: 0;
    padding: 0 16px;
    border-bottom: 1px solid var(--home-line);
    background: rgba(255, 255, 255, .98);
  }

  .home-topic-index-head {
    display: none;
  }

  .home-topic-index-nav {
    display: flex;
    gap: 25px;
    padding: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .home-topic-index-nav::-webkit-scrollbar {
    display: none;
  }

  .home-topic-index-nav a {
    position: relative;
    min-width: max-content;
    padding: 14px 0 13px;
    flex: 0 0 auto;
    color: var(--home-copy);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
  }

  .home-topic-index-nav a.is-active {
    color: var(--home-accent);
  }

  .home-topic-index-nav a.is-active::after {
    position: absolute;
    right: 0;
    bottom: 4px;
    left: 0;
    width: 24px;
    height: 3px;
    margin: auto;
    border-radius: 3px;
    background: var(--home-accent);
    content: "";
  }

  .home-primary-column {
    min-width: 0;
    overflow: hidden;
  }

  .home-lead-story,
  .home-lead-story > a {
    height: 192px;
    border-radius: 10px;
  }

  .home-lead-story {
    margin: 14px 16px 0;
  }

  .home-lead-copy {
    padding: 52px 16px 15px;
  }

  .home-lead-copy h2 {
    font-size: 18px;
    line-height: 1.45;
  }

  .home-mobile-briefs {
    display: block;
    margin: 14px 16px 0;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--home-line);
  }

  .home-mobile-brief-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 13px;
  }

  .home-mobile-brief-head h2 {
    margin: 0;
    padding: 4px 9px;
    border-radius: 4px;
    background: var(--home-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.25;
  }

  .home-mobile-brief-head > a {
    color: var(--home-muted);
    font-size: 12px;
  }

  .home-mobile-brief-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 22px;
    row-gap: 13px;
  }

  .home-mobile-brief:nth-child(3) {
    grid-column: 1 / -1;
    padding-top: 13px;
    border-top: 1px solid var(--home-line);
  }

  .home-mobile-brief a {
    display: block;
  }

  .home-mobile-brief h3 {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .home-mobile-brief time {
    display: block;
    margin-top: 6px;
    color: var(--home-muted);
    font-size: 11px;
  }

  .home-feed-head {
    margin-top: 0;
    padding: 18px 16px 8px;
    border-bottom: 0;
  }

  .home-feed-head::before {
    display: none;
  }

  .home-feed-head h2 {
    font-size: 19px;
  }

  .official-account-content {
    padding: 0 16px;
  }

  .official-date-label {
    display: none;
  }

  .official-post-row {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 14px;
    min-height: 112px;
    padding: 16px 0;
  }

  .official-post-thumb {
    grid-column: 1;
    width: 112px;
    height: 82px;
    border-radius: 8px;
  }

  .official-post-copy {
    grid-column: 2;
    display: flex;
    min-height: 82px;
    flex-direction: column;
  }

  .official-post-row.noCover .official-post-copy {
    grid-column: 1;
  }

  .official-post-title {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    -webkit-line-clamp: 3;
  }

  .official-post-excerpt {
    display: none;
  }

  .official-post-meta {
    margin-top: auto;
    padding-top: 8px;
    gap: 8px;
  }

  .official-post-meta span:nth-of-type(n+2),
  .official-post-meta span:nth-of-type(n+3) {
    display: none;
  }

  .home-question-feed {
    margin-top: 38px;
  }

  .home-question-entry a {
    padding: 15px 0;
    font-size: 14px;
  }

  .home-utility-column {
    display: none;
  }

  .home-rail-block {
    padding: 17px;
  }

  .home-topic-digest,
  .home-school-guide,
  .home-ai-guide {
    display: none;
  }

  .home-wide-head h2 {
    font-size: 20px;
  }

  .home-topic-digest-grid,
  .home-school-guide-grid,
  .home-ai-answer-grid {
    grid-template-columns: 1fr;
  }

  .home-topic-digest-grid {
    gap: 0;
  }

  .home-stage-directory-card {
    padding: 16px;
  }

  .home-ai-answer,
  .home-ai-answer:first-child,
  .home-ai-answer:last-child {
    padding: 16px 0;
    border-top: 1px solid var(--home-line);
    border-left: 0;
  }

  .home-ai-answer:first-child {
    padding-top: 0;
    border-top: 0;
  }

  .home .fixed-tools {
    display: none;
  }
}

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