/* hxad.eu.org — Pet Insurance Decision Tool
   Single stylesheet, no frameworks, no external requests. */

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --ink: #12161f;
  --ink-soft: #4a5364;
  --ink-mute: #6f7787;
  --line: #e2e6ee;
  --brand: #0f5c6b;
  --brand-2: #14808f;
  --accent: #c2703c;
  --good: #1b7a4b;
  --warn: #a8621b;
  --bad: #a83232;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(18, 22, 31, .05), 0 8px 24px rgba(18, 22, 31, .06);
  --maxw: 1040px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-2); }

h1, h2, h3 { line-height: 1.25; letter-spacing: -.015em; }
h1 { font-size: clamp(1.65rem, 3.4vw, 2.35rem); margin: 0 0 .6rem; }
h2 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); margin: 2.2rem 0 .6rem; }
h3 { font-size: 1.05rem; margin: 1.6rem 0 .4rem; }
p { margin: 0 0 1rem; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-head {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 58px;
}
.brand {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.brand span { color: var(--brand); }
.nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .9rem;
  padding: 7px 10px;
  border-radius: 8px;
}
.nav a:hover { background: #eef3f6; color: var(--ink); }
.nav a[aria-current="page"] { background: #e7f1f3; color: var(--brand); font-weight: 600; }

/* ---------- hero ---------- */
.hero { padding: 40px 0 8px; }
.hero .lede { font-size: 1.06rem; color: var(--ink-soft); max-width: 62ch; margin-bottom: 0; }

/* ---------- calculator ---------- */
.calc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 26px 0 8px;
  align-items: start;
}
@media (max-width: 820px) { .calc { grid-template-columns: 1fr; } }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.panel h2 { margin: 0 0 14px; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute); font-weight: 700; }

.field { margin-bottom: 13px; }
.field label { display: block; font-size: .875rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 4px; }
.field .hint { display: block; font-weight: 400; color: var(--ink-mute); font-size: .78rem; margin-top: 3px; }

input[type="number"], select {
  width: 100%;
  padding: 10px 11px;
  font-size: .95rem;
  font-family: inherit;
  color: var(--ink);
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 9px;
  appearance: none;
}
select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%236f7787' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
input:focus, select:focus { outline: 2px solid #9fd0d8; outline-offset: 1px; border-color: var(--brand-2); }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.btn {
  display: inline-block;
  border: 0;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--brand-2); color: #fff; }
.btn.ghost { background: #eef3f6; color: var(--brand); }

/* ---------- results ---------- */
#results .verdict {
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  background: #f4f8fa;
}
#results .verdict strong { display: block; font-size: 1.05rem; margin-bottom: 2px; }
#results .verdict .sub { color: var(--ink-soft); font-size: .88rem; }
.v-good { background: #eef8f1; border-color: #cbe7d6; }
.v-warn { background: #fdf6ec; border-color: #f0dfc2; }
.v-bad  { background: #fbf0f0; border-color: #eed3d3; }

.stat { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.stat:last-of-type { border-bottom: 0; }
.stat .k { color: var(--ink-soft); font-size: .9rem; }
.stat .v { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }

.bars { margin: 14px 0 4px; }
.bar-row { margin-bottom: 9px; }
.bar-row .lab { display: flex; justify-content: space-between; font-size: .82rem; color: var(--ink-soft); margin-bottom: 3px; }
.bar { height: 10px; border-radius: 6px; background: #e9edf3; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 6px; transition: width .18s ease; }
.bar.ins i { background: var(--brand-2); }
.bar.self i { background: #b9c2d0; }

.note {
  font-size: .82rem;
  color: var(--ink-mute);
  background: #fbfcfe;
  border-left: 3px solid var(--line);
  padding: 8px 12px;
  border-radius: 0 8px 8px 0;
  margin: 14px 0 0;
}

/* ---------- content ---------- */
.content { padding-bottom: 10px; }
.content article { max-width: 72ch; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin: 20px 0 8px;
}
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
}
.card:hover { border-color: #cfe0e5; color: var(--ink); }
.card b { display: block; margin-bottom: 3px; }
.card span { color: var(--ink-mute); font-size: .86rem; }

table { width: 100%; border-collapse: collapse; margin: 14px 0 18px; font-size: .92rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f2f5f9; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-mute); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }

.callout {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: #fffaf6;
  border-radius: 0 10px 10px 0;
  padding: 14px 16px;
  margin: 18px 0;
  font-size: .93rem;
}
.callout strong { color: var(--ink); }

ul, ol { padding-left: 1.2rem; }
li { margin-bottom: .4rem; }

.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 600; }
.faq details[open] summary { margin-bottom: 8px; }
.faq p { margin: 0; color: var(--ink-soft); }

.breadcrumb { font-size: .82rem; color: var(--ink-mute); margin: 18px 0 10px; }
.breadcrumb a { color: var(--ink-mute); }

/* ---------- footer ---------- */
.site-foot {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 28px 0 34px;
  font-size: .87rem;
  color: var(--ink-mute);
}
.site-foot .cols { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.site-foot a { color: var(--ink-soft); text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 14px; }
.site-foot p { margin: 12px 0 0; max-width: 70ch; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
