/* Northbank Dental: app shell, cover, home sections, ask page. Mobile first. */

.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico .f, .ico path.f { fill: currentColor; stroke: none; }

/* ---------- Wordmark lockup: name 600 tight, hairline, last word in tracked caps width-matched by js ---------- */
.wm { display: inline-grid; justify-items: stretch; font-family: var(--font-display); line-height: 1; color: inherit; width: max-content; }
.wm__name { font-weight: 600; letter-spacing: -0.045em; font-size: 1em; line-height: 0.96; white-space: nowrap; }
.wm__rule { display: block; height: 1px; background: currentColor; opacity: 0.55; margin: 0.2em 0 0.19em; }
.wm__sub { display: block; font-weight: 500; font-size: 0.33em; letter-spacing: 0.3em; text-transform: uppercase; line-height: 1; white-space: nowrap; }
.wm--sm { font-size: 19px; }
.wm--lg { font-size: clamp(60px, 17vw, 112px); margin: 0; font-weight: 600; letter-spacing: normal; line-height: 1; }
.wm--footer { font-size: 26px; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  padding-top: var(--safe-t);
  color: var(--on-dark);
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out);
}
.topbar__in { height: var(--topbar-h); display: flex; align-items: center; gap: 20px; }
.brand { display: block; flex: none; transition: opacity 0.3s var(--ease-out); }
body[data-route='home'] .topbar[data-tone='clear'] .brand { opacity: 0; pointer-events: none; }
.topbar[data-tone='glass'] { background: rgba(247, 246, 242, 0.86); -webkit-backdrop-filter: blur(24px) saturate(130%); backdrop-filter: blur(24px) saturate(130%); color: var(--ink); }
.topbar[data-tone='dark'] { background: rgba(10, 12, 14, 0.5); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); color: var(--on-dark); }
.desk-nav { display: none; }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.call-pill, .topbar__book {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; min-height: 40px; padding: 0 16px; border-radius: var(--r-pill);
  font-weight: 500; font-size: 14px; color: inherit;
  background: rgba(14, 16, 19, 0.34);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-dark-edge);
  transition: transform 0.18s var(--ease-out), background-color 0.3s, color 0.3s, box-shadow 0.3s;
}
.call-pill { padding-left: 13px; display: none; }
.call-pill:active, .topbar__book:active { transform: scale(0.96); }
.call-pill .ico { width: 18px; height: 18px; }
.topbar[data-tone='glass'] .topbar__book { background: var(--accent); color: var(--on-dark); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.topbar[data-tone='dark'] .topbar__book { background: rgba(255, 255, 255, 0.12); }
.topbar[data-tone='glass'] .call-pill { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); -webkit-backdrop-filter: none; backdrop-filter: none; }
.topbar[data-tone='dark'] .call-pill { background: rgba(255, 255, 255, 0.12); box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.22); }

@media (min-width: 900px) {
  .wm--sm { font-size: 22px; }
  .desk-nav { display: flex; gap: 4px; margin-inline: auto; }
  .desk-nav a {
    height: 40px; padding: 0 16px; border-radius: var(--r-pill);
    display: inline-flex; align-items: center; font-size: 15px; font-weight: 500;
    color: inherit; opacity: 0.86; transition: opacity 0.2s, background-color 0.2s;
  }
  .desk-nav a:hover { opacity: 1; background: rgba(255, 255, 255, 0.12); }
  .topbar[data-tone='glass'] .desk-nav a:hover { background: rgba(10, 12, 14, 0.06); }
  .desk-nav a[aria-current='page'] { opacity: 1; }
  .topbar__actions { margin-left: 0; }
  .call-pill { display: inline-flex; background: rgba(255, 255, 255, 0.12); }
  .topbar__book { background: var(--on-dark); color: var(--ink); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
}

/* ---------- Views ---------- */
.view[hidden] { display: none !important; }
.view-pad { height: calc(var(--tabbar-h) + 56px + var(--safe-b)); }
@media (min-width: 900px) { .view-pad { height: 120px; } }

/* ---------- Cover ---------- */
.cover { position: relative; height: 100vh; height: 100svh; min-height: 640px; overflow: hidden; background: var(--hero-bg); color: #fff; isolation: isolate; }
.cover__media { position: absolute; inset: -4% 0; animation: heroIn 1.8s var(--ease-out); }
.cover__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; transform: translate3d(0, var(--py, 0px), 0); will-change: transform; }
@keyframes heroIn { from { transform: scale(1.06); } to { transform: scale(1); } }
.cover::after { /* dark scrim behind the copy only, never a white fade */
  content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 12, 16, 0.18) 0%, rgba(4, 12, 16, 0) 26%, rgba(4, 12, 16, 0) 48%, rgba(4, 12, 16, 0.66) 100%);
}
.cover__ui {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: calc(var(--topbar-h) + var(--safe-t) + 24px);
  padding-bottom: 56px;
  pointer-events: none;
}
.cover__ui > * { pointer-events: auto; }
.cover__copy { max-width: 760px; animation: fadeUp 1s 0.4s var(--ease-out) both; }
.cover__wm { visibility: hidden; }
.cover.is-ready .cover__wm { visibility: visible; }
.cover__line { margin: 20px 0 0; font-size: clamp(17px, 1.4vw, 21px); line-height: 1.45; color: rgba(255, 255, 255, 0.9); max-width: 44ch; text-wrap: pretty; }
.cover__row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 20px; }
.cover__open { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, 0.86); }
.cover__open[hidden] { display: none; }
.cover__open .ico { width: 17px; height: 17px; opacity: 0.9; }
@keyframes fadeUp { from { opacity: 0; transform: translate3d(0, 14px, 0); } to { opacity: 1; transform: none; } }

/* Phone portrait: the cover fills the first screen to the very bottom edge; the sheet's rounded edge starts below it */
@media (max-width: 599px) and (orientation: portrait) {
  .cover { height: calc(100vh + 28px); height: calc(100lvh + 28px); min-height: 0; }
  .cover__photo { object-position: 50% 50%; }
  .cover__ui { padding-bottom: calc(28px + (100lvh - 100svh) + var(--tabbar-h) + var(--safe-b) + 36px); }
  .cover::after { background: linear-gradient(180deg, rgba(4, 12, 16, 0.22) 0%, rgba(4, 12, 16, 0) 24%, rgba(4, 12, 16, 0) 42%, rgba(4, 12, 16, 0.72) 100%); }
  .cover__line { font-size: 16px; margin-top: 16px; }
}

/* ---------- Home sheet ---------- */
.home-sheet { position: relative; z-index: 5; background: var(--paper); }
@media (max-width: 599px) and (orientation: portrait) {
  .home-sheet { margin-top: -28px; border-radius: 28px 28px 0 0; box-shadow: var(--shadow-sheet); }
}
.sec-head { margin-bottom: 28px; }
.sec-head .lede { margin-top: 14px; }
@media (min-width: 900px) { .sec-head { margin-bottom: 44px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px 64px; align-items: end; } .sec-head .lede { margin-top: 0; } }
@media (max-width: 599px) { .services { padding-top: 44px; } }

/* ---------- Services: five cards, prices as starting points ---------- */
.svc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.svc { position: relative; overflow: hidden; border-radius: 20px; display: flex; flex-direction: column; min-width: 0; transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out); }
.svc__media { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--paper-2); }
.svc__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out); }
.svc__body { padding: 12px 13px 14px; display: flex; flex-direction: column; flex: 1; }
.svc__name { font-size: 16px; line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
.svc__line { margin: 6px 0 0; font-size: 13px; line-height: 1.4; color: var(--muted); text-wrap: pretty; }
.svc__price { margin: 10px 0 0; padding-top: 0; display: flex; flex-direction: column; line-height: 1.25; }
.svc__price strong { font-weight: 500; font-size: 15px; letter-spacing: -0.01em; }
.svc__price span { font-size: 12px; color: var(--muted); }
.svc__link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; cursor: pointer; }
.svc--wide { grid-column: 1 / -1; flex-direction: row; }
.svc--wide .svc__media { width: 38%; flex: none; aspect-ratio: auto; }
.svc--wide .svc__body { padding: 14px 16px; justify-content: center; }
@media (hover: hover) { .svc:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-lift); } .svc:hover .svc__media img { transform: scale(1.04); } }
@media (min-width: 640px) {
  .svc-grid { grid-template-columns: repeat(6, 1fr); gap: 20px; }
  .svc { grid-column: span 2; }
  .svc:nth-child(n + 4) { grid-column: span 3; }
  .svc--wide { flex-direction: column; }
  .svc--wide .svc__media { width: auto; aspect-ratio: 16 / 9; }
  .svc--wide .svc__body { padding: 16px 18px 18px; justify-content: flex-start; }
  .svc__media { aspect-ratio: 4 / 3; }
  .svc__body { padding: 16px 18px 18px; }
  .svc__name { font-size: 20px; }
  .svc__line { font-size: 15px; margin-top: 8px; }
  .svc__price { margin-top: 16px; flex-direction: row; align-items: baseline; gap: 8px; }
  .svc__price strong { font-size: 18px; }
  .svc__price span { font-size: 14px; }
}
@media (min-width: 900px) { .svc-grid { gap: 24px; } .svc:nth-child(n + 4) .svc__media { aspect-ratio: 16 / 9; } }

/* ---------- Team ---------- */
.team-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.doc { overflow: hidden; border-radius: 20px; min-width: 0; }
.doc__media { aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper-2); }
.doc__media img { width: 100%; height: 100%; object-fit: cover; }
.doc__body { padding: 12px 13px 14px; }
.doc__name { font-size: 16px; line-height: 1.15; letter-spacing: -0.02em; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 7px; }
.doc__cred { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0.04em; }
.doc__role { margin: 5px 0 0; font-size: 13px; color: var(--muted); line-height: 1.35; }
.doc__bio { display: none; margin: 12px 0 0; font-size: 15px; line-height: 1.5; text-wrap: pretty; }
@media (min-width: 640px) {
  .team-grid { gap: 20px; }
  .doc { display: grid; grid-template-columns: 42% 1fr; }
  .doc__media { aspect-ratio: auto; min-height: 100%; }
  .doc__body { padding: 20px 22px 22px; align-self: center; }
  .doc__name { font-size: 22px; }
  .doc__role { font-size: 14px; }
  .doc__bio { display: block; }
}
@media (min-width: 900px) { .team-grid { gap: 24px; } .doc__body { padding: 28px 30px; } .doc__name { font-size: 24px; } .doc__bio { font-size: 16px; } }

/* ---------- Insurance band (dark, light lettering) ---------- */
.band { padding-block: 64px; }
.band--ink { background: var(--ink); color: var(--on-dark); }
.band--ink .eyebrow { color: rgba(245, 244, 240, 0.62); margin: 0 0 14px; }
.band__p { margin: 16px 0 0; font-size: 17px; line-height: 1.5; color: rgba(245, 244, 240, 0.8); max-width: 46ch; text-wrap: pretty; }
.band__in { display: grid; gap: 36px; }
.band__facts { list-style: none; margin: 0; padding: 0; display: grid; }
.band__facts li { display: grid; gap: 4px; padding-block: 18px; box-shadow: inset 0 1px 0 var(--line-dark); }
.band__facts li:first-child { box-shadow: none; padding-top: 0; }
.band__k { font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(245, 244, 240, 0.62); }
.band__v { font-family: var(--font-display); font-weight: 400; font-size: clamp(26px, 2.6vw, 36px); letter-spacing: -0.03em; line-height: 1.1; }
.band__d { font-size: 15px; color: rgba(245, 244, 240, 0.74); }
@media (min-width: 900px) {
  .band { padding-block: 104px; }
  .band__in { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 96px; align-items: center; }
  .band__facts li { padding-block: 22px; }
}

/* ---------- Reviews (light) ---------- */
.reviews__head { margin-bottom: 24px; }
.reviews__big { display: flex; align-items: center; gap: 16px; }
.reviews__big .num { font-family: var(--font-display); font-weight: 300; font-size: clamp(56px, 7vw, 108px); line-height: 0.9; letter-spacing: -0.035em; }
.stars {
  --r: 5; --size: 18px;
  display: inline-block; width: calc(var(--size) * 5); height: var(--size); flex: none;
  background: linear-gradient(90deg, var(--ink) calc(var(--r) / 5 * 100%), rgba(10, 12, 14, 0.14) 0);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.8l2.75 5.9 6.45.75-4.8 4.4 1.3 6.35L12 17l-5.7 3.2 1.3-6.35-4.8-4.4 6.45-.75z'/%3E%3C/svg%3E") 0 0 / var(--size) var(--size) repeat-x;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.8l2.75 5.9 6.45.75-4.8 4.4 1.3 6.35L12 17l-5.7 3.2 1.3-6.35-4.8-4.4 6.45-.75z'/%3E%3C/svg%3E") 0 0 / var(--size) var(--size) repeat-x;
}
.reviews__count { margin: 10px 0 0; font-size: 15px; color: var(--muted); }
.reviews__grid { display: grid; gap: 12px; }
.rv { margin: 0; padding: 20px; border-radius: 20px; display: flex; flex-direction: column; gap: 14px; }
.rv blockquote { margin: 0; }
.rv p { margin: 0; font-size: 17px; line-height: 1.45; font-weight: 400; letter-spacing: -0.01em; text-wrap: pretty; }
.rv figcaption { margin-top: auto; display: flex; align-items: baseline; gap: 10px; font-size: 14px; color: var(--muted); }
.rv figcaption strong { font-weight: 500; color: var(--ink); }
@media (min-width: 760px) { .reviews__grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } .rv { padding: 26px; } .reviews__head { margin-bottom: 40px; } .stars { --size: 24px; } }
@media (min-width: 900px) { .reviews__grid { gap: 24px; } }

/* ---------- Visit: hours and the address line ---------- */
.visit__in { display: grid; gap: 28px; }
.visit__addr { margin: 16px 0 0; font-size: 17px; line-height: 1.5; color: var(--muted); }
.visit__addr .ln { display: block; }
.hours { margin: 0; padding: 6px 20px; border-radius: 20px; }
.hours__row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; }
.hours__row + .hours__row { box-shadow: inset 0 1px 0 var(--line); }
.hours dt { font-weight: 500; }
.hours dd { margin: 0; color: var(--muted); text-align: right; white-space: nowrap; }
@media (min-width: 900px) { .visit__in { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 96px; align-items: center; } .hours { padding: 10px 28px; } .hours__row { padding: 18px 0; } }

/* ---------- Ask band (dark photo, glass card) ---------- */
.ask-band { position: relative; overflow: hidden; background: var(--ink); color: var(--on-dark); padding-block: 72px; isolation: isolate; }
.ask-band__media { position: absolute; inset: 0; z-index: -1; }
.ask-band__media img { width: 100%; height: 100%; object-fit: cover; filter: blur(10px) saturate(1.05); transform: scale(1.1); }
.ask-band__media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3, 14, 18, 0.6), rgba(3, 14, 18, 0.74)); }
.ask-band__card { max-width: 560px; padding: 28px 24px; border-radius: 28px; background: rgba(14, 16, 19, 0.5); }
.ask-band__p { margin: 14px 0 22px; font-size: 16px; line-height: 1.5; color: rgba(245, 244, 240, 0.86); text-wrap: pretty; }
@media (min-width: 900px) { .ask-band { padding-block: 128px; } .ask-band__card { padding: 40px 44px; } .ask-band__p { font-size: 18px; margin: 18px 0 28px; } }

/* ---------- Footer ---------- */
.footer { padding: 56px 0 calc(28px + var(--tabbar-h) + var(--safe-b) + 28px); }
.footer__in { display: grid; gap: 32px; }
.footer__brand p { margin: 14px 0 0; color: var(--on-dark-muted); font-size: 15px; }
.footer__col { display: grid; gap: 0; }
.footer__col .eyebrow { margin: 0 0 8px; color: rgba(245, 244, 240, 0.62); }
.footer__col a { display: inline-flex; align-items: center; min-height: 44px; }
.footer__col span { display: block; line-height: 1.6; color: rgba(245, 244, 240, 0.86); }
.footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; margin-top: 40px; padding-top: 20px; box-shadow: inset 0 1px 0 var(--line-dark); font-size: 13px; color: var(--on-dark-muted); }
@media (min-width: 900px) { .footer { padding: 88px 0 32px; } .footer__in { grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; } .footer__base { margin-top: 56px; } }
body:not([data-route='home']) .footer { display: none; }

/* ---------- Tab bar: Instagram-style dark liquid glass, three icons, Ask in the middle ---------- */
.tabbar {
  position: fixed; left: 50%; bottom: calc(10px + var(--safe-b)); z-index: 60;
  display: flex; gap: 0; padding: 5px; border-radius: var(--r-pill);
  transform: translate3d(-50%, 0, 0);
  transform-origin: 50% 100%;
  transition: transform 0.5s var(--ease-spring), opacity 0.3s;
  background: rgba(14, 16, 19, 0.62);
  box-shadow: var(--glass-dark-edge), var(--shadow-float);
}
.tabbar::before { background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0) 45%); }
.tabbar > * { position: relative; width: 56px; height: 46px; display: grid; place-items: center; border-radius: var(--r-pill); color: var(--on-dark); transition: background-color 0.25s, transform 0.18s var(--ease-out); -webkit-tap-highlight-color: transparent; }
.tabbar > *:active { transform: scale(0.9); }
.tabbar .ico { width: 24px; height: 24px; grid-area: 1 / 1; }
.tabbar .s { display: none; }
.tabbar [aria-current='page'] { background: rgba(255, 255, 255, 0.06); }
.tabbar [aria-current='page'] .o { display: none; }
.tabbar [aria-current='page'] .s { display: block; }
.tabbar.is-compact { transform: translate3d(-50%, 4px, 0) scale(0.88); }
html.sheet-open .tabbar { transform: translate3d(-50%, 150%, 0); }
@media (min-width: 900px) { .tabbar { display: none; } }
@media (max-width: 899px) { html.sheet-open .topbar { opacity: 0; pointer-events: none; transition: opacity 0.25s var(--ease-out); } }

/* ---------- Ask page ---------- */
.ask { --ask-pad: 170px; position: relative; }
.ask__stage {
  position: relative; min-height: 56svh; display: flex; align-items: flex-end; overflow: hidden;
  background: var(--hero-bg); color: var(--on-dark);
  padding: calc(var(--topbar-h) + var(--safe-t) + 32px) 0 52px;
  transition: min-height 0.6s var(--ease-out);
}
.ask.has-query .ask__stage { min-height: 0; padding-bottom: 44px; }
.ask__bg { position: absolute; inset: 0; }
.ask__bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(8px) saturate(1.05); transform: scale(1.08); }
.ask__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3, 14, 18, 0.58) 0%, rgba(3, 14, 18, 0.7) 60%, rgba(3, 14, 18, 0.8) 100%); }
.ask__stage-in { position: relative; z-index: 1; }
.ask__title { font-family: var(--font-display); font-weight: 500; font-size: clamp(40px, 5.4vw, 84px); line-height: 1; letter-spacing: -0.035em; margin: 0; text-shadow: 0 1px 24px rgba(0, 10, 14, 0.45); }
.ask__lede { margin: 16px 0 0; max-width: 34ch; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.5; color: rgba(245, 244, 240, 0.92); text-wrap: pretty; text-shadow: 0 1px 24px rgba(0, 10, 14, 0.45); }
.ask__chips { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ask__chips li { animation: fadeUp 0.6s var(--ease-out) both; }
.ask__chips li:nth-child(2) { animation-delay: 0.06s; } .ask__chips li:nth-child(3) { animation-delay: 0.12s; }
.ask__chip {
  min-height: 42px; padding: 0 16px; border-radius: var(--r-pill); font-size: 14px; font-weight: 500; white-space: nowrap; color: var(--on-dark);
  background: rgba(255, 255, 255, 0.1); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.26); transition: background-color 0.2s, transform 0.18s var(--ease-out);
}
.ask__chip:hover { background: rgba(255, 255, 255, 0.18); }
.ask__chip:active { transform: scale(0.96); }
.ask.has-query .ask__chips { display: none; }
.ask__sheet { position: relative; z-index: 2; margin-top: -28px; padding-top: 30px; min-height: 36vh; background: var(--paper); border-radius: 28px 28px 0 0; box-shadow: var(--shadow-sheet); }
.ask__log { display: flex; flex-direction: column; gap: 12px; }
.ask:not(.has-query) .ask__sheet { min-height: calc(100svh - 56svh + 28px); }
.msg { position: relative; max-width: 86%; padding: 13px 16px; border-radius: 20px; font-size: 16px; line-height: 1.45; animation: msgIn 0.4s var(--ease-out) both; }
.msg p { margin: 0; text-wrap: pretty; }
.msg p .ln { display: inline; }
.msg--me { align-self: flex-end; background: var(--accent); color: var(--on-dark); border-bottom-right-radius: 6px; }
.msg--nb { align-self: flex-start; background: var(--card); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-card); border-bottom-left-radius: 6px; }
.msg--typing { padding: 16px 18px; }
.dots { display: inline-flex; gap: 5px; height: 10px; align-items: center; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); animation: dot 1.1s infinite var(--ease-out); }
.dots i:nth-child(2) { animation-delay: 0.15s; } .dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.msg__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.msg__act { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill); font-size: 14px; font-weight: 500; background: var(--paper-2); color: var(--ink); white-space: nowrap; transition: transform 0.18s var(--ease-out), background-color 0.2s; -webkit-tap-highlight-color: transparent; }
.msg__act:active { transform: scale(0.96); }
.msg__act--ink { background: var(--accent); color: var(--on-dark); }
.view-pad--ask { height: calc(var(--tabbar-h) + 56px + 80px + var(--safe-b)); }
.ask__form {
  position: fixed; z-index: 55; left: var(--gutter); right: var(--gutter);
  bottom: calc(10px + var(--safe-b) + var(--tabbar-h) + 12px);
  display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 20px; border-radius: var(--r-pill);
  background: rgba(14, 16, 19, 0.62);
  transition: box-shadow 0.3s var(--ease-out);
}
.ask__form:focus-within { box-shadow: var(--glass-dark-edge), 0 0 0 1px rgba(255, 255, 255, 0.28), 0 28px 70px -24px rgba(0, 0, 0, 0.7); }
.ask__form input { flex: 1; min-width: 0; min-height: 44px; background: transparent; border: 0; outline: 0; color: var(--on-dark); font-size: 16px; font-weight: 500; caret-color: var(--on-dark); }
.ask__form input::placeholder { color: rgba(245, 244, 240, 0.55); }
.ask__send { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--on-dark); color: var(--ink); transition: transform 0.2s var(--ease-out); }
.ask__send:active { transform: scale(0.9); }
.ask__send .ico { width: 20px; height: 20px; stroke-width: 2; }
html.sheet-open .ask__form { opacity: 0; pointer-events: none; }
@media (min-width: 900px) {
  .ask { --ask-pad: 120px; }
  .ask__stage { min-height: 50vh; padding-bottom: 72px; }
  .ask:not(.has-query) .ask__sheet { min-height: 32vh; }
  .ask__log { max-width: 760px; margin-inline: auto; }
  .ask__sheet { padding-top: 40px; }
  .msg { max-width: 76%; }
  .ask__form { left: 50%; right: auto; transform: translateX(-50%); width: min(760px, calc(100% - 2 * var(--gutter))); bottom: 28px; padding: 8px 8px 8px 26px; }
  .ask__form input { min-height: 52px; font-size: 17px; }
  .ask__send { width: 52px; height: 52px; }
  .view-pad--ask { height: 140px; }
}

/* ---------- Reduced motion: fitted text measures synchronously ---------- */
@media (prefers-reduced-motion: reduce) { .wm, .wm__name, .wm__sub { transition: none !important; } }
