/* -------------------------
   Design tokens (tweakable)
   ------------------------- */
:root{
  --bg: #f6f8fb;
  --surface: #ffffff;
  --ink: #0b1220;
  --muted: #5a6475;

  /* Wireframe teal-ish from the mockups */
  --brand: #0aa6b4;
  --brand-ink: #ffffff;

  --stroke: rgba(11, 18, 32, 0.12);
  --shadow: 0 10px 30px rgba(11, 18, 32, 0.12);

  --r-1: 10px;
  --r-2: 16px;
  --r-3: 26px;

  --gap: 14px;
  --pad: 16px;

  --max: 460px; /* phone-ish max width for kiosk/tablet centering */
  --min-tap: 44px;
}

/* Better default sizing */
*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 700px at 50% -10%, rgba(10,166,180,0.18), transparent 60%), var(--bg);
}

/* Accessibility helper */
.skip-link{
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.skip-link:focus{ left: 8px; }

/* App container */
.app{
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 24px);
}

.stage{
  width: 100%;
  display: grid;
  place-items: center;
}

.device{
  width: 100%;
  max-width: var(--max);
  min-height: min(92vh, 780px);
  background: var(--surface);
  border: 2px solid var(--stroke);
  border-radius: 34px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Brand bar (top logo) */
.brandbar{
  padding: 14px var(--pad) 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid var(--stroke);
}

.brandbar__logo{
  min-height: var(--min-tap);
  display: grid;
  place-items: center;
  padding: 0 14px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(10,166,180,0.06);
}
.brandbar__logoText{
  font-weight: 700;
  letter-spacing: 0.4px;
}

/* Footer logo */
.footer{
  margin-top: auto;
  padding: 12px var(--pad) 16px;
  display: flex;
  justify-content: center;
  border-top: 1px solid var(--stroke);
  background: linear-gradient(to top, rgba(11,18,32,0.03), transparent);
}
.footer__logo{
  min-height: var(--min-tap);
  display: grid;
  place-items: center;
  padding: 0 14px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(10,166,180,0.06);
}
.footer__logoText{ font-weight: 650; }

/* Screens */
.screen{
  display: none;
  padding: var(--pad);
  gap: var(--gap);
  grid-auto-rows: min-content;
  grid-template-rows: auto 1fr auto;
}
.screen__content{
  display: grid;
  gap: var(--gap);
  padding-top: 10px;
}

/* Screen routing via data attribute */
.screen {
  display: none;
  flex-direction: column;
  height: 100%;
}

.app[data-screen="idle"]   .screen--idle,
.app[data-screen="intro"]  .screen--intro,
.app[data-screen="video"]  .screen--video,
.app[data-screen="symptom"] .screen--symptom,
.app[data-screen="survey"] .screen--survey,
.app[data-screen="final"]  .screen--final {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.title{
  text-align: center;
  font-size: 1.2rem;
  margin: 0;
  padding: 12px 10px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(10,166,180,0.08);
}

/* Panels (disclaimer blocks, final statement, etc.) */
.panel{
  border: 1px solid var(--stroke);
  border-radius: var(--r-2);
  padding: 14px;
  background: rgba(11,18,32,0.02);
}
.panel--subtle{
  background: rgba(10,166,180,0.06);
}
.panel--rounded{
  border-radius: var(--r-3);
  padding: 18px;
}

.lead{
  margin: 0 0 8px;
  font-weight: 750;
}
.muted{
  color: var(--muted);
}
.helper{
  margin: 0;
  font-size: 0.95rem;
}

/* Hero placeholder */
.hero{
  border: 1px solid var(--stroke);
  border-radius: var(--r-2);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(10,166,180,0.20), rgba(10,166,180,0.04));
  min-height: 220px;
  display: grid;
  place-items: center;
}
.hero__inner{
  width: 88%;
  height: 78%;
  border: 2px dashed rgba(11,18,32,0.18);
  border-radius: var(--r-2);
  display: grid;
  place-items: center;
}
.hero__label{ margin: 0; font-weight: 650; color: rgba(11,18,32,0.55); }

/* Media placeholder (video) */
.media{
  position: relative;
  display: grid;
  gap: 10px;
}
.media__frame{
  border: 1px solid var(--stroke);
  border-radius: var(--r-2);
  min-height: 260px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(10,166,180,0.12), rgba(11,18,32,0.02));
}
.media__label{ margin: 0; font-weight: 650; color: rgba(11,18,32,0.55); }

/* Camera placeholder (symptom/survey) */
.camera{
  display: grid;
  gap: var(--gap);
}
.camera__feed{
  border: 1px solid var(--stroke);
  border-radius: var(--r-2);
  min-height: 360px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(10,166,180,0.14), rgba(11,18,32,0.02));
}
.camera__label{ margin: 0; font-weight: 650; color: rgba(11,18,32,0.55); }

/* Buttons */
.btn{
  min-height: var(--min-tap);
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  background: var(--surface);
  color: var(--ink);
  transition: transform .05s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active{ transform: translateY(1px); }
.btn:focus-visible{
  outline: 3px solid rgba(10,166,180,0.35);
  outline-offset: 2px;
}
.btn--primary{
  background: var(--brand);
  border-color: rgba(0,0,0,0.08);
  color: var(--brand-ink);
  box-shadow: 0 8px 18px rgba(10,166,180,0.22);
}
.btn--secondary{
  background: rgba(10,166,180,0.10);
  border-color: rgba(10,166,180,0.30);
}
.btn--ghost{
  background: transparent;
}

/* Action layouts */
.actions{
  display: grid;
  gap: 10px;
}
.actions--single{
  grid-template-columns: 1fr;
}
.actions--split{
  grid-template-columns: 1fr 1fr;
}
/* Symptom screen specific styles */
.screen--symptom .screen__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.screen--symptom .camera {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.actions--symptom {
  display: flex;
  justify-content: space-between;
  padding: var(--pad);
  margin-top: auto;
  background: var(--surface);
  border-top: 1px solid var(--stroke);
}

.actions--symptom .btn--primary {
  margin-left: auto;
  min-width: 120px;
}

/* Skip chip */
.chip{
  position: absolute;
  top: 10px;
  right: 10px;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(11,18,32,0.18);
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(6px);
  font-weight: 750;
  cursor: pointer;
}

/* Modal overlay (survey) */
.modal{
  position: absolute;
  inset: 0;
  display: none;
  background: rgba(11,18,32,0.55);
  padding: 18px;
  align-items: center;
  justify-items: center;
}
.app[data-screen="survey"] .modal{
  display: grid;
}
.modal__card{
  width: min(100%, 420px);
  background: var(--surface);
  border-radius: var(--r-2);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  padding: 16px;
  display: grid;
  gap: 12px;
}
.modal__title{
  margin: 0;
  font-size: 1.1rem;
}
.modal__desc{
  margin: 0;
  line-height: 1.35;
}

/* 1–5 scale buttons */
.scale{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.pill{
  min-height: var(--min-tap);
  border-radius: 999px;
  border: 1px solid rgba(10,166,180,0.35);
  background: rgba(10,166,180,0.10);
  font-weight: 800;
  cursor: pointer;
}

/* Responsive enhancements */
@media (min-width: 520px){
  :root{ --pad: 18px; --gap: 16px; }
  .title{ font-size: 1.25rem; }
  .camera__feed{ min-height: 420px; }
}

@media (min-width: 900px){
  /* On wider screens, keep “phone” centered but give it breathing room */
  .app{ padding: 36px; }
  .device{ min-height: 760px; }
}
