/* Readability and layout refinements, shared by the new home and mod pages. */
.wrap { width: min(1320px, calc(100% - 64px)); }
.header-inner { width: min(1440px, calc(100% - 64px)); gap: 32px; }
.brand { flex-shrink: 0; }
.brand strong { white-space: nowrap; letter-spacing: .4px; }
.site-header nav { gap: 28px; }
.header-link { padding: 8px 14px; }
.header-link span { margin-left: 8px; }
.hero-grid { grid-template-columns: 1.1fr 1fr; gap: 56px; min-height: 520px; padding-block: 44px; }
.hero-copy { padding: 15px 0; }
.hero-lead { max-width: 620px; line-height: 1.85; }
.hero-actions { margin-top: 32px; }

.hero-carousel { position: relative; height: 420px; border: 1px solid #dbc2f32b; border-radius: 18px; overflow: hidden; background: #21142f; box-shadow: 0 20px 50px #160b2440; isolation: isolate; }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .65s ease, visibility .65s; }
.hero-slide.active { opacity: 1; visibility: visible; }
.hero-slide img { width: 100%; height: 100%; object-fit: contain; }
.carousel-controls { position: absolute; z-index: 2; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 2px; background: #251537dc; border: 1px solid #ffffff29; border-radius: 24px; padding: 1px 5px; }
.carousel-dots { display: flex; }
.carousel-dots button, .carousel-toggle { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; color: #f3e8ff; background: transparent; }
.carousel-dots button::after { content: ''; width: 7px; height: 7px; border-radius: 8px; background: #cbb4db; transition: width .2s, background .2s; }
.carousel-dots button[aria-pressed="true"]::after { width: 20px; background: #f1dfff; }
.carousel-controls button:hover { background: #ffffff16; }
.carousel-toggle svg { width: 19px; height: 19px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }
.carousel-toggle .play-icon, .carousel-toggle[data-paused="true"] .pause-icon { display: none; }
.carousel-toggle[data-paused="true"] .play-icon { display: block; fill: currentColor; stroke: none; }

.quick-start { padding-top: 60px; padding-bottom: 58px; }
.quick-start-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.pack-slot { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; position: relative; min-height: 355px; border: 1px solid #e1d5ed; border-radius: 14px; padding: 28px; background: linear-gradient(145deg, #fff 15%, #f0e8f8); }
.pack-slot-number { color: #8a739e; font: 16px/1.5 Consolas, monospace; }
.pack-slot-icon { width: 90px; height: 90px; fill: none; stroke: #ab8bc3; stroke-width: 1.3; align-self: center; margin: 30px 0; }
.pack-slot:nth-child(2) { background: linear-gradient(145deg, #fff 15%, #eee6f6); }
.pack-slot:nth-child(3) { background: linear-gradient(145deg, #fff 15%, #f4eaf7); }
.pack-slot h3 { font-size: 22px; }
.pack-slot p { font-size: 18px; margin-top: 8px; color: #796782; }
.quick-start .server-card { align-self: stretch; padding: 24px; display: flex; flex-direction: column; }
.quick-start .server-card h3 { font-size: 23px; line-height: 1.5; }
.quick-start .server-card > p { font-size: 18.2px; line-height: 1.65; }
.quick-start .server-address { grid-template-columns: 1fr auto; margin: 20px 0 16px; padding: 11px; gap: 5px 8px; }
.quick-start .server-address > span { grid-column: auto; font-size: 14px; }
.quick-start .server-address code { grid-column: 1/-1; font-size: 19px; line-height: 1.5; }
.quick-start .copy-address { font-size: 15.4px; }
.quick-start .server-card .button { margin-top: auto; font-size: 18.2px; padding: 10px; gap: 10px; }
.quick-start .server-card > small { font-size: 14px; line-height: 1.7; }
.catalog-section { border-top: 1px solid var(--line); padding-top: 58px; }
.search-box { width: 330px; }
.search-box svg { width: 20px; height: 20px; }
.filter-group button { padding: 9px 12px; }
.mod-grid { gap: 26px; }
.card-body { padding: 24px; }
.card-title { display: flex; align-items: baseline; gap: 12px; }
.card-title h3 { display: block; flex: 0 1 auto; max-width: 58%; line-height: 1.5; }
.card-title .card-english { flex: 1; min-width: 0; margin: 0; line-height: 1.5; letter-spacing: 0; overflow-wrap: anywhere; }
.card-description { min-height: 0; margin-top: 16px; line-height: 1.8; }
.card-footer { margin-inline: 24px; padding-block: 16px; flex-wrap: wrap; }
.mod-title { display: flex; align-items: baseline; gap: 12px 20px; }
.mod-title h1 { flex-shrink: 0; }
.mod-title .mod-english { min-width: 0; margin: 0; line-height: 1.5; letter-spacing: .3px; }
.mod-intro-links { align-items: baseline; }
.side-panel dl > div { gap: 15px; }
.environment-label { white-space: normal; text-align: right; }
.update-excerpt { max-width: 1080px; }
.footer-bottom { align-items: start; line-height: 1.8; gap: 20px 40px; }
.footer-bottom > span:first-child { max-width: 720px; }
.footer-bottom > span:last-child { text-align: right; max-width: 430px; }

@media (max-width: 1250px) {
  .header-inner { gap: 22px; }
  .header-link { display: none; }
  .site-header nav { margin-right: 0; gap: 24px; }
  .quick-start-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pack-slot { min-height: 340px; }
  .quick-start .server-address code { font-size: 19px; }
  .catalog-toolbar { flex-wrap: wrap; }
  .hero-grid { gap: 35px; }
  .hero-carousel { height: 380px; }
  .mod-title { flex-wrap: wrap; gap: 8px 18px; }
}
@media (max-width: 950px) {
  .wrap, .header-inner { width: calc(100% - 40px); }
  .header-inner { flex-wrap: wrap; height: auto; gap: 12px; padding-block: 17px 0; }
  .site-header nav { width: 100%; justify-content: space-between; margin: 0; padding: 10px 0 16px; }
  .site-header nav .active:after { bottom: -17px; }
  html { scroll-padding-top: 134px; }
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 25px; }
  .hero h1 { font-size: 38px; }
  .hero-carousel { height: 330px; }
  .hero-actions { flex-wrap: wrap; gap: 10px; }
  .search-box { width: 100%; }
  .mod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-body, .card-footer { margin-inline: 0; }
  .card-body { padding: 21px; }
  .card-footer { margin-inline: 21px; }
  .community-section { align-items: flex-start; gap: 30px; }
  .community-section p br { display: none; }
}
@media (max-width: 600px) {
  .wrap, .header-inner { width: calc(100% - 36px); }
  .site-header .header-inner { min-height: 102px; padding-top: 13px; gap: 0; }
  .brand strong { font-size: 16px; letter-spacing: 0; }
  .brand { gap: 8px; }
  .site-header nav { padding: 11px 0 12px; margin-top: 12px; }
  .site-header nav a { font-size: 15.4px; }
  .site-header nav .active:after { bottom: -13px; }
  html { scroll-padding-top: 126px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; padding-block: 34px; }
  .hero-copy { padding: 0; }
  .hero h1 { font-size: 39px; }
  .hero-lead { font-size: 16.8px; line-height: 1.9; }
  .hero-lead br { display: none; }
  .hero-actions { margin-top: 24px; }
  .hero .button { font-size: 16.8px; gap: 14px; padding: 11px 17px; }
  .hero-carousel { height: auto; aspect-ratio: 1.12; border-radius: 14px; }
  .carousel-controls { bottom: 10px; right: 10px; }
  .quick-start { padding-block: 38px; }
  .quick-start-grid { grid-template-columns: 1fr; gap: 18px; }
  .pack-slot { min-height: 178px; padding: 22px; display: grid; grid-template-columns: 1fr auto; gap: 15px; align-items: center; }
  .pack-slot-number { grid-column: 1; font-size: 14px; }
  .pack-slot-icon { grid-column: 2; grid-row: 1/3; width: 76px; height: 76px; margin: 0; }
  .pack-slot > div { grid-column: 1; }
  .pack-slot h3 { font-size: 21px; }
  .pack-slot p { font-size: 16px; margin-top: 5px; }
  .quick-start .server-card { padding: 25px; }
  .quick-start .server-card h3 { font-size: 24px; }
  .quick-start .server-card > small { font-size: 13px; }
  .quick-start .server-card .button { font-size: 18px; }
  .catalog-section { padding-top: 38px; }
  .filter-group button { padding: 8px 10px; font-size: 15.4px; }
  .filter-group button span { font-size: 12.6px; }
  .search-box input { font-size: 16.8px; }
  .mod-grid { grid-template-columns: 1fr; }
  .card-title { gap: 12px; }
  .card-title h3 { font-size: 22px; }
  .card-title .card-english { font-size: 15.4px; }
  .card-description { font-size: 18.2px; line-height: 1.85; }
  .card-footer { font-size: 14px; gap: 10px; }
  .card-footer b { font-size: 16.8px; }
  .section-heading .text-link { font-size: 15.4px; white-space: nowrap; }
  .section-heading.compact { gap: 12px; }
  .compact .environment-label { font-size: 12px; max-width: 150px; }
  .mod-title { flex-wrap: wrap; gap: 8px 14px; }
  .mod-title h1 { font-size: 34px; }
  .mod-title .mod-english { font-size: 16.8px; }
  .mod-intro-links { gap: 12px 18px; }
  .version-toolbar { flex-wrap: wrap; gap: 12px; }
  .version-toolbar input { width: 142px; }
  .version-table { min-width: 330px; }
  .version-table .table-variant { max-width: 115px; }
  .update-excerpt { max-width: 100%; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-links { gap: 14px 22px; }
  .footer-bottom { display: flex; flex-direction: column; gap: 14px; font-size: 12px; }
  .footer-bottom > span:last-child { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .hero-slide { transition: none; } }

/* Item icons, direct community entry, and a simpler shared footer. */
.header-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; }
.brand img { object-fit: contain; image-rendering: pixelated; }
.site-header nav { margin: 0; justify-self: center; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions .header-link { display: inline-flex; align-items: center; padding: 8px 12px; }
.header-actions .header-link span { margin-left: 7px; }
.hero-copy { padding: 0; }
.hero-group { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; max-width: 100%; color: #dfceee; font-size: 18.2px; line-height: 1.65; }
.hero-group b { color: #f4eaff; letter-spacing: .5px; }
.hero-group svg { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.hero-group:hover { color: #fff; }
.hero-group:hover b { text-decoration: underline; text-underline-offset: 4px; }
.section-title { display: flex; align-items: center; gap: 14px; }
.section-title img { width: 48px; height: 48px; flex-shrink: 0; object-fit: contain; image-rendering: pixelated; }
.section-title + p { padding-left: 62px; }
.site-footer { border-top: 1px solid var(--line); }
.footer-top { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding-bottom: 28px; }
.footer-top > strong { font-size: 22px; color: #f3e8ff; }
.site-footer .footer-top p, .site-footer .footer-bottom { font-size: 18.2px; line-height: 1.85; }
.footer-top p { margin: 0; color: #d7c8e5; }
.footer-top a, .footer-bottom a { color: #ead8ff; }
.footer-bottom { padding-block: 25px 30px; color: #d7c8e5; }
.footer-bottom > span:first-child { max-width: 720px; }
.footer-bottom > span:last-child { max-width: 500px; }

@media (max-width: 1120px) {
  .header-inner { grid-template-columns: 1fr auto; height: auto; padding: 16px 0 0; gap: 8px 20px; }
  .header-actions { grid-row: 1; grid-column: 2; }
  .site-header nav { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; justify-content: center; gap: 48px; padding: 12px 0 16px; width: auto; }
  .site-header nav .active:after { bottom: -17px; }
  html { scroll-padding-top: 142px; }
}
@media (max-width: 760px) {
  .site-header .header-inner { display: flex; flex-wrap: wrap; gap: 0; padding-top: 13px; }
  .brand { width: 100%; }
  .brand strong { font-size: 16px; letter-spacing: 0; }
  .site-header nav { order: 2; width: 100%; justify-content: space-between; gap: 14px; margin-top: 10px; padding: 9px 0 12px; }
  .site-header nav a { font-size: 15.4px; }
  .site-header nav .active:after { bottom: -6px; }
  .header-actions { order: 3; width: 100%; justify-content: flex-end; gap: 10px; padding: 6px 0 12px; }
  .header-actions .header-link { font-size: 15.4px; padding: 5px 10px; }
  html { scroll-padding-top: 182px; }
  .hero-group { font-size: 16.8px; margin-top: 19px; gap: 8px; }
  .hero-group svg { width: 20px; height: 20px; }
  .section-title { gap: 12px; }
  .section-title img { width: 40px; height: 40px; }
  .section-title + p { padding-left: 52px; }
  .section-title .heading-date { white-space: nowrap; }
  .footer-top { align-items: baseline; flex-wrap: wrap; gap: 12px 20px; padding-bottom: 22px; }
  .footer-top > strong { font-size: 21px; }
  .site-footer .footer-top p, .site-footer .footer-bottom { font-size: 16.8px; }
  .footer-bottom { padding-block: 20px 25px; gap: 18px; }
}
