/* The product tour: four products, each a centred title, a list of its features on the left and one app window on the right.
   Picking a feature swaps the window (app.js). On phones the list becomes arrows and dots, a carousel. Windows are drawn in HTML,
   styled like the PunsiCare app, with sample data (no real hospital, doctor or patient). */
/* Each product fills one screen below the navbar (64px tall, 58px on phones), content at the top, so a menu link shows exactly one
   part and the next starts below the fold. Taller content (phones) simply makes the section taller. */
.product { --navh: 64px; --pt: clamp(16px, 2.6vh, 28px); min-height: calc(100vh - var(--navh)); min-height: calc(100svh - var(--navh)); display: flex; flex-direction: column; justify-content: flex-start; padding-top: var(--pt); padding-bottom: var(--pt); scroll-margin-top: var(--navh); }
@media (max-width: 520px) { .product { --navh: 58px; } }
.product-head { text-align: center; max-width: 760px; margin: 0 auto clamp(20px, 3vw, 32px); }
.product-head h2 { margin: 0 0 8px; font-size: clamp(32px, min(5vw, 7vh), 58px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; color: var(--ink); }
.product-head p { margin: 0; font-size: clamp(17px, 1.8vw, 22px); color: var(--muted); text-wrap: balance; }

.tour { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.tour-nav { display: grid; grid-template-columns: 40px 1fr; gap: 10px; position: sticky; top: 96px; }
.tour-arrows { display: grid; gap: 8px; align-content: start; padding-top: 2px; }
.tour-arrows button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--sunk); color: var(--lake); font: 600 20px/1 var(--font); cursor: pointer; transform: rotate(90deg); }
.tour-arrows button:hover { background: var(--lake-tint); }
.tour-list { display: grid; gap: 2px; border-left: 2px solid var(--line); }
.tour-list button { text-align: left; border: 0; background: transparent; padding: 9px 14px; margin-left: -2px; border-left: 2px solid transparent; font: 500 16px/1.3 var(--font); color: var(--muted); cursor: pointer; min-height: 40px; }
.tour-list button:hover { color: var(--ink); }
.tour-list button[aria-selected="true"] { color: var(--lake); font-weight: 700; border-left-color: var(--lake); }
/* All of a product's windows sit in one grid cell, so the stage is as tall as its tallest window: nothing jumps when you switch,
   and every window fills that height with its content centred (no empty block at the bottom). */
.tour-stage { min-width: 0; display: grid; }
.tour-panel { grid-area: 1 / 1; display: flex; flex-direction: column; min-width: 0; }
.tour-panel.off { visibility: hidden; pointer-events: none; }
.tour-panel .win { flex: 1; display: flex; flex-direction: column; }
.tour-panel .win-body { flex: 1; align-content: center; }
.tour-panel .win.dark { display: grid; }
.caption { margin: 0 0 14px; font-size: clamp(17px, 1.6vw, 20px); color: var(--ink); }
.tour-panel:not(.off) { animation: fadein .25s ease; }
@keyframes fadein { from { opacity: .4; } to { opacity: 1; } }
.tour-dots { display: none; }

/* An app window: tab bar, then content on a soft tinted ground. */
.win { border-radius: 20px; border: 1px solid var(--line); background: var(--paper); box-shadow: 0 30px 70px -40px rgba(6, 78, 78, .45); overflow: hidden; }
.win-bar { display: flex; align-items: center; gap: 4px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--paper); font-size: 14px; overflow: hidden; white-space: nowrap; }
.win-bar b { color: var(--lake); margin-right: 14px; font-weight: 800; }
.win-bar span { padding: 6px 12px; border-radius: 10px 10px 0 0; color: var(--muted); }
.win-bar span.on { color: var(--lake); font-weight: 700; background: var(--lake-tint); }
.win-bar.url i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.win-bar .addr { margin-left: 12px; flex: 1; max-width: 340px; background: var(--mist); border-radius: var(--r-pill); padding: 5px 14px; color: var(--muted); }
.win-body { padding: clamp(16px, 2.4vw, 28px); display: grid; gap: 14px; align-content: start; }
.tint-a .win-body, .tint-a.dark { background: #EEF6F2; }
.tint-b .win-body, .tint-b.dark { background: #EAF3F1; }
.tint-c .win-body, .tint-c.dark { background: #F1F5EE; }
.tint-d .win-body, .tint-d.dark { background: #EDF3F5; }
.win.dark { display: grid; place-items: center; padding: clamp(20px, 3vw, 36px); }
.win-body.split { grid-template-columns: 1fr 1fr; gap: 18px; }
.t { margin: 0; font-weight: 700; color: var(--ink); }
.t.big { font-size: 26px; letter-spacing: -0.02em; }
.s { margin: 0; font-size: 13px; color: var(--muted); }
.pg-head { display: flex; align-items: center; gap: 12px; background: var(--paper); padding: 14px; border-radius: 14px; }
.pg-head > div:nth-child(2), .pg-head > div:first-child:not(.pg-logo) { flex: 1; }
.pg-logo { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--lake); color: var(--paper); display: grid; place-items: center; font-weight: 800; }
.chip { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: var(--r-pill); background: var(--lake-tint); color: var(--leaf-ink); white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { padding: 6px 12px; border-radius: var(--r-pill); background: var(--paper); border: 1px solid var(--line); font-size: 13px; font-weight: 500; }
.chips .warn { background: #FBEFD3; border-color: #F3DFAE; color: #6B4A00; }
.chips .sel { background: var(--lake); border-color: var(--lake); color: var(--paper); }
.rows { display: grid; background: var(--paper); border-radius: 14px; overflow: hidden; }
.rows .r { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); font-size: 14px; }
.rows .r:first-child { border-top: 0; }
.rows .r b { min-width: 0; }
.rows .r span { flex: 1; color: var(--muted); min-width: 0; }
.rows .r em { font-style: normal; font-weight: 700; font-size: 13px; color: var(--lake); }
.rows .r em.ok, .q em.ok { color: var(--leaf-ink); }
.rows .r em.muted { color: var(--muted); font-weight: 600; }
.rows .r em.hi { color: #8a5a00; }
.sched .r b { width: 44px; flex: none; }
.sched .r span { flex: none; }
.pill { background: var(--lake-tint); color: var(--lake) !important; font-weight: 600; padding: 4px 10px; border-radius: var(--r-pill); }
.q .r b { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--mist); color: var(--lake); }
.btn-s { display: inline-flex; align-items: center; justify-content: center; justify-self: start; font-style: normal; font-weight: 700; font-size: 14px; color: var(--paper); background: var(--lake); border-radius: var(--r-pill); padding: 9px 16px; white-space: nowrap; }
.btn-s.wide { justify-self: stretch; }
.rows .r em.btn-s { color: var(--paper); font-size: 13px; padding: 7px 14px; } /* a button inside a list row keeps white text */
.now { padding: 16px 18px; background: var(--lake); border-radius: 14px; color: var(--paper); display: flex; justify-content: space-between; align-items: center; }
.now-label { margin: 0; font-weight: 600; color: var(--on-lake); }
.token { margin: 0; font-weight: 800; font-size: 44px; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.days { display: flex; gap: 8px; margin: 12px 0; }
.days span { flex: 1; display: grid; justify-items: center; padding: 7px 0; border-radius: var(--r-chip); border: 1px solid var(--line); background: var(--paper); font-size: 12px; color: var(--muted); }
.days b { font-size: 17px; color: var(--ink); }
.days .on { background: var(--lake); border-color: var(--lake); color: var(--on-lake); }
.days .on b { color: var(--paper); }
.slots { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slots li { text-align: center; padding: 9px 0; border-radius: var(--r-chip); border: 1px solid var(--line); background: var(--paper); font-weight: 600; font-size: 14px; color: var(--lake); }
.slots .gone { color: #9DB0AA; background: var(--mist); border-color: transparent; text-decoration: line-through; }
.slots .pick { background: var(--lake); border-color: var(--lake); color: var(--paper); }
.confirm { background: var(--paper); border-radius: 14px; padding: 16px; display: grid; gap: 8px; align-content: start; }
.confirm.center { text-align: center; justify-items: center; align-content: center; }
.form { display: grid; gap: 10px; }
.form label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--lake); }
.in { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 15px; font-weight: 500; color: var(--ink); }
.notice { background: #FBEFD3; color: #3d2c00; border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.match { display: flex; align-items: center; gap: 12px; background: var(--paper); border-radius: 14px; padding: 12px 14px; }
.match > div:nth-child(2) { flex: 1; }
.file { display: flex; align-items: center; gap: 12px; background: var(--paper); border: 1px dashed var(--line); border-radius: 14px; padding: 12px 14px; font-size: 14px; }
.file b { background: #FBE4E1; color: #8c1d18; border-radius: 8px; padding: 6px 8px; font-size: 12px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stats div { background: var(--paper); border-radius: 14px; padding: 14px; }
.stats b { display: block; font-size: clamp(20px, 2.4vw, 28px); letter-spacing: -0.02em; color: var(--lake); }
.stats span { font-size: 13px; color: var(--muted); }
.lab { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: 14px; overflow: hidden; font-size: 14px; }
.lab th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 12px; }
.lab td { padding: 12px; border-top: 1px solid var(--line); }
.lab em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--leaf-ink); background: var(--lake-tint); padding: 3px 8px; border-radius: var(--r-pill); }
.lab em.hi { color: #6B4A00; background: #FBEFD3; }
.lab b.hi { color: #8a5a00; }
.site { justify-items: start; }
.widget { justify-self: end; width: min(100%, 300px); background: var(--paper); border-radius: 16px; padding: 16px; box-shadow: 0 20px 40px -26px rgba(6, 78, 78, .5); }

/* TV, phones and messages, shown on the plain tinted ground. */
.tvwrap { position: relative; width: min(100%, 520px); display: grid; place-items: center; }
.tv { width: min(100%, 440px); aspect-ratio: 16 / 10; border-radius: 16px; background: var(--lake-deep); color: var(--paper); padding: 24px 28px; display: grid; align-content: center; box-shadow: 0 0 0 9px #0b2b2b, 0 30px 60px -30px rgba(4, 59, 59, .8); }
.tv-label { margin: 0; color: var(--on-lake-muted); font-weight: 600; }
.tv-token { margin: 0; font-size: clamp(72px, 9vw, 112px); font-weight: 800; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tv-next { display: flex; gap: 8px; align-items: center; margin-top: 12px; color: var(--on-lake-muted); font-weight: 600; }
.tv-next b { display: grid; place-items: center; min-width: 42px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, .1); color: var(--paper); }
.phone { background: var(--paper); border-radius: 30px; padding: 20px; border: 1px solid var(--line); box-shadow: 0 30px 60px -36px rgba(6, 78, 78, .45); width: min(100%, 340px); display: grid; gap: 12px; }
.phone.small { position: absolute; right: 0; bottom: -14px; width: 136px; padding: 14px 16px; border-radius: 20px; text-align: center; gap: 2px; }
.mini-token { margin: 2px 0; font-size: 42px; font-weight: 800; line-height: 1; color: var(--lake); font-variant-numeric: tabular-nums; }
.chat { width: min(100%, 420px); display: grid; gap: 10px; }
.chat-head { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.bubble small { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); text-align: right; }
.bubble { margin: 0; padding: 12px 14px; border-radius: 16px 16px 16px 4px; background: var(--paper); box-shadow: 0 1px 0 rgba(6, 78, 78, .06); font-size: 15px; max-width: 92%; }

@media (max-width: 960px) {
  /* Phones and tablets: the window first, then its name and caption, then arrows and dots (a carousel). */
  .tour { grid-template-columns: 1fr; }
  .tour-nav { position: static; display: block; order: 3; }
  .tour-list { display: none; }
  .tour-arrows { display: flex; justify-content: space-between; align-items: center; }
  .tour-arrows button { transform: none; width: 44px; height: 44px; }
  .tour-dots { display: flex; justify-content: center; gap: 6px; margin-top: -32px; order: 4; pointer-events: none; }
  .tour-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
  .tour-dots i.on { width: 22px; border-radius: 4px; background: var(--lake); }
  .tour-panel { display: flex; flex-direction: column; }
  .tour-panel .caption { order: 2; margin: 10px 0 4px; font-size: 16px; color: var(--muted); }
  .tour-panel .caption::before { content: attr(data-name); display: block; color: var(--lake); font-weight: 700; font-size: 18px; margin-bottom: 2px; }
}
@media (max-width: 620px) {
  .win-body.split { grid-template-columns: 1fr; }
  .win-bar span:not(.on) { display: none; }
  .phone.small { position: static; margin-top: 16px; width: 100%; }
  .widget { justify-self: stretch; }
  .stats b { font-size: 20px; }
}

/* Short laptop screens (13-inch MacBooks show about 800 to 900px of height): tighten everything so a product's title, its
   caption and the whole window fit on one screen after a menu link. */
@media (min-width: 961px) and (max-height: 920px) {
  .product-head { margin-bottom: 16px; }
  .product-head p { font-size: 18px; }
  .caption { margin-bottom: 10px; font-size: 17px; }
  .win-bar { padding: 7px 12px; }
  .win-body { padding: 16px 20px; gap: 10px; }
  .pg-head, .match, .file { padding: 10px 12px; }
  .rows .r { padding: 9px 12px; }
  .now { padding: 10px 16px; } .token { font-size: 36px; }
  .days { margin: 8px 0; } .slots li { padding: 7px 0; }
  .in { padding: 8px 10px; }
  .stats div { padding: 10px 12px; }
  .lab td { padding: 9px 12px; }
  .tv { width: min(100%, 380px); } .tv-token { font-size: 80px; }
  .phone { padding: 16px; gap: 10px; }
  .tour-nav { top: 84px; }
}
