:root {
  --bg: #f6f7f4;
  --card: #ffffff;
  --ink: #1b2b2a;
  --muted: #5d6f6d;
  --line: #dfe5e1;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --teal-soft: #e6f2f0;
  --sky: #e8f1f6;
  --amber: #b45309;
  --red: #b91c1c;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.6; -webkit-text-size-adjust: 100%; }
img { max-width: 100%; display: block; }
.w { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
a { color: var(--teal-dark); }

/* Header: evening-teal gradient, not a plain white bar */
.top { background: linear-gradient(100deg, #0b3d3a 0%, #0f766e 55%, #2b8a9e 100%); color: #fff; position: sticky; top: 0; z-index: 10; box-shadow: 0 2px 18px rgba(11, 61, 58, .25); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; }
.brand b { font-weight: 700; }
.mark { width: 36px; height: 36px; border-radius: 8px; background: #fff; padding: 2px; }
.links { display: flex; gap: 14px; font-size: .85rem; align-items: center; flex-wrap: wrap; }
.links a { color: #e6f7f4; text-decoration: none; }
.links a:hover { color: #fff; text-decoration: underline; }
.links .pill { border: 1px solid rgba(255,255,255,.55); border-radius: 999px; padding: 5px 14px; }

/* Full-bleed photo hero */
.hero { position: relative; min-height: 460px; display: flex; align-items: flex-end; color: #fff; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 40, 38, .15) 0%, rgba(8, 40, 38, .55) 55%, rgba(8, 40, 38, .85) 100%); }
.hero-copy { position: relative; padding-top: 64px; padding-bottom: 40px; }
.ey { font-size: .72rem; font-weight: 700; letter-spacing: .18em; color: var(--teal); margin-bottom: 8px; }
.hero .ey { color: #9ee6dc; }
h1 { font-size: clamp(1.75rem, 5vw, 2.8rem); line-height: 1.12; margin: 0 0 12px; max-width: 20ch; }
.lead { margin: 0 0 20px; max-width: 60ch; color: #e3f1ef; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; border: 1px solid var(--teal-dark); border-radius: 999px; padding: 10px 20px; font-size: .88rem; text-decoration: none; color: var(--teal-dark); background: var(--card); cursor: pointer; font-family: inherit; min-height: 44px; }
.btn.primary { background: var(--teal-dark); color: #fff; border-color: var(--teal-dark); }
.hero .btn.primary { background: #14b8a6; border-color: #14b8a6; color: #06302d; font-weight: 600; }
.btn.ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.6); }
.facts { list-style: none; padding: 0; margin: 22px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.facts li { font-size: .72rem; letter-spacing: .1em; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 3px 11px; color: #d7efec; }

/* Photo gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; }
.gallery figure { margin: 0; position: relative; border-radius: 14px; overflow: hidden; box-shadow: 0 6px 22px rgba(27, 43, 42, .12); }
.gallery img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 14px 10px; font-size: .8rem; font-weight: 600; letter-spacing: .05em; color: #fff; background: linear-gradient(180deg, transparent, rgba(8, 40, 38, .8)); }

/* Tabs + panel */
.tabs { display: flex; gap: 8px; margin: 28px auto 0; max-width: 1080px; padding: 0 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 0 0 auto; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 9px 18px; font-size: .85rem; cursor: pointer; font-family: inherit; min-height: 40px; }
.tab.is-active { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; font-weight: 600; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 28px; margin-top: 14px; box-shadow: 0 4px 18px rgba(27, 43, 42, .06); }
.panel h2 { margin-top: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.code { font-size: .68rem; letter-spacing: .1em; background: var(--teal-soft); color: var(--teal-dark); border-radius: 999px; padding: 2px 10px; font-weight: 700; }
.muted { color: var(--muted); }
.controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.controls label { font-size: .8rem; font-weight: 600; color: var(--muted); }
.controls input, .controls select { font: inherit; font-size: 16px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: #fff; color: var(--ink); min-height: 42px; }
.controls input { flex: 1 1 180px; }
.status { font-size: .82rem; color: var(--muted); margin: 6px 0; }
.status.warn { color: var(--amber); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table.data { width: 100%; border-collapse: collapse; font-size: .85rem; }
.data th, .data td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data th { background: var(--sky); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.data tr:last-child td { border-bottom: 0; }
.mag { display: inline-block; min-width: 38px; text-align: center; border-radius: 999px; padding: 1px 8px; font-weight: 700; background: var(--teal-soft); color: var(--teal-dark); }
.mag.m4 { background: #fef3c7; color: var(--amber); }
.mag.m6 { background: #fee2e2; color: var(--red); }
.tag { font-size: .68rem; font-weight: 700; letter-spacing: .08em; color: var(--amber); }
.src { font-size: .8rem; color: var(--muted); margin-top: 12px; }
.links-list { padding-left: 18px; }
.links-list li { margin: 6px 0; }
.result { margin-top: 10px; }
.score { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; background: var(--sky); border-radius: 14px; padding: 16px 18px; }
.score .num { font-size: 2rem; font-weight: 700; line-height: 1; }
.band-Low { color: var(--teal-dark); }
.band-Moderate { color: var(--amber); }
.band-High { color: var(--red); }
.bars { display: grid; gap: 6px; margin-top: 12px; }
.bar { display: grid; grid-template-columns: 90px 1fr 34px; gap: 10px; align-items: center; font-size: .8rem; }
.bar i { display: block; height: 8px; border-radius: 99px; background: linear-gradient(90deg, #14b8a6, #0f766e); }
.bar span:first-child { color: var(--muted); text-transform: capitalize; }
.track { background: var(--line); border-radius: 99px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: linear-gradient(180deg, #fff, var(--teal-soft)); }
.card h3 { margin: 0 0 6px; font-size: 1rem; }
.card p { margin: 0 0 8px; font-size: .88rem; color: var(--muted); }
.card a { font-size: .78rem; word-break: break-all; display: block; }

.band { background: linear-gradient(100deg, var(--teal-soft), var(--sky)); border-block: 1px solid var(--line); margin-top: 36px; padding: 32px 0; }
.band .ey { color: var(--teal-dark); }
.band h2 { margin: 0 0 8px; font-size: 1.3rem; }
.band p { margin: 0; max-width: 62ch; }
.ip-net { background: #0b3d3a; color: #cdeee9; font-size: .82rem; }
.ip-net .w { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.ip-net a { color: #fff; }
.foot { padding: 22px 0; color: var(--muted); font-size: .8rem; }
.apin { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

@media (max-width: 720px) {
  .hero { min-height: 520px; }
  .links a:not(.pill) { display: none; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery figure:last-child { grid-column: span 2; }
  .panel { padding: 18px; border-radius: 12px; }
  .cards { grid-template-columns: 1fr; }
  .data th:nth-child(3), .data td:nth-child(3) { display: none; }
}

/* ===== Colour redesign (Oct 2026): sunset + teal, accent per hazard ===== */
body { background: linear-gradient(180deg, #fff7ed 0%, #fdf2f8 40%, #f0fdfa 100%); }
.top { background: linear-gradient(100deg, #9a3412 0%, #db2777 50%, #0f766e 100%); }
.hero-bg::after { background: linear-gradient(180deg, rgba(124,45,18,.15) 0%, rgba(131,24,67,.55) 55%, rgba(19,78,74,.9) 100%); }
.hero .ey { color: #fed7aa; }
.hero .btn.primary { background: linear-gradient(90deg, #fb923c, #f472b6); border: 0; color: #3b0a1a; font-weight: 700; }
.seismo { width: 100%; max-width: 520px; height: 44px; margin: 18px 0 0; }
.seismo path { fill: none; stroke: #fdba74; stroke-width: 2.5; stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 4s ease-in-out infinite; }
@keyframes draw { 60%,100% { stroke-dashoffset: 0; } }
.facts li { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.4); color: #fff; }
.gallery figcaption { background: linear-gradient(180deg, transparent, rgba(131,24,67,.85)); }
.tab { background: #fff; border: 2px solid var(--c); color: #1f2937; font-weight: 600; }
.tab.is-active { background: var(--c); border-color: var(--c); color: #fff; box-shadow: 0 6px 16px -6px var(--c); }
.panel { background: rgba(255,255,255,.82); border: 0; box-shadow: 0 10px 40px -18px rgba(131,24,67,.35); backdrop-filter: blur(6px); }
.tabpane { --c: #0f766e; }
.pane-head { position: relative; margin: -28px -28px 18px; height: 170px; border-radius: 16px 16px 0 0; overflow: hidden; }
.pane-head img { width: 100%; height: 100%; object-fit: cover; }
.pane-head::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--c) 0%, color-mix(in srgb, var(--c) 60%, transparent) 55%, transparent 100%); }
.ph-in { position: absolute; z-index: 1; left: 22px; bottom: 18px; display: flex; gap: 14px; align-items: center; color: #fff; }
.ph-in h2 { margin: 0 !important; color: #fff; font-size: 1.5rem; text-shadow: 0 1px 6px rgba(0,0,0,.3); }
.ico { width: 52px; height: 52px; border-radius: 16px; background: rgba(255,255,255,.95); display: grid; place-items: center; flex: none; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.ico svg { width: 30px; height: 30px; fill: none; stroke: var(--c); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ring { transform-origin: 12px 12px; animation: pulse 2.2s ease-out infinite; }
.ring.r2 { animation-delay: .7s; }
@keyframes pulse { 0% { opacity: .9; transform: scale(.5); } 100% { opacity: 0; transform: scale(1.15); } }
.spin { transform-origin: 12px 12px; animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.chip { display: inline-block; margin-top: 4px; font-size: .72rem; font-weight: 600; letter-spacing: .04em; background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.5); border-radius: 999px; padding: 2px 10px; color: #fff; }
.data th { background: color-mix(in srgb, var(--c) 12%, #fff); color: #374151; }
.table-wrap { border-color: color-mix(in srgb, var(--c) 25%, #fff); }
.mag.m4 { background: #fef3c7; color: #92400e; }
.tag { background: #fef3c7; color: #92400e; padding: 1px 8px; border-radius: 999px; }
.btn.primary { background: var(--c, #0f766e); border-color: var(--c, #0f766e); }
.score { background: linear-gradient(120deg, #f0fdf4, #fff7ed); }
.gauge { width: 150px; height: auto; }
.needle { transform-origin: 60px 62px; transform-box: view-box; transition: transform 1.2s cubic-bezier(.2,1.4,.4,1); }
.bar i { background: linear-gradient(90deg, #16a34a, #f59e0b, #dc2626); }
.card { border: 0; background: linear-gradient(160deg, #f5f3ff, #fdf2f8); box-shadow: 0 6px 20px -12px #6d28d9; border-top: 4px solid #6d28d9; }
.card a { color: #5b21b6; }
.band { background: linear-gradient(100deg, #ffedd5, #fce7f3, #ccfbf1); border: 0; }
.ip-net { background: linear-gradient(90deg, #134e4a, #831843); color: #fde7f3; }
.foot .w { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: #4b5563; }
.foot-logo { width: 40px; height: 40px; border-radius: 10px; background: #fff; padding: 2px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
@media (max-width: 720px) { .pane-head { margin: -18px -18px 16px; height: 150px; border-radius: 12px 12px 0 0; } }
@media (prefers-reduced-motion: reduce) { .seismo path, .ring, .spin { animation: none; } .seismo path { stroke-dashoffset: 0; } .needle { transition: none; } }
