/* RadAssist — CT Cardiac Calcium Score. Brand tokens from the RadAssist site. */
:root {
  --bg: #eef3f8;
  --card: #ffffff;
  --ink: #16232f;
  --muted: #5a6b7a;
  --navy: #0f3a5f;
  --navy-d: #0a2942;
  --steel: #3d6a94;
  --teal: #0e8f9e;
  --teal-d: #0a6b77;
  --amber: #c9862f;
  --danger: #b3341f;
  --line: #dce5ee;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Sans 3", -apple-system, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.serif { font-family: "Fraunces", Georgia, serif; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px 64px;
}

/* Header */
header.site {
  background: linear-gradient(180deg, #e7eef5, var(--bg));
  border-bottom: 4px solid var(--navy);
  padding: 28px 20px 24px;
}
.brandrow {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.mark {
  width: 44px; height: 44px; border-radius: 11px; flex: none;
  background: linear-gradient(150deg, var(--navy), var(--teal-d));
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 6px 16px rgba(15, 58, 95, .25);
  font-family: "Fraunces", serif; font-weight: 600; font-size: 20px;
}
.brandrow .name { font-weight: 700; letter-spacing: 1.2px; color: var(--navy);
  font-size: 12.5px; text-transform: uppercase; }
.brandrow h1 {
  font-family: "Fraunces", serif; font-weight: 600;
  font-size: clamp(20px, 4.4vw, 27px); color: var(--navy-d);
  margin: 2px 0 0; letter-spacing: -.4px; line-height: 1.1;
}

/* Layout */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin-top: 26px;
}
@media (min-width: 860px) {
  .grid { grid-template-columns: 420px 1fr; align-items: start; }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(16, 35, 47, .05);
  padding: 22px 22px 24px;
}
.card h2 {
  font-family: "Fraunces", serif; font-weight: 600;
  font-size: 19px; color: var(--navy-d); margin: 0 0 4px;
}
.eyebrow {
  font-size: 11.5px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--steel); font-weight: 700; margin: 0 0 10px;
}

fieldset { border: none; margin: 0 0 14px; padding: 0; }
legend {
  font-size: 12.5px; font-weight: 700; letter-spacing: .4px;
  text-transform: uppercase; color: var(--teal-d); padding: 0 0 8px;
}

.field { margin-bottom: 12px; }
.field label {
  display: block; font-weight: 600; font-size: 14px;
  color: var(--navy-d); margin-bottom: 4px;
}
.field .hint { font-weight: 400; color: var(--muted); font-size: 12.5px; }

input[type="number"], select, textarea {
  width: 100%; padding: 10px 12px; font-size: 16px;
  color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 8px;
  font-family: inherit;
}
input:focus-visible, select:focus-visible, textarea:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(14, 143, 158, .35);
  outline-offset: 1px; border-color: var(--teal);
}
input[aria-invalid="true"] { border-color: var(--danger); background: #fdf3f1; }

.vessels { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.demo3 { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 520px) { .demo3 { grid-template-columns: 1fr 1fr; } }

.btn {
  appearance: none; border: none; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 16px;
  border-radius: 8px; padding: 13px 18px; width: 100%;
  background: var(--teal-d); color: #fff;
  transition: background .18s ease;
}
.btn:hover { background: var(--teal); }
.btn.secondary { background: transparent; color: var(--teal-d);
  border: 1.5px solid var(--teal-d); width: auto; padding: 9px 16px; font-size: 14px; }
.btn.secondary:hover { background: rgba(14, 143, 158, .08); }

.msg { border-radius: 8px; padding: 12px 14px; font-size: 14.5px; margin: 12px 0 0; }
.msg.warn { background: #fbf3e6; border: 1px solid #eacf9f; color: #7a531a; }
.msg.error { background: #fdf0ed; border: 1px solid #e6b6ab; color: var(--danger); }

/* Results */
.results-head { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 16px; }
.stat {
  flex: 1 1 150px; background: #f7fafc; border: 1px solid var(--line);
  border-top: 3px solid var(--teal); border-radius: 12px;
  padding: 16px 16px; text-align: center;
}
.stat .num {
  font-family: "Fraunces", serif; font-weight: 600;
  font-size: clamp(28px, 6vw, 38px); line-height: 1; color: var(--teal-d);
  letter-spacing: -.5px;
}
.stat .lbl { font-size: 12.5px; color: var(--muted); margin-top: 7px; line-height: 1.35; }

.report-tools { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.report-tools .status { font-size: 13px; color: var(--teal-d); font-weight: 600; }

textarea.report {
  width: 100%; min-height: 460px; resize: vertical;
  font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px; line-height: 1.55; color: var(--ink);
  background: #fbfdff; border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 16px; white-space: pre-wrap; word-break: break-word;
}

.placeholder {
  color: var(--muted); font-size: 15px; padding: 40px 10px; text-align: center;
}

/* Feedback panel */
.card.feedback { margin-top: 22px; padding-top: 18px; padding-bottom: 18px; }
.feedback summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.feedback summary::-webkit-details-marker { display: none; }
.feedback summary::after {
  content: "▸"; color: var(--steel); font-size: 14px; margin-left: auto;
  transition: transform .18s ease;
}
.feedback details[open] summary::after { transform: rotate(90deg); }
.fb-title {
  font-family: "Fraunces", serif; font-weight: 600;
  font-size: 17px; color: var(--navy-d);
}
.fb-intro { margin: 14px 0 2px; font-size: 15px; color: var(--ink); }
.fb-phi { margin: 0 0 14px; font-size: 12.5px; color: var(--teal-d); font-weight: 600; }
.feedback textarea { resize: vertical; }
.fb-name input { max-width: 320px; }
.fb-actions { display: flex; align-items: center; gap: 12px; margin-top: 6px; flex-wrap: wrap; }
.fb-actions .status { font-size: 13px; color: var(--teal-d); font-weight: 600; }
a.btn { display: inline-block; text-align: center; text-decoration: none; line-height: normal; }

footer.site {
  max-width: 1080px; margin: 40px auto 0; padding: 20px;
  border-top: 1px solid var(--line); color: var(--muted);
  font-size: 12.5px; line-height: 1.5;
}
footer.site strong { color: var(--navy-d); }

.privacy {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(14, 143, 158, .1); color: var(--teal-d);
  font-weight: 700; font-size: 11.5px; letter-spacing: .5px; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
