/* ============================================================
   Second Opinion Hospital
   Calm medical trust. Mobile-first. System fonts only, so it
   renders instantly on a mid-range Android over patchy data.
   ============================================================ */

:root {
  --ink:        #0B2027;
  --ink-soft:   #40555E;
  --ink-faint:  #6B7F87;

  --teal-900:   #0A3844;
  --teal-700:   #11606E;
  --teal-600:   #167B8C;
  --teal-100:   #D6E9EC;
  --teal-50:    #EDF6F7;

  --paper:      #FFFFFF;
  --sand:       #F8F6F2;
  --line:       #DCE5E7;

  --red:        #9B2226;
  --red-bg:     #FDF0EF;
  --amber:      #8A5A0B;
  --amber-bg:   #FDF6E7;
  --green:      #1F6B4A;
  --green-bg:   #EDF7F1;

  --radius:     10px;
  --radius-lg:  16px;
  --shadow:     0 1px 2px rgba(11,32,39,.05), 0 8px 24px rgba(11,32,39,.06);
  --wrap:       1120px;
  --prose:      64ch;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

/* ---------------- layout ---------------- */

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.prose { max-width: var(--prose); }
.section { padding-block: 56px; }
.section--sand { background: var(--sand); }
.section--teal { background: var(--teal-50); }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }

/* ---------------- type ---------------- */

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; font-weight: 650; letter-spacing: -.011em; }
h1 { font-size: clamp(1.85rem, 5.2vw, 2.85rem); color: var(--teal-900); }
h2 { font-size: clamp(1.4rem, 3.6vw, 1.95rem); color: var(--teal-900); }
h3 { font-size: 1.16rem; }
p  { margin: 0 0 1rem; }
a  { color: var(--teal-700); text-underline-offset: 3px; }
a:hover { color: var(--teal-900); }

.eyebrow {
  font-size: .76rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--teal-600); margin-bottom: .8rem;
}
.lead  { font-size: 1.12rem; color: var(--ink-soft); }
.small { font-size: .9rem; color: var(--ink-faint); }
.muted { color: var(--ink-faint); }
strong { font-weight: 650; }

/* ---------------- header ---------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 16px; min-height: 66px; }

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--teal-900); }
.brand-mark {
  width: 36px; height: 36px; flex: none; border-radius: 9px;
  background: var(--teal-700); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: .95rem;
}
.brand-name { font-weight: 680; font-size: 1.03rem; letter-spacing: -.01em; line-height: 1.15; }
.brand-sub  { font-size: .72rem; color: var(--ink-faint); letter-spacing: .02em; }

.nav { margin-left: auto; display: none; gap: 26px; align-items: center; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: .94rem; font-weight: 520; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--teal-700); }

.nav-toggle {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 12px; font: inherit; font-size: .9rem; color: var(--ink); cursor: pointer;
}
.mobile-nav { display: none; border-top: 1px solid var(--line); padding: 10px 0 18px; }
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block; padding: 11px 2px; color: var(--ink);
  text-decoration: none; border-bottom: 1px solid var(--line); font-weight: 520;
}

@media (min-width: 900px) {
  .nav { display: flex; }
  .nav-toggle, .mobile-nav { display: none !important; }
}

/* ---------------- buttons ---------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px; border-radius: 999px; border: 1.5px solid transparent;
  font: inherit; font-weight: 620; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.btn--primary { background: var(--teal-700); color: #fff; }
.btn--primary:hover { background: var(--teal-900); color: #fff; }
.btn--ghost { background: transparent; color: var(--teal-700); border-color: var(--teal-100); }
.btn--ghost:hover { border-color: var(--teal-700); color: var(--teal-900); }
.btn--danger { background: var(--red); color: #fff; }
.btn--block { width: 100%; }
.btn--lg { padding: 17px 34px; font-size: 1.06rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------------- hero ---------------- */

.hero { padding-block: 52px 44px; background:
  linear-gradient(178deg, var(--teal-50) 0%, #fff 78%); }
.hero h1 { margin-bottom: .5em; }
.hero .lead { font-size: 1.18rem; max-width: 56ch; }

.promise {
  margin: 26px 0 0; padding: 20px 22px;
  background: var(--paper); border: 1px solid var(--teal-100);
  border-left: 4px solid var(--teal-700);
  border-radius: var(--radius); box-shadow: var(--shadow);
  max-width: 60ch;
}
.promise p { margin: 0; font-size: 1.03rem; }
.promise p + p { margin-top: .5rem; }
.promise strong { color: var(--teal-900); }

.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 26px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; font-size: .93rem; color: var(--ink-soft); }
.tick { color: var(--teal-600); font-weight: 700; }

/* ---------------- cards & grids ---------------- */

.grid { display: grid; gap: 18px; }
@media (min-width: 700px)  { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 24px;
}
.card h3 { margin-bottom: .45em; color: var(--teal-900); }
.card p:last-child { margin-bottom: 0; }
.card--link { text-decoration: none; color: inherit; display: block; transition: border-color .15s, box-shadow .15s; }
.card--link:hover { border-color: var(--teal-600); box-shadow: var(--shadow); color: inherit; }

.step-num {
  width: 34px; height: 34px; border-radius: 999px; flex: none;
  background: var(--teal-700); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: .95rem; margin-bottom: 14px;
}

/* ---------------- notices ---------------- */

.notice { padding: 16px 18px; border-radius: var(--radius); border: 1px solid; margin: 0 0 20px; }
.notice p:last-child { margin-bottom: 0; }
.notice--warn   { background: var(--amber-bg); border-color: #E8D5A8; color: var(--amber); }
.notice--danger { background: var(--red-bg);   border-color: #EFC9C7; color: var(--red); }
.notice--ok     { background: var(--green-bg); border-color: #C5E2D2; color: var(--green); }
.notice--info   { background: var(--teal-50);  border-color: var(--teal-100); color: var(--teal-900); }
.notice strong { font-weight: 700; }

/* ---------------- forms ---------------- */

.form-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 26px 22px; box-shadow: var(--shadow);
}
.field { margin-bottom: 20px; }
.field > label, .field-label {
  display: block; font-weight: 620; margin-bottom: 6px; font-size: .97rem; color: var(--ink);
}
.field .hint { display: block; font-size: .87rem; color: var(--ink-faint); margin: -2px 0 8px; }
.req { color: var(--red); font-weight: 700; }

input[type=text], input[type=tel], input[type=email], input[type=number],
input[type=password], input[type=date], select, textarea {
  width: 100%; padding: 13px 14px; font: inherit; font-size: 16px; /* 16px stops iOS zoom */
  color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--line); border-radius: var(--radius);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgba(22,123,140,.14);
}
textarea { min-height: 110px; resize: vertical; line-height: 1.55; }

.row { display: grid; gap: 16px; }
@media (min-width: 620px) { .row--2 { grid-template-columns: 1fr 1fr; } .row--3 { grid-template-columns: repeat(3,1fr); } }

/* checkbox / radio as tappable cards — thumbs, not cursors */
.choice {
  display: flex; gap: 13px; align-items: flex-start;
  padding: 15px 16px; border: 1.5px solid var(--line);
  border-radius: var(--radius); cursor: pointer; background: var(--paper);
  margin-bottom: 10px; transition: border-color .13s, background .13s;
}
.choice:hover { border-color: var(--teal-600); }
.choice input { margin: 3px 0 0; width: 20px; height: 20px; flex: none; accent-color: var(--teal-700); }
.choice-body { flex: 1; }
.choice-body b { display: block; font-weight: 620; }
.choice-body span { display: block; font-size: .9rem; color: var(--ink-faint); margin-top: 2px; }
.choice:has(input:checked) { border-color: var(--teal-700); background: var(--teal-50); }

/* upload */
.drop {
  border: 2px dashed var(--teal-100); border-radius: var(--radius-lg);
  padding: 30px 20px; text-align: center; background: var(--teal-50);
}
.drop input[type=file] { display: none; }
.drop .btn { margin-top: 12px; }
.file-list { list-style: none; padding: 0; margin: 16px 0 0; }
.file-list li {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px;
  font-size: .92rem; background: var(--paper);
}
.file-list .fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list .fsize { color: var(--ink-faint); font-size: .85rem; flex: none; }
.file-list .bad { color: var(--red); }

/* progress */
.steps { display: flex; gap: 6px; margin-bottom: 26px; }
.steps span { flex: 1; height: 4px; border-radius: 99px; background: var(--line); }
.steps span.done { background: var(--teal-700); }

/* ---------------- emergency gate ---------------- */

.gate-stop { background: var(--red-bg); border: 2px solid var(--red); border-radius: var(--radius-lg); padding: 28px 24px; }
.gate-stop h2 { color: var(--red); }
.gate-stop .btn--danger { font-size: 1.1rem; }

/* ---------------- tables ---------------- */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: .94rem; min-width: 560px; }
table.data th, table.data td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); font-weight: 700; }
table.data tr:hover td { background: var(--sand); }

.pill {
  display: inline-block; padding: 3px 11px; border-radius: 99px;
  font-size: .78rem; font-weight: 650; white-space: nowrap;
}
.pill--new   { background: var(--teal-50);  color: var(--teal-900); }
.pill--wait  { background: var(--amber-bg); color: var(--amber); }
.pill--live  { background: #EDF0FB; color: #2F3E8F; }
.pill--done  { background: var(--green-bg); color: var(--green); }
.pill--late  { background: var(--red-bg);   color: var(--red); }

/* ---------------- opinion sheet ---------------- */

.verdict {
  padding: 22px 24px; border-radius: var(--radius-lg);
  background: var(--teal-50); border: 1px solid var(--teal-100); margin-bottom: 26px;
}
.verdict .eyebrow { margin-bottom: .4rem; }
.verdict h2 { margin: 0; font-size: clamp(1.25rem, 3.4vw, 1.6rem); }

.sheet { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px 24px; background: var(--paper); }
.sheet h3 { color: var(--teal-900); margin-top: 1.8em; }
.sheet h3:first-of-type { margin-top: 0; }
.signature { margin-top: 32px; padding-top: 20px; border-top: 2px solid var(--teal-100); }
.signature .name { font-weight: 680; color: var(--teal-900); font-size: 1.05rem; }

dl.meta { display: grid; gap: 2px 18px; margin: 0; }
@media (min-width: 620px) { dl.meta { grid-template-columns: max-content 1fr; } }
dl.meta dt { font-size: .84rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .05em; font-weight: 650; padding-top: 3px; }
dl.meta dd { margin: 0 0 8px; }

/* ---------------- footer ---------------- */

.site-footer { background: var(--teal-900); color: #C9DDE1; padding-block: 44px 28px; margin-top: 64px; font-size: .93rem; }
.site-footer h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.site-footer a { color: #C9DDE1; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 30px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; } }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-bottom {
  margin-top: 34px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.14);
  font-size: .85rem; color: #9FBCC3; display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: space-between;
}

/* ---------------- misc ---------------- */

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--teal-900); color: #fff;
  padding: 10px 16px; z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

.sticky-cta {
  position: fixed; inset: auto 0 0 0; z-index: 40; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96); border-top: 1px solid var(--line);
  display: flex; gap: 10px;
}
@media (min-width: 900px) { .sticky-cta { display: none; } }
body.has-sticky { padding-bottom: 82px; }

hr.rule { border: none; border-top: 1px solid var(--line); margin: 40px 0; }

/* ---------------- print (this is how the opinion becomes a PDF) ---------------- */

@media print {
  .site-header, .site-footer, .sticky-cta, .no-print, .btn { display: none !important; }
  body { font-size: 11.5pt; color: #000; background: #fff; }
  .wrap { max-width: none; padding: 0; }
  .sheet, .verdict, .card { border: 1px solid #999; box-shadow: none; break-inside: avoid; }
  .verdict { background: #f2f2f2 !important; }
  a { color: #000; text-decoration: none; }
  .print-only { display: block !important; }
  @page { margin: 16mm; }
}
.print-only { display: none; }
