/* ============================================================
   Signal Care — clean modern UI
   Palette pulled from the main Signal site (deep teal-green)
   ============================================================ */
@import url("https://api.fontshare.com/v2/css?f[]=general-sans@500,600,700&f[]=hanken-grotesk@400,500,600&display=swap");

:root {
  --brand:        #0f6667;
  --brand-600:    #0c5556;
  --brand-400:    #2f8b8c;
  --brand-soft:   #e6f7f8;
  --brand-mist:   #f2fafa;
  --ink:          #0f1e1f;
  --ink-soft:     #3f4948;
  --ink-mute:     #6d7b7b;
  --line:         #e2ecec;
  --line-strong:  #cddcdb;
  --bg:           #f6fafa;
  --surface:      #ffffff;
  --ok:           #145c3c;
  --ok-soft:      #e7f6ee;
  --warn:         #9a6a09;
  --warn-soft:    #fdf3e0;
  --bad:          #8e2e23;
  --bad-soft:     #fdeeec;
  --r-sm: 10px;
  --r:    16px;
  --r-lg: 22px;
  --r-full: 999px;
  --shadow-sm: 0 1px 2px rgba(15, 30, 31, .05);
  --shadow:    0 6px 24px rgba(15, 102, 103, .07);
  --font-display: "General Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 940px; margin: 0 auto; padding: 0 22px; }
.wrap.main { padding-top: 40px; padding-bottom: 72px; }

/* ---------- header ---------- */
.topbar {
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: saturate(160%) blur(8px);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand__mark { width: 30px; color: var(--brand); flex: none; }
.brand__name { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -.02em; }
.brand__tag {
  font-family: var(--font-display);
  font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand); background: var(--brand-soft);
  padding: 3px 9px; border-radius: var(--r-full);
}
.topbar nav { display: flex; align-items: center; gap: 6px; }
.topbar nav a {
  color: var(--ink-soft);
  font-size: 14.5px; font-weight: 500;
  padding: 8px 14px; border-radius: var(--r-full);
  text-decoration: none;
}
.topbar nav a:hover { background: var(--brand-mist); color: var(--brand); text-decoration: none; }
.topbar nav a.on { background: var(--brand-soft); color: var(--brand); }

.foot { border-top: 1px solid var(--line); background: var(--surface); color: var(--ink-mute); font-size: 13.5px; padding: 22px 0; }

/* ---------- typography ---------- */
h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.1;
  letter-spacing: -.03em;
  font-weight: 600;
  margin: 0 0 10px;
}
h2 { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -.015em; margin: 0 0 14px; }
h3 { font-family: var(--font-display); font-size: 15px; font-weight: 600; margin: 0 0 8px; }
p.lead { font-size: 17.5px; color: var(--ink-soft); margin: 0 0 30px; max-width: 62ch; }
.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 12px;
}
.small { font-size: 13.5px; color: var(--ink-mute); }
.hint { display: block; font-weight: 400; color: var(--ink-mute); font-size: 13px; margin-top: 4px; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

/* ---------- cards ---------- */
.box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.box > h2 { display: flex; align-items: center; gap: 10px; }
.box > h2[data-step]::before {
  content: attr(data-step);
  display: inline-grid; place-items: center;
  width: 26px; height: 26px;
  background: var(--brand-soft); color: var(--brand);
  border-radius: var(--r-full);
  font-size: 13px; font-weight: 600;
}

.row { display: flex; gap: 18px; flex-wrap: wrap; }
.row > * { flex: 1 1 230px; }

/* ---------- forms ---------- */
label { display: block; font-weight: 500; font-size: 14px; margin-bottom: 6px; color: var(--ink); }
.field { margin-bottom: 18px; }

input[type=text], input[type=email], input[type=tel], input[type=password],
input[type=number], input[type=date], select, textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: #fff;
  font: inherit;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #9aa8a8; }
textarea { min-height: 104px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand-400);
  box-shadow: 0 0 0 4px rgba(15, 102, 103, .12);
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%236d7b7b' stroke-width='1.6' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  padding-right: 38px;
}
.choices .field > label:first-child { font-weight: 500; margin-bottom: 10px; }
.choices label:has(input[type=radio]) {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-strong); border-radius: var(--r-full);
  padding: 7px 16px; margin: 0 8px 8px 0; cursor: pointer;
  background: #fff; font-weight: 400;
  transition: border-color .15s, background .15s;
}
.choices label:has(input[type=radio]:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 500; }
input[type=radio], input[type=checkbox] { accent-color: var(--brand); width: 16px; height: 16px; margin: 0; }
label:has(> input[type=checkbox]) { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; color: var(--ink-soft); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand); color: #fff;
  border: 1px solid var(--brand);
  border-radius: var(--r-full);
  padding: 12px 26px;
  font-family: var(--font-display);
  font-size: 15px; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: transform .12s ease, background .15s, box-shadow .15s;
  box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.sec { background: #fff; color: var(--brand); border-color: var(--line-strong); box-shadow: none; }
.btn.sec:hover { background: var(--brand-mist); border-color: var(--brand-400); }
.btn.sm { padding: 7px 16px; font-size: 13.5px; }

/* ---------- messages ---------- */
.msg { border-radius: var(--r); padding: 14px 18px; margin-bottom: 20px; border: 1px solid var(--line); background: #fff; }
.msg.ok { background: var(--ok-soft); border-color: #b6e0c9; color: var(--ok); }
.msg.err { background: var(--bad-soft); border-color: #f2beb8; color: var(--bad); }

/* ---------- estimate ---------- */
.estimate {
  background: linear-gradient(180deg, var(--brand-soft), var(--brand-mist));
  border: 1px solid #c8e8e8;
  border-radius: var(--r);
  padding: 22px 24px;
}
.estimate .total {
  font-family: var(--font-display);
  font-size: 40px; font-weight: 600; letter-spacing: -.03em;
  color: var(--brand); line-height: 1.1;
}
.estimate ul { margin: 14px 0 0; padding: 0; list-style: none; }
.estimate li {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 14px; color: var(--ink-soft);
  padding: 7px 0; border-top: 1px solid rgba(15, 102, 103, .12);
}

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  font-family: var(--font-display);
  font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-mute); background: var(--brand-mist);
  white-space: nowrap;
}
tr:last-child td { border-bottom: 0; }
.box table { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }

/* ---------- tags / codes ---------- */
.tag {
  display: inline-block;
  background: var(--brand-soft); color: var(--brand);
  border-radius: var(--r-full);
  padding: 4px 13px;
  font-size: 12.5px; font-weight: 600;
}
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }

.code {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 24px; font-weight: 600; letter-spacing: .08em;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: var(--r);
  padding: 12px 22px;
}

/* ---------- progress steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li {
  position: relative;
  padding: 0 0 22px 30px;
  color: var(--ink-mute);
  font-size: 14.5px;
}
.steps li::before {
  content: "";
  position: absolute; left: 0; top: 5px;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: #fff;
}
.steps li::after {
  content: "";
  position: absolute; left: 6px; top: 21px; bottom: 0;
  width: 2px; background: var(--line);
}
.steps li:last-child::after { display: none; }
.steps li.done { color: var(--ink-soft); }
.steps li.done::before { background: var(--brand-400); border-color: var(--brand-400); }
.steps li.now { color: var(--brand); font-weight: 600; }
.steps li.now::before { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 24px; padding-bottom: 10px; }
.tabs a {
  padding: 8px 16px;
  border-radius: var(--r-full);
  font-size: 14.5px; font-weight: 500;
  color: var(--ink-soft); text-decoration: none;
}
.tabs a:hover { background: var(--brand-mist); color: var(--brand); text-decoration: none; }
.tabs a.on { background: var(--brand); color: #fff; }

.hidden { display: none; }

@media (max-width: 640px) {
  .wrap.main { padding-top: 28px; }
  .box { padding: 20px; border-radius: var(--r); }
  .topbar nav a { padding: 8px 10px; font-size: 14px; }
  .brand__tag { display: none; }
}

@media print {
  .topbar, .foot, .btn { display: none; }
  body { background: #fff; }
  .box { box-shadow: none; }
}
