/* Akasha Virtual Rehab — styles matched to akashaintegrativehealth.com */
:root {
  --teal-900: #16504C;
  --teal-700: #237A73;
  --teal-500: #3B9C93;
  --teal-100: #E4EEEC;
  --indigo: #332B5E;
  --paper: #FBFAF7;
  --white: #FFFFFF;
  --sage-100: #F1F2EC;
  --line: #DCDACF;
  --ink: #23201C;
  --muted: #58534C;
  --ochre: #B7832F;
  --ochre-100: #F7EEDC;
  --red: #A6392B;
  --red-100: #F8E4E0;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(35, 32, 28, .05), 0 6px 20px rgba(35, 32, 28, .05);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--teal-700); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; color: var(--teal-900); }
h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-family: var(--mono); font-size: .8rem; letter-spacing: .02em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
.hidden { display: none !important; }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand-mark { width: 28px; height: 28px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--teal-500), var(--teal-900) 70%); flex: none; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; color: var(--teal-900); display: block; line-height: 1; }
.brand-tag { font-family: var(--mono); font-size: .65rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.header-actions { display: flex; align-items: center; gap: 10px; font-size: .875rem; }
.header-actions .who { color: var(--muted); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-banner { background: var(--indigo); color: #fff; font-size: .8rem; text-align: center; padding: 6px 16px; }

main { padding: 32px 0 64px; }
.eyebrow { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--teal-700); margin-bottom: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 999px;
  padding: 11px 22px; font: 600 .95rem var(--sans); cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--teal-900); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--teal-700); }
.btn-outline { background: transparent; border-color: var(--teal-900); color: var(--teal-900); }
.btn-outline:hover:not(:disabled) { background: var(--teal-100); }
.btn-ghost { background: transparent; color: var(--muted); padding: 8px 12px; }
.btn-ghost:hover { color: var(--teal-900); }
.btn-ochre { background: var(--ochre); color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: .85rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* Cards */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.stack > * + * { margin-top: 16px; }

/* Forms */
label.field { display: block; font-weight: 500; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=tel], input[type=number], textarea, select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--white); color: var(--ink); }
input:focus, textarea:focus, select:focus, .choice:focus-within, .btn:focus-visible { outline: 2px solid var(--teal-500); outline-offset: 2px; }
textarea { min-height: 90px; resize: vertical; }
.error-text { color: var(--red); font-size: .85rem; margin-top: 6px; }
.q { padding: 18px 0; border-top: 1px solid var(--line); }
.q:first-child { border-top: 0; padding-top: 0; }
.q-label { font-weight: 600; margin-bottom: 10px; display: block; }
.q.has-error .q-label { color: var(--red); }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices.col { flex-direction: column; align-items: stretch; }
.choice { position: relative; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px;
  background: var(--white); cursor: pointer; user-select: none; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .tick { width: 18px; height: 18px; border: 1.5px solid var(--line); border-radius: 50%; flex: none; display: grid; place-items: center; }
.choice.multi .tick { border-radius: 5px; }
.choice.on { border-color: var(--teal-700); background: var(--teal-100); }
.choice.on .tick { border-color: var(--teal-700); background: var(--teal-700); }
.choice.on .tick::after { content: ""; width: 6px; height: 6px; background: #fff; border-radius: 50%; }
.choice.multi.on .tick::after { width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; background: none; border-radius: 0; transform: rotate(-45deg) translate(1px, -1px); }
.choice.consent { align-items: flex-start; }
.choice.consent .tick { margin-top: 3px; }
.yesno .choice { min-width: 90px; justify-content: center; }
.yesno .choice .tick { display: none; }
.yesno .choice.on.yes { border-color: var(--ochre); background: var(--ochre-100); color: var(--ink); }

.scale { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; }
.scale button { border: 1px solid var(--line); background: var(--white); border-radius: 8px; padding: 10px 0; font: 600 .9rem var(--sans); cursor: pointer; color: var(--ink); }
.scale button.on { background: var(--teal-900); color: #fff; border-color: var(--teal-900); }
.scale-ends { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); margin-top: 4px; }
.psfs-row { display: grid; grid-template-columns: 1fr 110px; gap: 8px; margin-bottom: 8px; }

/* Stepper */
.progress { display: flex; gap: 6px; margin: 8px 0 24px; }
.progress span { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.progress span.done { background: var(--teal-500); }
.progress span.now { background: var(--teal-900); }
.step-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 24px; }

/* Notices */
.notice { border-radius: var(--radius); padding: 18px 20px; border: 1px solid; }
.notice h3 { margin-bottom: 6px; }
.notice p:last-child { margin-bottom: 0; }
.notice-teal { background: var(--teal-100); border-color: #C6DCD8; }
.notice-ochre { background: var(--ochre-100); border-color: #E8D3AA; }
.notice-ochre h3 { color: #7A5415; }
.notice-red { background: var(--red-100); border-color: #E8B9B1; }
.notice-red h3 { color: var(--red); }
.emergency-number { font: 700 2rem var(--serif); color: var(--red); }

/* Badges */
.badge { display: inline-block; font: 500 .72rem var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--sage-100); color: var(--muted); white-space: nowrap; }
.badge-teal { background: var(--teal-100); color: var(--teal-900); }
.badge-ochre { background: var(--ochre-100); color: #7A5415; }
.badge-red { background: var(--red-100); color: var(--red); }
.badge-indigo { background: #E7E4F2; color: var(--indigo); }

/* Physio dashboard */
.dash { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tab { border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 6px 12px; font: 500 .82rem var(--sans); cursor: pointer; color: var(--muted); }
.tab.on { background: var(--teal-900); color: #fff; border-color: var(--teal-900); }
.tab .count { font-family: var(--mono); margin-left: 4px; opacity: .8; }
.queue { display: flex; flex-direction: column; gap: 8px; }
.queue-item { text-align: left; width: 100%; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; font: inherit; color: inherit; }
.queue-item:hover { border-color: var(--teal-500); }
.queue-item.on { border-color: var(--teal-900); box-shadow: inset 3px 0 0 var(--teal-900); }
.queue-item .top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.queue-item .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-item .meta { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.detail-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.tile { background: var(--sage-100); border-radius: 10px; padding: 12px; }
.tile .k { font: 500 .7rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tile .v { font: 600 1.3rem var(--serif); color: var(--teal-900); }
.flag { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; margin-bottom: 8px; }
.flag.emergency, .flag.urgent, .flag.ineligible { background: var(--red-100); }
.flag.caution { background: var(--ochre-100); }
.flag strong { display: block; }
.ai-label { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.ai-section { margin-bottom: 16px; }
.ai-section h4 { margin: 0 0 6px; font: 600 .78rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ai-section ul { margin: 0; padding-left: 20px; }
.ai-section li { margin-bottom: 4px; }
.cls { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.cls .row { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.cls .pro { color: var(--teal-900); }
.cls .con { color: var(--muted); }
details.answers summary { cursor: pointer; font-weight: 600; color: var(--teal-900); padding: 6px 0; }
.qa { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 4px 16px; font-size: .9rem; padding: 8px 0; border-top: 1px solid var(--line); }
.qa .a { font-weight: 500; }
.qa .a.yes { color: var(--red); }
.step-title { font: 600 .75rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--teal-700); margin: 14px 0 4px; }
.decision-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.decision { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--white); cursor: pointer; text-align: left; font: inherit; color: inherit; }
.decision strong { display: block; margin-bottom: 2px; }
.decision.on { border-color: var(--teal-900); background: var(--teal-100); }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: .9rem; z-index: 50; box-shadow: var(--shadow); }
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.site-footer { border-top: 1px solid var(--line); padding: 24px 0; font-size: .8rem; color: var(--muted); }

@media (max-width: 860px) {
  .dash { grid-template-columns: 1fr; }
  .dash.showing-detail .queue-col { display: none; }
  .dash:not(.showing-detail) .detail-col { display: none; }
  .decision-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .card { padding: 18px; }
  .scale { grid-template-columns: repeat(6, 1fr); }
  .qa { grid-template-columns: 1fr; }
  .psfs-row { grid-template-columns: 1fr 90px; }
  .header-actions .who { display: none; }
  .brand-tag { display: none; }
}
