/* SpaHQ inner pages: platform, pricing, switch, about, contact, security, legal, sign-in, owner app.
   Loaded after site.css; uses its tokens. Component rules sit in Bootstrap's "custom" layer. */

@layer custom {

  /* ---------- Breadcrumb and page hero ---------- */
  .crumbs { font-size: 14px; color: var(--mist); margin-bottom: 1rem; display: flex; flex-wrap: wrap; gap: 6px; }
  .crumbs a { color: var(--mist); }
  .crumbs a:hover { color: var(--gold); }
  .page-hero h1 { font-size: clamp(32px, 3.4vw + 14px, 72px); line-height: 1.06; letter-spacing: -.025em; max-width: 20ch; margin-bottom: 1rem; }

  /* ---------- Feature grid ---------- */
  .feature { background: #fff; }
  .feature .card-body { padding: clamp(22px, 2vw, 32px); display: flex; flex-direction: column; gap: 8px; }
  .feature h3 { font-size: 1.125rem; margin: 0; }
  .feature p { color: var(--slate); margin: 0; }
  .feature .icon { color: var(--gold-text); }

  /* ---------- A day with ... (timeline) ---------- */
  .timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
  .timeline li { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 18px 0; border-top: 1px solid var(--ink-line); }
  .timeline .when { font-family: var(--bs-heading-font-family); font-weight: 700; color: var(--gold); letter-spacing: .06em; }
  .timeline p { margin: 0; color: var(--mist); font-size: 1.0625rem; }
  @media (min-width: 768px) { .timeline li { grid-template-columns: 180px 1fr; gap: 24px; align-items: baseline; } }

  /* ---------- FAQ ---------- */
  .faq { display: flex; flex-direction: column; gap: 12px; max-width: 900px; }
  .faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 0 20px; }
  .faq summary { font-weight: 600; cursor: pointer; padding: 18px 0; min-height: 56px; list-style-position: outside; }
  .faq details[open] summary { border-bottom: 1px solid var(--line); }
  .faq details p { color: var(--slate); padding: 14px 0 18px; margin: 0; }

  /* ---------- Module index ---------- */
  a.dept { text-decoration: none; color: inherit; }
  .dept .more { margin-top: auto; padding-top: 6px; font-weight: 600; color: var(--gold-text); }

  /* ---------- Prose (legal, about, security) ---------- */
  .prose { max-width: 820px; font-size: 1.0625rem; }
  .prose h2 { font-size: clamp(22px, 1vw + 18px, 30px); margin: 2.25rem 0 .75rem; }
  .prose h3 { font-size: 1.15rem; margin: 1.5rem 0 .5rem; }
  .prose p, .prose li { color: #24393C; }
  .prose ul, .prose ol { padding-inline-start: 1.25rem; }
  .prose li { margin-bottom: .4rem; }
  .prose .meta { color: var(--slate); font-size: 15px; }
  .prose .summary-box { background: #fff; border: 1px solid var(--line); border-inline-start: 4px solid var(--gold); border-radius: 12px; padding: 18px 22px; margin: 1.5rem 0; }
  .prose table { width: 100%; border-collapse: collapse; font-size: 15px; background: #fff; }
  .prose th, .prose td { text-align: start; padding: 10px 12px; border: 1px solid var(--line); vertical-align: top; }
  .legal-layout { display: grid; gap: 32px; }
  .legal-nav { display: flex; flex-wrap: wrap; gap: 8px; }
  .legal-nav a { padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-decoration: none; font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; }
  .legal-nav a[aria-current] { border-color: var(--gold-lo); background: #FBF6E9; }
  @media (min-width: 1100px) {
    .legal-layout { grid-template-columns: 240px 1fr; }
    .legal-nav { flex-direction: column; position: sticky; top: 110px; align-self: start; }
  }

  /* ---------- Pricing page ---------- */
  .included { columns: 1; list-style: none; padding: 0; margin: 0; }
  .included li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; break-inside: avoid; }
  .included .icon { color: var(--gold-text); margin-top: 2px; }
  @media (min-width: 768px) { .included { columns: 2; column-gap: 40px; } }

  /* ---------- Switch page ---------- */
  .source-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
  .source-list li { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; font-weight: 500; }
  .moves { display: grid; gap: 12px; }
  @media (min-width: 768px) { .moves { grid-template-columns: 1fr 1fr; } }

  /* ---------- Footer columns (replaces the single footer row) ---------- */
  .footer-cols { display: grid; grid-template-columns: 1fr; gap: 24px; width: 100%; }
  .footer-cols nav { display: flex; flex-direction: column; align-items: flex-start; }
  .footer-cols a { color: var(--ivory); text-decoration: none; min-height: 40px; display: inline-flex; align-items: center; }
  .footer-cols a:hover { color: var(--gold); }
  .footer-head { font-family: var(--bs-heading-font-family); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin: 0 0 6px; }
  /* .footer-cols prefix: ".footer-cols nav" above is more specific than ".footer-platform" alone and would keep this a flex column */
  .footer-cols .footer-platform { display: grid; grid-template-columns: repeat(2, max-content); column-gap: 14px; align-content: start; justify-items: start; }
  .footer-platform .footer-head { grid-column: 1 / -1; }
  @media (min-width: 600px) { .footer-cols { grid-template-columns: repeat(3, max-content); justify-content: start; column-gap: clamp(32px, 6vw, 96px); } }
  @media (min-width: 768px) { .footer-cols { flex-basis: 100%; } }

  /* ---------- Sign in ---------- */
  .auth-wrap { max-width: 520px; margin-inline: auto; }
  .auth-card .card-body { padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; gap: 20px; }
  .auth-card h1 { font-size: clamp(26px, 1.4vw + 20px, 36px); margin: 0; }
  .auth-card .btn-solid { width: 100%; }
  .auth-alt { text-align: center; color: var(--slate); font-size: 15px; margin: 0; }

  /* ---------- Owner app ---------- */
  .app-bar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; margin-bottom: 24px; }
  .app-bar h1 { font-size: clamp(26px, 1.6vw + 18px, 40px); margin: 0; }
  .app-bar .who { color: var(--slate); margin: 0; }
  .mode-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 4px; gap: 4px; }
  .mode-switch button { border: 0; background: transparent; border-radius: 9px; padding: 10px 16px; min-height: 44px; font-weight: 600; color: var(--slate); }
  .mode-switch button[aria-pressed="true"] { background: var(--ink); color: var(--ivory); }
  .mode-switch button[data-mode="training"][aria-pressed="true"] { background-image: var(--gold-metal); color: var(--ink); }
  .app-grid { display: grid; gap: 24px; }
  @media (min-width: 1100px) { .app-grid { grid-template-columns: 2fr 1fr; } }
  .task-list .today-item button { border: 0; }
  .task-empty { padding: 24px 0 8px; color: var(--slate); }
  .app-side .card-body { display: flex; flex-direction: column; gap: 10px; }
  .app-side a { font-weight: 600; }
  .app-status { min-height: 1.5em; color: var(--slate); font-size: 15px; }
  /* ---------- Section tabs (shared by Today and Schedule) ---------- */
  .app-tabs { display: inline-flex; flex-wrap: wrap; max-width: 100%; gap: 4px; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 4px; }
  .app-tabs a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 18px; border-radius: 9px; font-weight: 600; color: var(--slate); text-decoration: none; }
  .app-tabs a[aria-current="page"] { background: var(--ink); color: var(--ivory); }
  @media (max-width: 599px) { .app-tabs { max-width: 100%; flex-wrap: wrap; } .app-tabs a { padding-inline: 12px; font-size: 15px; } }
  [hidden] { display: none !important; }
}
