:root {
  --blue: #006cf5;
  --heading: #0032e8;
  --navy: #0b1e43;
  --body: #38547a;
  --line: #d4e3f8;
  --wash: #f0f6fc;
  font-family: Arial, 'PingFang HK', 'Microsoft JhengHei', 'Microsoft YaHei', sans-serif;
  color: var(--navy);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: #fff; }
a { color: #005de0; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible { outline: 3px solid #00a6ff; outline-offset: 3px; }
button, input { font: inherit; }
button { cursor: pointer; }
img { display: block; width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: absolute; top: .5rem; left: .5rem; z-index: 5; background: white; padding: .7rem; }
.icon { display: inline-block; width: 1.3em; height: 1.3em; flex: 0 0 auto; vertical-align: middle; }
.arrow { padding-left: .15em; white-space: nowrap; }

.site-header { background: #fff; border-bottom: 1px solid #e3ecf8; position: relative; z-index: 2; }
.header-inner { min-height: 83px; max-width: 1920px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: clamp(.55rem, 1.1vw, 1.3rem); padding: .65rem clamp(.8rem, 1.3vw, 1.5rem); }
.brand { color: #141e40; display: inline-flex; align-items: center; gap: .7rem; width: max-content; white-space: nowrap; text-decoration: none; }
.brand-mark { width: clamp(39px, 3.7vw, 68px); height: auto; color: #007dff; }
.brand-name { display: block; font-size: clamp(1.52rem, 2.25vw, 2.7rem); letter-spacing: -.058em; font-weight: 850; line-height: 1; }
.brand-name span { color: #0879ff; }
.brand-line { display: block; margin-top: .42rem; font-size: .55rem; letter-spacing: .46em; }
.main-nav { display: flex; flex: 1; justify-content: space-around; align-items: center; gap: .1rem; }
.nav-item { position: relative; }
.nav-item summary { display: flex; align-items: center; gap: .52em; list-style: none; padding: .7rem .36rem; cursor: pointer; color: var(--navy); font-size: clamp(.82rem, 1.12vw, 1.22rem); font-weight: 700; white-space: nowrap; }
.nav-item:first-child summary, .nav-item[open] summary, .nav-item summary:hover { color: #0058cb; }
.nav-item summary::-webkit-details-marker { display: none; }
.chevron { width: .42em; height: .42em; border: solid #245890; border-width: 0 1.5px 1.5px 0; transform: translateY(-.14em) rotate(45deg); }
.nav-panel { position: absolute; z-index: 3; top: calc(100% + .15rem); left: 0; width: max-content; min-width: 12rem; max-width: min(18rem, 90vw); border: 1px solid var(--line); border-radius: .7rem; padding: .4rem; box-shadow: 0 12px 40px #0b274526; background: #fff; }
.nav-item:nth-last-child(-n+3) .nav-panel { right: 0; left: auto; }
.nav-panel a { display: block; border-radius: .35rem; padding: .65rem .7rem; text-decoration: none; color: var(--navy); font-size: .95rem; }
.nav-panel a:hover { background: var(--wash); color: var(--blue); }
.header-actions { display: flex; gap: clamp(.55rem, .95vw, 1rem); align-items: center; }
.search-icon { display: inline-flex; padding: .2rem; color: var(--navy); font-size: 1.25rem; }
.languages { display: flex; border: 1px solid #c7dbfc; background: #fff; border-radius: .58rem; overflow: hidden; }
.languages a { text-decoration: none; color: #35577f; font-weight: 700; font-size: clamp(.87rem, 1.08vw, 1.15rem); white-space: nowrap; padding: .68rem .68rem; }
.languages a[aria-current], .languages a:hover { background: #edf5ff; color: #0058c9; }
.languages a:focus-visible { outline-offset: -3px; }
.menu-toggle { display: inline-flex; align-items: center; gap: .35rem; padding: .55rem; border: 1px solid var(--line); border-radius: .5rem; color: var(--navy); background: #fff; }

.hero { color: white; background-color: #172d4d; background-image: linear-gradient(90deg, #071b35e8 0%, #0c2445b5 29%, #0b213e55 59%, #09192b16 100%), linear-gradient(0deg, #0d274675, transparent 55%), url('/media/hero.webp'); background-size: cover; background-position: center 52%; }
.hero-inner { min-height: clamp(445px, 30vw, 600px); max-width: 1920px; margin: 0 auto; position: relative; padding: clamp(1.45rem, 2vw, 2.45rem) clamp(1.1rem, 2.45vw, 3rem) 2.5rem; }
.hero h1 { max-width: 13em; font-size: clamp(3.1rem, 4.26vw, 5rem); font-weight: 850; letter-spacing: -.057em; line-height: .96; }
.hero-intro { margin-top: .85rem; max-width: 53rem; font-size: clamp(1.13rem, 1.48vw, 1.7rem); line-height: 1.35; text-wrap: pretty; }
.weather { position: absolute; top: clamp(1rem, 1.3vw, 1.45rem); right: clamp(1rem, 2.5vw, 3rem); color: #052353; text-decoration: none; background: #f8fbff; padding: .38em .45em; border: 1px solid #d9e8ff; border-radius: .26em; font-size: clamp(1.5rem, 2.48vw, 2.85rem); font-weight: 850; line-height: 1; box-shadow: 0 4px 16px #04254b1a; }
.search-form { display: flex; align-items: center; gap: .8rem; background: #fff; border: 1px solid #dbe8f9; border-radius: .64rem; color: #0a376d; box-shadow: 0 3px 10px #173a6a12; padding: .3rem; }
.hero .search-form { max-width: 59rem; margin-top: 1.4rem; }
.search-form .icon { font-size: 1.33rem; margin-left: .83rem; }
.search-form input { flex: 1; width: 0; min-width: 0; padding: .65rem 0; border: none; background: none; color: var(--navy); font-size: clamp(1rem, 1.06vw, 1.17rem); }
.search-form input::placeholder { color: #53739c; opacity: 1; }
.search-form button { min-width: clamp(5.2rem, 9vw, 9.6rem); min-height: 3.2rem; border: 0; border-radius: .38rem; background: #0669ed; color: white; font-weight: 800; font-size: 1.08rem; padding: .56rem .65rem; }
.search-form button:hover, .hero-actions .hero-primary:hover { background: #0055c7; }
.popular { display: flex; flex-wrap: wrap; align-items: center; gap: .42rem; margin-top: .7rem; line-height: 1.12; }
.popular > span { margin-right: .2rem; }
.popular > a { text-decoration: none; color: white; background: #081a34a8; border: 1px solid #c4d8f7; border-radius: 2rem; padding: .49rem .83rem; }
.popular > a:hover, .hero-actions a:hover { background: #143b64; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: 1.12rem; }
.hero-actions a { background: #071d3aab; border: 1px solid #cae2ff; border-radius: .58rem; padding: .87rem 1.03rem; color: white; text-decoration: none; line-height: 1.25; font-size: clamp(.96rem, 1.1vw, 1.2rem); font-weight: 700; }
.hero-actions .hero-primary { background: #005bc8; border-color: #0874f5; padding-inline: 1.15rem; font-weight: 850; font-size: clamp(1rem, 1.22vw, 1.28rem); }

.dashboard { max-width: 1920px; margin: 0 auto; padding: 1.18rem clamp(1rem, 1.8vw, 2.2rem) 1.45rem; }
.home-split { display: grid; grid-template-columns: .92fr 1.08fr; align-items: start; gap: clamp(.9rem, 1.2vw, 1.45rem); }
.dashboard h2 { color: var(--heading); font-size: clamp(1.55rem, 2.03vw, 2.4rem); letter-spacing: -.032em; font-weight: 850; line-height: 1.13; }
.area-section { border: 1px solid var(--line); border-radius: .72rem; padding: .93rem; }
.area-section h2 { margin-bottom: .72rem; }
.map-card { border: 1px solid #d4e2ef; border-radius: .76rem; overflow: hidden; background: #eef5f9; }
.map-header, .map-caption { display: flex; align-items: center; gap: .5rem; }
.map-header { background: #fff; border-bottom: 1px solid #deebf7; padding: .74rem .9rem; font-size: 1.08rem; font-weight: 800; }
.map-header .icon { color: #7595b3; }
.map-header a { text-decoration: none; color: #073352; }
.map-header a:hover { text-decoration: underline; }
.map-caption { padding: .35rem .85rem .62rem; color: #486784; font-size: .95rem; }
.map-caption .icon { width: 1rem; height: 1rem; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .55rem 1rem; padding-bottom: .75rem; }
.section-heading a { flex: 0 0 auto; text-decoration: none; font-size: clamp(.9rem, 1.05vw, 1.12rem); }
.section-heading a:hover { text-decoration: underline; }
.purpose-grid, .essential-grid, .catalog-grid { display: grid; gap: .64rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.essential-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.image-card { overflow: hidden; min-width: 0; border: 1px solid var(--line); border-radius: .6rem; background: white; }
.image-card > a { display: flex; height: 100%; flex-direction: column; text-decoration: none; color: inherit; }
.image-card > a:focus-visible { outline-offset: -3px; }
.image-card > a:hover .card-link { text-decoration: underline; }
.image-card img { object-fit: cover; aspect-ratio: 2.42; background: #e5eef7; }
.card-content { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: .37rem; padding: .72rem .77rem; }
.card-content h3 { display: flex; align-items: start; gap: .32rem; font-size: clamp(.99rem, 1.08vw, 1.22rem); color: #0029cf; font-weight: 850; letter-spacing: -.024em; line-height: 1.12; }
.card-content .icon { margin-top: -.06em; color: #0674fb; }
.card-content .icon-home, .card-content .icon-city { color: #008e80; }
.card-content .icon-people { color: #e60044; }
.card-content p { color: var(--body); font-size: .99rem; line-height: 1.4; text-wrap: pretty; }
.card-link { display: inline-block; margin-top: auto; color: #003aeb; font-weight: 750; padding-top: .24rem; font-size: .97rem; }
.planning { margin-top: 1.3rem; padding: .85rem .88rem; border-radius: .77rem; background: var(--wash); }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 54rem; gap: .63rem; }
.tool-grid a { display: flex; gap: .64rem; align-items: center; border: 1px solid var(--line); border-radius: .55rem; background: white; color: #071e45; text-decoration: none; font-size: 1.02rem; padding: .88rem .75rem; font-weight: 750; min-height: 3.8rem; }
.tool-grid a:hover { border-color: #8bbdff; color: #005bce; }
.tool-grid .icon { font-size: 1.34rem; color: #008e80; }
.tool-grid .icon-bed { color: #ec6517; }
.tool-grid .icon-visa { color: #a800eb; }
.essentials { margin-top: 1.35rem; }
.home-credits { display: flex; justify-content: flex-end; gap: .9rem; padding-top: .7rem; font-size: .88rem; }
.home-credits a { text-decoration: none; }
.home-credits a:hover { text-decoration: underline; }

.site-footer { border-top: 1px solid #dce8f8; background: #fbfdff; }
.footer-inner { display: grid; grid-template-columns: 1.35fr repeat(4, minmax(0, 1fr)); align-items: start; gap: 1.2rem; max-width: 1920px; margin: 0 auto; padding: 1.45rem clamp(1rem, 2vw, 2.2rem) 1.65rem; }
.footer-inner h2 { color: #0064e5; font-weight: 650; font-size: 1.13rem; margin-bottom: .66rem; }
.footer-inner a:not(.brand) { display: inline-block; font-size: .94rem; color: #426084; text-decoration: none; margin: 0 .55rem .4rem 0; }
.footer-inner a:hover { text-decoration: underline; }
.footer-inner .brand-name { font-size: clamp(1.5rem, 2.32vw, 2.45rem); }

.page { width: min(100% - 2rem, 76rem); min-height: 55vh; margin: 0 auto; padding-block: clamp(2rem, 5vw, 4.3rem); }
.page h1 { color: #08245a; font-size: clamp(2.2rem, 4.5vw, 4.1rem); line-height: 1.04; letter-spacing: -.045em; }
.page-intro { margin: 1rem 0 1.6rem; max-width: 46rem; color: var(--body); font-size: clamp(1.12rem, 2vw, 1.35rem); line-height: 1.48; }
.catalog-grid { gap: 1rem; }
.guide { width: min(100% - 2rem, 52rem); }
.guide h2 { margin-bottom: .55rem; color: #083a87; font-size: clamp(1.35rem, 2.5vw, 1.75rem); }
.guide section { margin-top: 1.65rem; }
.guide section p, .district-grid p { color: #334e73; font-size: 1.055rem; line-height: 1.64; }
.guide-photo { max-height: 345px; object-fit: cover; border-radius: .8rem; }
.breadcrumb { margin-bottom: 1.15rem; }
.link-list { margin: .8rem 0 0; padding-left: 1.3rem; line-height: 1.85; }
.district-index { display: flex; flex-wrap: wrap; gap: .52rem; margin-bottom: 1.3rem; }
.district-index a { background: var(--wash); border: 1px solid var(--line); border-radius: 1.5rem; padding: .44rem .78rem; text-decoration: none; }
.district-index a:hover { background: #e0efff; }
.district-grid, .credit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.district-grid article, .credit-grid article, .results-list article { padding: 1rem; border: 1px solid var(--line); border-radius: .65rem; }
.district-grid article:target { outline: 2px solid var(--blue); background: #f3f8ff; }
.district-grid h2, .results-list h2, .credit-grid h2 { margin-bottom: .44rem; color: #093379; font-size: 1.18rem; }
.district-grid p { margin-bottom: .55rem; }
.credit-grid { margin-top: 1.25rem; }
.credit-grid article { overflow: hidden; padding: 0; }
.credit-grid img { height: 8rem; object-fit: cover; }
.credit-grid article > div { padding: .8rem; }
.credit-grid p { color: var(--body); line-height: 1.42; margin-bottom: .3rem; }
.source-note { margin-top: 1.2rem; }
.search-page .search-form { max-width: 43rem; margin-top: 1.2rem; }
#search-status { margin-block: 1.2rem .9rem; color: var(--body); }
.results-list { display: grid; max-width: 48rem; gap: .68rem; }
.results-list p { color: var(--body); line-height: 1.45; }

@media (min-width: 1540px) {
  .header-inner { min-height: 96px; }
  .search-form button { min-height: 3.32rem; }
  .hero-actions a { padding-block: 1rem; }
  .section-heading { padding-bottom: 1.12rem; }
}

@media (max-width: 1130px) {
  .header-inner { flex-wrap: wrap; }
  .main-nav { order: 4; flex: 1 0 100%; }
  .nav-item summary { font-size: .95rem; }
  .main-nav[data-collapsed='true'] { display: none; }
  .main-nav[data-collapsed='false'] { display: flex; }
  .header-actions { margin-left: auto; }
  .home-split { grid-template-columns: minmax(0, 1fr); }
  .area-section { max-width: 100%; }
  .essential-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .header-inner { min-height: 65px; column-gap: .46rem; padding: .55rem .65rem; }
  .brand { gap: .34rem; }
  .brand-mark { width: 35px; }
  .brand-name { font-size: 1.45rem; }
  .brand-line { font-size: .45rem; letter-spacing: .28em; margin-top: .3rem; }
  .menu-toggle { order: 3; padding: .37rem; }
  .menu-toggle span, .header-actions .search-icon { display: none; }
  .menu-toggle { min-width: 2.4rem; min-height: 2.4rem; justify-content: center; }
  .languages a { font-size: .76rem; padding: .56rem .34rem; }
  .main-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .65rem; }
  .main-nav[data-collapsed='false'] { display: grid; }
  .nav-item summary { padding: .58rem .35rem; }
  .nav-panel, .nav-item:nth-last-child(-n+3) .nav-panel { position: static; background: var(--wash); min-width: 0; max-width: 100%; width: auto; box-shadow: none; }
  .nav-panel a { font-size: .87rem; }
  .hero { background-position: 59% center; background-image: linear-gradient(90deg, #071b35e8, #0b213e73), url('/media/hero.webp'); }
  .hero-inner { min-height: 0; padding: 1.58rem .85rem 1.6rem; }
  .hero h1 { font-size: clamp(2.45rem, 7.4vw, 3.4rem); padding-right: 2.2rem; }
  .weather { right: .7rem; top: .64rem; font-size: 1.2rem; }
  .hero-intro { margin-top: .66rem; max-width: 36rem; }
  .hero .search-form { margin-top: .9rem; }
  .search-form { gap: .4rem; }
  .search-form .icon { font-size: 1rem; margin-left: .4rem; }
  .search-form button { min-height: 2.65rem; min-width: 4.25rem; font-size: .98rem; }
  .popular { font-size: .88rem; }
  .popular > a { padding: .38rem .55rem; }
  .hero-actions { gap: .44rem; margin-top: .8rem; }
  .hero-actions a, .hero-actions .hero-primary { padding: .6rem .68rem; }
  .dashboard { padding: .85rem .75rem 1.2rem; }
  .area-section { padding: .65rem; }
  .section-heading { align-items: flex-end; }
  .purpose-grid, .essential-grid, .catalog-grid, .district-grid, .credit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-grid { grid-template-columns: minmax(0, 1fr); }
  .tool-grid a { min-height: 3rem; padding: .61rem .7rem; }
  .card-content { padding: .58rem; }
  .card-content p { font-size: .91rem; }
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem .6rem; }
  .footer-inner .brand { grid-column: 1 / -1; }
}

@media (max-width: 360px) {
  .brand-name { font-size: 1.25rem; }
  .brand-mark { width: 28px; }
  .brand-line { display: none; }
  .languages a { padding-inline: .27rem; }
  .section-heading { flex-wrap: wrap; }
}
