/* =====================================================================
   Cadence look — shared by /join, the client portal and the office app.

     "It just feels more usable."  "I still want it in my colors. I just
      liked that style."

   Big serif headlines, one calm column, full-width pill buttons, cards
   with room to breathe, and a bar of tabs at the bottom on a phone.

   EVERY COLOUR IS A TOKEN BELOW. The company colour (--brand, --brand-ink,
   --brand-soft) is painted in by SMB.ui.brandTheme() from config.js, so a
   Crescendo client sees Crescendo. The page ground (--c-bg) and the logo
   are still being decided — change them here and nowhere else.
   ===================================================================== */
:root {
  --brand: #E85D52;
  --brand-soft: #FDEDEB;
  --brand-ink: #B8392F;
  --on-brand: #FFFFFF;

  --c-bg: #F6F6F4;          /* page ground */
  --c-card: #FFFFFF;
  --c-field: var(--brand); /* the coloured field behind sign-in cards and on the top bar */
  --c-ink: #17191C;
  --c-muted: #5D626A;
  --c-line: #E3E4E7;
  --c-good: #12805C;
  --c-bad: #B3261E;

  --c-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --c-font: 'Jost', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --c-radius: 20px;
  --c-tabbar: 64px;
}

.c-body { margin: 0; background: var(--c-bg); color: var(--c-ink); font-family: var(--c-font);
          font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
.c-body *, .c-body *::before, .c-body *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

.c-wrap { max-width: 580px; margin: 0 auto; padding-inline: 20px; }
.c-screen { min-height: 100vh; min-height: 100dvh; }

.c-display, .c-body h1.c-display, .c-body h2.c-display {
  font-family: var(--c-display); font-weight: 600; letter-spacing: -.025em;
  line-height: 1.04; margin: 0; text-wrap: balance;
}
.c-display em { font-style: italic; font-weight: 500; color: var(--brand-ink); }
.c-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-ink); }
.c-sub { color: var(--c-muted); margin: 0; }
.c-fine { font-size: 14.5px; color: var(--c-muted); margin: 0; }

/* top bar on the pitch page */
.c-top { display: flex; align-items: center; justify-content: space-between; padding-block: 18px; gap: 12px; }
.c-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--c-ink); }
.c-logo { flex-direction: column; align-items: flex-start; gap: 2px; }
.c-logo img.wm { height: 34px; width: auto; display: block; }
.c-card .c-logo img.wm { height: 30px; }
.c-logo > span { font-family: var(--c-display); font-weight: 600; font-size: 28px; letter-spacing: -.02em; line-height: 1; }
.c-logo small { display: block; font-family: var(--c-font); font-size: 12.5px; font-weight: 400; letter-spacing: 0; color: var(--c-muted); padding-left: 2px; }
.c-logo small b { color: var(--brand-ink); font-weight: 600; }
.c-logo small.from { display: flex; align-items: center; gap: 6px; }
.c-logo img.bl { height: 11px; width: auto; display: inline-block; }
.c-link { background: none; border: 0; color: var(--c-ink); font: inherit; font-weight: 600; padding: 8px 4px;
          text-decoration: none; cursor: pointer; }
.c-link.center { justify-self: center; text-align: center; color: var(--brand-ink); }
.c-link.muted { color: var(--c-muted); font-weight: 500; }

/* buttons */
.c-btn { display: block; width: 100%; border-radius: 999px; padding: 16px 22px; font: inherit; font-size: 18px;
         font-weight: 600; border: 1px solid transparent; text-align: center; text-decoration: none; cursor: pointer;
         background: var(--brand); color: var(--on-brand); box-shadow: 0 8px 22px -14px rgba(0,0,0,.45); }
.c-btn:hover { filter: brightness(.95); }
.c-btn:disabled { opacity: .6; cursor: default; }
.c-btn.ghost { background: var(--c-card); color: var(--c-ink); border-color: var(--c-line); box-shadow: none; }
.c-btn:focus-visible, .c-in:focus, .c-opt:focus-within, .c-link:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 2px; }

/* the coloured field + card, for sign-in and sign-up */
.c-field { background: var(--c-field); padding: calc(40px + env(safe-area-inset-top, 0px)) 16px 40px; }
.c-card { max-width: 520px; margin: 0 auto; background: var(--c-card); border-radius: 28px; padding: 28px 22px 24px;
          display: grid; gap: 16px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.45); }
.c-card h2.c-display { font-size: 36px; }
.c-card .c-logo > span { font-size: 26px; }

/* forms */
.c-lab { display: block; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
         color: #4C5058; margin-bottom: 7px; }
.c-in { width: 100%; border: 1px solid var(--c-line); background: #fff; border-radius: 14px; padding: 13px 14px;
        font: inherit; font-size: 17px; color: var(--c-ink); }
textarea.c-in { resize: vertical; }
.c-opts { display: grid; gap: 8px; }
.c-opt { display: flex; align-items: center; gap: 12px; border: 1px solid var(--c-line); background: #fff;
         border-radius: 14px; padding: 12px 14px; cursor: pointer; }
.c-opt input { accent-color: var(--brand-ink); width: 18px; height: 18px; flex: none; margin: 0; }
.c-opt .t { flex: 1; min-width: 0; }
.c-opt .t b { display: block; }
.c-opt .t span { display: block; font-size: 14px; color: var(--c-muted); }
.c-opt .p { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.c-opt.on { border-color: var(--brand-ink); background: var(--brand-soft); }
.c-err { padding: 10px 12px; border-radius: 12px; background: #FCECEA; color: var(--c-bad); font-size: 15px; }
.c-ok { padding: 10px 12px; border-radius: 12px; background: #E4F4EE; color: var(--c-good); font-size: 15px; }

/* segmented tabs */
.c-seg { display: grid; grid-template-columns: repeat(4, 1fr); background: #ECECEA; border-radius: 999px; padding: 4px; gap: 2px; }
.c-seg button { border: 0; background: none; border-radius: 999px; padding: 10px 4px; font: inherit; font-weight: 600;
                font-size: 14.5px; color: #4C5058; min-width: 0; cursor: pointer; }
.c-seg button.on { background: #fff; color: var(--brand-ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* =====================================================================
   INSIDE THE APP — portal and office share these.
   ===================================================================== */

/* coloured top bar */
.c-bar { background: var(--c-field); color: #fff; padding: calc(12px + env(safe-area-inset-top, 0px)) 18px 12px;
         display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.c-bar .c-logo { color: #fff; }
.c-bar .c-logo small, .c-bar .c-logo small b { color: rgba(255,255,255,.8); }
.c-bar .c-logo img.wm { height: 28px; }
.c-bar .c-logo > span { font-size: 25px; }
.c-bar .who { text-align: right; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.c-bar .who b { display: block; font-size: 15px; letter-spacing: 0; text-transform: none; color: #fff; }

.c-hello { font-family: var(--c-display); font-size: 38px; font-weight: 600; letter-spacing: -.02em; line-height: 1.05; margin: 20px 0 0; }
.c-date { color: var(--c-muted); margin: 4px 0 16px; }

/* a list panel of big tappable rows */
.c-panel { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--c-radius); padding: 18px 18px 4px; }
.c-panel.accent { border-top: 4px solid var(--brand); }
.c-panel h3 { font-family: var(--c-display); font-size: 27px; font-weight: 600; margin: 6px 0 4px; letter-spacing: -.015em; line-height: 1.1; }
.c-row { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--c-line);
         color: inherit; text-decoration: none; cursor: pointer; background: none; border-left: 0; border-right: 0;
         border-bottom: 0; width: 100%; text-align: left; font: inherit; }
.c-row:first-of-type { border-top: 0; }
.c-row .ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
              background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; font-size: 15px; }
.c-row .txt { flex: 1; min-width: 0; }
.c-row .txt b { display: block; }
.c-row .txt span { display: block; color: var(--c-muted); font-size: 15px; }
.c-row .go { color: var(--c-muted); font-size: 22px; }

/* quick add row */
.c-quick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; text-align: center; }
.c-quick button, .c-quick a { background: none; border: 0; display: grid; justify-items: center; gap: 6px; font: inherit;
         font-weight: 600; font-size: 13.5px; color: var(--c-ink); padding: 6px 0; cursor: pointer; text-decoration: none; }
.c-quick i { font-style: normal; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
             font-weight: 700; font-size: 18px; background: var(--brand-soft); color: var(--brand-ink); }

/* bottom tab bar (phones); becomes a left rail on a wide screen in the office */
.c-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--c-field);
          display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
          padding: 8px 4px calc(8px + env(safe-area-inset-bottom, 0px)); }
.c-tabs a, .c-tabs button { display: grid; justify-items: center; gap: 3px; color: rgba(255,255,255,.7); font: inherit;
          font-size: 12.5px; font-weight: 500; text-decoration: none; background: none; border: 0; cursor: pointer; padding: 4px 0; position: relative; }
.c-tabs .ti { font-size: 20px; line-height: 1; height: 22px; }
.c-tabs .on { color: #fff; font-weight: 700; }
.c-tabs .badge { position: absolute; top: 0; left: calc(50% + 6px); background: #fff; color: var(--brand-ink);
          border-radius: 999px; font-size: 10.5px; font-weight: 700; padding: 0 5px; line-height: 16px; }
.c-tabs .badge:empty { display: none; }
.c-has-tabs { padding-bottom: calc(var(--c-tabbar) + 24px + env(safe-area-inset-bottom, 0px)); }

/* sheet (More) */
.c-sheet { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 50; display: flex; align-items: flex-end; }
.c-sheet-card { background: var(--c-bg); width: 100%; max-width: 640px; margin: 0 auto; border-radius: 26px 26px 0 0;
                padding: 20px 18px calc(20px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 14px;
                max-height: 85vh; overflow-y: auto; }
.c-sheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.c-sheet-grid a { background: var(--c-card); border: 1px solid var(--c-line); border-radius: 14px; padding: 14px;
                  font-weight: 600; color: var(--c-ink); text-decoration: none; display: flex; justify-content: space-between; gap: 8px; }
.c-sheet-grid a .n { color: var(--brand-ink); font-weight: 700; }
.c-sheet-grid a .n:empty { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .c-screen { animation: c-rise .3s ease-out; }
  @keyframes c-rise { from { transform: translateY(6px); } to { transform: none; } }
}
