/* Shared pieces of the inner pages (expert profile, dashboard, sign up / log in, settings): breadcrumbs,
   page headers, loading skeletons, and the expert profile layout. Brand tokens come from style.css. */

/* Page header (title + short line) used on Dashboard, Settings and friends -------------------------- */
.page-head { margin: 0 0 26px; }
.page-head h1 { margin: 0 0 6px; }
.page-head p { margin: 0; color: var(--ink-soft); }

/* Loading skeletons ---------------------------------------------------------------------------------- */
.skeleton { display: block; border-radius: 12px; background: linear-gradient(90deg, var(--skeleton-a) 25%, var(--skeleton-b) 50%, var(--skeleton-a) 75%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
.skeleton-line { height: 14px; margin: 10px 0; }
.skeleton-line.w60 { width: 60%; } .skeleton-line.w80 { width: 80%; } .skeleton-line.w40 { width: 40%; }
.skeleton-title { height: 28px; width: 50%; margin: 6px 0 14px; }
.skeleton-avatar { width: 76px; height: 76px; border-radius: 50%; flex: 0 0 auto; }
.skeleton-card { background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: 0 10px 26px -18px rgba(var(--shadow-rgb), 0.3); margin-bottom: 20px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* Settings ---------------------------------------------------------------------------------------- */
.settings { max-width: 760px; }
.app-progress { background: var(--card); border-radius: var(--radius); padding: 18px 22px; margin: 0 0 22px; box-shadow: 0 10px 26px -18px rgba(var(--shadow-rgb), 0.3); border-left: 6px solid var(--accent2); }
.app-progress[hidden] { display: none; }
.app-progress-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.app-progress .vt-bar { margin: 12px 0 6px; }
.app-progress-foot { margin: 0; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.linklike { background: none; border: none; padding: 0; min-height: 44px; font: inherit; font-weight: 800; color: var(--accent-text); cursor: pointer; text-decoration: underline; }
.linklike:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 2px; border-radius: 6px; }

/* Sign up and log in: a benefits panel next to the form ------------------------------------------------- */
.auth-split {
  display: grid; grid-template-columns: 1fr 1fr; max-width: 980px; margin: 56px auto 90px; width: calc(100% - 48px);
  border-radius: var(--radius); overflow: hidden; box-shadow: 0 24px 60px -30px rgba(var(--shadow-rgb), 0.5); background: var(--card);
}
.auth-panel { position: relative; overflow: hidden; background: var(--navy); color: var(--on-navy); padding: 44px 38px; display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.auth-panel h2 { color: var(--on-navy); margin: 0; font-size: 1.7rem; line-height: 1.2; position: relative; }
.auth-blob { position: absolute; border-radius: 50%; }
.auth-blob.a1 { width: 220px; height: 220px; background: rgba(var(--accent-rgb), 0.22); top: -80px; right: -70px; }
.auth-blob.a2 { width: 150px; height: 150px; background: rgba(var(--accent2-rgb), 0.2); bottom: -50px; left: -40px; }
.auth-benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; position: relative; }
.auth-benefits li { display: flex; gap: 14px; align-items: flex-start; font-size: 0.98rem; line-height: 1.45; }
.auth-benefits svg { flex: 0 0 auto; color: var(--accent2-light); margin-top: 2px; }
.auth-split .auth-card { max-width: none; border-radius: 0; box-shadow: none; animation: none; padding: 44px 40px; display: flex; flex-direction: column; justify-content: center; }
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 0.85rem; font-weight: 800; margin: 0 0 6px; color: var(--ink-soft); }
.field input { margin-top: 0; }
.field .hint { display: block; font-weight: 600; color: var(--ink-soft); font-size: 0.78rem; margin-top: 6px; }
.field input[aria-invalid="true"] { border-color: var(--red-strong); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 52px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: none; background: transparent; border-radius: 50%; color: var(--ink-soft); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pw-toggle:hover { color: var(--ink); background: var(--bg); }
.pw-toggle[aria-pressed="true"] { color: var(--accent-text); }
.pw-toggle:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 1px; }
.pw-strength { min-height: 22px; margin-top: 8px; display: flex; align-items: center; gap: 10px; }
.pw-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; width: 120px; }
.pw-bar i { display: block; height: 6px; border-radius: 999px; background: var(--border); }
.pw-strength[data-level="1"] .pw-bar i.on { background: var(--red-strong); }
.pw-strength[data-level="2"] .pw-bar i.on { background: var(--pw-2); }
.pw-strength[data-level="3"] .pw-bar i.on { background: var(--pw-3); }
.pw-strength[data-level="4"] .pw-bar i.on { background: var(--accent2-strong); }
.pw-text { font-size: 0.8rem; font-weight: 800; color: var(--ink-soft); }
.pw-strength[data-level="1"] .pw-text { color: var(--red-strong); }
.pw-strength[data-level="4"] .pw-text { color: var(--accent2-text); }
.forgot-row { margin: -4px 0 16px; text-align: right; }
.forgot-row a { font-size: 0.85rem; font-weight: 800; color: var(--accent-text); text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.forgot-row a:hover { text-decoration: underline; }
@media (max-width: 860px) {
  .auth-split { grid-template-columns: 1fr; margin: 28px auto 60px; width: calc(100% - 32px); }
  .auth-panel { display: none; }
  .auth-split .auth-card { padding: 30px 22px; }
}

/* Dashboard ---------------------------------------------------------------------------------------- */
.dash { max-width: 880px; }
.tab-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--accent-strong); color: var(--on-accent); font-size: 0.75rem; font-weight: 800; }
.tab-count[hidden] { display: none; }
.tab.active .tab-count { background: var(--on-inverse); color: var(--inverse); }
.block { display: block; }
.plain-link { color: inherit; text-decoration: none; }
.plain-link:hover, .plain-link:focus-visible { color: var(--accent-text); text-decoration: underline; }
.booking-card { margin-bottom: 16px; }

/* Progress line of a question: Paid, Waiting, Answered, Reviewed */
.timeline { list-style: none; margin: 4px 0 16px; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; }
.timeline li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 0.78rem; font-weight: 800; color: var(--ink-soft); padding: 0 4px; }
.timeline li::before { content: ''; position: absolute; top: 11px; left: -50%; right: 50%; height: 3px; background: var(--border); z-index: 0; }
.timeline li:first-child::before { display: none; }
.tl-dot { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; background: var(--card); border: 3px solid var(--border); color: var(--on-accent2); display: flex; align-items: center; justify-content: center; font-size: 0.72rem; line-height: 1; }
.timeline li.done { color: var(--ink); }
.timeline li.done::before, .timeline li.current::before { background: var(--accent2-strong); }
.timeline li.done .tl-dot { background: var(--accent2-strong); border-color: var(--accent2-strong); }
.timeline li.current { color: var(--ink); }
.timeline li.current .tl-dot { border-color: var(--accent-strong); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.22); }

.countdown { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--sun-soft); color: var(--sun-ink); font-size: 0.92rem; }
.countdown svg { flex: 0 0 auto; }
.countdown.urgent { background: var(--pink-soft); color: var(--pink-ink); }
.countdown .muted { color: inherit; opacity: 0.85; }
.booking-amount .block { font-weight: 600; margin-top: 2px; white-space: nowrap; font-size: 0.74rem; }
.booking-amount { white-space: nowrap; flex: 0 0 auto; }
.booking-top > div:nth-child(2) { min-width: 0; }
@media (max-width: 560px) {
  .timeline li { font-size: 0.72rem; padding: 0 2px; }
}

/* Expert profile --------------------------------------------------------------------------------------- */
.expert-wrap { padding: 36px 24px 90px; max-width: 1120px; }
.expert-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 22px 34px; align-items: start;
  grid-template-areas: "profile ask" "about ask" "checks ask" "reviews ask" "report ask";
  grid-template-rows: auto auto auto auto 1fr;
}
.profile-card { grid-area: profile; background: var(--card); border-radius: var(--radius); padding: 28px; box-shadow: 0 10px 26px -18px rgba(var(--shadow-rgb), 0.3); }
.profile-head { display: flex; align-items: center; gap: 20px; }
.profile-head h1 { margin: 0 0 2px; font-size: 1.9rem; line-height: 1.15; }
.profile-title { margin: 0 0 10px; color: var(--ink-soft); font-weight: 700; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tag { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 3px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 800; text-decoration: none; }
.tag-niche { background: var(--lav-soft); color: var(--ink); }
a.tag-niche:hover { background: var(--inverse); color: var(--on-inverse); }
.tag-verified { background: var(--mint-soft); color: var(--accent2-text); }
.tag-new { background: var(--sun-soft); color: var(--sun-ink); }
.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 24px 0 0; padding-top: 20px; border-top: 2px dashed var(--border); }
.profile-stats div { min-width: 0; }
.profile-stats dt { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 4px; }
.profile-stats dd { margin: 0; font-weight: 800; font-size: 1.05rem; font-family: 'Baloo 2', sans-serif; }
.profile-stats dd .rating { font-size: 1.05rem; }
.profile-stats .muted { font-family: 'Nunito', sans-serif; font-size: 0.85rem; font-weight: 700; }

.profile-section { background: var(--card); border-radius: var(--radius); padding: 24px 28px; box-shadow: 0 10px 26px -18px rgba(var(--shadow-rgb), 0.3); }
.profile-section h2 { margin: 0 0 12px; font-size: 1.15rem; }
.profile-about { grid-area: about; }
.profile-checks { grid-area: checks; }
.profile-reviews { grid-area: reviews; }
.report-section { grid-area: report; margin-top: 0; border-top: none; padding-top: 0; }
.profile-about p { margin: 0; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.profile-checks .trust-list { margin: 0; }

.review-summary { display: flex; align-items: center; gap: 20px; margin-bottom: 16px; flex-wrap: wrap; }
.review-summary strong { font-family: 'Baloo 2', sans-serif; font-size: 2.4rem; line-height: 1; }
.review-bars { display: grid; gap: 4px; flex: 1 1 180px; max-width: 320px; }
.review-bar { display: grid; grid-template-columns: 22px 1fr 26px; gap: 8px; align-items: center; font-size: 0.78rem; font-weight: 700; color: var(--ink-soft); }
.review-bar i { display: block; height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; }
.review-bar i b { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.reviews-empty { text-align: center; padding: 10px 0 4px; }
.reviews-empty svg { width: 120px; height: auto; margin-bottom: 6px; }
.reviews-empty h3 { margin: 0 0 4px; font-size: 1.1rem; }
.reviews-empty p { margin: 0 auto; max-width: 420px; color: var(--ink-soft); font-size: 0.92rem; }

/* The box where a question is written: sticks to the side while the profile scrolls */
.ask-side { grid-area: ask; position: sticky; top: 92px; align-self: start; }
.ask-panel { background: var(--card); border-radius: var(--radius); padding: 26px; box-shadow: 0 18px 40px -22px rgba(var(--shadow-rgb), 0.5); border: 2px solid var(--border-strong); }
.ask-panel h2 { margin: 0 0 4px; font-size: 1.2rem; }
.ask-price { display: flex; align-items: baseline; gap: 8px; margin: 0 0 14px; }
.ask-price strong { font-family: 'Baloo 2', sans-serif; font-size: 2.1rem; line-height: 1; }
.ask-price span { color: var(--ink-soft); font-weight: 700; font-size: 0.88rem; }
.ask-tip { background: var(--sun-tint); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 0.86rem; margin: 0 0 14px; color: var(--ink); }
.ask-panel label { margin-bottom: 8px; }
.ask-panel textarea { min-height: 130px; }
.q-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 0.78rem; font-weight: 700; color: var(--ink-soft); margin: 0 0 12px; }
.q-meta .over { color: var(--red-strong); }
.q-meta .ok { color: var(--accent2-text); }

/* Two-step verification (admins) */
.tf-card { max-width: 520px; }
.tf-qr { width: 232px; max-width: 100%; margin: 6px auto 12px; border-radius: var(--radius-sm); overflow: hidden; }
.tf-qr svg { display: block; width: 100%; height: auto; } /* (the code is black on white in both themes: a QR reader needs that) */
.tf-dev { margin: 0 0 12px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--sun-soft); color: var(--sun-ink); font-weight: 800; font-size: 0.88rem; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.tf-key { text-align: center; }
.tf-key code { font-size: 1.05rem; letter-spacing: 0.06em; user-select: all; overflow-wrap: anywhere; }
.tf-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 12px 0; padding-left: 1.4rem; }
.tf-codes code { font-size: 1rem; user-select: all; }
.tf-saved { display: flex; gap: 10px; align-items: center; margin: 14px 0 6px; font-weight: 700; }
.tf-h { font-size: 1.2rem; margin: 0 0 6px; }
.tf-h:focus { outline: none; }
.tf-switch { text-align: center; margin: 12px 0 0; }
.tf-card input[name="code"], .tf-card input[name="recovery"] { font-size: 1.3rem; letter-spacing: 0.18em; text-align: center; }
.ask-notes { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; font-size: 0.82rem; color: var(--ink-soft); font-weight: 600; }
.ask-notes li { display: flex; gap: 8px; align-items: flex-start; }
.ask-notes svg { flex: 0 0 auto; color: var(--accent2-strong); margin-top: 2px; }
.ask-login { display: grid; gap: 10px; }

/* The question bar and sheet (phones) ------------------------------------------------------------------------ */
.ask-bar { display: none; }
.trust-explain { display: none; }

/* Tablets and phones: one column. The question box follows the profile header (tablets); phones get a bar instead. */
@media (max-width: 899px) {
  .expert-wrap { padding: 24px 24px 70px; }
  .expert-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "profile" "ask" "about" "checks" "reviews" "report"; grid-template-rows: none; }
  .ask-side { position: static; }
  .profile-card { padding: 24px; }
  .ask-panel { padding: 22px; }
}
@media (max-width: 639px) {
  .expert-wrap { padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); }
  .profile-stats { grid-template-columns: 1fr 1fr; }
  .profile-card { padding: 22px; }
  .profile-head { gap: 14px; align-items: flex-start; }
  .profile-head h1 { font-size: 1.5rem; }
  .avatar-lg { width: 60px; height: 60px; font-size: 1.2rem; flex: 0 0 auto; }
  .profile-section { padding: 20px; }
  .ask-side { display: none; } /* the box lives in the sheet */

  .ask-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 10px max(16px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: var(--glass-strong); backdrop-filter: blur(10px); border-top: 1px solid var(--border); box-shadow: 0 -12px 30px -20px rgba(var(--shadow-rgb), 0.5);
  }
  .ask-bar[hidden] { display: none; }
  .ask-bar-price { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
  .ask-bar-price strong { font-family: 'Baloo 2', sans-serif; font-size: 1.55rem; }
  .ask-bar-price span { font-size: 0.78rem; font-weight: 700; color: var(--ink-soft); }
  .ask-bar .btn { flex: 1 1 auto; max-width: 250px; }
  .has-ask-bar .footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

  /* the checks: a row of badges you swipe, with the explanations written out underneath (no hover on a phone) */
  .profile-checks .trust-list {
    flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; margin: 0 -20px 12px; padding: 4px 20px 8px; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 32px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 32px), transparent 100%);
  }
  .profile-checks .trust-list::-webkit-scrollbar { display: none; }
  .profile-checks .trust-list li { flex: 0 0 auto; scroll-snap-align: start; }
  .trust-badge-lg { cursor: default; }
  .trust-tip { display: none; }
  .trust-explain { display: grid; gap: 8px; list-style: none; margin: 0 0 4px; padding: 0; font-size: 0.9rem; color: var(--ink-soft); }
  .trust-explain strong { color: var(--ink); }
  .review-summary { gap: 14px; }
  .review-bars { flex-basis: 100%; max-width: none; }
}
/* the sheet holds the box: no frame of its own */
.sheet-body #askArea > h2 { display: none; }
.sheet-body .ask-tip { margin-top: 4px; }
.sheet-body textarea { min-height: 150px; }
@media (min-width: 640px) { .profile-stats { grid-template-columns: repeat(4, 1fr); } }

/* Settings and dashboard on tablets and phones ---------------------------------------------------------------- */
@media (max-width: 639px) {
  .settings, .dash { padding: 24px 16px 72px; }
  .settings h1, .dash h1 { font-size: 1.7rem; margin-bottom: 18px; }
  .settings-card { padding: 20px 18px; }

  /* the tab row: swipe it, with a fade at the edges (the chosen tab is scrolled into view) */
  .tabs {
    margin: 0 -16px 20px; padding: 2px 44px 8px 16px; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding: 0 16px;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 34px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 34px), transparent 100%);
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { scroll-snap-align: center; }

  /* the main button of a long form stays in reach above the keyboard */
  .settings-card form > button[type="submit"], .contact-card form > button[type="submit"] {
    width: 100%; position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 6;
    box-shadow: 0 10px 24px -10px rgba(var(--accent-strong-rgb), 0.6), 0 0 0 8px var(--card);
  }
  .vt-form .btn { justify-self: stretch; }

  /* verification: a compact vertical stepper */
  .vt-main-list { margin-left: 2px; }
  .vt-main-list > .vt-step, .vt-main-list > .vt-group { position: relative; }
  .vt-steps { gap: 0; }
  .vt-main-list > .vt-step {
    background: transparent; box-shadow: none; border-radius: 0; padding: 0 0 6px; grid-template-columns: 32px minmax(0, 1fr); gap: 12px;
  }
  .vt-main-list > .vt-step::before {
    content: ''; position: absolute; left: 15px; top: 34px; bottom: 0; width: 3px; background: var(--border); border-radius: 3px;
  }
  .vt-main-list > .vt-step:last-child::before { display: none; }
  .vt-main-list > .vt-passed::before { background: var(--accent2-strong); }
  .vt-main-list > .vt-step > .vt-main { background: var(--card); border-radius: var(--radius-sm); padding: 12px 14px 8px; margin-bottom: 12px; box-shadow: 0 8px 20px -16px rgba(var(--shadow-rgb), 0.4); }
  .vt-step .vt-icon { position: relative; z-index: 1; margin-top: 8px; }
  .vt-head h3 { font-size: 0.98rem; }
  .vt-step .muted.small { font-size: 0.8rem; }
  .vt-group { padding: 10px; }
}
@media (min-width: 640px) and (max-width: 1023px) {
  .settings, .dash { padding-left: 24px; padding-right: 24px; }
}
/* Sign up / log in on a tablet: one centred card, not a stretched one */
@media (min-width: 640px) and (max-width: 860px) {
  .auth-split { max-width: 560px; }
}
/* A question's progress runs down the card on phones (four steps side by side are too cramped) */
@media (max-width: 639px) {
  .timeline { grid-auto-flow: row; grid-auto-columns: auto; gap: 12px; margin: 8px 0 16px; }
  .timeline li { flex-direction: row; justify-content: flex-start; text-align: left; font-size: 0.9rem; padding: 0; gap: 12px; min-height: 24px; }
  .timeline li::before { top: -12px; left: 10.5px; right: auto; width: 3px; height: 12px; }
  .timeline li:first-child::before { display: none; }
  .booking-top { flex-wrap: wrap; }
}
/* Earnings figures: two across then one full-width card on phones (never a lone half-width card), three across on tablets */
@media (max-width: 639px) {
  .earn-cards { grid-template-columns: 1fr 1fr; }
  .earn-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 640px) { .earn-cards { grid-template-columns: repeat(3, 1fr); } }
/* Admin: the tab and filter chips are one swipe row each on phones instead of five wrapped rows */
@media (max-width: 639px) {
  #adminTabs, #statusFilters {
    flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 2px 44px 8px 16px; scroll-padding: 0 16px; scrollbar-width: none;
    scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 34px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 34px), transparent 100%);
  }
  #adminTabs::-webkit-scrollbar, #statusFilters::-webkit-scrollbar { display: none; }
  #adminTabs .chip, #statusFilters .chip { flex: 0 0 auto; scroll-snap-align: center; }
  #adminTabs { margin-bottom: 8px !important; }
  #statusFilters { margin-bottom: 18px !important; }
}
/* Admin action rows (reason box + button, transfer reference + Mark as paid, interview slot) stack on phones */
@media (max-width: 639px) {
  .mv-decide, .payout-pay, .mv-reject { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-left: 0; }
  .mv-decide input, .mv-decide .btn, .payout-pay input, .payout-pay .btn, .mv-reject input, .mv-reject .btn { width: 100%; }
  .mv-decide .btn-sm, .payout-pay .btn-sm, .mv-reject .btn-sm { min-height: 44px; }
  #ivMinutes, #ivWhen { width: 100% !important; }
  .iv-add label { margin-top: 6px; }
  .mv-final { display: grid; gap: 10px; }
  .mv-final .btn-primary { width: 100%; }
  .review-actions { gap: 8px !important; }
  .review-actions .btn { min-height: 44px; }
  .earn-list li { grid-template-columns: 1fr auto; }
  .payout-toolbar .btn { flex: 1 1 100%; justify-content: center; }
}
/* Photos and public profiles ---------------------------------------------------------------------------------- */
.avatar-photo { object-fit: cover; display: block; background: var(--border); }
.avatar-xl { width: 96px; height: 96px; font-size: 1.9rem; }
.profile-headline { margin: -4px 0 10px; color: var(--ink); font-weight: 600; font-size: 0.95rem; overflow-wrap: anywhere; }
.profile-facts { list-style: none; margin: 18px 0 0; padding: 16px 0 0; border-top: 2px dashed var(--border); display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 18px; }
.profile-facts li { display: grid; gap: 1px; min-width: 0; }
.profile-facts strong { font-weight: 800; overflow-wrap: anywhere; }
.profile-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 14px 0 0; }
.profile-link { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; color: var(--accent-text); font-weight: 800; font-size: 0.9rem; text-decoration: none; overflow-wrap: anywhere; }
.profile-link:hover { text-decoration: underline; }
.profile-self { margin: 14px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.expert-layout.profile-plain { grid-template-columns: minmax(0, 720px); grid-template-areas: "profile" "about"; grid-template-rows: none; justify-content: center; }

/* Settings → Profile: the form and its live preview */
.profile-editor { display: grid; gap: 22px; align-items: start; }
.photo-edit { display: flex; align-items: center; gap: 18px; margin: 0 0 22px; }
.photo-preview { flex: 0 0 auto; }
.photo-actions { min-width: 0; }
.photo-label { margin: 0 0 8px; font-weight: 800; font-size: 0.85rem; color: var(--ink-soft); }
.photo-buttons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.photo-buttons .btn[hidden] { display: none; }
/* the real file field lies invisibly over the button, so the button is what is clicked, tapped and reached with the keyboard */
.photo-buttons .file-btn { position: relative; overflow: hidden; margin: 0; cursor: pointer; }
.file-btn .file-input { position: absolute; inset: -2px; width: calc(100% + 4px); height: calc(100% + 4px); margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.photo-buttons .file-btn:has(.file-input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.photo-actions .hint { margin-top: 8px; }
.photo-actions .form-error { margin: 6px 0 0; }
.username-edit { margin: 0 0 18px; }
.username-edit .hint { overflow-wrap: anywhere; }
.username-status { min-height: 1.2em; font-weight: 700; }
.username-status.is-ok { color: var(--accent2-text); }
.username-status.is-bad { color: var(--red-strong); }
.username-edit .btn { margin-top: 6px; }
.lang-fieldset { border: 0; margin: 0 0 15px; padding: 0; min-width: 0; }
.lang-fieldset legend { font-size: 0.85rem; font-weight: 800; color: var(--ink-soft); padding: 0; margin-bottom: 8px; }
.lang-checks { display: flex; flex-wrap: wrap; gap: 8px; }
form .check-chip { display: inline-flex; align-items: center; margin: 0; position: relative; }
form .check-chip input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; padding: 0; cursor: pointer; }
.check-chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 14px; border-radius: 999px; border: 2px solid var(--border); background: var(--field); font-weight: 700; font-size: 0.88rem; color: var(--ink); }
.check-chip input:checked + span { background: var(--inverse); border-color: var(--inverse); color: var(--on-inverse); }
.check-chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
#bioCount.is-over { color: var(--red-strong); font-weight: 800; }
.profile-preview { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: 0 10px 26px -18px rgba(var(--shadow-rgb), 0.3); }
.profile-preview h2 { font-size: 1.05rem; margin: 0 0 14px; }
.preview-card { background: var(--bg); border-radius: var(--radius-sm); padding: 18px; margin-bottom: 14px; }
.preview-card .profile-head { gap: 14px; align-items: center; }
.preview-name { margin: 0 0 2px; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 1.25rem; line-height: 1.15; overflow-wrap: anywhere; }
.preview-bio { margin: 14px 0 0; white-space: pre-line; overflow-wrap: anywhere; font-size: 0.92rem; }
.preview-card .profile-facts { margin-top: 14px; padding-top: 12px; grid-template-columns: 1fr; }
@media (min-width: 1100px) {
  .settings:has(#panel-profile:not([hidden])) { max-width: 1080px; }
  .profile-editor { grid-template-columns: minmax(0, 1fr) 360px; }
  .profile-preview { position: sticky; top: 92px; }
}
@media (max-width: 639px) {
  .photo-edit { align-items: flex-start; gap: 14px; }
  .avatar-xl { width: 72px; height: 72px; font-size: 1.5rem; }
  .profile-facts { grid-template-columns: 1fr; }
  .profile-preview { padding: 18px; }
}
/* Continue with Google (Google's button: white, thin grey outline, the four-colour G, Roboto-style medium text) ----------- */
.google-block { margin: 0 0 4px; }
.google-block[hidden] { display: none; }
.google-error { margin: 0 0 12px; }
.google-error:empty { display: none; }
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 16px;
  background: var(--gbtn-bg); border: 1px solid var(--gbtn-border); border-radius: 999px; color: var(--gbtn-ink); text-decoration: none; cursor: pointer;
  font-family: Roboto, 'Helvetica Neue', Arial, sans-serif; font-size: 14px; font-weight: 500; line-height: 20px; letter-spacing: 0.25px;
  transition: background-color 0.15s, box-shadow 0.15s;
}
.btn-google:hover { background: var(--gbtn-hover); box-shadow: 0 1px 3px var(--gbtn-shadow); }
.btn-google:focus-visible { outline: 3px solid var(--border-strong); outline-offset: 2px; }
.btn-google:active { background: var(--gbtn-active); }
.btn-google-logo { display: inline-flex; width: 20px; height: 20px; flex: 0 0 auto; }
.or-divider { display: flex; align-items: center; gap: 14px; margin: 18px 0 14px; color: var(--ink-soft); font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Settings → Account: connected accounts */
.connected-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 2px solid var(--border); border-radius: var(--radius-sm); }
.connected-logo { display: inline-flex; flex: 0 0 auto; }
.connected-info { flex: 1; min-width: 0; display: grid; gap: 1px; }
.connected-info .muted { overflow-wrap: anywhere; }
#googleAccountError { margin: 10px 0 0; }
@media (max-width: 479px) { .connected-row { flex-wrap: wrap; } .connected-row .btn { width: 100%; } }
/* The page a new person from Google passes through to confirm a username */
.choose-who { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; }
.choose-who strong { font-family: 'Baloo 2', sans-serif; font-size: 1.15rem; overflow-wrap: anywhere; }
.choose-card .field { margin-top: 18px; }
/* Ratings: the panel on a question, the tags, the reviews on a profile, the reply, the asker badge ------------------------ */
.rate-card { margin-top: 14px; padding: 16px 18px; border: 2px solid var(--border); border-radius: var(--radius-sm); background: var(--card); }
.rate-card.rate-prompt { border-color: var(--accent); background: var(--coral-tint); }
.rate-card .rate-h { margin: 0 0 6px; font-size: 1rem; }
.rate-card .muted.small { margin: 0 0 8px; }
.rate-label { margin: 10px 0 4px; font-size: 0.76rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
.rate-form fieldset { border: 0; margin: 0 0 12px; padding: 0; min-width: 0; }
.rate-form legend { font-size: 0.85rem; font-weight: 800; color: var(--ink-soft); padding: 0; margin-bottom: 6px; }
.rate-form textarea { margin: 6px 0 4px; }
.tag-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip-tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; background: var(--lav-soft); color: var(--ink); font-size: 0.8rem; font-weight: 800; }
.chip-tag b { color: var(--accent-text); }
.rate-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rate-edit { margin-top: 10px; }
.rate-change[hidden], .rate-edit[hidden] { display: none; }
.review-reply { margin: 10px 0 0; padding: 10px 14px; background: var(--bg); border-left: 4px solid var(--accent2-strong); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 0.9rem; }
.review-reply p { margin: 4px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.review-text { white-space: pre-line; overflow-wrap: anywhere; }
.reply-box { margin-top: 8px; }
.reply-box summary { cursor: pointer; color: var(--ink-soft); font-size: 0.85rem; font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }
.reply-box summary:hover { color: var(--accent-text); }
.reply-box summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.reply-form { display: grid; gap: 4px; max-width: 520px; }
.reply-form .btn { justify-self: start; }
.review-top { flex-wrap: wrap; row-gap: 4px; }
.reviewer { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: inherit; text-decoration: none; font-weight: 800; font-size: 0.92rem; min-width: 0; }
a.reviewer:hover { color: var(--accent-text); text-decoration: underline; }
.avatar-sm { width: 36px; height: 36px; font-size: 0.8rem; }
.avatar-anon { background: var(--border); color: var(--ink-soft); }
.rate-tag-summary { margin: 0 0 14px; }
.rate-tag-summary h3 { margin: 0 0 4px; font-size: 0.95rem; }
.asker-badge { margin: 2px 0 6px; }
.asker-pill { display: inline-flex; align-items: center; padding: 3px 12px; border-radius: 999px; background: var(--skeleton-b); color: var(--ink); font-size: 0.82rem; font-weight: 800; border: 2px solid var(--border); }
.asker-pill.great { background: var(--mint-soft); color: var(--accent2-text); border-color: var(--mint-line); }
.asker-tags { margin: 0 0 8px; }
.asker-line { margin: 2px 0 8px; }
@media (max-width: 639px) { .rate-card { padding: 14px; } .rate-actions .btn { flex: 1 1 auto; } }
.theme-radios { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }