/* Rehab Kiosk: full-screen touch UI, VSC brand kit
   Colours: vsc-orange #ed9b2d, vsc-taupe #b7a9a0, charcoal #393a3c, paper #fbfdfc.
   Charcoal is the only text colour; orange only for fills, rules and type 24px+.
   Face: Plus Jakarta Sans throughout (chosen by Scott over the brand kit's Cinzel/Crimson/PT Sans). */
.rk-app {
  --rk-orange: #ed9b2d;
  --rk-taupe: #b7a9a0;
  --rk-ink: #393a3c;
  --rk-paper: #fbfdfc;
  --rk-white: #ffffff;
  --rk-display: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --rk-serif: var(--rk-display);
  --rk-sans: var(--rk-display);
  position: fixed; inset: 0; z-index: 99999;
  display: flex; flex-direction: column;
  background: var(--rk-paper); color: var(--rk-ink);
  font-family: var(--rk-sans); font-size: 16px; line-height: 1.5;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.rk-app *, .rk-app *::before, .rk-app *::after { box-sizing: border-box; }

/* Header: logo | taupe rule | italic place line, orange rule beneath (the lockup device) */
.rk-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 32px; background: var(--rk-white); border-bottom: 3px solid var(--rk-orange);
}
.rk-brand { display: flex; align-items: center; gap: 20px; min-width: 0; }
.rk-brand img { height: 56px; width: auto; display: block; }
.rk-brand .rk-rule { width: 1px; align-self: stretch; background: var(--rk-taupe); }
.rk-brand .rk-place { font-family: var(--rk-sans); font-weight: 600; font-size: 24px; line-height: 1.2; white-space: nowrap; }
.rk-clock { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }

.rk-main { flex: 1; display: flex; padding: 32px; overflow: auto; }
.rk-screen { width: 100%; max-width: 960px; margin: auto; text-align: center; animation: rk-in .25s ease-out; }
@keyframes rk-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.rk-h1 { font-family: var(--rk-display); font-weight: 700; font-size: 56px; line-height: 1.05; letter-spacing: -.01em; margin: 0; }
.rk-h2 { font-family: var(--rk-display); font-weight: 600; font-size: 34px; line-height: 1.2; letter-spacing: -.005em; margin: 0; }
.rk-h1::after, .rk-h2::after { content: ""; display: block; width: 96px; height: 3px; background: var(--rk-orange); margin: 18px auto 0; }
.rk-sub { font-size: 22px; margin: 18px 0 36px; line-height: 1.4; }
.rk-pet { color: var(--rk-ink); font-weight: 700; }

.rk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 96px; padding: 20px 40px; border-radius: 14px; border: 2px solid var(--rk-orange);
  font-family: var(--rk-sans); font-size: 28px; font-weight: 700; letter-spacing: .01em; line-height: 1.2; cursor: pointer;
  background: var(--rk-orange); color: var(--rk-ink);
  transition: transform .06s, filter .06s;
}
.rk-btn:active { transform: scale(.98); filter: brightness(.94); }
.rk-btn.rk-secondary { background: var(--rk-white); border-color: var(--rk-taupe); }
.rk-btn.rk-small { min-height: 64px; font-size: 22px; padding: 12px 28px; }
.rk-btn[disabled] { opacity: .4; pointer-events: none; }
.rk-btn small { font-size: 20px; font-weight: 400; }

.rk-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 760px; margin: 0 auto; }
.rk-row .rk-btn { width: 100%; min-height: 150px; font-size: 34px; flex-direction: column; gap: 4px; }

.rk-help-link { margin-top: 40px; }

.rk-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin: 0 auto 32px; }
.rk-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 24px 28px; border-radius: 14px; border: 2px solid var(--rk-taupe);
  background: var(--rk-white); color: var(--rk-ink); font: inherit; text-align: left; cursor: pointer;
}
.rk-tile:active { border-color: var(--rk-orange); transform: scale(.98); }
.rk-tile b { font-size: 30px; font-weight: 700; line-height: 1.2; }
.rk-tile span { font-size: 20px; }
.rk-tile em { font-style: normal; font-size: 18px; font-weight: 600; }
.rk-tile.rk-done { background: var(--rk-paper); border-style: dashed; }
.rk-empty { font-size: 24px; padding: 32px 0; }

.rk-qr { display: inline-block; padding: 18px; background: var(--rk-white); border-radius: 14px; border: 2px solid var(--rk-taupe); margin-bottom: 28px; }
.rk-qr svg { display: block; width: 250px; height: 250px; }

.rk-weight { display: flex; align-items: center; justify-content: center; gap: 48px; }
.rk-weight-side { display: flex; flex-direction: column; align-items: stretch; gap: 20px; }
.rk-weight-side .rk-actions { flex-direction: column; margin: 0; }
.rk-display {
  min-width: 320px; padding: 16px 28px; border-radius: 14px; background: var(--rk-white); border: 2px solid var(--rk-taupe);
  font-size: 54px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.rk-display small { font-size: 28px; font-weight: 400; margin-left: 8px; }
.rk-keypad { display: grid; grid-template-columns: repeat(3, 108px); gap: 14px; }
.rk-key {
  height: 84px; border-radius: 14px; border: 2px solid var(--rk-taupe); background: var(--rk-white);
  font-family: var(--rk-sans); font-size: 34px; font-weight: 700; color: var(--rk-ink); cursor: pointer;
}
.rk-key:active { border-color: var(--rk-orange); transform: scale(.97); }
.rk-actions { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }

.rk-check {
  width: 120px; height: 120px; margin: 0 auto 28px; border-radius: 50%;
  background: var(--rk-orange); color: var(--rk-ink); display: grid; place-items: center;
}
.rk-check svg { width: 64px; height: 64px; }

.rk-bottom { display: flex; justify-content: space-between; align-items: center; padding: 16px 32px; }
.rk-back { visibility: hidden; }
.rk-back.rk-show { visibility: visible; }
.rk-steps { display: flex; gap: 10px; }
.rk-steps i { width: 12px; height: 12px; border-radius: 50%; background: var(--rk-taupe); opacity: .5; }
.rk-steps i.rk-on { background: var(--rk-orange); opacity: 1; }

.rk-banner { padding: 14px 20px; margin: 0 auto 24px; max-width: 760px; border-radius: 12px; background: var(--rk-taupe); color: var(--rk-ink); font-size: 20px; font-weight: 700; }
.rk-banner[hidden] { display: none; }

/* Embedded Cognito questionnaire */
.rk-screen-form { max-width: 1100px; height: 100%; display: flex; flex-direction: column; gap: 14px; margin: 0 auto; }
.rk-form-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; text-align: left; }
.rk-h2-compact { font-size: 28px; }
.rk-h2-compact::after { margin: 10px 0 0; width: 72px; }
.rk-form-actions { display: flex; gap: 14px; flex-shrink: 0; }
.rk-frame-wrap { position: relative; flex: 1; min-height: 300px; border: 2px solid var(--rk-taupe); border-radius: 14px; overflow: hidden; background: var(--rk-white); }
.rk-frame-loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; font-size: 20px; }
.rk-frame { position: relative; width: 100%; height: 100%; border: 0; display: block; background: transparent; }
.rk-form-note { margin: 0; font-size: 18px; }

@media (max-width: 760px) {
  .rk-h1 { font-size: 40px; } .rk-h2 { font-size: 26px; } .rk-sub { font-size: 19px; }
  .rk-row { grid-template-columns: 1fr; }
  .rk-weight { flex-direction: column; gap: 20px; }
  .rk-form-head { flex-direction: column; align-items: stretch; }
  .rk-keypad { grid-template-columns: repeat(3, 92px); }
  .rk-key { height: 70px; }
  .rk-main { padding: 20px 16px; } .rk-top, .rk-bottom { padding: 12px 16px; }
  .rk-brand img { height: 40px; } .rk-brand .rk-place { font-size: 20px; } .rk-clock { display: none; }
}
