/* =========================================================
   Chaiyaphum Hazard — main stylesheet
   Layout: one centred column; hero → quick links → law types → contact
   ========================================================= */
:root {
  color-scheme: light;
  --navy: #0d3b6e;
  --navy-dark: #0a2f59;
  --teal: #0f8f7e;
  --teal-light: #e7f6f2;
  --ink: #1d2b45;
  --ink-soft: #5a6b85;
  --line: #dde8ef;
  --bg: #f4f8fb;
  --card: #ffffff;
  --mint: #eef8f5;
  --sky: #eef5fd;
  --line-green: #06c755;

  --green: #12a072;
  --blue: #3a6fd8;
  --purple: #8b5cd6;
  --orange: #f47c2a;
  --cyan: #0f9b8e;
  --slate: #3f5a80;
  --pink: #d14a7c;
  --amber: #c27c0e;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 4px 18px rgba(13, 59, 110, .07);
  --shadow-hover: 0 10px 28px rgba(13, 59, 110, .14);

  --font-head: "Prompt", "Sarabun", system-ui, sans-serif;
  --font-body: "Sarabun", "Prompt", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 110px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
h1, h2, h3, h4, h5 { font-family: var(--font-head); margin: 0; line-height: 1.35; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; }
svg.lucide { width: 1.1em; height: 1.1em; flex-shrink: 0; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .7em 1.4em; border-radius: 999px; border: 0;
  font-family: var(--font-head); font-weight: 500; font-size: .95rem;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-dark); }

.tag {
  display: inline-block; padding: .2em .8em; border-radius: 6px;
  background: var(--navy); color: #fff; font-size: .8rem; font-family: var(--font-head);
}

/* ---------- Header ---------- */
.site-header {
  background: #fff; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  border-bottom: 4px solid var(--navy); box-shadow: 0 2px 10px rgba(13, 59, 110, .06);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }

.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-logo {
  width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: #fff; border: 3px solid var(--teal); color: var(--teal);
  box-shadow: inset 0 0 0 4px var(--teal-light);
}
.brand-logo svg { width: 34px; height: 34px; }
.brand-logo .skull-mark { --logo-fill: #fff; stroke-width: 1.6; }
.brand-logo.light { width: 56px; height: 56px; border-color: #fff; color: #fff; background: rgba(255,255,255,.08); box-shadow: none; }
.brand-logo.light .skull-mark { --logo-fill: var(--navy); }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.75rem; color: var(--navy); line-height: 1.15; }
.brand-name b { color: var(--teal); font-weight: 700; }
.brand-sub { font-family: var(--font-head); font-weight: 600; color: var(--navy); font-size: 1rem; }
.brand-org { color: var(--ink-soft); font-size: .9rem; }
.header-tools { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.updated {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .4em 1em; border-radius: 999px; background: var(--teal-light);
  font-size: .85rem; color: var(--ink-soft);
}
.updated svg { color: var(--teal); }
.lbl-short { display: none; }
.updated time { font-family: var(--font-head); font-weight: 500; color: var(--navy); white-space: nowrap; }
.header-contact { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px 16px; }
.hc-item { display: inline-flex; align-items: center; gap: .4em; font-size: .9rem; color: var(--navy); white-space: nowrap; }
.hc-item svg { color: var(--teal); }
.hc-line svg { color: var(--line-green); }
.hc-item:hover { color: var(--teal); }
.btn-login { padding: .45em 1.1em; font-size: .88rem; }

/* ---------- Hero / news slider ----------
   Every slide shares one frame (the news image ratio), so the page doesn't jump while slides rotate.
   A slide with data-bg shows only its image (whole image clickable); one without shows the illustrated text card. */
.hero-wrap { margin-top: 20px; }
.hero {
  position: relative; overflow: hidden; border-radius: var(--radius);
  aspect-ratio: 1800 / 797; box-shadow: var(--shadow);
  background:
    linear-gradient(90deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.85) 42%, rgba(255,255,255,0) 70%),
    linear-gradient(180deg, #d6ecfa 0%, #e8f4ef 55%, #cfe7d8 100%);
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-image {
  position: absolute; inset: 0; display: none;
  background: #fff var(--slide-bg) center / contain no-repeat;
}
.hero.has-image .hero-image { display: block; }
.hero.has-image .hero-bg { display: none; }
.hero.has-image .slide { padding: 0; max-width: none; }
.hero.has-image .slide .tag, .hero.has-image .slide h1 {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0;
}
.hero.has-image .slide .btn {
  position: absolute; right: 16px; bottom: 16px; z-index: 2;
  padding: .5em 1.1em; font-size: .88rem; box-shadow: 0 6px 18px rgba(10, 47, 89, .35);
}
.slide-cover { display: none; }
.hero.has-image .slide-cover { display: block; position: absolute; inset: 0; z-index: 1; }
.hills { position: absolute; left: 0; bottom: 0; width: 100%; height: 45%; opacity: .7; }

.ghs-group { position: absolute; right: 9%; top: 50%; width: 260px; height: 260px; transform: translateY(-55%); }
.ghs {
  position: absolute; width: 84px; height: 84px;
  background: #fff; border: 6px solid #e0262f; border-radius: 6px;
  transform: rotate(45deg); display: grid; place-items: center;
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
}
.ghs > * { transform: rotate(-45deg); color: #111; }
.ghs svg { width: 40px; height: 40px; stroke-width: 2.4; }
.excl-text { font-family: Arial, sans-serif; font-size: 46px; font-weight: 900; line-height: 1; }
.g1 { left: 88px; top: 0; }
.g2 { left: 18px; top: 70px; }
.g3 { left: 158px; top: 70px; }
.g4 { left: 88px; top: 140px; }

.slides { position: absolute; inset: 0; z-index: 1; }
.slide {
  position: absolute; inset: 0; display: none; flex-direction: column; justify-content: center; align-items: flex-start;
  padding: 40px 72px 56px; animation: fadeIn .5s ease;
}
.slide.is-active { display: flex; }
.slide h1 { max-width: 640px; font-size: 2.1rem; font-weight: 600; color: var(--navy); margin: 14px 0 22px; }
@keyframes fadeIn { from { opacity: .4; } to { opacity: 1; } }

.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: var(--navy); color: #fff; display: grid; place-items: center;
  box-shadow: var(--shadow);
}
.hero-arrow.prev { left: 14px; }
.hero-arrow.next { right: 14px; }
.hero.single .hero-arrow, .hero.single .hero-foot { display: none; }

.hero-foot { position: absolute; left: 16px; bottom: 16px; z-index: 3; }
.dots { display: flex; gap: 8px; padding: 6px 10px; border-radius: 99px; background: rgba(255,255,255,.85); }
.dots button { width: 10px; height: 10px; border-radius: 99px; border: 2px solid var(--navy); background: transparent; padding: 0; transition: width .2s; }
.dots button[aria-selected="true"] { background: var(--navy); width: 26px; }

/* ---------- Quick links ---------- */
#services { margin-top: 22px; }
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.service {
  --c: var(--teal);
  display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0;
  padding: 22px 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--c); }
.service-icon {
  width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: var(--c); color: #fff; margin-bottom: 14px;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 15%, transparent);
}
.service-icon svg { width: 32px; height: 32px; }
.service h3 { font-size: 1rem; font-weight: 600; color: var(--c); margin-bottom: 6px; }
.service p { font-size: .85rem; color: var(--ink-soft); flex: 1; }
.service .ext {
  display: inline-flex; align-items: center; gap: .3em; margin-top: 14px; max-width: 100%;
  font-size: .72rem; color: var(--ink-soft); padding: .25em .7em; border-radius: 99px;
  background: color-mix(in srgb, var(--c) 9%, white); overflow-wrap: anywhere;
}
.service .ext svg { color: var(--c); }
.c-green { --c: var(--green); }
.c-blue { --c: var(--blue); }
.c-purple { --c: var(--purple); }
.c-orange { --c: var(--orange); }
.c-teal { --c: var(--cyan); }
.c-slate { --c: var(--slate); }
.c-pink { --c: var(--pink); }
.c-amber { --c: var(--amber); }

/* ---------- Panels ---------- */
#contact { margin-top: 22px; }
.panel { background: var(--mint); border: 1px solid #d5ece5; border-radius: var(--radius); padding: 24px; }
.panel-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.panel-head h2 { font-size: 1.3rem; font-weight: 600; color: var(--navy); }
.panel-head p { color: var(--ink-soft); font-size: .92rem; }
.panel-icon { width: 50px; height: 50px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: var(--teal); color: #fff; }
.panel-icon.blue { background: var(--blue); }
.panel-icon.amber { background: var(--amber); }
.panel-icon.pink { background: var(--pink); }
.panel-icon svg { width: 24px; height: 24px; }

/* ---------- Inner pages (ข่าวประชาสัมพันธ์, คู่มือประชาชน) ---------- */
.page { padding-top: 22px; padding-bottom: 40px; min-height: 55vh; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: .88rem; color: var(--ink-soft); margin-bottom: 14px; }
.crumbs a { color: var(--teal); }
.crumbs a:hover { text-decoration: underline; }
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.page-head h1 { font-size: 1.6rem; font-weight: 600; color: var(--navy); }
.page-head p { color: var(--ink-soft); }
.back-link { display: inline-flex; align-items: center; gap: .4em; margin-top: 26px; color: var(--navy); font-family: var(--font-head); }
.back-link:hover { color: var(--teal); }

.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.news-card {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--amber); }
.news-media { display: grid; place-items: center; aspect-ratio: 1800 / 797; background: #fff; border-bottom: 1px solid var(--line); }
.news-media img { width: 100%; height: 100%; object-fit: contain; }
.news-noimg { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(180deg, #d6ecfa, #cfe7d8); color: var(--navy); }
.news-noimg svg { width: 40px; height: 40px; }
.news-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.news-body h2 { font-size: 1.05rem; font-weight: 600; color: var(--ink); flex: 1; }
.news-go { display: inline-flex; align-items: center; gap: .35em; font-family: var(--font-head); font-size: .88rem; color: var(--navy); }

/* Staff login / registration */
.notice {
  display: flex; align-items: flex-start; gap: 10px; max-width: 560px; margin-bottom: 16px;
  padding: 12px 16px; border-radius: var(--radius-sm); background: #fff6df; color: #7a5300; border: 1px solid #f1dca4;
}
.auth-card { max-width: 560px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 18px; background: var(--bg); border-radius: 999px; }
.auth-tabs button {
  border: 0; border-radius: 999px; padding: .6em 1em; background: transparent;
  font-family: var(--font-head); font-size: .92rem; color: var(--ink-soft);
}
.auth-tabs button[aria-selected="true"] { background: var(--navy); color: #fff; }
.auth-form { display: flex; flex-direction: column; gap: 6px; }
.auth-form label { font-family: var(--font-head); font-size: .9rem; color: var(--navy); margin-top: 8px; }
.auth-form label small { font-family: var(--font-body); color: var(--ink-soft); }
.auth-form input:not([type="checkbox"]) {
  width: 100%; padding: .7em .9em; border: 1px solid #cbd8e3; border-radius: var(--radius-sm);
  font: inherit; color: var(--ink); background: #fff;
}
.auth-form input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-light); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.auth-form .consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-family: var(--font-body); font-size: .88rem; color: var(--ink); }
.consent input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--teal); flex-shrink: 0; }
.form-error { min-height: 1.4em; margin-top: 8px; color: #c0322f; font-size: .9rem; }
.form-error:empty { min-height: 0; margin-top: 0; }
.btn-block { justify-content: center; width: 100%; margin-top: 10px; }
.btn.is-busy { opacity: .6; pointer-events: none; }
.form-hint { text-align: center; font-size: .88rem; color: var(--ink-soft); margin-top: 6px; }
.link-btn { border: 0; background: none; padding: 0; color: var(--teal); font: inherit; text-decoration: underline; }
.form-hint.left { text-align: left; margin-top: 2px; }
.btn-outline { background: #fff; color: var(--navy); border: 1px solid #c9d6e4; padding: .5em 1.1em; font-size: .9rem; }
.staff-bar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  margin-bottom: 16px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--teal-light);
}
.staff-bar p { display: inline-flex; align-items: center; gap: .5em; color: var(--ink); }
.staff-bar svg { color: var(--teal); }
.staff-bar b { color: var(--navy); font-family: var(--font-head); font-weight: 600; }

.modal {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px;
  background: rgba(10, 30, 55, .45);
}
.modal-box {
  width: 100%; max-width: 400px; text-align: center; padding: 28px 24px 22px;
  background: #fff; border-radius: var(--radius); box-shadow: 0 20px 50px rgba(10, 30, 55, .3);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.modal-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #fff3d6; color: var(--amber); margin-bottom: 4px; }
.modal-icon svg { width: 28px; height: 28px; }
.modal-box h2 { font-size: 1.2rem; color: var(--navy); }
.modal-box p { color: var(--ink-soft); font-size: .95rem; }
.modal-contact { display: inline-flex; align-items: center; gap: .4em; margin: 6px 0 10px; padding: .4em .9em; border-radius: 99px; background: color-mix(in srgb, var(--line-green) 10%, white); }
.modal-contact svg { color: var(--line-green); }
.modal-contact a { color: var(--navy); font-weight: 600; }

.pw-field { position: relative; }
.pw-field input { padding-right: 46px !important; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-soft);
  display: grid; place-items: center;
}
.pw-toggle:hover { background: var(--bg); color: var(--navy); }

/* Staff area */
.staff-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 24px; }
.topic-card {
  --c: var(--navy);
  display: flex; align-items: center; gap: 14px; text-align: left; width: 100%;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
  box-shadow: var(--shadow); font: inherit; color: var(--ink); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.topic-card:not(:disabled):hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--c); }
.topic-card .service-icon { width: 48px; height: 48px; margin: 0; box-shadow: none; }
.topic-card .service-icon svg { width: 24px; height: 24px; }
.topic-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topic-text b { font-family: var(--font-head); font-weight: 600; color: var(--navy); }
.topic-text small { color: var(--ink-soft); font-size: .85rem; }
.topic-lock { display: none; color: var(--ink-soft); }
.topic-card.is-locked { cursor: not-allowed; opacity: .6; box-shadow: none; }
.topic-card.is-locked .service-icon { background: #9aa8b8; }
.topic-card.is-locked .topic-lock { display: block; }
.sub-title { font-size: 1.1rem; font-weight: 600; color: var(--navy); margin-bottom: 12px; }

.back-link.inline { margin: 0 0 14px; border: 0; background: none; padding: 0; font-size: .95rem; }
.admin-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.admin-head h2 { font-size: 1.2rem; color: var(--navy); }
.admin-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.admin-filter button {
  display: inline-flex; align-items: center; gap: .5em; padding: .45em 1em; border-radius: 99px;
  border: 1px solid var(--line); background: #fff; font-family: var(--font-head); font-size: .88rem; color: var(--ink-soft);
}
.admin-filter button[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.admin-filter .count { min-width: 22px; padding: 0 6px; border-radius: 99px; background: var(--bg); color: var(--navy); font-size: .8rem; text-align: center; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.reg-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 1080px; }
.reg-table th, .reg-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.reg-table th { position: sticky; top: 0; background: var(--bg); font-family: var(--font-head); font-weight: 500; color: var(--navy); white-space: nowrap; }
.reg-table td { font-variant-numeric: tabular-nums; }
.reg-table tbody tr:hover { background: #f8fbfd; }
.reg-table tbody tr:last-child td { border-bottom: 0; }
.approve { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; cursor: pointer; }
.approve input { width: 18px; height: 18px; accent-color: var(--green); }
.approve input:checked + span { color: var(--green); font-weight: 600; }
.approve input:not(:checked) + span { color: var(--amber); }
#regEmpty { margin-top: 12px; }

.row-actions { white-space: nowrap; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--navy);
  display: inline-grid; place-items: center; margin-right: 6px;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { border-color: var(--navy); background: var(--bg); }
.icon-btn.danger { color: #c0322f; }
.icon-btn.danger:hover { border-color: #c0322f; background: #fdecec; }
.btn-danger { background: #c0322f; color: #fff; }
.btn-danger:hover { background: #a42825; }
.modal-form { max-width: 520px; text-align: left; align-items: stretch; gap: 6px; }
.modal-form h2 { margin-bottom: 4px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; width: 100%; }
.modal-box:not(.modal-form) .modal-actions { justify-content: center; }
.modal-icon.danger { background: #fdecec; color: #c0322f; }
.modal { overflow-y: auto; }

.table-tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.table-tools .admin-filter { margin-bottom: 0; }
.search-box {
  display: flex; align-items: center; gap: 8px; flex: 1 1 280px; max-width: 420px;
  padding: 0 12px; border: 1px solid #cbd8e3; border-radius: 999px; background: #fff; color: var(--ink-soft);
}
.search-box:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-light); }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; padding: .6em 0; font: inherit; font-size: .92rem; background: transparent; }
.table-meta { font-size: .82rem; color: var(--ink-soft); margin-bottom: 8px; }
.hazard-table { min-width: 1500px; font-size: .86rem; }
.hazard-table th { white-space: normal; min-width: 90px; vertical-align: bottom; }
.hazard-table td { vertical-align: top; }
.hazard-table td:nth-child(4), .hazard-table td:nth-child(6), .hazard-table td:nth-child(8) { min-width: 180px; }
.hazard-table tr.is-cancelled td { color: var(--ink-soft); background: #fafbfc; }
.mark-done { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #e3f6ee; color: var(--green); font-weight: 700; }
.pill-cancel { display: inline-block; padding: .1em .6em; border-radius: 99px; background: #fdecec; color: #b3312e; font-size: .8rem; white-space: nowrap; }
.topic-card.c-orange { --c: var(--orange); }
.topic-card.c-orange .service-icon { background: var(--orange); }
.topic-card:not(.is-locked) .service-icon { background: var(--c); }

/* Manual list */
.doc-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.doc-list a, .doc-list li > div {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.doc-list a:hover { border-color: var(--teal); }
.doc-list a span, .doc-list li > div span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.doc-list small { color: var(--ink-soft); font-size: .85rem; }
.doc-list small:empty { display: none; }
.doc-list svg { color: var(--teal); }
.empty-state {
  display: flex; align-items: center; gap: 10px; padding: 16px;
  background: #fff; border: 1px dashed #b9dccf; border-radius: var(--radius-sm); color: var(--ink-soft);
}
.empty-state svg { color: var(--teal); }

/* Contact */
.contact-card { background: var(--sky); border: 1px solid #d6e5f6; border-radius: var(--radius); padding: 24px; }
.contact-items { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.contact-items li {
  display: flex; gap: 12px; align-items: flex-start; min-width: 0;
  padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.contact-items small { display: block; font-family: var(--font-head); font-size: .78rem; color: var(--ink-soft); }
.contact-items a { color: var(--navy); font-weight: 600; }
.contact-items a:hover { text-decoration: underline; }
.ci-icon { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: var(--sky); color: var(--blue); }
.ci-icon.line { background: color-mix(in srgb, var(--line-green) 12%, white); color: var(--line-green); }

/* ---------- Footer ---------- */
.site-footer { background: linear-gradient(180deg, var(--navy), var(--navy-dark)); color: #dbe6f3; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding-top: 36px; padding-bottom: 36px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 12px; }
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-brand div { display: flex; flex-direction: column; }
.footer-brand strong { color: #fff; font-family: var(--font-head); font-size: 1.05rem; }
.muted { color: #a9bdd5; }
.contact-list a:hover { color: #fff; text-decoration: underline; }
.contact-list { display: flex; flex-direction: column; gap: 8px; }
.contact-list li { display: flex; gap: 10px; align-items: flex-start; }
.contact-list svg { margin-top: 4px; color: #7fd3c3; }

/* ---------- Utilities ---------- */
.to-top {
  position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 40;
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: var(--teal); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-hover);
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
.to-top.show { opacity: 1; visibility: visible; }

a:focus-visible, button:focus-visible { outline: 3px solid color-mix(in srgb, var(--teal) 55%, transparent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
  .ghs-group { right: 4%; transform: translateY(-55%) scale(.8); }
}

@media (max-width: 900px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .services { grid-template-columns: repeat(2, 1fr); }
  section[id] { scroll-margin-top: 90px; }
  .brand-name { font-size: 1.4rem; }
  .brand-logo { width: 52px; height: 52px; }
  .brand-logo svg { width: 26px; height: 26px; }
  .contact-items { grid-template-columns: 1fr 1fr; }
  .contact-items li:first-child { grid-column: 1 / -1; }
  .ghs-group { opacity: .25; right: -40px; }
}

@media (max-width: 600px) {
  .brand { gap: 10px; }
  .brand-logo { width: 44px; height: 44px; }
  .brand-logo svg { width: 22px; height: 22px; }
  .brand-name { font-size: 1.15rem; white-space: nowrap; }
  .brand-sub { font-size: .8rem; }
  .brand-org { font-size: .78rem; }
  .brand-sub .lbl-full { display: none; }
  .brand-sub .lbl-short { display: inline; }
  .site-header { position: relative; top: 0; }
  .header-inner { flex-wrap: wrap; row-gap: 10px; }
  .header-tools { width: 100%; align-items: stretch; }
  .updated { justify-content: center; padding: .3em .8em; font-size: .78rem; }
  .header-contact { justify-content: center; gap: 6px 14px; }
  .hc-item { font-size: .82rem; }

  .services { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .service { padding: 18px 10px 14px; }
  .service-icon { width: 54px; height: 54px; }
  .service-icon svg { width: 26px; height: 26px; }
  .service h3 { font-size: .92rem; }
  .service p, .service .ext { display: none; }

  .hero:not(.has-image) { aspect-ratio: 16 / 9; }
  .hero.has-image .slide .btn { right: 8px; bottom: 8px; padding: .35em .8em; font-size: .75rem; }
  .ghs-group { display: none; }
  .slide { padding: 12px 20px 36px; }
  .slide h1 { font-size: 1.15rem; margin: 8px 0 12px; }
  .slide .btn { padding: .45em 1em; font-size: .85rem; }
  .hero-arrow { width: 30px; height: 30px; }
  .hero-arrow.prev { left: 6px; }
  .hero-arrow.next { right: 6px; }
  .hero-foot { left: 8px; bottom: 8px; }
  .dots { padding: 4px 8px; gap: 6px; }
  .dots button { width: 8px; height: 8px; }
  .dots button[aria-selected="true"] { width: 18px; }

  .panel, .contact-card { padding: 18px 16px; }
  .contact-items, .doc-list, .news-grid { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 1.3rem; }
  .form-row { grid-template-columns: 1fr; }
  .auth-card { padding: 16px; }


  .footer-grid { grid-template-columns: 1fr; }
}
