:root {
  --bg: #fbf9f6;
  --ink: #1c2430;
  --muted: #6a7383;
  --accent: #c2452d;
  --accent-dark: #8f2f1d;
  --hero: #14203a;
  --card: #ffffff;
  --line: #e6e1d8;
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  line-height: 1.55;
}
.wrap { max-width: 1020px; margin: 0 auto; padding: 0 20px; }
h2 { border-left: 4px solid var(--accent); padding-left: 10px; }
a { color: var(--accent); }
code { background: #f0ece5; padding: 1px 5px; border-radius: 4px; }

/* top nav */
.topnav { position: sticky; top: 0; z-index: 9; background: #fff; border-bottom: 1px solid var(--line); }
.topnav .wrap { display: flex; justify-content: space-between; align-items: center; height: 52px; }
.brand { font-weight: 800; font-size: 2.15rem; color: var(--ink); text-decoration: none; letter-spacing: .5px; }
.brand span { color: var(--accent); padding: 0 2px; }
.topnav nav a { margin-left: 14px; text-decoration: none; color: var(--ink); font-size: .92rem; }
.topnav nav a:hover { color: var(--accent); }

/* hero */
.hero { background: linear-gradient(160deg, var(--hero), #0d1526 60%); color: #fff; padding: 64px 0 54px; margin-top: 0!important; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin: 0 0 14px; line-height: 1.15; }
.hero h1 b { color: #ffb199; }
.hero .lead { max-width: 640px; color: #d5dcec; font-size: 1.06rem; }
.cta { display: inline-block; margin-top: 18px; background: var(--accent); color: #fff;
  padding: 12px 22px; border-radius: 999px; text-decoration: none; font-weight: 700; }
.cta:hover { background: var(--accent-dark); }
.pills { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.pills span { background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,.22);
  color: #ffd9cc; padding: 4px 12px; border-radius: 999px; font-size: .85rem; }

/* stats strip */
.stats { background: #fff; border-bottom: 1px solid var(--line); }
.statsgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; padding: 18px 20px; }
.statsgrid div { text-align: center; }
.statsgrid b { display: block; font-size: 1.5rem; color: var(--accent); }
.statsgrid small { color: var(--muted); }

main { padding: 10px 0 30px; }
section { margin: 2.2rem 0; }
.two { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 760px) { .two, .statsgrid { grid-template-columns: 1fr; } }
.quotebox { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.quote { font-size: 1.05rem; font-style: italic; }
ul.plain { padding-left: 18px; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.step b { display: inline-block; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #fff; text-align: center; line-height: 26px; }
.step h3 { margin: 10px 0 4px; }

/* cards + gauges */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.url { font-weight: 700; overflow-wrap: anywhere; word-break: normal; margin-bottom: .5rem; }
.rtitle { font-weight: 700; }
.rurl { color: #8a8a8a; font-size: .76rem; overflow-wrap: anywhere; word-break: break-all; }
.gauges { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-start; }
.gauge { flex: 0 0 86px; text-align: center; display: inline-block; }
.gauge svg { width: 86px; height: 52px; display: block; margin: 0 auto; }
.glabel { font-size: .8rem; color: #555; display: block; }
.badge { background: #e7f0ea; border: 1px solid #b8d4c2; color: #1d6f42;
  border-radius: 999px; padding: 1px 9px; font-size: .72rem; }

/* form */
form { display: flex; gap: .5rem; max-width: 640px; }
input { flex: 1; padding: .6rem .8rem; border: 1px solid #cbc5ba; border-radius: 8px; }
button { background: var(--accent); color: #fff; border: 0; padding: .6rem 1.2rem;
  border-radius: 8px; font-weight: 700; cursor: pointer; }
button:hover { background: var(--accent-dark); }
#estimate { margin-top: .5rem; font-size: .9rem; color: #555; }
.muted { color: var(--muted); font-size: .85rem; margin: .3rem 0; }

/* the browse page: search, filters, a sortable table, pagination */
.browseform { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: 14px; }
.binput { padding: .48rem .6rem; border: 1px solid #cbc5ba; border-radius: 8px; font: inherit; font-size: .9rem; background: #fff; }
.browseform input[type=search] { flex: 1 1 260px; }
.browseform input[type=number] { width: 84px; }
.browseform button { padding: .5rem 1rem; }
.tablewrap { overflow-x: auto; margin-top: 10px; }
.browsetable { width: 100%; border-collapse: collapse; font-size: .85rem; }
.browsetable th, .browsetable td { border-bottom: 1px solid #e6e1d8; padding: 7px 8px; text-align: left; vertical-align: top; }
.browsetable th { font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.browsetable th a { color: var(--muted); text-decoration: none; }
.browsetable th a:hover { color: var(--accent); }
.browsetable td.num { text-align: right; font-variant-numeric: tabular-nums; }
.browsetable td.btitle { max-width: 340px; }
.browsetable td.btitle a { color: var(--ink); text-decoration: none; font-weight: 600; }
.browsetable td.btitle a:hover { color: var(--accent); text-decoration: underline; }
.browsetable td.burl { max-width: 260px; color: var(--muted); word-break: break-all; }
.pager { display: flex; gap: .4rem; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.pager a, .pager span { padding: .3rem .6rem; border: 1px solid #e6e1d8; border-radius: 8px; text-decoration: none; color: var(--ink); background: #fff; }
.pager span.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.sitebox { margin-top: 12px; padding: 9px 11px; background: #f7f9fb; border: 1px solid #dfe5ea;
           border-radius: 8px; font-size: .88rem; }
.sitebox small { display: block; color: var(--muted); font-size: .78rem; margin-top: 3px; }

/* the verdict: the summary is a gauge, and clicking it opens the breakdown */
.vdetails { margin: 12px 0 4px; }
.vdetails > summary { cursor: pointer; list-style: none; }
.vdetails > summary::-webkit-details-marker { display: none; }
.vdetails > summary:hover .glabel { color: var(--accent); }
.vsummary { display: flex; align-items: center; gap: 14px; }
.vtext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vband { font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.vhint { font-size: .74rem; color: var(--muted); }
.gauge.big { flex: 0 0 124px; }
.gauge.big svg { width: 124px; height: 76px; }
.gauge.big .glabel { font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }

/* the recent-scan cards: one score, not six gauges */
.rscore { display: flex; align-items: baseline; gap: 8px; }
.rscore b { font-size: 1.6rem; font-weight: 800; }
.rscore span { font-size: .78rem; color: var(--muted); text-transform: lowercase; }
.rscore.low b { color: #2e9e5b; }
.rscore.moderate b { color: #d99a1f; }
.rscore.high b { color: #d64545; }
.rcard { display: flex; gap: 12px; align-items: center; }
.rcard .gauge.big { flex: 0 0 92px; }
.rcard .gauge.big svg { width: 92px; height: 58px; }
.rcard .gauge.big .glabel { font-size: .68rem; }
.rcardtext { min-width: 0; }
/* the whole card is the link (one anchor per card): it has to LOOK clickable */
.cardlink { display: block; color: inherit; text-decoration: none; cursor: pointer;
            transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.cardlink:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(0,0,0,.07); transform: translateY(-1px); }
.cardlink:hover .rtitle { text-decoration: underline; text-underline-offset: 2px; }
.cardlink:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* the whole browse row is clickable (the headline keeps the real anchor) */
.browsetable tr.brow { cursor: pointer; }
.browsetable tr.brow:hover { background: #f6f2ea; }
.browsetable tr.brow:hover td.btitle a { color: var(--accent); text-decoration: underline; }
/* the world map (the tile grid) */
.mapwrap { overflow-x: auto; }
.worldmap { width: 100%; max-width: 720px; height: auto; display: block; }
.worldmap rect { shape-rendering: crispEdges; }

/* ---- the "live" homepage: the results first ---- */
.livehero { padding-bottom: 18px; }
.liverow { display: flex; gap: 28px; flex-wrap: wrap; align-items: flex-start; }
.liveclaim { flex: 1 1 420px; min-width: 0; }
.liveclaim h1 { font-size: 1.9rem; line-height: 1.2; margin: 0 0 .5rem; }
.liveclaim .lead { max-width: 46ch; }
.liveform { flex: 0 1 340px; }
.liveform input[type=text] {
  width: 100%; padding: .6rem .7rem; font: inherit; font-size: .95rem;
  border: 1px solid #cbc5ba; border-radius: 8px; background: #fff; }
.liveform button {
  margin-top: 6px; padding: .55rem 1.1rem; border: 0; border-radius: 8px;
  background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; }
.livenums { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 18px; }
.livenums b { display: block; font-size: 1.5rem; line-height: 1.1; }
.livenums small { color: var(--muted); font-size: .78rem; }
/* the pills and the counters, in ONE small block under the hero */
.livefacts { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.14); }
.livefacts .pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.livefacts .pills span {
  font-size: .68rem; padding: 2px 9px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35); color: #e8e2d6; background: transparent; }
.livefacts .livenums { gap: 16px; margin-top: 0; }
.livefacts .livenums b { font-size: 1.05rem; }
.livefacts .livenums small { font-size: .68rem; }
.livefeed { display: flex; flex-direction: column; gap: 2px; }
.liveitem {
  display: flex; align-items: center; gap: 14px; padding: 9px 10px;
  border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.liveitem:hover { background: #faf7f1; }
.liveitem:hover .rtitle { text-decoration: underline; }
.liveitemtext { min-width: 0; }
.liveitem .rtitle { font-weight: 700; font-size: .98rem; }
.livesub { display: flex; gap: 10px; align-items: center; font-size: .78rem; color: var(--muted); }
.livedriver { background: #fdf1ec; color: #8f2f1d; border-radius: 999px; padding: 1px 8px; }
.livesite { font-weight: 600; }
.weekbars { display: flex; gap: 6px; align-items: flex-end; height: 74px; margin-top: 10px; }
.weekbar { flex: 1 1 0; display: flex; flex-direction: column; justify-content: flex-end;
  align-items: center; height: 100%; }
.weekbarfill { width: 100%; background: #e08a4a; border-radius: 3px 3px 0 0; min-height: 2px; }
.weekbar small { color: var(--muted); font-size: .68rem; margin-top: 3px; }
.sitetable { width: 100%; max-width: 900px; font-size: .85rem; }
.sitetable th, .sitetable td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.sitetable th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.sitetable td.num, .sitetable th.num { text-align: right; font-variant-numeric: tabular-nums; }
.sitetable a { color: var(--ink); text-decoration: none; font-weight: 600; }
.sitetable a:hover { color: var(--accent); text-decoration: underline; }

/* "Something looks wrong? Tell us" */
.reportbox { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.reportbox > summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.reportbox > summary:hover { color: var(--accent); }
.reportform { display: grid; gap: .35rem; margin-top: .8rem; max-width: 520px; }
.reportform label { font-size: .82rem; color: var(--muted); margin-top: .35rem; }
.reportform select, .reportform input, .reportform textarea {
  font: inherit; font-size: .9rem; padding: .45rem .55rem;
  border: 1px solid #cbc5ba; border-radius: 8px; background: #fff; width: 100%; }
.reportform textarea { resize: vertical; }
.reportform button {
  justify-self: start; margin-top: .6rem; padding: .5rem 1rem;
  border: 0; border-radius: 8px; background: var(--accent); color: #fff;
  font-weight: 700; cursor: pointer; }
.reportform button:hover { background: var(--accent-dark); }
.reportform button:disabled { opacity: .6; cursor: default; }
.reportstatus { font-size: .85rem; }
.reportstatus.ok { color: #2e9e5b; }
.reportstatus.bad { color: #a52818; }
.err { color: #a52818; }
details { margin-top: .5rem; font-size: .92rem; }
table { border-collapse: collapse; font-size: .8rem; }
th, td { border: 1px solid #ddd; padding: .25rem .55rem; text-align: left; }

footer { background: var(--hero); color: #9aa6c0; padding: 18px 0; font-size: .85rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
