:root {
  --ink: #1d2522;
  --muted: #657069;
  --paper: #f7f6f1;
  --surface: #ffffff;
  --line: #dad8cd;
  --forest: #0f5c49;
  --moss: #6e7b37;
  --gold: #bd8f2f;
  --rust: #a84f3a;
  --blue: #315f83;
  --soft-green: #eaf0e7;
  --soft-gold: #f4ead2;
  --soft-blue: #e8eef3;
  --shadow: 0 18px 52px rgba(29, 37, 34, 0.14);
  --radius: 8px;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(15, 92, 73, 0.04), transparent 22%),
    var(--paper);
}

a {
  color: inherit;
}

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

button {
  font: inherit;
}

h1,
h2,
h3,
h4,
p,
li,
a {
  max-width: 100%;
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.2rem;
  align-items: center;
  min-height: 76px;
  padding: 0.8rem clamp(1rem, 3vw, 2.4rem);
  background: rgba(247, 246, 241, 0.94);
  border-bottom: 1px solid rgba(218, 216, 205, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-grid;
  grid-template-columns: 44px auto;
  gap: 0.75rem;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 0.98rem;
}

.brand span {
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem;
  min-width: 0;
}

.nav a {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0.52rem 0.72rem;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
}

.nav a:hover,
.nav a[aria-current="page"] {
  background: var(--soft-green);
  color: var(--ink);
}

.header-contact {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0.58rem 0.9rem;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.icon {
  width: 1.05em;
  height: 1.05em;
  flex: 0 0 auto;
}

main section[id] {
  scroll-margin-top: 132px;
}

.hero {
  position: relative;
  min-height: min(720px, calc(100vh - 76px));
  display: grid;
  align-items: end;
  padding: clamp(3rem, 8vw, 6.5rem) clamp(1.2rem, 5vw, 5rem);
  color: #fff;
  background:
    linear-gradient(90deg, rgba(15, 36, 31, 0.94), rgba(15, 92, 73, 0.76) 48%, rgba(189, 143, 47, 0.42)),
    url("assets/jlhx-logo-hero-clean.png") right clamp(1rem, 7vw, 6rem) center / min(42vw, 420px) no-repeat,
    #15372f;
}

.hero::before {
  content: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 32%;
  background: linear-gradient(0deg, rgba(247, 246, 241, 0.18), transparent);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f4d680;
}

h1 {
  max-width: 840px;
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3.2vw, 3rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.24;
  letter-spacing: 0;
}

h4 {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.35;
  letter-spacing: 0;
}

.lead {
  max-width: 760px;
  margin: 1.2rem 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  line-height: 1.75;
}

.hero-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.6rem;
}

.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.48rem;
  min-height: 44px;
  padding: 0.72rem 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 750;
  text-decoration: none;
}

.action.primary {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}

.section {
  padding: clamp(3.5rem, 7vw, 6rem) clamp(1.2rem, 5vw, 5rem);
}

.page-hero {
  padding-top: clamp(3.2rem, 7vw, 5.5rem);
  padding-bottom: clamp(2.8rem, 6vw, 4.8rem);
}

.wrap {
  width: min(1160px, 100%);
  margin: 0 auto;
}

.narrow {
  width: min(880px, 100%);
}

.section-intro {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(260px, 0.42fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: end;
  margin-bottom: clamp(1.8rem, 4vw, 3rem);
}

.section-intro p,
.text-panel p,
.resource-subject p,
.guide-body p,
.contact-panel p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.75;
}

.soft-band {
  background:
    linear-gradient(90deg, rgba(234, 240, 231, 0.85), rgba(255, 255, 255, 0.65)),
    var(--soft-green);
}

.blue-band {
  background:
    linear-gradient(90deg, rgba(232, 238, 243, 0.9), rgba(255, 255, 255, 0.68)),
    var(--soft-blue);
}

.gold-band {
  background:
    linear-gradient(90deg, rgba(244, 234, 210, 0.95), rgba(255, 255, 255, 0.62)),
    var(--soft-gold);
}

.flow-grid,
.resource-map,
.guide-list {
  display: grid;
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.resource-map {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.flow-item,
.resource-subject,
.guide-block,
.portal-card {
  background: rgba(255, 255, 255, 0.82);
}

.flow-item,
.resource-subject,
.portal-card {
  padding: clamp(1.15rem, 2.8vw, 1.6rem);
}

.flow-item {
  min-height: 210px;
}

.flow-item p,
.portal-card p,
.resource-subject li,
.guide-body li,
.plain-list,
.link-list li,
.book-list li {
  color: var(--muted);
  line-height: 1.65;
}

.number {
  display: inline-grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  background: var(--forest);
  color: #fff;
  font-weight: 800;
}

.content-stack {
  display: grid;
  gap: clamp(1.4rem, 3vw, 2.3rem);
}

.deep-grid,
.mini-grid,
.split-columns,
.portal-grid {
  display: grid;
  gap: clamp(1rem, 3vw, 2rem);
}

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

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

.split-columns {
  grid-template-columns: minmax(0, 0.7fr) minmax(280px, 0.48fr);
  align-items: start;
}

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

.portal-card {
  min-height: 190px;
  border-top: 4px solid var(--forest);
  color: var(--ink);
  text-decoration: none;
}

.portal-card:hover {
  background: #fff;
  box-shadow: var(--shadow);
}

.text-panel {
  padding: clamp(1rem, 2.5vw, 1.5rem) 0;
  border-top: 1px solid var(--line);
}

.callout {
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border-left: 5px solid var(--forest);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  line-height: 1.7;
}

.callout strong,
.plain-list strong,
.link-list strong,
.book-list strong {
  color: var(--ink);
}

.plain-list {
  margin: 0.85rem 0 0;
  padding-left: 1.1rem;
}

.link-list,
.book-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.link-list li,
.book-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.link-list a,
.plain-list a,
.book-list a,
.resource-subject a,
.contact-panel a {
  color: var(--forest);
  font-weight: 760;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.pill-list,
.resource-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
}

.pill-list li {
  padding: 0.35rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.status {
  display: inline-flex;
  width: fit-content;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(49, 95, 131, 0.12);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 750;
}

.status.open {
  background: rgba(15, 92, 73, 0.12);
  color: var(--forest);
}

.status.pending {
  background: rgba(168, 79, 58, 0.12);
  color: var(--rust);
}

.status.paid {
  background: rgba(189, 143, 47, 0.16);
  color: #765817;
}

.guide-block summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: clamp(1rem, 2.4vw, 1.4rem);
  cursor: pointer;
  list-style: none;
}

.guide-block summary::-webkit-details-marker {
  display: none;
}

.guide-block summary::after {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--forest);
  font-weight: 850;
}

.guide-block[open] summary::after {
  content: "-";
}

.guide-body {
  display: grid;
  grid-template-columns: minmax(0, 0.54fr) minmax(280px, 0.46fr);
  gap: clamp(1rem, 3vw, 2rem);
  padding: 0 clamp(1rem, 2.4vw, 1.4rem) clamp(1rem, 2.4vw, 1.4rem);
}

.guide-body ul {
  margin: 0.7rem 0 0;
  padding-left: 1.1rem;
}

.guide-kicker {
  margin: 0.3rem 0 0;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-button {
  min-height: 38px;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.filter-button.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.contact-panel {
  padding: clamp(1.2rem, 3vw, 1.8rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.note {
  margin-top: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.65;
}

.site-footer {
  padding: 2rem clamp(1.2rem, 5vw, 5rem);
  background: var(--ink);
  color: rgba(255, 255, 255, 0.76);
}

.footer-wrap {
  width: min(1160px, 100%);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.footer-wrap strong,
.footer-wrap a {
  color: #fff;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .portal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .header-contact {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.2rem;
  }
}

@media (max-width: 980px) {
  .section-intro,
  .deep-grid,
  .mini-grid,
  .split-columns,
  .guide-body {
    grid-template-columns: 1fr;
  }

  .flow-grid,
  .resource-map {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .site-header {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 0.65rem;
  }

  .brand {
    grid-template-columns: 38px auto;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }

  .header-contact {
    grid-column: auto;
    grid-row: auto;
    justify-self: start;
    width: fit-content;
    min-height: 38px;
    padding: 0.52rem 0.7rem;
    font-size: 0.88rem;
  }

  .nav {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 0.3rem;
    -webkit-overflow-scrolling: touch;
  }

  .hero {
    min-height: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 6rem;
    padding-bottom: 3.5rem;
    overflow: hidden;
    background:
      linear-gradient(90deg, rgba(15, 36, 31, 0.95), rgba(15, 92, 73, 0.75)),
      url("assets/jlhx-logo-hero-clean.png") right -1.5rem top 2rem / 240px no-repeat,
      #15372f;
  }

  .hero::before {
    content: none;
  }

  h1 {
    font-size: clamp(2.1rem, 10vw, 3rem);
  }

  h2 {
    font-size: clamp(1.55rem, 7.4vw, 2.05rem);
  }

  .lead {
    font-size: 1rem;
    line-height: 1.62;
  }

  .section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .wrap,
  .hero-content,
  .section-intro,
  .section-intro > *,
  .flow-item,
  .portal-card,
  .resource-subject,
  .guide-block,
  .contact-panel {
    min-width: 0;
    width: 100%;
    max-width: calc(100vw - 2rem);
  }

  .hero h1,
  .hero .lead,
  .section-intro h2,
  .section-intro p {
    width: 100%;
    max-width: min(340px, calc(100vw - 2rem));
  }

  .hero-actions,
  .portal-grid {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .hero-actions .action {
    width: 100%;
  }
}
